maybe I don’t need sync

Swaroop C H wrote a blog post about switching back to org-mode from using various apps, including and Evernote, which sync. He says he realized that he prefers a laptop-only workflow, and that his mobile devices don’t actually help him stay organized. If this is even close to being accurate, I want to switch to a laptop-only workflow, as I don’t appreciate the lack of presence that I get from relying on my cell phone.

I’m going to try to adopt a less stressful workflow by switching more to my laptop for organizing things. Wish me luck!

my apps directory

A while ago I got systematic about organizing the files on my computer. It started with a ~/github directory that mirrors the structure of GitHub itself. If I’ve cloned visionmedia’s commander.js, I know I can find it in ~/github/visionmedia/commander.js. This has helped make things easy to remember. Since then I’ve added an archive directory, a src directory (which contains most of my code), and a projects directory (which contains the code I’m currently working on. A few days ago I added an apps directory.

What does my ~/apps directory contain? It contains credentials and configuration for web apps, which I don’t want to store in my code repositories. For the fluxnote project I’m developing, it contains a script to set my environment variables to mirror what I require on Heroku:

export GITHUB_CLIENT_ID=7f2264d71eb1dfbc2611
export GITHUB_CLIENT_SECRET=copied_and_pasted_from_github
export SESSION_SECRET=a_long_hard_to_guess_session_secret
export GITHUB_USERNAME=benatkin
export COUCH_URL=

(Side note: Cloudant has clever auto-generated usernames. The username and GitHub Client ID are real; the secrets and password are not.)

If I run source ~/apps/fluxnote/config, the environment variables from the above script are loaded into my shell. Then I can run npm start to start my server. (After I add my Procfile I’ll also be able to run it with foreman start.)

I like it, because I have my credentials in one place, that I know not to give to anybody (and that would be hard to steal because I use full drive encryption).

Organizing github repos

There are only two hard things in Computer Science: cache invalidation and naming things.

— Phil Carlton

I find that I spend an awful lot of time naming things. More than that, it’s a distraction. I also spend a lot of time organizing directories, and a lot of time trying to recall where I’ve put things.

Cluttered Office

GitHub has made it a lot easier for me to find code online. In fact, it’s so easy that sometimes I just download another copy of a repository rather than search my home directory for one.

As of yesterday, though, the madness is over, because I decided to replicate github’s organization on my own computer. Here are the first two levels of my new, and currently modest, ~/github directory:

As I get more repos downloaded, I think my new organization style will only make more sense. And if I also need a github repo somewhere else, I can symlink it. Also, ~/src is symlinked to ~/github/benatkin.

The idea came when I realized I didn’t have all of my GitHub repos in one place. As you can tell by the tree, I still don’t. Also, I’m putting stuff in my GitHub directory that I may add to GitHub later. If something stays there longer than a week and  I don’t put it on GitHub, though, I’ll move it to the archive.

This new directory structure also has the nice side effect that I won’t need to delete repositories just because I need stuff to be easier to find.  It shouldn’t take long for the number at the end of the tree output to go over 100, and in a while, the number could be in the thousands. I’ll think of it as a partial mirror.