
MIT Hacker Tools: a lecture series on programmer tools - anishathalye
https://hacker-tools.github.io/
======
Jonhoo
Hi all! We (@anishathalye, @jjgo, and @jonhoo) have long felt that while
university CS classes are great at teaching specific topics, they often leave
it to students to figure out a lot of the common knowledge about how to
actually use your computer. And in particular, how to use it efficiently.

There’s just no class in the undergrad curriculum that teaches you how to
become familiar with the system you’re working with! Students are expected to
know about, or figure out, the shell, editors, remote access and file
management, version control, debugging and profiling utilities, and all sorts
of other useful tools on their own. Often times, they won’t even know that
many of these tools exist, and instead do things in roundabout ways or simply
be left frustrated about their development environment.

To help mitigate this, we decided to run this short lecture series at MIT
during the January Independent Activities Period that we called “Hacker Tools”
(in reference to “hacker culture”, not hacking computers). Our hope was that
through this class, and the resulting lecture materials and videos, we might
be able to bootstrap students’ knowledge about the tools that are available to
them, which they can then put to use throughout their time at university, and
beyond.

We’ve shared both the lecture notes and the recordings of the lectures in the
hopes that people outside of MIT may also find these resources useful in
making better use of their tools. If that turns out to be true, we’re also
thinking of re-doing the videos in screen-cast style with live chat and a
proper microphone when we get the time. If that sounds interesting to you, and
if you have ideas about other things you’d like to see us cover, please leave
a comment below; we’d love to hear from you!

We’re sure there are also plenty of cool tools that we didn’t get to cover in
this series that you all know and love. Please share them below along with a
short description so we can all learn something new!

Anish, Jose, and Jon

~~~
gumby
> ...[universities] often leave it to students to figure out a lot of the
> common knowledge about how to actually use your computer.

Now I'm out in the real world (MIT class of '86!) I think this is more of an
MIT thing -- many graduates of other schools get explicit training in things
that the MIT faculty, fairly or not, assumes students will simply pick up. And
this is despite the heavy emphasis on actually doing stuff, especially in the
school of engineering. Actually I've had hit or miss results hiring freshly-
graduated MIT grads (maybe less so VI-A) for this reason, though once they are
up to speed they've mostly been great.

Really good use of IAP by the way!

~~~
akhilcacharya
> many graduates of other schools get explicit training in things that the MIT
> faculty, fairly or not, assumes students will simply pick up. And this is
> despite the heavy emphasis on actually doing stuff,

uh...I graduated from a low tier state school that was notable in our state
for focusing on practical matters....and we didn't get 'explicitly trained' on
this either. Most people _do_ just pick it up.

~~~
hinzed1127
I got a CS minor from a top-5 program, and while a lot of the core classes
definitely covered some of these topics in various degrees, it's really nice
to see all of these aggregated in a concise way.

While you definitely do pick stuff up over time, this is arranged in a way
that I could see myself preferring to reference this rather than find that one
stack overflow answer that clicked with me at the time. Now that I at least
have a better understanding of these concepts 3.5 years into real-world web
development, this seems like a good resource to cover my bases better now.

