Lesson in Programming: Why those /* (funny) */ comments are so important

Complete Sarcasm, Banshee, Nifty, Life — trick on November 3, 2007 at 01:33

At work we always marvel about the comments we come across in our code. Indiana Jones stories that somehow get related back to the code by it, how tired the programmer was when writing the code, indications of the [lack of] sobriety of the programmer, random musings about various wildlife…you name it. There’s nothing better than finding a gem. Feel free to submit your own stories.

Actually, I take that back. There is! Discovering your own gems!

So this isn’t exactly code, but it really got me. When I upped to GNOME 2.20, I noticed my task list applet had some gibberish on the right-hand side of it. Strange, eh? Perhaps some sort of bug, perhaps? Naw, something that obvious would’ve been spotted a long time ago. I’ve done something strangely, I was sure of it. As always, a visual is best [red indicates my thoughs at the time…]:

Task Selector: Hmm….

It took me a few weeks of not being able to read such small text and not bothering to even try to before I even thought twice about it. It’s scary. It’s new. It’s something. It’ll go away. Or I’ll figure out what it’s there for.

Ah hah! All it took was a few drinks, and it all made sense. Those must be workspace names! But…uh…gosh, those are strange names when you manage to look close enough to read them. “comes after 11″ — who the hell named these things?!

Yep, that’d be me. Guilty as charged.

Workspace Switcher Prefs - Hah

And I remember. Years ago. Naming my workspaces because “Workspace {1..4}” simply was unacceptable to me. But there was no good reason to stick a proper name on the workspace anyway, so I didn’t. I bet I childishly giggled to myself while writing those. But now it seems they’re used. And I’m laughing even more. Yep. Gem discovered.

Moral of the story: It’s better than finding $20 in your back pocket!

For those of you who can count, what /is/ after 11? I could never figure it out.

[but then I looked it up on Wikipedia…lo and behold!]

/* note to reader: it’s the american dream! [eddie izzard] */

Death to the Zen Micro

Banshee, Free and Open Source, Life, MTP — trick on August 20, 2007 at 19:59

So yesterday I was quite convinced that I was going to make it down to see the Chicago Air and Water Show, hoping I could see the Thunderbirds.  Well lets just say that we got water alright.  I stood out in the rain for well over an hour hoping to see something, but it turns out that they cancelled much (if not all of it).  I came home soaked to the bone, but I had been smart enough to put all the electronics in my bad inside a spare plastic bag — or had I?

Last night I was unpacking my bag and found my Creative Zen Micro down at the bottom of the bag.  It was a sad sight.  I might as well have just gone for a swim in the lake while I was at it, because it was dripping, and I could see water inside the screen.  Tonight, with the help of this handy article at hardwarezone.com, I took it apart and found what I expected — pools of water inside the device. I’m hopeful that I can pull the ole “let it dry, reassemble and it’ll work” game, but I’m doubtful.

Does anyone have an old/spare MTP device that they’d be willing to donate or provide cheaply so I can work on MTP stuff for Banshee?  I’m going to comb eBay of course, but would be happy to take one off someone’s hands if they have a spare.  I don’t really have the cash or need these days to buy anything new.  If you have one, drop me a line!

In the mean time, I guess I’ll just have to write really clean code for Banshee that works perfectly, right? ;)

GUADEC followup

Wowzers, what a great time! Was intending to write about each day individually, but that’s certainly out of the question now. GUADEC was a great experience and I’m hooked on the community! A big thanks to everyone who helped put GUADEC ‘07 together.

