James Larisch

I write not from wisdom but out of a desire to achieve it

Read this first

Distributed Hash Tables: Introduction

This post assumes you have ~ 1 or more years of programming or Computer Science experience. I’d say if you’re comfortable with hash functions & some basic network ideas, there’s something here for you. This series of posts is designed to explore the purpose, design, and function of Distributed Hash Tables; specifically & eventually Kademlia, which I am implementing here.

 The Problem

Sharing files is not easy. Locating and hosting files across the internet is particularly challenging. As a webmaster, you are free to host files on your HTTP server and serve these files up to any user that visits your website. One might have a few complaints with this situation, however:

  • One can only see the files you choose to upload; the selection is limited.
  • You might take these files down, at which point one can no longer download them.
  • If your website becomes popular, you might have trouble

Continue reading →

What is a Bloom Filter, Really?

 When are sets not enough?

As we’ve seen, sets provide a powerful and efficient solution to specific problems. They allow you to efficiently determine if something belongs in a certain categorization, or not. Have I seen this song before? Have I seen this computer before? Have I seen this SSL certificate before?

Normal sets also store information about anything that has been inserted - this usually means you can enumerate over the inserted elements (in no particular order, of course).

Sets are fast - but normal sets take up quite a bit of space. If you want to view the contents of the set, you must store each element in its entirety. What if you forwent this ability and tried to store a shortened version of each element? Perhaps you only care if the inserted elements are in the set or not. Maybe the first 5 characters? Maybe a hash of the element? Both techniques suffer from the same

Continue reading →

What is a Bloom Filter?


Sets are useful mathematical abstractions. They are also useful and ubiquitous programming abstractions. Typically, we are concerned with the membership of elements within a set. Is the element we’re talking about in the set, or not?

Think about sets as unordered collections of unique elements. You could construct a set of all blue items in the world. The group of all real numbers is a set. The group of all integers is a set. So on and so forth.

Sets provide constant-time lookup operations on average. Let’s say your program builds up a group (read: not list) of a user’s favorite artists based on songs he or she has liked. When the user favorites a song performed by an artist already in the list, you don’t want to duplicate any work, so you use sets to ensure the items in your collection are unique. If you need to check if something is in your set, you can rest assured it will be

Continue reading →

A Pinch of Internet Protocol and a Dash of Routing

After typing in your favorite search engine, duckduckgo.com, into your web browser’s address bar, a complex series of events occurs once you hit the Return key.

It’s too much to cover in one blog post, but I’d like to cover part of the process of communication between your computer and DuckDuckGo’s server.

 IP Addresses

Every computer1 on the internet is assigned an Internet Protocol address, or IP address.

IP addresses take then form Four numbers from 0 - 255, separated by periods.

The range [0, 255] includes 256 numbers. 256 is equal to 2 to the power of 8, or 28.

Screen Shot 2016-05-29 at 7.09.20 PM.png

This means it takes 8 bits to represent all numbers from 0 to 256. Since we have 4 of these numbers, IP addresses are expressed in 32 bits. This means we can express 232 or 4,294,967,296 unique IP addresses using this scheme.

For now, let’s just say your computer is assigned one of these numbers

Continue reading →

What is SSL?

Secure Socket Layer, otherwise known as TLS (Transport Layer Security) keeps the internet safe. I’ll use the two acronyms interchangeably, despite TLS being the correct one.

If you’ve ever heard someone say, “don’t give sensitive information unless you see the green lock in the address bar”, you’ve used (and been instructed to use) SSL. If you’re using SSL, your address bar should say https://....

TLS/SSL facilitates an encrypted connection between a given client and a participating server. Let’s say I host and run a dating website. Technically speaking, this means I run a web server on a computer somewhere, connected to the internet. This web server runs on port 80.

You are a member of my dating website - you’re updating your profile while sitting at a Starbucks, chilling on public WiFi. Since the (TCP) connection between your web browser and my web server is not encrypted, all