------
bhchiang
The equivalent UCLA course is CS35L: Software Construction Laboratory
([https://web.cs.ucla.edu/classes/winter19/cs35L/](https://web.cs.ucla.edu/classes/winter19/cs35L/)).
It's taught by Paul Eggert (big open source/coreutils/emacs contributor +
author of diff/sort).

~~~
emmelaich
Paul Eggert is also the maintainer of the timezone database and designer of
the uniform naming convention for time zones, such as America/New_York and
Europe/Paris.

What a champ!

------
flafla2
Here’s the CMU equivalent course, which interestingly was also designed by
students:

[https://www.cs.cmu.edu/~15131/f17/](https://www.cs.cmu.edu/~15131/f17/)

~~~
sk5t
CMU did (maybe still does?) have a mandatory, once-a-week course to orient new
students to logging in to *nix workstations, setting file permissions and
copying files around on AFS, etc. Whether this was just for CIT or university-
wide I cannot recall.

~~~
jjoonathan
Didn't they recently nuke the unix infrastructure and replace it with cloud
services? Or have reports been exaggerated?

~~~
Shoop
The unix infrastructure is still in place and widely used by nearly all cs
courses.

------
mistrial9
Please note that the Software Carpentry [0] project exists as well. All
welcome .

[0] [https://software-carpentry.org/](https://software-carpentry.org/)

------
melling
MIT went with the Berkeley editor. A lost opportunity to introduce programmers
to the beauty of using Emacs and Lisp.

~~~
komali2
But almost all IDEs and editors have a VIM mode - learning VIM is a good way
to teach people how to keep their fingers on home row, and the skill is
(because of what I stated previously) easily transferred to whatever editor
you like.

From my perspective, I tried to learn Emacs, and decided it's a great editor,
once you spend weeks to months to get it actually "working good," and learn
shitloads of commands (let alone keybindings). Given my initial goal was "keep
hands on home row," it was far, far faster/better for me to spend 3 days
learning/memorizing VIM commands, installing a vim plugin into VScode, and
just doing that.

Would love to use Emacs, but it's a nightmare to set up. I still haven't
managed to get it feature parity with vscode.

~~~
VonGallifrey
> Would love to use Emacs, but it's a nightmare to set up.

Maybe you would like spacemacs then? It is a Configuration Bundle for Emacs
focusing on "Evil Mode" (aka the Vim emulator in Emacs). It is just a few
minutes to install and if you already familiar with vim then there should not
be much change what the normal editor usage is concerned. Of course the
customization is Emacs lisp which has a bit of a learning curve, but just to
get started with Emacs and evil you don't really need to customize anything.

------
andrewl
This looks good. I would also recommend the Software Carpentry program:

[https://software-carpentry.org/](https://software-carpentry.org/)

------
taude
This is a great series. I'm going to share with my team, just to make sure
they can fill in any items they're missing, like using bash functions for
shortcuts or aliasing.

BTW, Stanford did an online training course 5 years ago or something called CS
184 Startup Engineering. They had some excellent tutorials on the CLI and
Emacs [1]. -I wish I could find the materials, if anyone else can find them.-

Actually, I found them online: [1] [http://docshare.tips/cli-git-emacs-
dotfiles_57592eb2b6d87f37...](http://docshare.tips/cli-git-emacs-
dotfiles_57592eb2b6d87f377c8b46af.html)

[2] Link to their dotfiles for beginner config: [https://github.com/startup-
class](https://github.com/startup-class)

------
splittingTimes
So one lecture covers window managers for tiling. I used dwm for years and
love it, but am stuck on Windows at work. Is there anything for Windows 10
that has a similar approach of having a stack with your unused applications
and a big window for the app that is in focus? And then you can easily move
window from stack to focus and vice versa?

I looked at the Wikipedia article [1], but none of the alternatives seem to do
that.

What can you recommend?

===

[1]
[https://en.m.wikipedia.org/wiki/Tiling_window_manager](https://en.m.wikipedia.org/wiki/Tiling_window_manager)

~~~
TeMPOraL
~Year ago, I had plenty of success with bug.n -
[https://github.com/fuhsjr00/bug.n](https://github.com/fuhsjr00/bug.n). It's a
DWM clone written in... AutoHotkey, of all things.

~~~
Thimothy
Ok,this blew my mind in thousands pieces. I'm going to try it right away.

------
rollinDyno
I strongly believe man is a product of his tools, my slow but steady increase
of their mastery is a source of pride. I've spent nights just mindelessly
browsing the web in the search for a tool I didn't know about (it can be a
service, a browser extension, a text editor plugin) so just looking at the
title of this post made me ready for an injection of dopamine.

I have a branch on my todo list solely focused on my tools, because there are
so many things to configure continuously. I schedule these tasks for the
occassion I feel like I'll have a couple of minutes to improve and their
priority are often labeled as "Compounding Rewards" as opposed to "Critical".

~~~
JeffRosenberg
Love it! Do you have any favorite tools you'd recommend, and/or favorite
places for finding new ones?

------
everetm
We had a student run course at Purdue for a while to teach new students
fundamental tools outside of class. [https://github.com/Purdue-
CSUSB](https://github.com/Purdue-CSUSB)

------
stebann
Really useful! I was looking something introductory for teaching, this will
do.

------
jackallis
is this some sort of MIT class to undergrad or general public?

~~~
c256
At MIT, the month of January is a reserved time separate from the normal terms
called IAP - Independent Activities Period. During IAP, there are many
seminars, panels, talks, and short courses (and some long courses taught in an
intensive fashion) on a huge variety of topics. Many are taught by students,
faculty, staff, and area alumni. While a few classes do give credit, fulfill
requirements, and the like, oat exist simply to learn cool, neat, useful,
interesting, wacky, etc stuff.

~~~
jackallis
ohh. Only if it was to public, hop on the red line and walk 10 mins.

------
jackallis
can't see anything on that projector :-(

~~~
Jonhoo
Yeah, sadly the screencasting software malfunctioned on some of the sessions.
We're thinking of re-doing some of them with a proper microphone and
screencast though (see also
[https://news.ycombinator.com/item?id=19081669](https://news.ycombinator.com/item?id=19081669)),
and will certainly announce when/if that happens! For what it's worth, the
lecture notes should capture most of the actual contents, and in the same
order.

------
marzoev
wow this is so cool!!!

------
abhishekjain123
Thank you Sir For This Amazing Post.It Really Helped Me To Buy new Tolls For
My Industries.

------
uasm
> [https://hacker-tools.github.io/lectures/](https://hacker-
> tools.github.io/lectures/)

Literally none of these have anything to do with proper information
security/hacking/penetration testing. Will you please consider to stop abusing
the term "hacker"?

~~~
Jonhoo
So, the term "hacker" and "hacking" has traditionally meant someone who is
exploring the limits of systems (whether computer-based on otherwise) in a
playful manner, often finding "clever" ways to make the system behave in
unintended ways. The term is arguably even broader than that — see the
Wikipedia entry on Hacker Culture[1] for more. The use of "hacker" to mean the
exploitation of computer systems is more recent, and was traditionally
referred to as "cracking". The two terms do have a decent amount of overlap,
but the latter is much more commonly associated with malicious intent, whereas
hacking really just means that a desire to push systems to their limits and
see what kind of cleverness you can pull off!

[1]:
[https://en.wikipedia.org/wiki/Hacker_culture](https://en.wikipedia.org/wiki/Hacker_culture)

------
flukus
Forget university, most of these this should be the content of K-12
computing/programming classes. It's simpler and has much more real world value
than a lot of the crap the tech, like graphical iPad programming or how to use
a specific version of word.

------
jointhefuture
The article on editors is basically "here's the names of 5 editors, now learn
vim"

I know this will piss off vim users but in my experience vim users are
seriously out date when it comes to dev tools. It's like they never left the
70s. vim might be great, it might be available everywhere but when I see a vim
user I then see them use something like gdb and have clearly never experienced
a modern debugger because if they had they'd be infuriated at how their
debugging tools haven't improved in 30 years.

I'm sure others could go into all the features a modern editor or IDE provide.
The vim users will say they don't need that crap. They sound like some grandpa
saying "back in my we had to walk to 5 miles to school, no one had invented
bicycles or cars or buses. Don't need those new fangled things, now Get off my
Lawn!"

~~~
flukus
My experience of IDE users (myself included much of the time) is that they
don't know how limited their debugging experience is, just breakpoints and how
to step through code. Things like breaking when a variable is set, debugging
from a core dump, creating a core dump under certain conditions, viewing the
assembly, setting variables on the fly etc, are features of a good debugger
(often the one they're using) that are obscured from them.

If you want that shallow level of debugging you can do it from inside vim
though: [https://github.com/idanarye/vim-
vebugger](https://github.com/idanarye/vim-vebugger)

~~~
jointhefuture
Exact opposite of my experience. IDEs let me easily add conditional break
points, toggle between source, disassembly, source+disassembly, set variables
just by clicking on them, view multiple areas of memory in different
tabs/windows. Set how that memory is viewed (bytes, words, dwords, floats, as
a type of class/struct, array of classes/structs), show different contexts at
once, have multiple windows per thread/process, never seen someone use one
that didn't know those features exist as they are all obvious to discover in
an IDE.

sounds like you've never used one but then that's what I'd guess from watching
most vim users. All of those have been standard features of visual IDE
debuggers for over 30 years. Mean while instead of seeing every thing update
live I watch the vim users type various gdb print and dump commands at the
command line and then watch that data scroll off their terminal instead of
being updated live as they progress like an IDE debugger.

~~~
flukus
> sounds like you've never used one but then that's what I'd guess from
> watching most vim users

You'd be mistaken, I've spent a huge chunk of my adult life inside Visual
Studio. IME most devs don't even know you can add a condition to a breakpoint
(hiding feature behind right clicks aren't obvious) and anything complicated
turns into a very convoluted process very quickly. Even setting conditional
breakpoints are basically an input into the command interface, essentially
what the windows run menu is to the command line.

Take this short tutorial ([https://amazingdim.wordpress.com/2014/02/01/gdb-
script/](https://amazingdim.wordpress.com/2014/02/01/gdb-script/)) on gdb
scripting and show me how to do similar through an IDE. With Visual Studio at
least it is much more complicated, here are a few google results on that path:

1\. [https://docs.microsoft.com/en-
us/visualstudio/debugger/using...](https://docs.microsoft.com/en-
us/visualstudio/debugger/using-dump-files?view=vs-2017) 2\.
[https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-
is...](https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-
and-how-do-i-create-one/) 3\.
[https://stackoverflow.com/questions/47513337/howto-debug-
a-n...](https://stackoverflow.com/questions/47513337/howto-debug-a-net-dmp-
file-in-visual-studio-2017) 4\. [https://docs.microsoft.com/en-
us/windows/desktop/wer/collect...](https://docs.microsoft.com/en-
us/windows/desktop/wer/collecting-user-mode-dumps)

~~~
MrEldritch
>IME most devs don't even know you can add a condition to a breakpoint (hiding
feature behind right clicks aren't obvious)

Can confirm: I sure didn't. ...honestly most of my debugging is with print
statements.