My favorite bits:

  • Staying at the hostel. It was a helluva long walk and really sucked on the rainy days, but it was a new experience. Forced random strangers to hang out and I met some cool people. Wish I would’ve gotten the names of the two guys running the hostel; they were very laid back.
  • There were some killer keynotes; most importantly:
    • Alex’s presentation of PyroDesktop. I don’t take much stock in the comments of folks who don’t like this technology. It’s something we’ve never seen before, and I think the coolest part is the potential to draw a new crowd of developers to the desktop! Alex, Chris & company: keep up the good work!
    • Havoc and Bryan’s presentation of the Gnome Online Desktop. Super sweet guys. Everyone loves integration. Now, lets see it happen!
    • Doc Searls’ closing keynote. Doc is a funny man. “Now bend over and give me some content!”
  • And my favorite sessions:
    • Larry’s presentation of F-Spot and the next wave of development. F-Spot rocks!
    • Telepathy and Tubes. You’ve heard the raves of others; I don’t need to spell it out here.
    • Joe’s presentation on Beagle and metadata joyfulness. Joe is a funny man.
    • Kudos to Jimmy K for holding his own during his talk on the new main menu development.
    • The Geodata standards project — creating a totally free database of mapping information.  Cool!
  • The Walkabout.  What a great bar.

Many thanks to all the folks who made going out and drinking absolutely hilarious, including Gabriel, Aaron, Michael, Aiden, Rodney, Toms, any anyone else I’ve missed!

:w

Banshee, Free and Open Source, Life, MTP — trick on June 18, 2007 at 23:56

Yes, that’s a VIM :w (not some new fangled creation), as in, I’m actually writing something here!

I haven’t written in three months, and haven’t committed any code in four…as I’ve been a bit distracted by a few things, notably:

  • That whole job thing. Turns out when you write code 8 - 10 hours a day it drains the coding life out of you. Am still working on overcoming my hate for coding past 8PM. I’m convinced that gedit/vim silently rearrange my code after 8PM so that it has more compilation errors, driving me to stop coding.
    • Perhaps it’s the immense rage caused by running Lotus Notes 5 (under Wine, no doubt!)
    • Perhaps it’s the fact that PHP likes to silently fail or cause strange errors?
    • Perhaps it’s that I _loathe_ bad management. Yes, that’s it. I might just be a young twenty-something kid but seriously, I know leadership & management and some folks “upstairs” don’t have their shit together. Good thing I work in a kick ass IT department!
  • Cycling season is finally here. Finally. Gotta love that good ‘ol mid-western weather for keeping me indoors for so long! Started riding 50 miles/week, then ramped up to 75/week, and then last week jumped right up to 145 in a week (which is hurting right now). Just shy of 500 miles for the year so far; not bad considering I’ve got another 10-12 weeks of good weather and 1,000 miles left toward my goal.
  • Being goofy. Yes, I’m a goof.
  • Kicking some serious ass in the IT department’s completely unofficial but incredibly serious(ish) mini golf tournament. It’s an intense sport I tell you.
  • The fact that bars in Chicago are open till 4 in the morning — enough said. This is simply trouble for a guy like me!
  • My truck has been in the shop more hours than I’ve driven it. I’m giving up — I am going to sell it; I don’t need it anymore!

I’ve been up to a few interesting things lately:

  • Setting up my own shiny new Linode to host vanstaveren.us stuff (websites, email). Exim + Dovecot makes for one heck of a good email server. I should probably write about Dovecot as it’s pretty swift, not too challenging to set up, and the LDA makes it even better. Cooperates much better than my old host’s IMAP server. Don’t ever consider 1and1 for any kind of hosting unless you like server load averages in the double digits, spiking up to 50+
    • Thanks Aaron for pointing me to Linode!
  • Trying, oh so hard, to make my Nokia 770 listen to a simple Ogg Vorbis stream (or even a file). No seriously, I think I’ve spent quite a few hours on this, and I can’t get it to work. I’m getting near ready to re-flash it and start over I’m so distraught. Isn’t Ogg Vorbis one of those things that Just Works on a modern Linux machine?
  • I’ve set up my own rsync mirroring system for Gentoo’s Portage tree. My Linode box (sam) sync’s every night, my server here at home sync’s from that, and my other three boxes (including my box at work, behind a firewall, over my VPN) sync from there. Think how much traffic Gentoo users could save their mirrors if they only had a similar setup!
  • I’m finally — yes, it’s true — starting to work on Banshee again, working on MTP stuff. I’m going to be traveling in a month and my goal by then is to be able to send tunes and playlists to my device with zero trouble.
  • I’m planning to go to GUADEC; this will be my first, and hopefully a lot of fun! Hopefully while there I can gather up a bit more motivation to get back to writing a bit more code :) I’ll also be visiting my job’s London office the following week. All in all it’ll be a sweet trip! If anyone is looking to split a room in a hotel, please drop me a message — I’m certainly looking for a roomate!

