Generic Data Structures

I’m curently taking a class called Data Structures and Algorithms. I decided I’d try to implement some common data structures of my own. These structures are mostly being built in a linked list style with the exception of the List struct which is built on an array that will auto-resize. You might ask, “why are you doing this, when there are already templated vectors and maps and such in the STL?” Mainly because I can!! I enjoy these things, and I…

Read More

Toom-k Polynomial Multiplication

I’ve been pretty busy with classes the past two weeks, but I’ve learned a few neat things and I’d like to share one of them. Multiplying big numbers is a problem when the numbers are really, really big. How big is really, really big? Depends on the hardware your using. But to multiply really big numbers, we represent the two multiplicands as polynomials where each term is in the form cxn, where x is the base in the number system, c is its coefficent modifier…

Read More

Look and Say Numbers Sequence

The very famous John Conway (Conway’s Game of Life) discusses a silly ‘look-and-say’ math trick that I’ve been playing on people since middle school. Who would have guessed such interesting characteristics could come of this sequence? I am inspired by John Conway’s insight into things as simple as this basic sequence. See the video below:

Read More

Public Key Cryptography

In this post I will try to describe how public key cryptography works. Specifically, I will be using a watered down version of the Diffie-Hellman Key Exchange method for my examples of public key cryptography. Public Key Exchange The issue with sharing private keys is that there is no security in the transport of private keys. Public key exchange systems work around this by having two keys known as the Public Key and the Private Key. The two keys are used together to…

Read More

Binary bit fields and flags

If you’ve used any legacy C libraries before, you’ve probably used these things called bit fields, even if you didn’t know what they were. Bit fields are a way to efficiently store multiple boolean values in one or more bytes. If you can imagine an 8 bit integer as binary, each bit would have to be either a 1 or a 0, corresponding to an “On” or “Off” value. With just one 8 bit variable, you can store 8 on/off…

Read More

C++ 2014: auto return deduction and more!

The new C++ standard-in-the-making codenamed C++1y, has some great new features. The most standout addition in my opinion is the ‘return type deduction’ feature which allows functions to use ‘auto’ return types that will be deduced at runtime. There are a few limits on this functionality however. Recursion can only happen if there is at least one return statement that can be evaluated to a non-auto type. For example: // this factorial works auto factorial(int i) { if(i == 0…

Read More

The server is back!

I’ve finally got my server back in service. I’m renting a DigitalOceans Droplet server out of NYC. Currently I am updating parts of my site as I find time. Some of the links found within the site may be unavailable at the moment (for instance I know that my resume is not available) because I am still working on the link generation and click tracking portions of the site.  

Read More