Sign in

Harvard. Software Engineer. American.

And why and when you shouldn’t

Think about who you’re telling game over — just because the player failed doesn’t mean the game failed. Photo by Sigmund on Unsplash

A few months back, I was reading about HTTP status codes — as one casually does — when I stumbled across 2 gems:

  1. Return code 418 is “I AM A TEAPOT”. It’s an April fools joke — well, as close to a joke as us nerds can muster. I’ll have a link at the end of the article.
  2. 4xx responses are for client-caused failures, while 5xx responses are for server-caused failures. These are different.

I knew this in the back of my mind, but it wasn’t until I worked on a particular project until I realized the wisdom behind this…

…has a lot to do with treating spaghetti code

Photo by Mae Mu on Unsplash. Not the final product of our recipe — try the recipe yourself!

Our Secret Family Recipe

Before making your sauce:

  1. Fill a pot with water. Add salt — we advise a lot. Add oil if you want; we don’t.
  2. Set the burner on low, or not at all, if you have the time.
  3. Add sweet spices, like basil or marjoram. Mix them into your water a bit. Like tea.
  4. Let it sit for a while. Maybe you start on the sauce.
  5. When you’re ready to make the pasta, boil the spaghetti in the sweet herb tea.
  6. When draining, don’t rinse the pasta.

In short: steep your spaghetti in tea instead of plain water. …

How the framework fosters deception and undermines the basis of civilization

Kinda what I looked like when I uncovered Angular’s fatal flaw. Photo by Tim Gouw on Unsplash

Angular Is Not All Awful

I’ve worked with Angular professionally, some good and bad codebases. I have to say, most of Angular is fine. Many parts are actually pretty neat — I’m a fan of how much it uses reactive programming concepts, exposes web component support, and provides a nice dependency injection system.

Some of the concepts and structures are similar enough to Spring that some of my junior backend colleagues were able to find their way around the codebase — which is valuable in-and-of-itself.

But, there is at least one thing that can go horribly wrong with Angular.

No, I’m not talking about the…

Hopefully, I’ll save you from getting her headache. Photo by Aiony Haust on Unsplash.

You’d imagine free public datasets would be painless

This wasn’t painless. But now that I’ve figured it out, I want to save you Google-ers out there some time.

What’s Google Colab?

Colab is a way to run Python Jupyter Notebooks on the Cloud, for free. It’s provided by Google and integrates with Google Drive. Very clean way to handle “but it doesn’t work on my computer!” issues.

See the “Resources” section at the end of this article for a link.

What’s Kaggle?

Kaggle is “Your Home for Data Science”. It hosts public datasets and competitions revolving around Data Science and Artificial Intelligence. It adds a sense of gamification to it as well. …

Deploying algorithms for live (or paper) trading with Docker

Build your own compass for finding your way through the market. Photo by AbsolutVision on Unsplash

Before we talk code, we will clear up 2 misconceptions about stock investing, namely:

  • stocks are a zero-sum lottery (investing is not, trading may be)
  • investing can be a moral hazard (not acting may be worse)

Then, we will discuss the technical side of stocks, particularly focused on Quantopian algorithms,, and deployment with Docker on an AWS EC2 instance.

But First, Where’s The Code?

Relax, it’s all right here in GitHub. Don’t forget to star the repo!

This Is Not Gambling

For some reason, some people think trading stocks is an entirely risky affair, akin to the lottery. There is some risk involved (depends on the stock!), yet…

Never lose a form submission again

Now that’s what I call local storage! Photo by Aneta Foubíková on Unsplash

Story Time: Moodle Quizzes

Some years ago, I used an open source LMS called Moodle (comparable to Blackboard or Canvas, if you’ve heard of those). At the time, it was not the prettiest, but it worked well enough, and the school could not complain about the price. I really only had one complaint.

When taking a test/quiz in Moodle, it would pop up a reminder about how much time you had left. Not the smoothest user experience (UX), but understandable at the time. However, if you were typing a response, the text area would suddenly be de-selected. …

Resolve. Reject. But what about neither?

Race your promise against the clock. Photo by Jonathan Chng on Unsplash

Promises are a nice way to wrangle your asynchronous JavaScript. When they resolve or reject, you can easily view how these 2 outcomes are handled with Promises.

However, asynchronous tasks have 3 scenarios: resolve, reject, or neither. The latter scenario, combined with delayed resolution/rejection, often goes unconsidered in our JavaScript code, perhaps assuming the underlying library is mature enough to eventually reject operations that take too long. However, this may not be the case — and if it isn’t, the handling required may not be exactly the same as any other error.

For example, consider slow network requests, database operations…

Or: How to Cancel That Embarrassing Email

Photo by Andrej Lišakov on Unsplash

Ever send an email you immediately regretted, or click submit even when you noticed something was wrong? “Where’s the red X? Can I quickly stop that?”, you cry!

Promise Methods

In Javascript, asynchronous behavior is captured with Promises. While they are cleaner than callbacks and are deeply integrated with the language (async and await), Promises have very few methods: then accepts a callback which is run when the behavior succeeds, catch runs a callback upon failure, and finally runs in both scenarios. cancel is not among these standard Promise methods.

Let’s see how we might work go about breaking the Promise interface…

What mobile app testing feels like. Ow. (Pen and paper? Seriously? :) ) Photo by freestocks on Unsplash

It is tricky to set up automated testing of mobile apps. Maybe you’re on a small project and your Jest + Enzyme unit tests aren’t giving you the ROI you want. Maybe you want to test network error scenarios or time-sensitive logic, but don’t have the means to do so in your current app framework. Your friends in the web-development world tell you about Cypress, but they don’t have a React-Native mobile app to test.

There’s a way to bridge the gap that doesn’t require rearchitecting your app. In this article, I lay out how to apply the best of…

Use Expo Web to Deploy to with Continuous Delivery Scripts

Your phone, your code, and your localhost:19006 site — all that’s left is deployment! And coffee. That mug is totally empty. Photo by Christopher Gower on Unsplash

You have an app, and you’re ready to deploy your web version. I’ve deployed on for free and hit a couple 100% avoidable issues — since then, it’s been smooth sailing with 1 command to deploy to production.

By the end of this article, you will know how to:

  • Deploy your website (for free) on
  • Connect a (not free) custom domain to your website (and keep it connected by modifying your build script)
  • Write a single script to test (if you have those), build, then deploy your app to production (essentially, CI/CD).


Deploying any GitHub pages static…

James Fulford

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store