Banshee Alarm Plugin v0.2

alarm-plugin, Banshee — trick on March 9, 2007 at 02:27

Just as a quick update, Bertrand Lorentz has put together a second release of the alarm plugin, v0.2.  For those of you who love Banshee so much that you want to hear it first thing when you wake up in the morning, this plugin is for you!
We’re moving unofficial Banshee stuff like this to a Google Code project, at http://code.google.com/p/banshee-unofficial-plugins.  With the use of the fabulous svnsync tool provided by Subversion 1.4, I’ve migrated the entire repository (history included) that was on svn.banshee-project.org to the Google Code project.

If you are ever looking to start a Banshee plugin, or want to see some random hack plugins, check it out.  I’m also happy to give SVN access to anyone who wants to make a commit or add their own module.

Happy hacking!

Banshee MTP Guide Moved

libgphoto2-sharp, Banshee, MTP — trick on December 27, 2006 at 00:45

Howdy folks,

The guide that used to be at http://tricky.vanstaveren.us/Projects/Open_Source/Banshee/MTP has now been moved to the Banshee wiki at http://www.banshee-project.org/Guide/DAPs/MTP.  All the subpages have been moved accordingly.  My site has all the pages set to forward to the Banshee site, so update your bookmarks now :)
MTP progress has been busy as of late and with the recent release of libgphoto2-sharp 2.3.0, I’ve seen quite a few people trying to get their MTP devices working with Banshee and I’ve also been busy writing a lot of code.  Hopefully in the next few days I can tie up a few things and commit my local changes which include playlist support - yes folks, full playlist support.  It’s still a bit buggy tho, so I need a few more days to hack at it :)

libgphoto2-2.3.1 was released this past weekend, be sure to grab it for optimal MTP use!  It has a new hack to increase initialization times by factors between 10 and 100 times because of sped up metadata reading.  Naturally, this is hella-good :)

Banshee Alarm and Sleep Timer Plugin

alarm-plugin, Banshee — trick on September 17, 2006 at 19:04

So…it’s been a while since I’ve worked on this one, but I figure with Banshee 0.11.0 right around the corner, and plugins making their way into the portage tree, it’s time for a release!

So, without further adeiu, I give you banshee-alarm-plugin-0.1. This page will be the home of any further releases. You can also subscribe to the feed category alarm-plugin to hear about any updates or releases.

Cheers!

Banshee knows the words, too!

Banshee — trick on June 24, 2006 at 21:42

This morning I (very belatedly) committed a monster patch from David Schneider which extends the Wikipedia plugin to also be able to query autolyrics.com for the currently playing track. Building upon David’s awesome parsing backend, this makes it integrate well with Banshee. What does this mean for you? No more asking yourself, “What IS (insert favorite artist here) saying?!?!” The answer is a lot closer than you think.

It’s as easy as pie - just download from the Banshee subversion repository. Check out the Banshee Plugin Repository for how to get it!

Now what I’m really looking for is this - I need your feedback. The Wikipedia plugin now does more than just display wikipedia pages, it also does lyrics. Thus, it needs a new name. Anyone have any grand ideas? The winner with the best idea…I dont know…will get…voice on IRC for a day…or something.

Of course, the obligatory screenshot:
lyrics thumbnail

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Patrick “Trick” van Staveren