Code by Zack

I periodically share web development tips and tricks as I learn.

Upgrading Elf Help to GPT 3.5 Turbo

In my previous post, I mentioned that [ElfHelp.ai](https://www.elfhelp.ai) is not on gpt-3.5-turbo because the prompt is designed to get the proper JSON formatting from text-davinci-003.

Streaming responses from OpenAI to Next.JS on Vercel

ElfHelp.ai uses GPT-3 to help you brainstorm gift ideas and then search for them on Amazon, Google, and Etsy. Because GPT-3 models are not so fast it was timing out often. By streaming the response, we keep the edge function alive and also set the stage for user experience improvements like accurate progress bar loading and/or streaming results to the UI.

Animating with CSS Translations

I heard CSS transitions were the rage, so I converted the hamburger menu to use CSS transitions, thinking it would take advantage of cool-sounding technology like "GPU-acceleration."

Introduction to Swift

In June at WWDC, Apple announced Swift, a new programming language to replace Objective-C. Swift is intended to be more resilient to erroneous code ("safer") than Objective-C and also more concise. Apple began accepting Swift app submissions to the App store in September, when the language hit version 1.0.

Why Use Callbacks?

If you've never seen a callback before, you might be curious why we use them. Consider the following two code examples from a weather app, both of which get the weather from the Internet and show it on the screen.

Introducing Fiber

Over the past couple weeks, I built a new tool called Fiber, a content engine that makes it as easy as possible for technically-minded folks to build and update small-scale websites and web applications.

Deploying Static Node.JS Sites

I work with a lot of people who are just starting to learn web development. Often they develop by creating a folder on their computers, populating it with HTML, CSS, and JavaScript files, and opening it with a web browser.

Setting up PostgreSQL on Ubuntu

I'm continuing this linux tools / installation series because in recent days I've found it to be very helpful to look at whenever I get tripped up, and also because it's an area that is a little harder to just google and be sure the result will work.

Setting up RVM on Amazon EC2

Today we're going to go over how to set up RVM on an Amazon EC2 server. This should work seamlessly if you have used Amazon EC2 before, but often these types of things don't go exactly as planned.

Introducing Socktalk

While I was working at Brewster last summer, I worked with socktalk, a lightweight socket.io proxy by John Crepezzi.

Introducing Notorious

A couple days ago, I released a new library to RubyGems. It's called notorious, and it's a command-line application that allows you to take notes in markdown and then view them all spiffed up in the browser.

Setting up RVM on Ubuntu

Today we'll go over how to set up RVM on Ubuntu. In theory, this should work seamlessly, but often these types of things don't go exactly as planned.

Setting Up Passenger with RVM on Ubuntu

Today I'm going to quickly continue the recent trend of logging installation details on this blog for reference and for anyone who cares to read. Today is Phusion Passenger.

Brewster

This summer I've been working in New York City at a startup called Brewster. Brewster is "your personalized address book."

Destroying constructor.prototype.constructor

Two days ago we replicated the new operator in JavaScript. In doing so, I noticed a quirky little trend with inheritance, and decided to look into it. In this post, we'll do just that, and then we'll also replicate the instanceof operator, since it can be equally confusing as new.

Including jQuery

No ramblings today, just a quick snippet on the (subjective) best way to include jQuery on your page.

JavaScript's new operator

The other day -- in order to understand it a little better -- I wrote a method to replicate the behavior of the new operator.

Hello!

Welcome to my brand new space for thoughts/mostly simple coding tutorials. In my time learning to program and build web applications, there have been countless times when someone's post or article has helped me grasp a concept or figure out a problem much more quickly than I would have alone.