Welcome to
Caches to Caches

This blog is devoted to the broad interests of Gregory J Stein, which includes topics such as Numerical Modeling, Web Design, Robotics, and a number of my individual hobby projects. If there's any article you would like to see, or something you've been wondering about, be sure to let me know on Twitter.


I'm sure we've all had the same experience with "fully-featured" todo-list and project management programs: each had their own niceties, but none quite delivered on their promise. I've been using the built-in org-mode within Emacs for quite some time now, so I figured it was high time that I really made it my own.

I'm glad I did.

For the last year, many of my customization options were taken directly from the unbelievably detailed Guide by Bernt Hansen and remained unchanged for some time. However, the guide contained an overwhelming amount of information, which made it difficult to determine precisely what features I would find most useful.

Even if you don't use this post for your own configurations, I highly recommend looking at Bernt's exhaustive guide.

I'm writing this short guide in an effort to introduce the features in org-mode which I've found I can't live without. I'll go over how I use org-mode, and it's powerful built-in summary/calendar view known as org-agenda, in both my work and in my hobby projects. I also include some details about how everything was implemented, or at the very least provide the reader with references to understand my code. This guide is only an introduction to my workflow and is by no means self-contained (unlike Bernt's)! Feel free to comment below or get in touch with me if you have any questions.

Org also has some nice export tools built in, so that I can easily share my notes with colleagues.


Roughly a year and a half ago, I had the privelage of taking a graduate "Introduction to Machine Learning" course under the tutelage of the fantastic Professor Leslie Kaelbling. While I learned a great deal over the course of the semester, there was one minor point that she made to the class which stuck with me more than I expected it to at the time: before using a really fancy or sophisticated or "in-vogue" machine learning algorithm to solve your problem, try a simple Nearest Neighbor Search first.

Let's say I gave you a bunch of data points, each with a location in space and a value, and then asked you to predict the value of a new point in space. What would you do? Perhaps the values of you data are binary (just +s and -s) and you've heard of Support Vector Machines. Should you give that a shot? Maybe the values are continuously valued (anything on the real number line) and you feel like giving Linear Regression a whirl. Or you've heard of the ongoing Deep Learning Revolution and feel sufficiently bold as to tackle this problem with a Neural Net.

...or you could simply find the closest point in your dataset to the one you're interested in and offer up the value of this "nearest neighbor". A Nearest Neighbor Search is perhaps the simplest procedure you might conceive of if presented with a machine-learning-type problem while under the influence of some sort of generalized "veil of ignorance". Though there exist slightly more complicated variations in the algorithm, the basic principle of all of them is effectively the same.


The original motivation for this post was the first homework prompt I encountered in graduate school at MIT, while I was taking a course on linear optics:

The course was taught by Prof. Jim Fujimoto, who pioneered optical coherence tomography.

Describe the Physics behind Maxwell's Equations.

Deceptively simple, the prompt was designed to encourage me and my peers to think more about the physical implications of the well-known Maxwell's Equations, which detail the behavior of electromagnetism, one of the fundamental forces of nature. Our responses were not supposed to be steeped in derivations or overly sophisticated equations, but were instead supposed to build intuition. I was quite proud of my response (and it earned the highest grade in the class), so I have included it here in an effort to convey my passion for these elegant, and profound, equations.

Here, I aim to delve into the fundamentals of electromagnetism, with the goal of making this post accessable to those who may not have a particularly strong mathematical background while including enough analysis so that it may be useful and interesting to those who do. More than anything, the purpose is to imbue the reader with some of the physical intuition behind electromagnetism.


On the heels of President Obama's recent pledge to increase funding for computer science education in U.S. schools, I worry about the future of education in the discipline. Without a doubt, teaching students how to program is a must for ensuring that the United States can modernize its workforce and compete on a global scale. However, the ways in which programming is taught in schools often lacks real grounding, and effort needs to be made in order distance general education in computer science from the training given to computer scientists.

The purpose of learning how to code is not to become an expert programmer (just as learning mathematics is not for the express purpose of creating mathematicians), but is to allow people to recognize when a little bit of simple programming can save a huge amount of time and effort. Many introductory and online courses in programming focus too much on abstract skills and not enough on how these skills can be practically applied.

Abstract skills, like algorithms, are assuredly important, but when was the last time any of you coded your own merge-sort.


Since I started using Ubuntu on more of my machines, I've encountered myriad issues relating to the wireless internet. Every few minutes, my wireless internet would simply dropout without warning and often without even realizing that the connection had vanished. Reconnecting was a nightmare, and was frequently most easily accomplished by simply rebooting my machine. Even when the wireless was 'working', pinging google.com (with ping google.com) would be slow and unreliable. Worst of all, this issue would often even limit my ability to get any work done for stretches of time, not to mention that it would invariably put me in a foul mood.

Admittedly, this post is mostly for my own reference, since it's decently well documented online if you know what you're looking for. However, if it can be helpful to any of you, that's motivation enough for putting this here.


Of all the packages I use to enhance my productivity in emacs, use-package is perhaps the most useful. With it, I can automatically download and install other packages from the emacs package databases when it detects they're missing. Since I'm constantly switching computers, virtual machines, and operating systems, having this functionality is essential for making sure I don't miss a beat when I'm starting from scratch; I simply clone the emacs config files from my GitHub repository and open emacs and I'm almost immediately ready to go.

This short guide shows how to ensure that use-package also automatically installs, and how to get the most out of the use-package features.


There are a number of different technologies which have gone into creating this blog. Now that it's mostly complete (though I'm constantly tweaking its look), I figure I should give a list of these different tools so that someone can use it as a starting point for their own site. Though I've created a blog, many of the steps I've gone through are useful for anyone creating a small, content-driven website of their own.

In short, this site (and my personal website) are hosted on a single Amazon T2.micro instance using Django and Apache and formatted using Bootstrap (and modified using Less). However, there's much more to it than that. I also made my mark in social media, being sure to get the pages associated with my site. See more details after the jump.