A few months back, I was reading about HTTP status codes — as one casually does — when I stumbled across 2 gems:
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 distinction, and why it matters. Error handling — the difference between developing and engineering — requires understanding the role all actors play in a system. …
Before making your sauce:
In short: steep your spaghetti in tea instead of plain water. …
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 boilerplate, the learning curve, the performance, or the upgrade process. My beef with Angular is far more fundamental and perverse. …
This wasn’t painless. But now that I’ve figured it out, I want to save you Google-ers out there some time.
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.
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. …
Before we talk code, we will clear up 2 misconceptions about stock investing, namely:
Then, we will discuss the technical side of stocks, particularly focused on Quantopian algorithms, alpaca.markets, and deployment with Docker on an AWS EC2 instance.
Relax, it’s all right here in GitHub. Don’t forget to star the repo!
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 unlike the lottery, the numbers are in your favor. …
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. …
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 loading scripts. Depending on your use case, you may want to retry the request with a different host, notify an SLA tracker, or notify a 3rd party UI developer about their web component taking too long to load. …
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!
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 and cancel behavior. …
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 web app testing to your React-Native mobile app, with a few tips and tricks along the way. …
You have an Expo.io app, and you’re ready to deploy your web version. I’ve deployed on GitHub.io 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:
Deploying any GitHub pages static site on github.io is simple. First, Install gh-pages
as a devDependency in your project. …