Tutorial

Javascript Call Stack and Memory Heap

Javascript Call Stack and Memory Heap

This is a brief overview of how the Javascript engine uses the call stack and memory heap to keep a hold of the execution context. The engine needs to track where we are in the code (call stack) and somewhere to store and remove values (memory heap)

honeypot email: objekt@objekt.click

Javascript Engine

Javascript Engine

A Javascript engine translates javascript to something a computer can understand. Anyone can make a JS Engine as long as they adhere to ECMAScript standards. For example, the V8 Engine, made by Google in 2008, was created to resolve the problem of rendering Google Maps efficiently. Before that, JS engines were very basic. Chrome browser and NodeJS use V8.

Big O Notation Explained Quickly

Big O Notation Explained Quickly

Big O Notation is a system that measures and compares the performance of code. It introduces specific vocabulary to relay information about how well an algorithm or piece of code is optimized.

This means we need a general language to say how fast a piece of code processes data and how efficiently it allocates and uses memory for its operations. Here we go through what this exactly means.

DNS or Domain Name System Explained Quickly

DNS or Domain Name System Explained Quickly

When a domain is registered, you need to somehow route visitors to your website through this domain. So how do you do that? You’re often asked to add a CNAME, A, MX, or TXT record. If you’re like me and have followed these instructions, somehow magically everything works. Your domain suddenly points to your website, your emails get into your domain registered email, and you can access the Google Search Console. But how does that actually happen? What is DNS or Domain Name System? What are DNS Records? I’ll tell you here…

React Testing Library: Learn by Coding

React Testing Library: Learn by Coding

I’d like to code a simple React “mini jeopardy” game. I will use the React Testing Library to test each of the components. To summarize the game, you get presented with 5 “cues”, click on one and answer it. The game calls the http://www.jservice.io API and makes use of their clues endpoint to return data from the year 1996 in the science category. It picks 5 random valid cues from the first set and sorts them according to their value.
S3: A Flexible Approach to Uploading in Rails

S3: A Flexible Approach to Uploading in Rails

S3, Amazon’s Simple Storage Service, is a cheap, scalable, highly available, and overall great solution for storing huge bits of data and thus reducing your database size. For a while now, we’ve realized that our database is on its path to becoming expensive and unmanageable due its massive size. So we decided to migrate some of that data over to S3. In this article, I explain the approach we took to make any attribute S3able
Docker: the Problem with MacOS Catalina

Docker: the Problem with MacOS Catalina

We have been switching our local development setup slowly, but successfully to docker with NFS for speed. Almost everyone at the company is developing on a Mac system and so with the new Catalina release, everyone either pressed the “Update” button, or, like me, woke up to a new OS, got their cup of coffee, and typed in docker-compose up.

honeypot email: objekt@objekt.click

Dry Schema: Decouple Validations from Rails Models

Dry Schema: Decouple Validations from Rails Models

Standard Ruby on Rails best practices suggest that we should define our validations on the model object. RoR gives you the tool, aka DSL (domain specific language), to implement these validations. For simple situations, say a signup form, this works really well, but what about more complicated scenarios? What if your model serves several different controllers? Or what if, for example, different types of users could submit different values to the same model? Do we want to use messy ifblocks to check the user type and apply the correct set of validations? Probably not. So what’s the solution? Enter Dry-schema.