Combined 3-colors: Lighter is higher unemployment (i.e. dark is good) Red is change, Green is current, Blue is old:
Old (lighter = worse):
Change (lighter = worse):
Now (lighter = worse, and note Michegan and Rhode Island are light enough they have to be bordered to be visible):
git add --patch
Incredibly helpful for splitting up your patches into atomic commits.
I use this like mad when I've made a few different types of changes between committing. (e.g. I find something that needs refactoring in the middle of adding a feature)
For hairier tasks, don't forget it's older brother,
git add --interactive, which launches a file manager shell with more options and better status info
git stash apply
Git stash is a wonderful thing, but people often don't realize that the stash is a stack, not just a single object.
Using apply with an optional ref argument, you can pop things off the stack that date from before the most recent stash.
I use this as a whole project undo/redo for things not worth creating a branch for
git rebase --interactive
Oh the power. If you pass the right revisions into git rebase --interactive, you can essentially go back and edit every single commit made in the repo.
For extra fun, try nonlinear editing or cross-branch interactive rebasing.
My primary use for this is to squash commits into useful units of functionality, particularly when updating a production branch or the equivalent.
Caution: if you're publishing your changes to other people, using this can really piss them off. You can also drastically break your repo, so make sure you know what you're doing, or try it on a fresh clone
git checkout -b branch_name remote/branch
This is an interesting trick: you can create a local branch named something different than a remote branch, and set it to track the remote. Makes git pull work without having to specify a remote and branch to merge.
git diff -Sstr
This lets you pull out a change that relates to the string. If you want to see whole patches, play with
--pickaxe-all, and for POSIX regex support use
Useful if you ever want to see who's using that bad idiom that you want to crush out of existence, or if you need to go back and find a chunk of lost code.
Since SSH keys are stored on your computer and never go over the wire, they are inherently more secure than passwords. Even if you pick a terrible passphrase for your SSH keys (or none at all), an attacker still has to get ahold of that key (barring someone patching your random number generator to return one of 2^10 numbers...)
With passwords, if everyone needs access to an account on one of your servers, then everyone has to know the same password. If one of your coworkers goes insane, you have to change the password (and probably a lot more than one) whereas with SSH keys, you just remove their key from the authorized_keys file and they're gone, nobody else has to worry about it.
Similarly, if people need access to some accounts and not others, you can segment access with keys much more easily than with passwords
Entering passwords gets old really quick. With the superb ssh-agent in use, you shouldn't ever have to do that, and as long as you remember to lock your computer when you leave it, you're as secure as if you were typing your password in every time
Since I wrote this short joking post about faux pas in a friend's recommendation letter, I've been getting people asking me how to write a good recommendation letter.
For posterity and the Internet, here you go:
Remember, your friend / colleague / student is submitting this for something that is very important to them. Probably the most important part is making sure that it reads like something you'd submit to a scholarly journal, not something you'd comment on their myspace page with.
Talk about them as you know them: write about the qualities they've shown through the experiences you've had with them. Don't fluff, bullshit, or otherwise go further than your experiences can warrant.
Remember, they're trying to get something from someone with this. That job, college admission, or grad school means a lot to your friend, and you have the ability to directly affect their chances. On the other hand, don't advocate so much that you're written off as a cheerleader.
If prompts are provided, make sure you nail every one of them. If they aren't, think about what you'd want in someone working or studying with you, and nail those points. Particularly, make sure you talk about communication skills, work ethic, and creativity, since those are pretty universally applicable.
Make sure you discuss ways in which they're not perfect. Talk about how they worked on their problems, how they changed for the better, and how they overcame obstacles.
Before you send that make-or-break document off, have other people read it and give you feedback. A fresh set of eyes can catch possibly credibility-damaging errors before you have to apologize for them.
In a pinch, drop me (Justin George) a note and I'll do a brain-dead check on it for you.
Stylistically, there are a couple things you want to make sure you do:
Write in short, complete paragraphs, and make sure each one has a topic. Limit yourself to a few sentences for each, and keep it punchy.
Take the space you need, but don't be verbose. Imagine yourself in the shoes of the reviewer: you don't want to waste time, neither do they. I usually suggest that people aim for a page, two or three if you've known them for a long time or in multiple roles.
Sign it with real pen, on real paper, and mail it to them. People are silly creatures, and an authentic signature on good stationery will make it clear that you mean it.
You do have good stationery, don't you? Everyone should have a few sheets of quality personal stationery for just such an occasion. Rag paper with a heavy feel shows you care enough to spend money on the people you're writing to, as well as the person you're writing for.
These are, generally, the same rules you should follow for all good writing. In fact, you'd do well to follow them for all official correspondence, including admissions letters and particularly thank-you letters.
If you're the one getting a recommendation, remember that it takes a lot of time and effort to write a really stellar one, so make sure you write them two letters: One to ask for a recommendation letter (Even if you're asking for a recommendation letter in person, it's a nice touch to follow up) and a second as a thank-you letter (both on real paper, following the rules above) and mean it. It will make you memorable in the future, and that can mean jobs, referrals, and other benefits, as well as a lasting friendship.