Making Plans with Plantuml

When it comes to building software, diagrams serve as a useful planning tool. One drawback with diagrams is the time it takes to create them. I like using Plantuml to create diagrams because it allows me to generate diagrams through text, saving me time. To get started, you just need to have Java and Graphviz installed. Download the plantuml.jar file and keep it handy, you’ll need it later. Then, create a text file and use the Plantuml language to specify the information you would like to include in your diagram.
Read more →

Measuring Web Requests with Httping

I recently encountered a bug where an http request was taking up to 3 seconds. Once I developed a potential solution, I needed to test the request to see if it was faster with the new code changes. In order to test, I developed a baseline by curling the request without any code changes. Next, I updated the code with the hopeful solution, and curled the request again to observe the change.
Read more →

Pipe it to jq

What is jq? I use jq when I need a quick way to gain insights on JSON in the command line. According to the jq manual, “a jq program is a “filter”: it takes an input, and produces an output.” This post will provide examples of how jq can help you answer questions about JSON. I recommend installing jq and trying out the examples below in your terminal. I’m going to use the Google Books API to query a list of quilting books.
Read more →

Messaging

Message brokers, like RabbitMQ, accept and forward messages between separate applications. Messaging is useful for decoupling applications. This means that different applications are connected through a message broker, but they don’t directly rely on one another. This post will provide an overview of messaging with a focus on AMQP and the publish-subscribe pattern. Another term for message broker is event bus. Publish/Subscribe architecture pattern The publish-subscribe (pub/sub) pattern is a messaging pattern where senders of messages (publishers) do not program the messages to be sent directly to specific receivers (subscribers).
Read more →

SQL GROUP BY using JavaScript

This post explores how PostgreSQL’s GROUP BY clause and JavaScript’s reduce method both have the ability to help you group objects/rows of data based on properties. I’m assuming you are already familiar with both GROUP BY and reduce, and that you are also (mildly) interested in gaining a deeper understanding of each. PostgreSQL’s GROUP BY clause According the PostgreSQL documentation, “the GROUP BY clause is used to group together those rows in a table that have the same values in all the columns listed…The effect is to combine each set of rows having common values into one group row that represents all rows in the group.
Read more →

Interviewing TypeScript

Sometimes JavaScript tries to guess what you mean. For example: true + [] // returns "true" You could say JavaScript is trying to be helpful by not asking any questions and just getting results, but sometimes those results come with a cost. Sometimes you may not find a bug that JavaScript’s guesswork produced until your code is in production. TypeScript helps solve this problem by providing error messages in a more timely fashion
Read more →

Making Filth Finder Faster with Google Cloud

I’ve written a bit about Filth Finder, an app that surfaces health inspections from NYC restaurants near you. Most recently, I wrote about the API that served the restaurants to the frontend. While this implementation worked, it was pretty slow to load. In an effort to speed up the loading time, I rewrote the backend to pull the of index restaurants from Google Cloud Storage. Check out how much faster it loads.
Read more →

Details Oriented

You don’t need JavaScript to implement a dropdown. You can create an accessible dropdown using just the html <details> element. This post will cover how I implemented a dropdown menu for an app I recently created called Congress Connect. I first learned about this element at a BrooklynJS meetup almost a year ago. There was a really cool talk, and the slides are excellent, and I highly recommend reading them if you are interested in learning more than this post covers.
Read more →

Geocoding with NYC’s GeoClient API

Filth Finder is an application that loads NYC restaurants near you and allows you to view health inspection violations at each restaurant. One problem that had to be solved when developing Filth Finder was how to calculate the distance between the user and all of the amazing restaurants NYC has to offer. The NYC Open Data API provided the addresses for each restaurant, but Filth Finder needed the geolocation of those restaurants.
Read more →

Filth Finder: React Hooks Rewrite

Have you ever walked around NYC looking for a place to eat? Have you ever wished there was a way to find the health inspection info for restaurants near you? Well, now you can do that using Filth Finder, a React app with a Rails backend. This application fetches data from the NYC Open Data API. I recently took the opportunity to rewrite one of the components using React Hooks!
Read more →