Fri, 30 Jul 2004
Short Attention Sp-Hey look!
I've been busy lately and I've not really had a chance to spend more than
half-an-hour on any one thing, I thought I should write a brief update
entry to help me keep tabs on what I've been playing^Wworking on.
- Pragmatic Guide to Version Control with CVS book review
- Added DOAP data to my two Freshmeat projects. The raw versions can be found here
- Started playing with bash 3.0, more to come on this.
- Rattled through six-eight mycroft requests using the excellent tools provided at Mindzilla
- Read Managing RAID with Linux. Review to come but its a good introduction to the topic
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/30 15:02 | /misctech | Permanent link to this entry | This entry + same date
Sat, 24 Jul 2004
Sells-ing Out
Adam Kinney has a post
about Longhorn and XAML books in production. While I'm an O'Reilly fan, I
have way too many of their excellent Unix books, I've never been too taken
with the Windows selection. It looks like they are gearing up though with
two books written by Ian Griffiths and Chris Sells, two bloggers that
should be required reading. Nice move Tim!
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/24 22:31 | /books | Permanent link to this entry | This entry + same date
UKLug -- Job Searches and RSS Feeds
A friend of mine runs the UKLug
website, an online search engine for jobs that allows you to 'subscribe' to
a search query. Every time your feed reader requests the contents the query
is re-run and the current results are passed down.
"Thats neat. Why is it getting mentioned here?" Well you highly focused individual it's being mentioned here for two reasons:
- Firstly it's a good site that deserves some coverage; even if it does look like Google.
- I'm writing some search tools/add-ins that work with it.
Over on the main site I'll be adding entries to both the Mycroft searches and IE Address-bar customisation pages. I may even be adding a new page for bookmarklets featuring a little snippet thats takes your Jobserve query and re-runs it against UKLug. This code snippet is based upon the querystrings used at each site, if these change i'll upload a new version on my site. For now the bookmarklet can be found here:
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/24 14:20 | /tools/online | Permanent link to this entry | This entry + same date
Tue, 20 Jul 2004
Ispell and HTML Documents
I'm posting this for my own benefit as much as anyone else's. Ispell has some
support for HTML /
XML documents, if
invoked with '-h' it will not spell-check certain parts of the document as
the rules below show:
- This element name is misspelled: <elemment>element</elemment>
- This attribute name is incorrect: <tag nme="Dean" />
- The value of this attribute is wrong: <tag animal="Elepant" />
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/20 00:07 | /tools/commandline | Permanent link to this entry | This entry + same date
Mon, 19 Jul 2004
Pragmatic Programmers do CVS
I've been a fan of the Pragmatic Programmers ever since I stumbled on to
their first book, The
Pragmatic Programmer. Since then I've happily worked my way through the
Pickaxe book (Pragmatic Programmers guide to Ruby) and now I've started on
their own 'Starter Kit' series.
CVS has never been something I went too deeply in to, the basics of checkout, change, update and commit were fine for my purposes. These days I mostly write small bits of code, short articles and seldom collaborate with other people on projects outside of work. Between the O'Reilly CVS pocket reference and TortoiseCVS I've managed to muddle through knowing the basics and using a little google magic. While I'm only halfway through Pragmatic Version Control I wish Dave Thomas and Andy Hunt had written this book when I first started using CVS.
The book begins with a gentle introduction to the what and why of source- code control. If you've read many development books then not much of this will be new to you. Where this book excels is pushing the point that SSH is the only sensible way of talking to CVS servers (assuming you don't just want anonymous access) while its recipe approach is ideally suited to the basic tasks of CVS; each one short and to the point. They are easy to read and understand while providing enough context, in the form of example commands and output, to save you checking a reference site.
I've not finished the book yet but so far I'm very happy with it.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/19 23:22 | /books | Permanent link to this entry | This entry + same date
Sun, 18 Jul 2004
Why do you use Orkut?
I received an invitation a while ago and I've had a play, invited some friends,
sent some messages and even created a group to discuss a topic. I spent
half an hour looking at the pictures for people I've chatted with on
lists but never meet in person, that was almost a month ago; then I
forgot about the account.
I've just logged back in and pretty much everything is as I left it, the groups I joined (GLLUG, Lonix, London-PM) have had no posts made and have a subset of the people on the respective mailing lists present. So I ask, what does Orkut get me that joining the mailing lists didn't?
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/18 16:33 | /tools/online | Permanent link to this entry | This entry + same date
Thu, 15 Jul 2004
Computer Changes
I've not had a good week as far as computers have gone, my trusty P2-350
with 512MB finally bit the bullet and died, it's not even reaching the BIOS
anymore so I'm looking to dump it. I'm currently using my backup machine, a
P3-866 with 128MB running the evaluation version of Windows 2003 (which is
quite nice but more to come on that) but its dog slow when I've got
FireFox, SharpReader, winamp and half a dozen terms open. Might be time to
splash out on a new PC.
The box hosting this site also went down for a couple of days, the hosting centre had a power failure in a couple of racks that took the box down until someone could get down and have a look, everything is running again now so i can continue to prattle on.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/15 22:34 | /meta | Permanent link to this entry | This entry + same date
Sun, 11 Jul 2004
Who Watches Watch?
The watch command is one of those little gems that often gets overlooked
and has its functionality duplicated by a custom tool; just slower and more
complicated. At its most basic watch runs the specified command every two
seconds until interrupted, a simple example that shows the current
directories content is given below, this will show any changes in either
the size or timestamp of the contents.
watch ls -ahl
Watch excels in showing real-time differences, by supplying either '-d' or the long option '--differences' any changes will be marked on screen using inverse colours. Running this command on two separate machines allows you to easily drill down on any changes taking effect, a good example is when comparing two MySQL slaves with a command like this:
watch -d -n 1 mysqladmin ext
In most cases this is ideal however only the changes from the most recent iteration are shown, if you want any changes since the command began to stay highlighted then you need either of the following cumulative flags:
watch -d=cumulative command
watch --differences=cumulative command
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/11 12:14 | /tools/commandline | Permanent link to this entry | This entry + same date
Fri, 09 Jul 2004
Sed Sickness -- Whitespace Reduction
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. The grep command can take a file as an argument, it doesn't need to read from standard input. This takes away one command and a | (pipe). We then move onto the bastard stepchild that is this abuse of sed. The person who wrote this is no-longer available to beat^H^H^H^H^H ask for clarification but after some head scratching it seems the author had never head of quantifiers such as + and *.
Instead it takes every instance of two spaces and makes it one space, globally. It then does it again and again until it id reduced to a single space. This is a great example for a number of reasons, wasteful repetition of code, long ugly lines and it displays a lack of knowledge of the tool. Compare the above with the following, rewritten version.
grep eth0 /proc/net/dev | sed 's/ \+/ /g'
We've killed the cat and shrunk the sed. The + is a quantifier, it changes the behaviour of the previous pattern, in this case it changes a 'match two spaces' to a 'match one space followed by any number of spaces as long as its above two.' This whole matched block is then substituted with a single space. The code is shorter, faster and easier to maintain. And it doesn't make me lose another few (precious) hairs.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/09 20:20 | /codinghorrors | Permanent link to this entry | This entry + same date
Breaking Grep
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. This would be a seriously annoying problem to track, you'd have to get lucky and notice it in the output of 'set' or a similar command.
Not that I'd ever think of doing that of course ;)
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/09 00:17 | /misctech | Permanent link to this entry | This entry + same date
Wed, 07 Jul 2004
Just Don't (1 of ?)
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. Anyway this doesn't lock the database or slow it down." *sound of head hitting desk*
If this is you PLEASE think about the possible options, a separate replication host that can be stopped and backed up, online backups (if you use InnoDB tables) or even (this is also bad) just a read lock and table by table SQL dumps are better than copying data you know is probably in an inconsistent state.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/07 21:35 | /justdont | Permanent link to this entry | This entry + same date
Absolutely Delicious
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'. These define what the targets contents are about (think categories such as programming, humour etc) and allow easy access to related sets of links. You can also add an extended comment if you like.
The front page is a rolling collection of the most recently added bookmarks, if you wanted you could just leave this page open as a source of inspiration. Given half-an-hour your bound to see something of interest. What makes it easier to find items of interest is that the darkness of each links background is based on the number of people that have book-marked it using the service. The darker the background the more people that have thought it worthy of note. The community aspect of the site is what gives it a killer edge for me, i don't get to speak to peers in some of the subjects I'm interested in but with a couple of feed subscriptions i can get an idea of what they are looking at.
Add to this the fact that you can get RSS feeds of pretty much anything you want (tags, peoples bookmarks, peoples specific tags) and its a great service, worthy of an evaluation.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/07 20:55 | /tools/online | Permanent link to this entry | This entry + same date
Sun, 04 Jul 2004
Magazine Adverts
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. Not bad for a magazine that weighs in at less than 150 pages.
One of my other magazine purchases was the July 2004 issue of MSDN magazine. What struck me as odd was the fact it came with another magazine bundled with it, "The C/C++ users Journal." While i can understand the desire to try and lure VB and C#ers across what gave me a chuckle was the articles on display in this Microsoft magazine attached freebie.
- C++ Compilers for Linux
- Gentoo: A programmers Linux
- Task Scheduling and Real Time Linux
- GNU and Native C++ compilers
I'm not sure who snuck this one through the MS people but the exposure doesn't hurt the Linux world.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/04 17:38 | /magazines | Permanent link to this entry | This entry + same date
Sat, 03 Jul 2004
Little Things -- GMail (1 of ?)
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. I like it.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/07/03 10:02 | /tools/online | Permanent link to this entry | This entry + same date

