Tuesday, June 29, 2010

Thrills

I just Syu --ignore kernel26'd my system. I couldn't do a normal Syu because it throws up an error about nvidia-173xx being homosexual. I knew that nvidia would give me hell.

I upgraded, made inittab drop me into runlevel 3, installed nvidia-beta and nvidia-beta-utils, ran a yaourt Syu for good measure, reverted inittab, and now have everything working again, all shiny.

The thrill of fucking things up, then singlehandedly fixing them, is better than sex.

Wednesday, June 2, 2010

Hacker Friends

Hacker Friends is a wonderful Chrome extension for highlighting the responses of those you respect.

Oh, other extensions I use:

Browsing erb.rb, part 1

Today's installment of One Month Codebase is a short browseof Masotoshi Seki's ruby/lib/erb.rb

It's 902 loc, not that hefty, and as we'll see, rather straightforward.

First, the introductory comments. The first 255 lines are great documentation. Several examples showing off different aspects, clear writing. It should make your day.

Pop open a buffer and type in these examples. They may seem trivial, and you really want to get to the meaty bits. Do it anyway. It may turn out that the example usage contains a bug, in which case in a few minutes you could contribute back to the project. If the code works, the sheer act of typing it out, running it, debugging your typos etc, will doubtless put you in the mindset of wondering where you can use
this technique. Hell, halfway through this you may have a brainfart that turns into a full project. At the very least, you will be accomplishing the important goal of playing with the code.

A good idea is to take one pomodoro (half an hour) per example. Keep another buffer open to jot down thoughts so you can come back to them later.

Now that you know how erb.rb is used, you can see how it works. Give yourself half an hour to skim the code, noting in a buffer points of interest, oddnesses, places where you need more comments. A good rule of thumb is that you should make a note of any oddly long method or class. These long methods and classes are great places for improvement: they're ripe to be refactored and simplified. Make a note
of any class or method that seems to be doing too many things, and ask yourself why it absolutely shouldn't be broken up. Sometimes there's a good reason, other times you will be saving countless people from horrible frustration.

Time: 1 pom

Cells.py a terrible temptation

Terrible, terrible temptation.

Today on HN phreeza posted an awesome python game called Cells.

I forked the project and began looking through it. Made some comments (seriously, fork it yourself and add comments. It needs it). Tried to think of ways to implement the TODOS. Popped open a buffer and began brainfarting a testsuite/profiler for it.

And then caught myself. This month is Ruby. Why am I plunging into Cells, even though it is undoubtably dripping with awesome sauce?

I can tell myself that there's plenty of time to do both. But that'll mean that the next cool code I want to jump into will be ever so much more distracting.

Solution: set up a cronjob to fetch the upstream repo once a week until I can dedicate myself to playing with it. When I jump back in, it'll be even more awesome (since the post on HN, it's already had a ton of contribs).

Pomodoro

The head of my todo.txt on Dropbox

As you can see, I'm going for as dead-simple an implementation as possible. I want to be able to C-a-2 into a screen buffer containing todo.txt, jot down brainfarts and update the list, and C-a-a right back to where I was. No mucking about with non-plaintext. I plan at some point to code up a pomodoro.el that adds pomodoro formatting to org-mode.

By the way, I put my todo.txt onto Dropbox, outside the Public share, and symlinked it to the one on my main box. Right now, it just means I can easily cat-tail it to a file such as goings.txt in the Public share to quickly show people what I'm doing at the moment. I can even cronjob it so every midnight, say, anyone who wants to can see what I've been doing.

Anyone have suggestions? A cooler way of integrating todo.[org|txt] with Dropbox?

Tuesday, June 1, 2010

Dropbox

I just pacman'd Dropbox.

I love it. Within seconds I git cloned my dotfiles to it, and aliased a command to push both to github and Dropbox. This is amazing, because it means I can instantly set up a box the way I want without needing root access to install git. I then exported my chrome bookmarks into it.

There's a great thread on HN about using Dropbox to increase the awesomeness in your life.

It's only been a few minutes, so I've not played around much with it. I'm going to try out encFS and TrueCrypt, as well as experiment with executable code. Can I put Arc or Rubinius in it, and have a testing environment? CANNOT FUCKING WAIT.

Monday, May 31, 2010