A blog on coding, machine learning, and mathematical physics.
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.
At some point in the midst of all of this news, I'd finally had it. I couldn't handle all of the sexism and the twisted company culture. After getting viscerally upset at Uber for the Nth time, I decided to delete the app and install Lyft instead.
I get a lot of email. I'm also pretty sure you get a lot of email. However, email is still not a solved problemThis is evidenced by the fact that a quick Google search yields no less than ten viable options for email clients on my Mac. . Each potential email client is acceptable on it's own, yet none of them satisfied all of my desired features:
The ability to access my email without an internet connectionI travel quite a lot, so this was very important to me. .
Easily move messages between different folders, which is how I keep all of my emails organized by project.
Quick yet powerful search of all my mail messages.
Having an auto-updating status indicator that shows me how many unread messages I have.
Managing multiple accounts (Gmail for personal emails and Microsoft Exchange for work emails) and syncing local changes so that my phone can still be up-to-date.
If you follow this blog, you'll recognize that I've gotten a bit carried away with migrating the different aspects of my life to operate within the Emacs environment. So it was only a matter of time until I finally decided to give it a shot, and I converged upon a solution which happily satisfies all of the above constraints. Every email service is a bit different so YMMV, but this setup works for me.
There's something about the end of the year that, in my experience, gives rise to a sort of sullen feeling. At least where I'm from in the northeastern United States, this time of year is characterized by shortening daylight hours, increasingly hostile temperatures and (frequently) gentle reminders of the passage of time and of all the things one set out to accomplish this year yet never quite got around to. The question you may ask is then:
What can be done to avoid this feeling?
Ultimately, I doubt that avoidance is the answer. Some people make an effort to ignore their feelings. More will drown themselves in their work. Others may hint at discomfort, but not reach out in the way they should. However, there is an upshot; despite the somber atmosphere (or perhaps because of it), people are increasingly willing to help one another out when called upon.
I have a friend who's always in "startup-founder mode". He's about to graduate with his PhD and he's starting a company, which in his eyes is already a unicorn. It is inspiring to see, and we have a weekly lunch in which he will fill me in on the company status and we bounce ideas off of one another on how to make his technology more robust or user friendly. A couple of weeks ago, I was particularly distracted and stressed. He quickly recognized that I wasn't doing very well and transitioned conversation to ensuring that I would be okay. Here was a guy who frequently cannot sleep because of his passion for his technology and spends every waking minute thinking about the future of his company, yet he made it clear that, no matter how much that mattered to him, my well-being would always come first.
What's most amazing to me is that this is a relative rarity, especially since most people I know would gladly help out a friend who asked for their help. We've all been there: the meetings pile up, exams interfere, or deadlines loom and it becomes easy to narrow our focus to our work or studies and to ignore the signs of colleagues and friends who may need someone to talk to. However, it is still our responsibility (and your responsibility, dear reader) to ensure that no one we know falls through the cracks. This short post is a call to action:
Be caring, and reach out to those around you.
I'm a pretty outgoing person, so I have no problem bringing up these issues or asking someone "Are you okay?". I have a number of friends who have not been faring too well lately. Graduate school can be tough, and I'm in a high-stress program. I try to remind them their well-being is more important than their work, and that the latter frequently requires the former. Further still, something we view as a failure is frequently an opportunity in disguise. I can only help so much, but reminding them that there's someone they can talk to and relate to can make a real difference.
If this message has resonated with you, I implore you to reach out to a friend, coworker or family member. Start with one person, and then help out more if you canNo excuses either: you can always think of someone who could use support. . Invite them out for coffee or call them on the phone. Even an email can be a nice gesture, though there's nothing like a face-to-face conversation. Most importantly, listen more than you talk and don't make the conversation about you unless they ask; I'm sure they'll value your concern.
Happy Helping, Happy Holidays, and Happy New Year. Be well.
Who this guide is for: If you've been using Emacs for a while, you should probably try the Vim way of doing thingsThe reverse of this is probably true as well, and if you use Vim I encourage you to give Emacs a try, but that's not the purpose of this guide. . Too many resources online push people in the direction of giving Spacemacs a try; most such guides are designed to encourage Vim users to try out Emacs and have a habit of alienating established Emacs users such as myself. During my efforts to embrace Evil, Emacs' Vim emulator, I hit a few road blocks and decided I would put this article together to help others through them. Whether you'd like to try out evil-mode or you're simply curious to see how the other half do development, keep reading.
My first thought in conducting this experiment was just to open my mind and learn something new. In addition, my Emacs pinky occasionally bothers me, and I wanted to try a more ergonomic way to appreciate the editing tools I use on a daily basis. This is a log of my experience, and some code for setting up your .emacs.d files. My verdict after roughly a week:
Having tried the Vim way, I won't likely revert to using pure Emacs.
I really love the way everything came together; the modal system of editing has started to change the way I think about composing text and code. The macro system and a couple of other niceties I'll talk about below blew me away, and I've quickly integrated them into how I work. Finally, Evil is quite popular, so many of the packages I use on a regular basis, like magit and org-mode have extensions to add more vim-like default keybindings.
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 timeEven if you don't use this post for your own configurations, I highly recommend looking at Bernt's exhaustive guide. . However, the guide contained an overwhelming amount of information, which made it difficult to determine precisely what features I would find most useful.
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 workOrg also has some nice export tools built in, so that I can easily share my notes with colleagues. 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.
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 opticsThe 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.