Continue reading →

The Serial Intern

I worked at HubSpot for 7 months and have currently been working at Gem for almost 6 months. I have yet to graduate.

I, like almost every student at Northeastern University, am a serial intern.

Northeastern, like other co-op schools, sends students to work for 2-3 periods of 6 months within their 5 year stints as a ‘student’. Software engineering work and computer science study blend to perfect synergy. Looking past the mind-numbingly high price-tag of NEU, this medley of experience has been spectacular.

I think everyone should embrace the intern mentality - it’s learning at its purest.


Often the first few months at a job are the most stressful. But they also tend to be absolute catapult-periods in terms of knowledge and skill-acquisition.

You’ll almost certainly be

  • Learning a new style of project-management and process
  • Learning new technologies, languages, and

Continue reading →

Making the Case for Haskell

This was originally posted on the blog over at Gem. Check them out!

 A Rubyist’s Lament: The Imperative Issue

At Gem, we are passionate about creating the world’s most reliable and secure API for developers who want to integrate Bitcoin wallets into their applications. Ruby is a fantastic and elegant language for getting this done, and paired with the actor-based Celluloid library it makes for a concurrent, rock-solid system that does exactly what we need it to. That being said, we also love exploring other ways of developing and thinking about software.

Haskell is a wonderful example of how different a language can be, and I’d like to examine some of the differences between Ruby, a language I enjoy using every day, and Haskell, a language I’ve enjoyed exploring.

 Pure Functions & Global State

Back in elementary school, you ran into things like y = f(x). Let’s create a Ruby method

Continue reading →

The Mystical Properties of Programming, or Why I Chose Haskell

I was attracted to programming initially because it gave me the power to be superior.

I can only assume others in our industry arrived here for similar reasons - why else would the software engineering landscape be rampant with ‘everything new sucks’ hate and vicious elitism / condescension?

That is the dark side of the force, in a sense. On the opposite side of elitism under the spectrum of superiority is curiosity, awe, and a voracious desire for understanding that which so many do not.

Certain programming languages have attracted me more than others for this very reason. Some programming languages give off a magical, sparkly aura.

The Ruby programming language had me under this spell from the get-go. The frequent references to Taoism, Buddhism, the Way, made Ruby appear as a mystical and possibly even dangerous tool - but if wielded and understood correctly… it was a beautiful

Continue reading →

Real Life™ + UI programming = FRP (or why Elm is awesome)


A piece of software that requires and reacts to user interaction is akin to a car. I’m no car guy - but when I press on the accelerator, my car’s velocity increases. When I hit the brakes, the brakepad hit my tires and the car begins to slow down.

I imagine slamming the brakes in a car is direct, short trip for the electrical system. When brakes are in ‘slammed’ state, the brakepad are hitting the tires. This makes sense & there’s no mental hurdle to jump to understand it.

In simple terms of input: I as the user am inputting 'brake’. I get a car that is slowing down. In other words - whenever the brakes are down, the car is slowing down. Whenever the steering wheel is turned to the left, the wheels are turned to the left. It’s tempting to say that my input determines the state of the car, but I don’t think that’s ambitious enough.

The input is the state of the car. They

Continue reading →

Stellar seems like the anti-cryptocurrency

Stripe recently announced their support of the Stellar project. Unfortunately the introduction page is the only non-source technical insight anyone has into the inner workings of the Stellar system. But after reading the introduction it’s clear that Stellar lacks the decentralization and trustlessness that the Bitcoin protocol readily boasts. It attempts to solve the seemingly important problem of converting any currency into any other, while being as decentralized as possible. But what can it accomplish that Bitcoin can’t?

Stellar is, essentially, a universal credit system. If you have 10 USD, you can bring that USD to a computer in the Stellar network and give the USD to that computer. The computer will give James a 10 USD. The network agrees that you gave 10 USD to that computer, let’s call it computer A. The full certificate would be more like 10 USD, A.

If James tells Steve he

Continue reading →