Hi, I'm Ben Oakes and this is my geek blog. Currently, I'm a Research Assistant in the Early Social Cognition Lab at Yale University. I also tend to do development with Ruby, Rails, SQL, HTML, CSS, and JavaScript. Sometimes, I am known for being a rabid Mac OS X and Vim enthusiast. I love design (both visual and conceptual) and music. I have an amazing girlfriend named Danielle Smith.
I recently decided I should send my aging TI-83 graphing calculator out to pasture. I haven’t really used the thing since my freshman year of college, and if I am going to do any serious amount of math, I have much better looking (and faster) solutions on my iPhone and even my ancient Zire 31. I’m a little surprised Texas Instruments hasn’t brought out anything significantly better — a TI-83 feels out of place in 2010. I guess that’s what you get for stifling competition; they’ve basically owned the graphing calculator market for quite some time. (Seems a little like Windows XP to me.)
Before selling it on Amazon, I thought it would be best to save some of the TI-83 Basic programs I had written back at the turn of the millenium. Some of my first programming experience came from writing dinky programs on the thing (which wasn’t ever that easy — keep in mind that it has a severely limiting 16 x 7 display). After figuring out what I was doing (a little) I even wrote a hangman program (pictured above). It’s littered with ugly things like single letter variables and goto statements. I don’t even know if it’s possible to make functions… I think they have to be other programs, a la Matlab — which is part of the reason that I say “Matlab is a great graphing calculator”.
At any rate, I typed up what I thought would be worth saving for “historical purposes” and even uploaded it to my snippets repository on GitHub. Take it as my gift to the TI-83 hacker community. :P
Update: …and within less than an hour, it sold on Amazon. The Internet still blows my mind sometimes.
My girlfriend is moving in just a few days but still has quite a few books listed on Amazon that would be great to sell before packing everything up. Take a look around — you might find something worth picking up!
This is the first of a series of posts about code I have in my GitHub repositories.
I’m often annoyed that I have to wait for iTunes to download the NBC Nightly News podcast so I can watch it in the morning. I also don’t like iTunes’ video player much — it’s slow and crashes all the time. (Why Apple hasn’t ported iTunes from Carbon to Cocoa is sometimes beyond me… but I’m sure it will happen eventually.)
Recently, I found out that NBC always publishes their podcast to the same location every day, so it was easy to make an AppleScript to open it in QuickTime X. QuickTime X starts playing it right away, without making me have to wait for it to download completely (or wait for iTunes to catch up with me).
It’s actually quite a simple script. Unfortunately, I couldn’t find a fullscreen verb for QuickTime X, so I had to use Jacob Rus’ menu_click method.
I’ve had the great pleasure of working with some other local Ruby developers to reignite NewHaven.rb over the last few weeks. Our second official event is a “Ruby, White, and Blue Hackfest” tomorrow, July 1st. It’s going to run from 6-9 pm at Blue State (the Wall St location). Everyone is welcome — don’t worry about skill level! You bring a laptop, we bring the community.
Right now, the plan is to get together and work on a few projects that group members are interested in, including our upcoming website. I’d also like to talk about what we should do for our next event.
I spent some time over the last few weeks pulling together lots of command line tools that I’ve written over the last few years. I’ve shared them on GitHub.
Some fill in gaps that I wish *nix systems would have by default (such as prune vs uniq or reverse vs rev). Others just script things that I do commonly or are just tedious to do (such as backups2git, github-init, timestamp, latest-migration-path, and std-timestamps). Some are just there for fun (such as is-computer-on). Most of them are written in Ruby, but some are plain old Bash scripts. Lots of the Ruby scripts make heavy use of ARGF, which is awesome for writting shell scripts if you’ve never used it.
I also spent some time documenting (and remembering) how they worked. (Most of it was just shuffling comments around.) Almost every command has a --help option that prints usage information and a short synopsis now. I hope you find them useful!
I’ve long been aware that “constants” in Ruby (i.e., variable names that are capitalized) aren’t really constant. Like other programming languages, a reference to an object is the only thing stored in the variable/constant. (Sidebar: Ruby does have the facility to “freeze” referenced objects from being modified, which as far as I know, isn’t an ability offered in many other languages.)
So here’s my question: when you re-assign a value into a constant, you get a warning like so:
This has to be one of the coolest things I’ve seen in a while. Such an awesome idea! I think he should have used Link from Zelda II when you get a mushroom, though.
I’ve been working hard on redesigning this site. You can see what it used to look like, above. It’s been a fun ride: I took this opportunity to learn more about HTML5 and CSS3. I’m pleased with what I’ve made. The result of my work is the custom WordPress theme you see now. I learned a lot in redesigning this site (mostly HTML and CSS, but a little PHP too). Over time, I’ll be rolling out some summaries of what I learned in blog posts.
Geek section: As it’s just a personal site, I’ve been experimenting with new HTML5 features and semantic tags, keeping the markup as minimal as possible, and applying visual effects only through CSS. As a result, there are very few images (all the gradients, shadows, rounded corners, and animation are pure CSS3) and the design degrades elegantly for older browsers. It even looks decent in the 9-year-old IE6. I’m preferring the new video and audio tags instead of Flash or other plugins as much as possible. The site even works (and looks) great on my iPhone. HTML5 and CSS3 still have problems, but the future of the web looks bright.
I also took the time to pull together some old content from other sites. There are still some gaps, but there are posts going all the way back to 2002. (I cringe a little reading some of it, but it’s interesting to see how much I have—and haven’t—changed.) Some posts have only been living on a hard drive for the last 8 years, but others have been on other services like Blogger. I’ve done my best to redirect links here.
Please let me know what you think in the comments.