Zero to Sixty
I don’t find much use in maintaining a blog, but i like looking back on my programming history.
2000s:
Made some HTML pages for my Neopets page.
2009:
First introduction to programming with C. The involved exams required us to write syntactically correct C code on paper. I acquire a distaste for programming.
2012:
First major project with LabVIEW. I don’t really remember much, other than graphical programming is kind of awkward, but building a system piece by piece was kind of satisfying.
2012-2014:
Undergrad. UML “programming”, and a final year project on neural networks applied to image processing in MATLAB. A terrible failure as far as the project is concerned, but i started to see programming as a means of understanding unknown domains. Things became less abstract after i had to code them. I also made some halfhearted attempts to learn emacs and Common Lisp after reading PG’s essays, which would come in handy during my first job.
2014-2016:
It was only on my first job that i started to learn about programming. I was thrown into the deep end as the sole developer in charge of a failed project that had been going on for years. It was software to control a high speed gantry robot, originally written in VB.NET by a bunch of industrial automation experts, but eventually desecrated by a revolving door of programmers at my company. Documentation was nonexistent, the software build was riddled with warnings that my seniors told me to ignore, there was no tests in place, the idea of version control was thumbdrives and copies of the entire project directory named by date. But i still managed to get a great deal out of it. I learnt:
- How to dive into a legacy codebase (100k LOC).
- The edit-compile-run-debug cycle.
- How to program.
I started printing snippets of code out to read and write notes on, and when that become too tedious (due to VB’s verbose syntax), i started making the code mine in small, manageable steps. I looked for unused functions and classes and removed them, edited function and variable names to be clearer without changing functionality, kept track of global variables in the code to remove duplicates and redundant ones, wrote my own documentation to keep track of the program execution. These baby steps helped me to internalize the program structure.
The only way i could work on the program was at the computer attached to the robot, it meant that failure in the software could have physical consequences - it was quite the shock to see the gantry crash.
Once i had a good grasp of the architecture, i started reworking the program architecture. I implemented a finite state machine to replace a convoluted mess of logic of checking and setting this and that flag to handle state transitions. To help manage the size and complexity of the code, i added utility functions to encapsulate common abstractions, wrote wrapper libraries on top of function calls to external hardware libraries (image processing, motion controller).
I also started looking for ways to level up as a developer. I got my chance as my company needed an app for translating CAD files into robot path planning.
- The difference between dynamic and static languages.
- How to design programs.
- Functional programming,
- Algorithms and data structures.
Since my boss wanted to outsource the app, time was running short. I had to prototype something quickly if i wanted to convince him, so i used Racket to write a script to parse and display CAD files. Thankfully, the graphics managed to convince him.
I learnt how to scale a script into a real program. While i’m not sure that i have a handle on that yet, i gained some experience anyhow in structuring my program, custom data structures, and when to emphasize modularity or not. The flaws in dynamic languages started to show as program size grew, although Racket supports gradual typing by allowing programs to mix untyped Racket and Typed Racket.
and how map, reduce, filter made working with data so much easier. I learnt about recursion, had my fun with it and then went back to for loops. Also, not everything was suitable for the functional style, and i made generous use of imperative style Racket when programming the GUI.
I was trying to optimize robot path planning when i came across the traveling salesman problem, quadtrees when trying to reduce the search time to reduce expensive function calls when implementing a selection query in my UI, graphs and depth-first search when modeling points and connections, and wrote my own algorithm to check if a rectangle (the query box) intersected with an arc. Heady times.
2016:
I took a sabbatical at the Recurse Center(RC) to work on my deficiencies as a programmer, to widen my horizons and to see how the software world had passed me by. I did the following during my 3 months stint:
- Finished set 1 of the Matasano crypto challenges in C.
- Finished a machine learning course by Andrew Ng on Coursera.
- Worked through the first chapter of Linear Algebra Done Right and learnt how to write (trivial) mathematical proofs.
- Built a 2048 clone in Clojurescript.
- Built an AI for the 2048 clone in Clojurescript.
- Built a visualization for the 2048 AI solver in D3 and Clojurescript. (probably spent too much time on 2048)
- Paired with a RC-er on another visualization for compression algorithms in Javascript because immutable data structures are a pain when using D3.
- Another pair project with another RC-er to use D3 to visualize some data now that i know how to select and animate data.
- Building an internal web app for RC with Flask, npm and React (to be done soon!).
- I took the time to learn about some tools i use (emacs/terminal).
- "Algorithm" Fridays, where a group take turns to practice whiteboarding, during which the rest discuss the problem on chat quietly.
And possibly the following:
- Contribute to the Luminus open source web project - possibly adding support for a library option to get a better idea of how leiningen works.
- Revisit the Matasano crypto challenges, but with C++ now that i have some idea of buffer overflow bugs with string manipulation that took so much of my time before.
- Start on the Udacity Deep Learning course.
- Possibly a second web app to refine what i have learnt before - isanybodyin.recurse.com or transcripts.recurse.com in Clojure/Flask and definitely Clojurescript/Om.
- A toy implementation of MapReduce in Clojure that could be expanded to work with VMs (vagrant) locally or AWS instances.