My name is Nathan and this is my internet home. I like to write code and then write things about the code here. Please, make yourself at home. If you need anything just get in touch

June 19, 2017

A Tale of Two Keys

My math research teacher Mrs. K would usually explain mathematical concepts to me using stories and riddles. On the subject of encryption, she proposed this thought problem: A man and a woman are lovers who have become separated from one another. They can communicate through the mail, but there’s a problem - The post office can open and read all of the mail that comes through the system. The couple wants to exchange secrets, so they decide to send their mail locked in a box, which can be opened with a key. ... Read more

May 18, 2017

The Minesweeper Interview Problem

I have a friend who was asked, during a coding interview, to write their own version of minesweeper from scratch. I found this anecdote amusing, as I have never encountered this problem during any interview I’ve ever taken. Sure, I’ve gotten take home assignments that generally require real-world tasks, but never making a game from scratch. And according to this friend, this was a whiteboard interview. Tall tale or not, it’s still a pretty neat story. ... Read more

May 9, 2017

Let the fors flow through you

What’s wrong with var? Well, a great many things, but is it really that bad? Kind of. I can’t find any good reasons where var gives you a legitimate advantage over let or const. All other major languages use block scoping, and with the ES6 initiative to welcome a new class of developers who come from stricter, safer languages, the var keyword will only cause confusion. On top of that, the light restrictions of const will enforce better paradigms like functional, data-driven programming and immutable data structures. ... Read more

May 4, 2017

To vim or not to vim

I am not good with vim. I use it for git commits and for when my bash-fu is not strong enough to make file changes with one command. I like it better than nano. For a while now, I’ve been trying to change my ways. vim is everywhere. It’s on Linux. Linux is everywhere. To achieve at least some level of proficiency with the vim text editor could give one a tremendous advantage working within a shell. ... Read more

April 18, 2017

Getting Your React Native Drawer to Behave Juuuuuuust Right

The “native” half of React-native is why so many web developers get so giddy about it. A technology that binds to native mobile platform APIs on top of the already-popular React library is a welcome addition to the new wave of web-to-mobile solutions, many of which rely on custom components rendered within webkit (which is also still great). Where React-native shines is that your picker will look like an iOs picker, your buttons will fade that right way when you click it, and the app will just “feel” like a real app. ... Read more

November 12, 2016

A Meditation on Redux

I’ve been thinking about Redux lately. Everybody and their mother (and my mother) loves Redux, and that makes sense. The Redux team (read: Dan Abramov) bestows philosophical documentation that explain the three noble truths of Redux - the main one being that reducers are pure functions of state and action. With immutable state, your application becomes much more predictable and testable. If this sounds simple and you are asking why it isn’t just incorporated into the design of state-based rendering libraries like React, it’s because it kinda sorta is with flux, a library/design pattern used internally at Facebook of which Redux builds upon. ... Read more

October 8, 2016

Working with geolocation on a non-secure site

The last couple of days, our small development team BrutSoft was working on some legacy code written by our friend Harvey for his app “Pick-up”. It is a simple web-app that organizes pick-up soccer games, sending out texts through Twilio’s SMS service. We wanted to expand this app to work on a mobile platform through the Ionic framework, add an authentication service, and extra geolocation features. I opted to implement the geolocation features, initially utilizing the HTML5 native navigator. ... Read more

August 2, 2016

The Objects of My Affliction

Javascript objects are a cozy bunch. To define an object in javascript in the most basic, literal sense, you would write: var myObject = {}; Keys and values may then be defined with bracket or dot-notation syntax, and objects are all instantiations of the parent Object of which it inherits other methods and properties. This syntax for displaying objects in Javascript has helped me to understand how objects are organized in other programming languages. ... Read more

© Asuka Suzuki 2016