Posts

Linux Programmer’s Manual on Ubuntu

I typed man sscanf on my Ubuntu 8.04.1 system at home and was shocked to see this reply: No manual entry for sscanf Never had a UNIX or UNIX-like system ever left me out in the cold like this without help. Fortunately, I found where to get the manpages . Just sudo aptitude install manpages-dev and everything is all better. Phew.

Stack Overflow: Pretty Impressive

Every now and then I check up on what Joel has to say, and I recently discovered that this Stack Overflow website is now up and running. I tested it out this evening by asking a simple little C++ question that I was feeling too lazy to look up. The first nice thing was that I didn't have to register. After I typed my question, I only had to type in a username and email address and it just posted my question without bothering me further. Nice. Then I waited a couple minutes and hit "reload" on the page and lo and behold, three answers had already appeared. Within 5 minutes I had 4 answers. None were quite what I was looking for (not really fair that I kind of already knew the answer and was fishing at this point), so I edited my question, started typing this blog post, and then hit "reload" again and saw another answer trying harder to fit my criteria. Fast results. I'm impressed.

Python For "One-Hour" Scripts

I wrote a "quick" script at work yesterday. I always have to put "quick" in quotes when I do this. I try to be good and write code to automate repetitive tasks that I do. Many others have advocated this and I find it to be very good advice, especially if you are a programmer. For me it usually happens like this: I'm doing something repetitive or tedious and I think, hey, I could spend an hour and write a script to do this. Over my career I've used Perl, shell scripts, and Python to do this. In that order. Yes, I learned Perl before I learned shell scripting (bash and korn shell on HP-UX), and no, Python hasn't completely replaced shell scripting, but I've all but abandoned Perl (and for my real firmware work I program in C++, just so you know). Whenever this happens it always takes more than an hour to write one of these "one-hour scipts." Yes, I'll confess. Sometimes much longer. With Perl most tasks would only require a f...

Less Awful Resume Tool

(UPDATE 12/5/2015: moved to github) If you read Steve Yegge's Ten Tips for a (Slightly) Less Awful Resume , you'll notice that he lists various words and phrases that you should avoid using in your resume. I was re-reading that hilarious, uncouth, yet insightful blog entry a couple days ago and started sweating that I might have a Weasel Word or two in my own resume. This could happen purely by accident, of course (we all get sloppy now and then, right?), so this obviously called for an automated tool. As a result, I present to you the Less Awful Resume Tool, or, lart. lart is a simple tool (written in Python) that searches a text file (ideally your resume) for those words and phrases called out in Steve Yegge's essay, and alerts you to their presence. I have claimed no copyright over this work, and the code is hosted at the Less Awful Resume Tool project on gitorious github. You can do a git pull as instructed there to get the code, or download a zip archive . T...

Bad Vibrations

Image
Having seen Bristlebot , I thought I knew exactly what I was looking for as I carefully disassembled my Samsung SGH-C417 phone. You see, it had accidentally gone for a ride in the washing machine and after quickly removing the battery, and then patiently letting it dry for a few days, it still wouldn't stop vibrating. Everything else worked fine, so I figured I'd open it up, find the little motor that looks like the one powering the Bristlebot, cut the wires to it, and then I'd still have a working cell phone. Here are some pics of what I saw once I opened it up: Can you see the little DC motor? I couldn't either, and as I fought with stubborn little screws and plastic tabs to uncover more of its innards, I became more frustrated with this little phone. I could still power it up and feel it vibrating the whole time, but I could not pinpoint where it was coming from. I definitely could not see a spinning motor anywhere. After a while, the last part to look un...

Open Office Stupidity

If you receive a document as an attachment, open that attachment, start editing, and then click save, guess what happens? You work is quietly saved in a file in /tmp . Guess what happens when you try to find that important file later? Sure, it shows up in the menu under File->Recent Documents, but when you select it, it has likely been deleted, as is the fate of most files left in /tmp for too long. Wonderful. This happened to my brother-in-law (a non-geek who has successfully been using Linux for a couple years now, well, until now, I guess) a couple weeks ago resulting in the loss of some hard work of his, and I almost let it happen to me today. Couldn't we make our apps a little smarter? If it's running on a UNIX like system, would it hurt to make it aware that /tmp is not a safe place to save its user's files? Could it at least give people a little warning before doing so? UPDATE : I don't know what happened, but I received an attachment today and O...

4,600 Miles in Two Weeks

My wife is from Oklahoma and we currently reside in Vancouver, WA. We don’t get to see her family out there in the midwest very often and we just missed a trip out there in April due to the stomach flu (long, messy story). Since April our youngest has turned 2 thereby raising the price of airline tickets for our family by another $500 or so. We also recently purchased a nice new minivan. All of this coalesced into a decision to pack up our three boys and drive to visit her family. We took it in two weeks, visiting friends and other family members along the way, and it was quite an adventure. Even with the price of gas these days it was less expensive than flying us all and renting a van for the time we would have been there. In fact, gas got cheaper the farther we got from Washington. Those Oklahomans have it pretty good at $3.87 or so a gallon. We had a really fun time and connected with a lot of people that we hadn’t seen in a while. It is especially fun to see your kids h...