Tuesday, December 8. 2009Using git for Backup is Asking for Paingit isn't a backup system. Neither is Mercurial, Bazaar, Subversion or even (even) CVS Version control systems, with the possible exception of SourceSafe, are great at keeping track of code. Why is that? Because they were designed to keep track of code. Unfortunately, though, the features of a good VCS are entirely different – and often exactly the opposite – of the features which make a good backup system. Take, for example, file ownership. A good VCS will, very rightly, ignore file ownership: when I check out someone else's code, I should be the owner of those file - not whatever And ownership is just one example - permissions†, creation and modification times, empty directories‡, hardlinks, xattrs, resource forks, … the list of details that a backup system must keep track of goes on and on. In fact, there are so many things a backup system can get wrong, there is a project called Backup Bouncer, designed specifically to verify that backup scripts correctly copy all the various bits of metadata tracked by the filesystem. So, please: if you value your bytes, use a real backup system, not git. †: Most VCSs only track the 'x' bit - for backup purposes, all bits, including suid bits, must be tracked. Monday, December 7. 2009Best Ever Implementation of "indexOf"!(alternate title: The "Fail Early, Fail Often" Principle in Action) I would like to award Adobe the "best ever implementation of
This beauty can be found in And the kicker? The function's documentation:
The author clearly knew that unknown methods* shouldn't be called… But instead of doing something sensible – like throwing an exception – they do something wholly nonsensical and return Next up: why implicit conversions from </rant> *: the magic PS: Instead of calling Saturday, December 5. 2009You and Your Editor: Vim normal mode commands g, : and d (3 of N)In my last post, I showed off some normal-mode data from vim-logging. In this (and the next few) posts, I'll go though my most-used commands and describe how I use them. (Don't use Vim? This post won't be too interesting… Although you may pick up something useful) gMy logs contain more than 60,000 references to the 'g' command (eight times more than ':', the next most frequently used command). This may seem surprising at first, but stick with me and let me explain: the 'g' command is something of a 'gateway' command - a prefix for a number of common actions which don't have their own single-character command (for example, gd, goto definition and g?, rot13 encode). Here is a breakdown of the 'g' suffixes I often use:
That's all the 'g' commands I can think of for now... The next version of vim-logging will log the sub-command used, so I will be able to provide better data in the future. :The colon command is fairly obvious: enter command-line mode to run commands like I'll write more about this later, when I analyze my most-used ex commands. dAh, As with
You and Your Editor: Data from vim-logging (2 of N)Remember when I blogged about vim-logging? Well, I've finally gotten around to interpreting the results. First, I will cover what I believe to be the most important thing to know about vim: the normal mode commands. Below is a chart of my 39 (why 39? I can't remember - when I created the graph, that's the number I chose) most-frequently-used normal-mode commands: Continue reading "You and Your Editor: Data from vim-logging (2 of N)" Tuesday, December 1. 2009codekills (and wolever.net) downtimeI'm sure you didn't notice, but I'll tell you about it anyway: the server that runs wolever.net and codekills.net, lazarus, died of unknown causes two weeks ago. It took two weeks to get everything fixed because it lives in Toronto and I live in Waterloo… And the first weekend I went back to pick it up… I forgot to pick it up. Right now the data has been migrated to another machine (the one you're talking to right now), and it is doubtful if lazarus will ever live again.
(Page 1 of 1, totaling 5 entries)
|
QuicksearchArchivesLinks
CategoriesSyndicate This Blog |
