October 2010
1 post
“The art of the connection is the end result of a nerd’s highly obsessive due...”
– Michael Lopp
Oct 28th
September 2010
2 posts
“Quit iTunes 10, and enter defaults write com.apple.iTunes full-window -1 in a...”
– Chris Foresman at ars technica
Sep 6th
2 notes
“[anthropologist Susan D. Blum] contends that undergraduates are less interested...”
– Lines on Plagiarism Blur for Students in the Digital Age - NYTimes.com
Sep 6th
August 2010
2 posts
Indonesian deforestation exposed →
A Greenpeace aerial survey reveals an area of deforestation in Sumatra stripped for pulp and palm oil plantations and logging (from The Guardian)
Aug 30th
5 tags
IE6 and CSS media types
When trying to reduce the number of HTTP requests on a web project I was working on, I tried to combine my screen and print stylesheets into a single file. Using the @media declaration, one should be able to specify media-specific styles. Other browsers were ok, but as usual IE6 was playing up. My @media print block was completely ignored. The setup First, I had only generic rules and a single...
Aug 18th
June 2010
5 posts
2 tags
Modifying Subversion commit messages
Sometimes when I try to quickly repeat my last command in the terminal, I end up firing off a svn commit. Unlike with Git, you cannot modify commits in Subversion, but you can modify a revision’s properties — like the log message. Here’s how: svn propedit --revprop -r 1234 svn:log This will open your $EDITOR and it lets you edit the log message for the specified commit (1234). Note: in...
Jun 30th
2 tags
Using relatedTarget in event handlers
Here’s a nice trick for working with mouse events in a web page. Given a simple drop down menu, I used to use a timer to delay the closing of a submenu while the mouse travels from the menu title to the sub menu (where it nog longer hovers over the menu title, that had the original event handler). The timer going off would hide the submenu, unless the mouse entering the submenu fired a new...
Jun 24th
1 tag
Quick text manipulation with Ruby
Here’s a nice trick I like to use to quickly transform some random piece of text using Ruby and Textmate: string = DATA.read # do stuff here... __END__ Text to transform goes here By using the __END__ line you tell Ruby to not executre all that follows, but capture it in an IO which you can read. You can then quickly whip up a script and have Textmate run it using ⌘R. The script’s...
Jun 21st
Jun 3rd
9 notes
3 tags
Open Mail window
Here’s something that has annoyed me ever since I got a Mac: when switching applications using the keyboard (e.g. ⌥-Tab), choosing Mail would not actually open a window if there wasn’t one open already. It seemed this was only good for switching to windows, not applications. Although this bugged me, I never got round to finding a solution, until now. It struck me that you can switch...
Jun 2nd
May 2010
1 post
4 tags
Issues using VCSCommand with MacVim
I tried to use the VCSCommand-plugin for Vim the other day, but I ran into a strange issue: the plugin tried to use an older version of subversion with my working copy, resulting in “this client is too old” error messages. The setup I’ve got two copies of Subversion installed on my system: the default that comes with Mac OS X (1.4.4) and the one I manually installed (1.6.9). I...
May 26th
April 2010
1 post
“…when Apple ties my hands behind my back and lets users punch me publicly in the...”
– Garrett Murray, creator of the awesome ego iPhone app, on how Apple’s App Store is not helping him at all.
Apr 28th
March 2010
8 posts
1 tag
Literally, A Web Log →
An English language grammar blog tracking abuse of the word “literally”
Mar 25th
6 tags
zsh arguments-fu
When using Subversion from the command-line I commonly do: svn copy ^/myproject/branches/FB-branch1 ^/myproject/branches/FB-branch2 svn switch ^/myproject/branches/FB-branch2 This is a lot of typing. One way of working around this a wrapper around svn to automate these patterns, but another is using shell power. I use zsh, but bash and others can do the same with slightly different...
Mar 18th
1 tag
Librarian: There's a problem with this account update. It seems you have changed your default library account password.
Me: yes.
Librarian: ...
Me: I like chaning my passwords every now and then.
Librarian: It's not recommended to change your password. No we cannot update your account.
Me: ...
Librarian: I'll create this extra account for you, and restore its default password. Your password should be the first four digits of your birthday. But don't change it again. It's makes life difficult for all of us.
Me: Ehm… thanks?
Mar 16th
2 tags
Designing for the Web →
Wonderful book, now available online for free.
Mar 12th
1 tag
McDonald's employee: here's your burger. You might want to check if it's still good.
Me: excuse me?
McDonald's employee: you know, try it. I'm not sure if it's still good.
Me: I think I prefer a new one, regardless.
McDonald's employee: why? It might still be okay!
Mar 12th
6 tags
Using Postbox
I’ve decided to give Postbox a try as my default e-mail client. I love Mail.app’s simplicity, but it has some quirks and I feel I could do better. Here’s what I like so far: A sleek interface for tagging (called topics) Quick browsing of attachments in a folder or from a contact Archive message immediately with ‘a’ Gmail-style conversation view Pretty good and quick...
Mar 11th
Mar 10th
71 notes
2 tags
Test apache configuration syntax
Recently my Mac OS X stock install of Apache failed to launch properly. The regular system preferences interface stopped and started Web Sharing without complaining, but I could not find httpd actually running using ps -ax | grep httpd in the terminal. I was at a loss to explain why, until I found this little gem that you can use to syntax-test your configuration files with: apachectl -t will...
Mar 10th
February 2010
1 post
2 tags
Javascript: typeof NodeList
Beware of Javascript’s quirky typeof: typeof document.getElementsByTagName('p') This will return 'function', which I did not expect. What is returned is a NodeList, which behaves like an array, identifies itself as a function, but really is neither. If you want to detect a NodeList you’re better off with feature detection: var isNodelist = (typeof myvar.length != 'undefined...
Feb 5th
December 2009
2 posts
1 tag
Getting Things Done with Rituals
In order to achieve real productivity you need to get into the zone. Context switches take you out of the zone and should therefore be managed carefully. Get rid of multitasking. I’ve found the mental overhead of context switches can be reduced with a clear start and end for a tiny break from work. A ritual provides such clear boundaries. I use several rituals throughout my day: reviewing...
Dec 16th
“In retrospect, all revolutions seem inevitable. Beforehand, all revolutions seem...”
– Michael McFaul
Dec 8th
November 2009
1 post
Nov 3rd
13,990 notes
October 2009
1 post
4 tags
jQuery custom selectors
I like writing jQuery plugins, so I can separate functionality into distinct units. But applying the plugin sometimes requires some logic I’d rather have in my plugin itself. Example code Say I want to create a plugin that creates a lightbox-style image zooming effect. I want to apply it to all links pointing at an image: <a href="/images/photo1.jpg"><img...
Oct 14th
September 2009
7 posts
4 tags
GTD with OWA
Relying on Microsoft Outlook Web Access without Internet Explorer can be tiresome — being served a static web application that would have annoyed even in 1996 — but it is kind of relaxing too: the effort of constantly logging in and taming the horrible interface to get to your mail is a real motivator to get some actual work done.
Sep 22nd
4 tags
Sep 20th
2 tags
“Your request to not receive promotional emails about your subscription has been...”
– FT.com customer service: 10 working days to unsubscribe from your mailing list? That’s crazy fast! They must be using some kind of “computer”. Amazing…
Sep 16th
3 tags
Attractive piracy
The problem with internet piracy is obvious: downloading illegal materials is easier, cheaper, faster and the acquired content is more portable, than with any legal alternative. The solution would be to close the gap between the desirability of illegal versus legal content distribution from the consumer’s perspective. Too bad then, that the music and movie industries take the...
Sep 9th
4 tags
Subversion branching
The main reason why developers should use Git for versioning is cheap, cheap branching. But in Subversion it isn’t so hard that you shouldn’t use it. Here’s a basic bugfix branch workflow. First, create your branch: svn copy /path/trunk\ /path/branches/my-new-branch\ -m "Create my new branch" svn switch /path/branches/my-new-branch Of course, /path/ is easy...
Sep 8th
1 tag
“In many ways, history should be regarded as a globalizing mass medium in the...”
– P. Fritzsche, Stranded in the Present
Sep 6th
4 tags
Distribution of Academic Literature
Here’s how I get my academic literature these days: Let a teacher e-mail me a Microsoft Word file with references. Print the file Go to the library, look up the titles and wait an hour before fellow students return them. Copy the required pages on dead tree (single-sided). Go home and scan in the dead tree. Archive the digital article on my computer, ready to read from screen. Throw...
Sep 4th
August 2009
5 posts
5 tags
Snow Leopard Web Development Configuration
After installing Snow Leopard on my iMac I found I had to tweak some settings before I could continue my daily web development workflow. First, you should note Snow Leopard now comes with PHP 5.3 and it will overwrite your custom Apache configuration. Here’s what I did to get up and running: Moved /etc/php.ini.default to /etc/php.ini. Edited php.ini (using search/replace) so that...
Aug 29th
4 tags
Internet Explorer, Javascript and base elements
Internet Explorer treats the base element a bit diffently from other browser. I ran into the issue when trying to change the current page’s hash through javascript: window.location.hash = 'some_value'; Internet explorer took the entire base URL and prepended it to the hash, resulting in an URL like http://domain.tld/http://domain.tld/#some_value. That’s clearly not my intention. ...
Aug 21st
3 tags
Removing deleted files from the Git index
When working with Git it can be cumbersome to have to remove files from the index (marking them deleted rahter missing) if you did not delete them using git-rm. Here’s bash one-liner for that: git rm $(git ls-files -d) I’ve got that aliased to grd (Git Remove Deleted).
Aug 17th
2 tags
Argument-specific memoization
There is another way of memoizing expensive operations in JavaScript, which is also fit for argument-specific results: base._fooCache = {}; base.foo = function(arg) { if(base._fooCache[arg] === undefined) { base. _fooCache[arg] = ...expensive operation... } return base. _fooCache[arg]; }; This just keeps a local key/value cache of the result of the expensive operation for...
Aug 13th
2 tags
Awesome JavaScript memoization
Here’s an easy way to memoize expensive Javascript functions. It introduces slightly obscure code and an extra function call, but if your operation is expensive enough to memoize, it is probably worth the extra overhead: this.foo = function(){ var foo = expensive_operation(); return (this.foo = function() { return foo; })(); }; What this function does is redefine itself, so on...
Aug 13th
July 2009
5 posts
3 tags
Science & Religion
Science and religion are not as incompatible as many seem to believe. The scientific method implies the use of logic and reason towards falsifiable theories. When you weigh pros an cons, and take into account all available evidence, there is nothing wrong with believing in a supreme being. I personally don’t believe that, bu to each his own. I do have a problem with people who reject...
Jul 21st
4 tags
E-mail can be hard to find, no?
For my formal request for a bachelor’s in History I needed to hand in my thesis via e-mail. I asked to make sure if I needed to include anything special with that, such as a subject line prefix, so they would be able to find it later on. The friendly lady on the phone told me that was unnecessary. Two days later when I came into their office to hand over all other paperwork I had to wait...
Jul 8th
3 tags
PDFs professional?
It is telling of Windows, Office and Adobe that using PDFs is considered ‘highly professional’ in the Windows-world, out of reach of the average Joe computer user. Creating and using PDFs can and should be easy, and need not require a $799 license for bloated Adobe products. It is, in essence, just a file format.
Jul 7th
“They’re made up. Invented. Plucked from the imagination of someone in the...”
– Martin Moore Blog: The Case of the Missing Journalists
Jul 6th
2 tags
Using git stash branch
When using Git I sometimes end up with a bunch of changes that would really be better off in a feature branch. Here’s a quick way to take those changes in your working copy and start a feature branch quickly: git stash git stash branch my_branch_title From the docs on git stash branch: Creates and checks out a new branch named starting from the commit at which the was originally...
Jul 2nd
June 2009
1 post
5 tags
Internet Explorer's defects
Internet explorer has many faults, especially the versions 6 and below. As web developers we want to give our users the best possible experience, so we come up with ways to hide these faults. By doing this we are teaching internet users that Internet Explorer is a fine web browser, and that websites built with web standards that look odd are not properly built. This is turning things on their...
Jun 30th
November 2008
29 posts
“An infinite number of mathematicians walk into a bar. The first one orders a...”
– Randgruppenhumor cont’d (via)
Nov 19th
Recipe: The Best French Onion Soup (…ever!) ... →
Nov 19th
Nov 19th
Nov 19th
“If you were to describe the document to someone over the phone, would you...”
– Writing good alt text | 456 Berea Street
Nov 19th
Internets down, no more work.
Nov 7th
stupid spaghetti code.
Nov 7th