Jekyll2018-01-08T20:55:55+00:00https://kirubarajan.com/kirubarajan.comA crash course on Arun Kirubarajan.Deep Learning Specialization Review2018-01-08T00:00:00+00:002018-01-08T00:00:00+00:00https://kirubarajan.com/coursera<p><strong>This post is a work in progress as I work through the <a href="https://www.coursera.org/specializations/deep-learning">Deep Learning Specialization on Coursera</a>.</strong> My education background (in addition to competitive programming experience) includes a course in discrete mathematics, single variable calculus, high school linear algebra (Ontario) and high school data management.</p>
<h1 id="about">About</h1>
<p>Andrew Ng, a professor at Stanford who bootstrapped AI initiatives at Google and Baidu, put out the holy grail of CS courses in 2008: Machine Learning. Since then, a LOT of progress has been made in machine learning, namely the rise of deep learning. As such, he’s launched a new initiative named <a href="https://deeplearning.ai">deeplearning.ai</a> and has created a 5-course specialization on <a href="https://www.coursera.org/specializations/deep-learning">Coursera</a>, a free to access MOOC (online course for any internet user).</p>
<p>I tried working through the 2008 course and found it too challenging (I was in high school) and I didn’t like Matlab/Octave. Since the new specialization is in Python/Tensorflow and my school doesn’t offer a deep learning course, I decided to work through the specialization. I put my Netflix skills to the task and binge-watched the first course over my Winter Break and am working through the subsequent modules. Here are my thoughts:</p>
<h1 id="course-1-neural-networks-in-deep-learning">Course 1: Neural Networks in Deep Learning</h1>
<p>My first impression is that the mathematical rigor seems to be a little toned down from the 2008 class. Since the class eases you into the idea of a neural network as a mathematical concept, the first week introduced a high-level model of deep learning and gets more rigorous as the weeks go by. This introduction makes the course less daunting to beginners but I often felt like the material was repetitve (i.e. “didn’t we just go over this?”). The course also assumes very little mathematical background and introduces most topics like natural logarithms, vectors/matrices/tensors, and derivatives(!).</p>
<hr />arunThis post is a work in progress as I work through the Deep Learning Specialization on Coursera. My education background (in addition to competitive programming experience) includes a course in discrete mathematics, single variable calculus, high school linear algebra (Ontario) and high school data management.k-Nearest Neighbors2017-12-08T00:00:00+00:002017-12-08T00:00:00+00:00https://kirubarajan.com/knn<h1 id="an-overview">An Overview</h1>
<p>It is recommended to begin your machine learning journey through the k-Nearest Neighbors (kNN) algorithm since it’s a very easy machine learning algorithm to understand and implement (and one of the most fun!). kNN is a supervised classification algorithm in that it allows us to determine which category a given input belongs to.</p>
<p>k-Nearest Neighbors is also called a <strong>Lazy Learning</strong> algorithm. Whereas many machine learning algorithms will develop generalizations about the data as its being loaded (also known as <strong>Eager Learning</strong>), kNN delays any computation related to the data until we ask the model to classify a new input. This makes the algorithm relatively easy to implement, but also computationally expensive if we need fast queries. Regardless, kNN is a good algorithm to begin with since the intuition behind it is fairly easy to grasp conceptually.</p>
<h1 id="the-algorithm">The Algorithm</h1>
<p>At a super high level, when we input a new datapoint <script type="math/tex">P</script> to be classified, the k-Nearest Neighbor algorithm works by taking the <script type="math/tex">k</script> most similar datapoints to <script type="math/tex">P</script>. Whichever class the <script type="math/tex">k</script> datapoints are a part of will ultimately be what class <script type="math/tex">P</script> belongs to.</p>
<p>Although the algorithm is easy to implement, the data wrangling/analysis is often still a difficult task with kNN. Let’s take an example by looking one of my favourite philosophical questions: what differentiates pants from shorts? Assume we have a labelled dataset of pants and shorts (with descriptions about each instance such as price, color, length, thickness etc).</p>
<h2 id="existential-datapoint-questions">Existential datapoint questions</h2>
<p>Like many of us, our datapoint <script type="math/tex">P</script> is having an existential crisis: “where do I belong?”. Thankfully, through Euclidean geometry, we can help <script type="math/tex">P</script> answer her question by seeing where the datapoints she is most similar to belong.</p>
<p>There are many ways to calculate similarity between two peices of information. For example, we can use the <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming Distance</a> (the number of different positions between two bit sequences) or the <a href="https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance">Levenshtein Distance</a> (the number of edits it takes to change one piece of information into another). However, the distance calculate we are probably most used to using is <strong>Euclidean</strong> Distance (the distance between two elements on a plane).</p>
<p>In 2 dimensions, we can calculate the distance between two points <script type="math/tex">p</script> and <script type="math/tex">q</script> using the Pythagorean Theorem, or more formally as <script type="math/tex">d = \sqrt{(p_1 - q_1)^2 + (p_2 - q_2)^2}</script> where 1 and 2 represent the first two dimensions of <script type="math/tex">p</script> and <script type="math/tex">q</script> (in this case <script type="math/tex">x=1</script> and <script type="math/tex">y=2</script>). When we change this to 3 or more dimensions we can rewrite this as <script type="math/tex">d = \sqrt{\sum_{i = 1} ^{n} (p_i - q_i)^2}</script> where there are <script type="math/tex">n</script> dimensions. If this math scares you, don’t worry - we’ll stick to 2 dimensions for this guide so you can rely on our friend Pythagoras.</p>
<p>At a slightly lower-level (using Euclidean geometry), given a new datapoint <script type="math/tex">P</script>, if we were to plot our labeled data in some coordinate system, we could retrieve the <script type="math/tex">k</script> <strong>closest</strong> datapoints to where <script type="math/tex">P</script> would be plotted. Intuitively, whichever class the most <script type="math/tex">k</script> datapoints belong to will be indicative of what class <script type="math/tex">P</script> belongs to.</p>
<h2 id="plotting-pants">Plotting pants</h2>
<p>The obvious answer to my above question about differentiating between pants and shorts is <code class="highlighter-rouge">"length"</code> (with an implicit ‘duh’). Unsuprisingly, this is actually really good insight for thinking about how we will plot our dataset of pants and shorts.</p>
<p>We want to plot all the pants in our dataset using axes that correspond to the different attributes (or <strong>features</strong>) that tell us the most about whether a given garment is either pants or shorts. To keep us thinking in 2 dimensions, we are going to select two features (resulting in 2 axes): length and price.</p>
<p>Now, we can plot the pants and shorts accordingly on the graph by designating length to be one axis and price to be the other. Using the Euclidean distance between <script type="math/tex">P</script> and the other datapoints, we can determine the <script type="math/tex">k</script> nearest neighbors. In python, the distance function will look something like this:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">((</span><span class="n">length1</span> <span class="o">-</span> <span class="n">length2</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="p">(</span><span class="n">price1</span> <span class="o">-</span> <span class="n">price2</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
</code></pre></div></div>
<p>After calculating distances by inputting the length and price of <script type="math/tex">P</script>, we can obtain the <script type="math/tex">k</script> nearest neighbors by sorting the list of datapoints by the distance to <script type="math/tex">P</script> and taking the first <script type="math/tex">k</script> elements:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">neighbors</span> <span class="o">=</span> <span class="n">datapoints</span><span class="p">[:</span><span class="n">k</span><span class="p">]</span>
</code></pre></div></div>
<p>Finally, we can iterate over <code class="highlighter-rouge">neighbors</code> and count the number of pants to see if <script type="math/tex">P</script> is a pair of pants - a fairly short(s) algorithm!</p>
<h2 id="faq">FAQ</h2>
<p><em>Why do we take the <script type="math/tex">k</script> nearest neighbors to <script type="math/tex">P</script> instead of the <strong>nearest</strong> neighbor?</em></p>
<p>Taking the nearest neighbor to <script type="math/tex">P</script> is often going to result in outliars in the data to dictate the classification, which is why taking <script type="math/tex">k</script> neighbors results in a more “democratic” selection.</p>
<p><em>How can we find the optimal value for <script type="math/tex">k</script>?</em></p>
<p>Although <script type="math/tex">k</script> is a hyperparameter that we can set, certain values are obviously better than others. A general rule of thumb is often to set <script type="math/tex">k = \sqrt{n}</script> where there are <script type="math/tex">n</script> instances of data. However, there exist more <a href="https://en.wikipedia.org/wiki/Cross-validation_(statistics)#K-fold_cross-validation">advanced techniques</a> to determine optimal values for <script type="math/tex">k</script>.</p>
<hr />
<p>This has been a very brief introduction to the math and intuition behind kNN. There is still a lot more to the algorithm that I haven’t touched upon such as normalizing parameters and eliminating bias, but I’d start by actually implenting the algorithm. For a more complete understanding check out <strong>these links</strong>:</p>
<ul>
<li><a href="http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html">Scikit Learn (try using kNN for yourself)</a></li>
<li><a href="https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm">Wikipedia (actually a very comprehensive resource)</a></li>
<li><a href="https://nlp.stanford.edu/IR-book/html/htmledition/k-nearest-neighbor-1.html">Stanford NLP (math-y but very to-the-point)</a></li>
</ul>
<hr />arunAn OverviewWhy does 0! = x^0?2017-12-04T12:00:00+00:002017-12-04T12:00:00+00:00https://kirubarajan.com/basecases<p>If you’ve ever taken a class in algebra or statistics, you would probably know from memory that <script type="math/tex">0! = 1</script> and <script type="math/tex">x^0 = 1</script> (for any real number <script type="math/tex">x</script>). But why?</p>
<h2 id="0-as-a-base-case">0! as a base case</h2>
<p>The factorial 0! is weird.</p>
<p>We can illustrate <script type="math/tex">0!</script> by determining the number of ways to arrange the elements of an empty set <script type="math/tex">\{\}</script>. Since there are no elements, there is only 1 possible set: <script type="math/tex">\{\}</script>. We usually use the factorial function when counting the number of permutations of a given set; so, it holds that <script type="math/tex">0! = 1</script>.</p>
<p>We formally define the factorial of an integer <script type="math/tex">x</script> as <script type="math/tex">x! = \prod\limits_{i=1}^x i</script>. But if <script type="math/tex">x = 0</script>, where does the 1 come from? One way to think about why <script type="math/tex">0! = 1</script> is through the concept of it being a base case for a recursive factorial function:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">factorial</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
<span class="k">if</span> <span class="n">x</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">x</span> <span class="o">*</span> <span class="n">factorial</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
</code></pre></div></div>
<p>If the definition of factorial was <script type="math/tex">x! = \prod\limits_{i=0}^x i</script>, then the factorial of <em>any</em> number would be equal to 0. So, as notion we can assume that <script type="math/tex">0! = 1</script> in order to delineate the final term of any given factorial such that it behaves accordingly.</p>
<h2 id="x0-as-a-base-case">x^0 as a base case</h2>
<p>The product <script type="math/tex">x^0</script> is even weirder.</p>
<p>We can’t illustrate <script type="math/tex">x^0</script> as easily as we could with <script type="math/tex">0!</script>. We’re usually taught that a number <script type="math/tex">x</script> raised to an exponent <script type="math/tex">n</script> is simply <script type="math/tex">x</script> multiplied by itself <script type="math/tex">n</script> times. But how do we multiply something <script type="math/tex">0</script> times? Isn’t that just the absense of <em>any</em> quantity: 0?</p>
<p>Again, it might easier to think of raising a number as an exponent as a recursive function:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">exponent</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">n</span><span class="p">):</span>
<span class="k">if</span> <span class="n">n</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">x</span> <span class="o">*</span> <span class="n">exponent</span> <span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
</code></pre></div></div>
<p>Given that this function works, since we know <script type="math/tex">x^2 = x * x</script> since <script type="math/tex">n = 2</script>, the exponentiation can be rewritten as <script type="math/tex">x^2 = 1 * x * x</script>. So, we can now think of exponentiation as <script type="math/tex">1</script> multiplied by <script type="math/tex">x</script> a total of <script type="math/tex">n</script> times.</p>
<p>Finally, the exponentiation of <script type="math/tex">x^0 = 1</script> makes sense since 1 is being multiplied by <script type="math/tex">x</script> a total of <script type="math/tex">0</script> times - which is 1! (the exclamation point here is simultaneously a factorial and my excitement).</p>
<h2 id="working-backwards-with-factorials">Working backwards with factorials</h2>
<p>Applying the recursive logic above, we can now just take an example to see <strong>why</strong> this works with factorials. This is easy to see since by definition, <script type="math/tex">x! = \frac{(x + 1)!}{x}</script>. Taking <script type="math/tex">4</script> as an example:</p>
<script type="math/tex; mode=display">4! = 4 * 3 * 2 * 1 = 24</script>
<script type="math/tex; mode=display">3! = \frac{4!}{4} = \frac{24}{4} = 6</script>
<script type="math/tex; mode=display">2! = \frac{3!}{3} = \frac{6}{3} = 2</script>
<script type="math/tex; mode=display">1! = \frac{2!}{2} = \frac{2}{2} = 1</script>
<p>And finally,</p>
<script type="math/tex; mode=display">0! = \frac{1!}{1} = \frac{1}{1} = 1</script>
<p>Now, <em>that</em> deserves an exclamation point.</p>
<h2 id="working-backwards-with-exponents">Working backwards with exponents</h2>
<p>Applying similar logic, we can do the same thing for the factorial function. Let’s take my favourite number: 2.</p>
<p>Working backwards, we can also say that <script type="math/tex">2^3 = 2^{4 - 1}</script>, or that <script type="math/tex">2^3 = \frac{2^4}{2} = \frac{16}{2} = 8</script>. Let’s work with this pattern:</p>
<script type="math/tex; mode=display">2^2 = \frac{2^3}{2} = \frac{8}{2} = 4</script>
<script type="math/tex; mode=display">2^1 = \frac{2^2}{2} = \frac{8}{2} = 2</script>
<p>And for the final step,</p>
<script type="math/tex; mode=display">2^0 = \frac{2^1}{2} = \frac{2}{2} = 1</script>
<p>(there’s no exclamation point for me to make a pun about, but I find the exponent example <em>much</em> cooler because <script type="math/tex">x^0</script> made no sense to me logically)</p>
<h2 id="why-does-this-matter">Why does this matter?</h2>
<p>Although this blog post may seem to be about number theory and algebra, the examples of factorial and exponents illustrate the importance of thinking about edge scenarios. Base cases and their respective functionalities are extremely useful in both computer science and mathematics thanks to the elegance of recursive functions.</p>
<p>Just don’t go around throwing (!) all over your algebra!</p>
<hr />arunIf you’ve ever taken a class in algebra or statistics, you would probably know from memory that and (for any real number ). But why?A Guide to Password Systems2017-09-04T12:00:00+00:002017-09-04T12:00:00+00:00https://kirubarajan.com/passwords<p><em><a href="https://hackernoon.com/a-6-minute-guide-to-password-systems-52f1857dc0ec">This piece was originally published in HackerNoon. Code examples and images included.</a></em></p>
<p><img src="https://cdn-images-1.medium.com/max/2000/1*4IwGiQ87DWBXokwsO9MWsw.jpeg" alt="A lock and door" /></p>
<p><em>“There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files.”</em> - Bruce Schneier</p>
<p>Dutch cryptographer <a href="https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle">Auguste Kerckhoffs</a> once said that a system should be secure even if everything is known about the system other than its key. In the case of the internet, with web applications serving as the system, passwords have become the new key. It’s not a stretch to say that your most valuable information is probably hidden across all your social media, cloud storage, digital banking and so forth. So, the first and final line of defence between you and digital burglars potentially highjacking your life is none other than your password.</p>
<p>News publications all go <strong>bananas</strong> over security breaches, yet security is often the most daunting task for beginners in back-end development. This guide aims not to provide backend code, but to provide new developers a skeleton for password systems.</p>
<h2 id="hashing">Hashing</h2>
<p>The foundation of any good password system lies in its use of hashing algorithms. So what is a hashing algorithm?</p>
<p>A hashing algorithm is a function that when inputted a string of arbitrary size will produce a fixed length string. More simply, a hashing algorithm is a one-way function that converts any text of <em>any size</em> into text with the exact same length each time.</p>
<p>This is made possible by altering and construing the input text until it does not even remotely resemble the original string. For example, the commonly used SHA-256 algorithm <em>always</em> produces outputs of 256 bits for a total of 2^256 possible outputs. As a result, it’s radically difficult to create collisions - when two different input strings produce the same output. In fact, there is a chance of 1 in over 115 quattuorvigintillion (that’s a real number; it’s 78 digits long) to produce a collision.</p>
<p>Hashing algorithms are used in practically every secure authentication system on the planet.</p>
<p>Instead of storing a plaintext password in a database when a new user is created, a hash of the password is stored instead. Whenever that user later logs in, whatever password they log in with is hashed and compared with the original password’s hash to verify the user. This is because even if a hacker was able to break into a database and view its contents (which happens more often than you’d think), a hash effectively hides every password <em>even if</em> the hacker knew which hashing algorithm was used. Kerckhoffs would be proud.</p>
<p>Some things to remember:</p>
<ol>
<li>A hashing algorithm will produce the same output for the same input.</li>
<li>A slightly different input will produce a completely different output.</li>
<li>A good hashing algorithm minimizes collisions.</li>
</ol>
<p>Or just use bcrypt (covered in final section).</p>
<h2 id="good-passwords">Good Passwords</h2>
<p>First, what makes a secure password?</p>
<p>The best passwords aren’t necessarily the ones that include both numbers, capital and lowercase letters, and special characters. Neither are passwords over 8-10 characters. Instead, what these web guidelines do is encourage users to expand <em>variation</em> in passwords to (hopefully) create a one-of-a-kind password. The best passwords are the ones that nobody has ever used before. Here’s why.</p>
<p>Let’s do some quick math.</p>
<p>Using 10 characters, your standard 26 lowercase characters will give you the option of 26^10 possible passwords. That’s a big number - 141,167,095,653,376 to be precise. However, we also have 26 uppercase letters at our disposal too (52 possible characters), which multiplies our total password count by <strong>1000</strong>. When you add special characters and numbers our total password count (barring conditions) is 59,873,693,923,837,890,000.</p>
<p>That number is too astronomically large to even wrap your head around. A more understandable metric would be <em>how long it takes to crack a given password</em>. Using a raw SHA256 hashing algorithm, it would take about <strong>738 thousand years</strong> to brute force the entire key space.</p>
<p>Seems secure enough?
Yeah, right.</p>
<h2 id="salting">Salting</h2>
<p>Even though it’s impossible to reverse engineer a given hash, we have standardized hashing algorithms like SHA.</p>
<p>This means that hackers can compile huge datasets known as <strong>dictionaries</strong> of common passwords and hash each password themselves to see if any of the corresponding hashes equal the original password hash. Another technique is to precompute the hashes of a dictionary and place them into a data-structure known as a lookup table, making it EVEN easier to determine the original password. Since large numbers of hashes can be computed only once and reused, these types of hacks can be efficient.</p>
<p>The best way to combat this method of hacking is to use <strong>salts</strong>: additional random characters added to the password when hashing. Each password requires a different salt, but the plaintext salt can be stored right alongside the password. How is this secure?</p>
<p>Salting protects your passwords because salting renders all the hashes stored in a lookup table useless, since using a salt will completely change the hash. Your passwords are (more or less) safe again.</p>
<h2 id="hashes-in-the-real-world">Hashes in the Real World</h2>
<p>So can you just take SHA256 implementation, throw in a secure salt, and call it a day? Just hold your horses for a second.</p>
<p>Turns out you can’t just roll your own authentication. When the only limit to cracking your password is how fast CPU’s run (and CPUs get faster every year), your security system will start to resemble a ticking time bomb. To combat this, most modern authentication systems use a technique called <strong>key stretching</strong>.</p>
<p>(Use this analogy: a stretched out key takes longer to fit into a hole to check if it’s the right key)</p>
<p>How key stretching works is beyond the scope of this guide, but essentially the technique makes it extremely difficult for hackers to test out a bunch of hashes in a short amount of time by slowing down the hashing algorithm and forcing hackers to wait (relatively) long times before a hash is produced.</p>
<p>A popular implementation of key stretching is used in bcrypt, a password hashing function that has been developed specifically for passwords in 1999. In a world where technology quickly outpaces itself, the age of bcrypt is a testament to how powerful it is. Bcrypt is available in every language conceivable, from node.js to C. Bcrypt even generates a cryptographically secure salt to prevent rainbow attacks. Useful, right?</p>
<h2 id="final-advice">Final Advice</h2>
<p>Use libraries like bcrypt, use 2-factor authentication, follow emerging trends in network security, and penetrate test frequently.</p>
<p>If you learned anything from this guide, I hope its this:</p>
<p>Never roll your own authentication. Your security isn’t just competing with hackers - it’s competing with other security systems since hackers can effortlessly apply the same hacking techniques from other attempts to your system.</p>
<hr />arunThis piece was originally published in HackerNoon. Code examples and images included.PennBasics2017-08-12T22:10:00+00:002017-08-12T22:10:00+00:00https://kirubarajan.com/pennbasics<h1 id="about">About</h1>
<p>PennBasics is a one-stop location for nearly 10,000 Penn undergraduates to receive realtime personalized information on Study Spaces, Dining Halls, Room Bookings and Laundry Availability. PennBasics is intended to launch early 2018 (I’ll update this post once we go live)!</p>
<h2 id="what-i-do">What I Do</h2>
<p>I’m a backend developer for our Express server. I primarily work on our API for aggregating the student body’s favourite Study Spaces and security using JWT for verifying users. I also help manage DevOps for the site (think SSL and nginx).</p>
<hr />
<p>Check out the project <a href="http://pennbasics.com">here!</a></p>arunAboutprogramjs2017-08-12T22:10:00+00:002017-08-12T22:10:00+00:00https://kirubarajan.com/programjs<h1 id="about">About</h1>
<p>Any beginning software developer needs to focus on two essential skills:</p>
<ol>
<li>Learning to write code with others.</li>
<li>Understanding the fundementals of computer science.</li>
</ol>
<p>Skill #1 is pretty much indisputed, but lots of people like to argue about Skill #2. Why should you learn it? Because in a world where new frameworks and languages pop up like Amazon Fulfillment Centers, understanding the boring theory of data structures, MVC, and algorithms will allow you to pick up new concepts and development trends easily.</p>
<p>programjs was concieved at <a href="https://elore.io">elore</a> to teach programmers these two skills at the same time. An inspiration for this project was computer science pioneer Niklaus Wirth: author of the classic textbook Algorithms + Data Structures = Programs. We believe that the philosophy of algorithms and data structures being at the core of software is important, so this module is made in the textbook’s honor.</p>
<p><img src="https://camo.githubusercontent.com/fd744ad88f4e667b049c025239dec72cceef86ce/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f656e2f392f39302f416c676f726974686d735f2532425f446174615f537472756374757265732e6a7067" alt="Textbook" /></p>
<h1 id="contributing">Contributing</h1>
<p>Although we’ve been working on this project for nearly 2 months, we’ve only scratched the surface. We have a [pretty comprehensive document] outlining the dos and don’ts of contributing pull requests, but it boils down to two rules:</p>
<ol>
<li>Open a pull request.</li>
<li>Make sure the code works.</li>
</ol>
<p>A deeper explanation and a step by step guide to these two rules can be read in our contributing guide.</p>
<h1 id="what-i-worked-on">What I worked on</h1>
<p>I helped bootstrap the project in its early days. Most notably, I helped ensure the architecture of the project would scale well with new implementations and be clear to new developers to understand how the project works. I also helped develop certain project standards by creating concise implementations to certain algorithms and data structures.</p>
<p>I had a good time learning how to use Chai and Mocha for testing and using Travis to verify tests before merging pull requests. This project really taught me the importance of test-driven development in a team setting (especially a team where you don’t know most of the contributors).</p>
<hr />
<p>Check out the project <a href="https://github.com/eloreprojects/programjs">here!</a></p>arunAboutLeaving MIT for the Internet2017-07-01T22:44:00+00:002017-07-01T22:44:00+00:00https://kirubarajan.com/elore<p><img src="/assets/images/elore_meeting.jpg" alt="A board meeting at elore" /></p>
<h1 id="incubation">Incubation</h1>
<p>Sometimes, being a beginner computer scientist can just feel like wandering through a corn field. It’s easy to feel lost with no direction in sight. When starting out, I really wished I had a community for other beginning students other than the disjointed GitHub community at the time (<a href="https://reddit.com/r/learnprogramming">r/learnprogramming</a> was a HUGE help, however).</p>
<p>So when arriving at MIT Launch (a residential incubator for high school students), the startup my two co-founder’s and I launched would solve exactly that: a platform to link together new developers by creating community amongst them. Alongside industry partners ranging from local Boston startups to huge Silicon Valley companies, we identified projects new developers could work on together (after our platform pairs similarly-skilled developers) to build a portfolio.</p>
<p>Whereas most Launch companies take a calculated and <a href="http://news.mit.edu/2013/disciplined-entrepreneurship-bill-aulet-0826">disciplined</a> approach to launching their startup, we dove right into coding 8 - 10 hours every day on top of ~5 hours of class. Red Bull was our best friend, and we’d sleep whenever we could. Literally.</p>
<p><img src="/assets/images/sleeping.PNG" alt="Sleeping" /></p>
<h1 id="the-aftermath">The Aftermath</h1>
<p>We ended up developing a full featured MVP that implemented our proprietary algorithm and even were named Most Progressive Company by our fellow Launch companies at the end of our session. Howevever, as GitHub and Devpost began ebbing more and more into our territory, and as school life caught up with our startup ambitions, we decided to take a large lateral step and turn away from competition to our roots of collaboration.</p>
<p>Capitalizing on our momentum from MIT, elore transformed from a startup into an organization that welcomed anybody to help us achieve our mission: launching new developers into their own careers. Elore is translated from hungarian to mean “move forward” (one of our co-founders, Julia, was Hungarian), the our ultimate goal of our platform realized in a different direction.</p>
<h1 id="moving-forward">Moving forward</h1>
<p>Right now, elore focuses on two main things:</p>
<ol>
<li>Developing open source software for new developers to contribute to.</li>
<li>Educating aspiring computer scientists on the world of computing and software engineering.</li>
</ol>
<p>On <a href="https://github.com/eloreprojects">our GitHub account</a> you can see a list of 100% public repositories for anybody to contribute to, including an award-winning password manager, an npm package of common data structures and algorithms, and even our splash page.</p>
<p>The future of elore lies in the hands of the excellent coding community, and we cannot wait to see what it does to the organization.</p>
<hr />arunCrypt2017-01-22T22:10:00+00:002017-01-22T22:10:00+00:00https://kirubarajan.com/crypt<p><img src="/assets/images/crypt.png" alt="Crypt's mascot" /></p>
<h1 id="about">About</h1>
<p>Due to a recent influx in security breaches and an increasing need for privacy, password managers have become incredibly useful for browsing the internet. However, even the most sophisticated password managers (i.e. LastPass) forget one crucial security flaw: email addresses.</p>
<p>Even though more people are beginning to use different passwords for their accounts, they usually use the same email. This presents an opportunity for hackers to group an individual’s accounts together using a shared email which is a HUGE security hole.</p>
<p>Crypt solves this by generating cryptographically secure emails that you can sign up for accounts with. All emails are forwarded back to your master email (passwords are encrypted using AES256), preventing hackers from gaining access to all of your accounts if one account is compromised and reassuring your privacy by preventing “email lookup” services from identifying you through a common email.</p>
<h1 id="my-experience">My experience</h1>
<p>I had a lot of fun building Crypt at PennApps. Even though I usually don’t like hackathon environments, I felt that Crypt was an elegant and simple solution to a big security problem, so the time constraint wasn’t a big deal.</p>
<p>I worked on the back end of the system and security-specific parts, such as email forwarding and AES encryption. Our biggest problem was email forwarding (they key functionality of our project). We ultimately ended up using <a href="https://nodemailer.com/about/">node-mailer</a> as a dedicated SMTP server that communicated with our primary Meteor application. The SMTP server would receive incoming emails to the crypt emails (eg. asj12hks89a0s.mail.plsencrypt.me) and “forward” the email by duplicating the email’s body and sending it to the destination email. This routing process was very un-obtrusive since even secure messages (i.e. password reset or verification links) would be sent as stateless tokens and were never stored in our database.</p>
<p>Weirdly enough, the hackathon blocked ports 25, 465, and 587; I ended up hosting the server on a VPS provided by DigitalOcean.</p>
<h1 id="awards">Awards</h1>
<p>After attending hackathons for three years and never winning anything, my team finally won an award for Crypt. We ended up winning the Best Use of the <a href="https://www.usebutton.com/">Button</a> API (by presenting Buttons using a “predictive” model based on which password information users were looking for) and, more notably, the Best Use of Security and Ecryption Award.</p>
<p>I had only known about cryptography and security in a very theoretical sense, so finally applying my knowledge in the subject to a project was oddly satisfying. I can’t say with 100% certainty that the project is bullet-proof, but I’d be still be very impressed if you could hack it!</p>
<h1 id="current-development">Current Development</h1>
<p>There’s a lot of work left to be done to make Crypt even better. Right now, I’ve transfered ownership of the Crypt repository to <a href="https://elore.io">elore</a>, so that more developers will have access to contribute to the project. Feel free to email me if you want some personal advice on where to get started.</p>
<p>We’ve also been rebuilding Crypt from the ground up to avoid using any gross hackathon code in production, as well as using better tools suited to the project such as SQL’s structure and Express’s greater control of security.</p>
<hr />
<p><a href="https://getcrypt.co">Check it out</a> here or <a href="https://github.com/kirubarajan/crypt">look at the code</a>.</p>arunCrrntly2016-07-01T22:10:00+00:002016-07-01T22:10:00+00:00https://kirubarajan.com/crrntly<p><img src="/assets/images/crrntly_screenshot.png" alt="Crrntly screenshot" /></p>
<h1 id="about">About</h1>
<p>Almost every software engineer is somewhat familiar with Agile Development, SCRUM, or some form of project management. My favourite tool to facilitate development is Trello. Last summer, when learning more about the process of development, I decided to dogfood a bit and create a project management tool to learn more about project management.</p>
<p>So, I created a Trello clone using Meteor, MongoDB and Blaze to worry less about core functionality and focus more on development and workflow. The result is a fully featured Kanban team that includes collaboration, real time status updates, and communication through cards.</p>
<h1 id="next-efforts">Next efforts</h1>
<p>Hopefully, I’ll find the time to port the front end from (the sorta deprecated) Blaze to React. I also hope to implement more intensive security features, such as two-factor authentication.</p>arun