What we want isn’t always what we need
I found this amazing image stream on flickr (via):
Read On No CommentsI found this amazing image stream on flickr (via):
Read On No CommentsI work on a simple Django Q&A app and decided that Questions and Answers should be on the same page in the admin. Django already provides that using inlines, but after using it a strange error started appearing (usually on server restart or code reload). type object ‘AnswerInline’ has no attribute ‘date_hierarchy’ After a bit [...]
Problem From time to time one needs to fetch a random row from a table in a db. Solution Take one The “obvious” solution is to order by RAND() and get the first: SELECT * FROM users ORDER BY RAND() LIMIT 1; /* Don’t do that */ It does the job, problem solved! Well, no, [...]
Just finished watching this presentation of Guy Kawasaki. Simple advice – whatever you do for a living – Watch It! Also, if you can, grab a copy of his book The Art of the Start. It’s the best 200 pages of entrepreneur advices you can get.
On my computer at work the pdf printer has been broken for a while and today, happily, I found a way to fix it. Go to System → Administration → Printing and delete the pdf printer. Create the ~/PDF folder if it does not exists Run sudo aptitude reinstall cups-pdf to reinstall it. Add a [...]
A few days ago I decided to bite the bullet and update Ubuntu. The last time I did this it caused me quite a lot of frustration – but amazingly this time it was almost painless. The wireless stopped working but I managed to get it back in about 30 minutes. The other thing was [...]
A few days ago I found a nice ringtone for SMS notifications, but couldn’t find a way to use it on my HTC Magic (except using a 3rd party app from the store). After a bit of digging I got it: On the SD card there must be a directory structure as follows: sdcard ⌊media [...]
A few weeks ago I got myself a HTC Magic – an Android based mobile device that, among many things, has a phone in it. But not the phone is the part that I’m going to talk about – it’s the video player. According to the android spec only h.263, h.264 and MPEG-4 SP are [...]
In a recent talk at QCon labeled Null References: The Billion Dollar Mistake1, Sir Charles Antony Richard Hoare himself – the inventor of Null (and QuickSort, and many other things that shaped our industry) states that Null was/is a bad idea. What is Null? Here is an explanation from wikipedia. Null is a special pointer [...]