Leafing through the live source-code should be a pleasant, calming experience, instead it often becomes a game of cringe and seek. While digging through some custom bandwidth monitoring scripts i came across this gem. cat /proc/net/dev | grep eth0 | sed -e 's/:/ /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g; s/ / /g;' Working left to right we have the useless use of cat. Read on →

While rummaging around the grep man page i stumbled on something I’d never noticed before; GREP_OPTIONS. This environmental variable does pretty much what you’d expect, once set it passes the options you specified to each and every invocation of grep that runs with the variable still in scope. While I’m not aware of any real positive usages for this something slightly less wholesome crossed my mind. If you set ‘GREP_OPTIONS=-v’ then every run would return the lines NOT matching your criteria, -v is an absolute switch rather than a toggle one so its not possible to reverse it with another -v. Read on →

Just don’t copy MySQL data files while the tables are in use and expect the backup to work. The conversation was going to be a painful one, sysadmin, the hero of our story felt it in the stream of vindaloo sauce that passed as his blood. “I noticed that our MySQL backups are just raw copies of the data files. I also saw some errors from the tar command about the files being written to while the backup was being run.” “Yes, we know about that risk but if we ever need one of the backups we can probably repair the tables.” “But isn’t the worst possible time to try and repair tables when we have a broken system and need the actual data?” “We’ve never needed them so far. Read on →

One of the online services/applications that has wiggled its way in to my near daily usage is del.icio.us. The concept, like most good ideas, is pretty simple; you save your bookmarks to a remote server and so does everyone else. What makes del.icio.us special is that everyone else using the service does the same. Each user has their own page of links, each book-marked URL is assigned one or more ‘tags’. Read on →

I’ve just finished a cursory read of this months Java focused Dr Dobbs magazine (number 362, July 2004). Not being a Java person i wasn’t expecting to get too much out of it but what surprised me was the sheer number of adverts. This issue has a pull out poster (sponsored by Microsoft) and a total of 50 full pages of adverts. This doesn’t include the half-page or multiple quarter page adverts found on another couple of dozen or so pages. Read on →

Its the little touches that makes certain products stand out. If you click on the ‘trash’ folder and its empty you see: No conversations in the trash. Who needs to delete when you have 1000 MB of storage?! The first time you see it is amusing (or i need a life). When you think about it the message itself is actually positive reinforcement for the service. It implies careful thought has been given to the storage requirements. Read on →

Service banner grabbing is no longer the prominent issue it once was. Todays fire and forget worms probe large IP ranges so quickly that they just try to brute force compromise any servers they encounter and hope to get lucky without checking the product name or version of the target. While these are the most common attacks you will see on your Apache server its also worth noting that they are the easiest ones to defend against. Read on →

The Unixdaemon site is undergoing some design changes as and when i get time. Surprisingly its gone from being a short set of links pointing to a few bits to code to something that actually gets unique visitors every day; and its not just my mum! On the left of the home page I’ve added a small set of navigation links and while working through the CSS i thought I’d try adding access keys. Read on →

A couple of my book reviews are now up on London PM’s review section, the two books are Coder to Developer and XForms Essentials. The first, Coder to Developer by Mike Gunderloy, is a great book for less experienced software developers looking to become more professional. The second is an older but still valid book focusing on the XForms spec. Its a little dry and academic but if you need to understand the principles XForms Essentials isn’t the worst option by a fair way.

Author: Mike Gunderloy ISBN: 078214327X Publisher: Sybex International For those that live in the land of the magic LAMP the name Mike Gunderloy might not ring any bells. For those in the Windows world it’s more familiar, the author of too many books to count, articles in Microsoft Certified Professional magazine (among a fair few others!), his own Larkware site and now Coder To Developer. The book draws upon the author’s years of experience to cover the areas that coders new to the real world of development will find themselves unprepared for, especially if they have come from a hobbyist or purely academic background. Read on →