-
The Commentator
Are you a totally k-rad coder who just can’t stop cutting code to spare time for those silly comments? Cenqua’s Commentator was made just for you:
The Commentator uses revolutionary real-time language processing to actually grok your code and add the necessary comments on the fly. No more doco to slow you down. Just install The Commentator and watch as your coding elegance is eloquently decorated with insightful, nuanced commentary … as you type. What’s more, The Commentator’s powerful Personality Controls allow you to tweak it’s output so completely that it’s as if The Commentator is speaking for you. In your voice. Explaining to those that need it, so that you can get on and get busy.
It’s worth checking out just for the personality controls screenshot. SCO or chicks indeed!
-
Flip4Mac's WMV Player
For those of you looking to play Windows Media on the Mac and absolutely loathe Windows Media Player, check out Flip4Mac’s WMV Player component for the Mac. For US$10, you can play Windows Media files in QuickTime player. (Though see the note about open-source players below; their support for Windows Media may be good enough for your purposes.) I bought it, and I’ve been quite happy with it. It will even use the QuickTime plugin instead of the dreaded Windows Media plugin to handle playback of Windows Media on the Web, even when they’re served those clunky .asx files.
Note: Several open-source multimedia players, such as VLC, XinePlayer and mplayerosx, will play .wmv files, but some WMV files have an advanced codec that these players don’t support yet, so they unfortunately won’t play all .wmv files. While I’m fairly certain that the codec will be reverse-engineered in time, for me, $10 is a pretty good deal to make sure I don’t have to deal with the pain of Windows Media Player ever again. (Of course, the arguably better solution is to use non-proprietary media file formats such as Ogg Vorbis and Ogg Theora!)
-
CSV to Address Book Importer
Mostly for my own reference, here’s an awesome CSV to vCard webpage which will import CSV data, and output vCard (.vcf) format files. This is rather useful if you have masses of contacts to import into Apple’s Address Book program. Bonus coding-fu points for being totally implemented in Javascript!
-
I'm 100% smart!
(Warning: formatting is borked. Sue me for being lazy with copy’n’paste.)
Your brain: 25% interpersonal, 15% visual, 25% verbal, and 35% mathematical!
Congratulations on being 100% smart! The above score breaks down what kind of thinking you most enjoy
doing. It says nothing about how good you are at any one, just how interested
you are in each, relatively. A substantial difference in scores between two people means, conclusively, that they are different kinds
of thinkers.
Matching Summary:
Each of us has different tastes. Still, I offer the following advice, which I think is obvious:
Don’t date someone if your interpersonal percentages
differ by more than 50%
.
Don’t be friends with someone if your verbal percentages
differ by more than 60%
.
- Don’t have sex with someone if their math percentage
is over 50%
.
Update, April 2005:
Try my new test, the 3-Variable Purity Test
.
My test tracked 4 variables How you compared to other people your age and gender
:
You scored higher than 70%
on interpersonal
You scored higher than 11%
on visual
You scored higher than 70%
on verbal
You scored higher than 48%
on mathematical
Link: The 4-Variable IQ Test written by chriscoyne on Ok Cupid -
Coding Fonts
I’m frequently surprised whenever I see veteran coders whittling away in Windows using Courier New or some equally horrible monospace font. (Yeah, I know this is all subjective, so if you don’t like my opinions, go back to using Comic Sans MS, OK?) Considering how much you can stare at the screen all day if you’re a professional coder, a readable pleasant font could actually improve your productivity and lifestyle, in every Dilbertesque sense.
Windows actually comes with a great monospace font that unfortunately seems to be reserved for use by its console windows only. Macintosh folks have been lucky to have had an excellent monospace font (Monaco 9) since its inception in 1984, and UNIX/X11 people have been blessed with truly excellent monospace fonts (
schumacher-clean
and good ol’fixed
, whoever made that.)So, if you’re never thought about your choice of a coding font, check out the following fonts which were made for heavy-duty programmers (complete with slashed zeros; long live the IBM PS/2!). Most of them are available for Windows, the Mac and Linux, too.
- ProFont, my current coding font of choice.
- Metrowerk’s MPW font (Mac OS X only).
- Triskweline
- Proggy Fonts
-
A Short History of Nearly Everything
This book has received a hell of a lot of praise from a hell of a lot of people: all I can say is that it greatly deserves it. Bill Bryson manages to make the book both educational and entertaining. I wish this was a textbook that I had to read for high school (in addition to more in-depth textbooks on the particular topic being studied, of course): it’s the only book I’ve read that made geology seem non-boring. (I wouldn’t quite say that it stirred an interest in geology for me, but it at least made me appreciate it as a science, which I never did before.) Even if you do know quite a lot about the Stars and the Earth, it’s worthwhile reading this just to get an idea of the personalities who were behind all the discoveries.
Best of all, many of the topics it discusses, such as life and the galaxy, gave me back that sense of wonder I had about science and discovery when I was a younger lad. Every time it got me thinking about the beauty of nature and the universe, it brought a smile to my face — and I think it’s worth reading just for that. Highly recommended!
-
An alternative PDF viewer for Windows
Welp, I finally got sick of Adobe Acrobat Reader 6.0 for Windows. Rather than downgrade to Acrobat Reader 5.0, which definitely sucks less (but still sucks), I Googled around and found an alternative PDF viewer for Windows called Foxit PDF Reader. Wow, double-click on a PDF and a viewer window opens in half a second. It can render fonts using ClearType, and you can select text too. Lightweight goodness.
-
reduce() in Python
There’s been a reasonable amount of publicity about Guido van Rossum’s comments on the usefulness of the reduce function in Python, but there’s quite an interesting comment on Lambda the Ultimate about how
reduce()
in Python is quite, well, broken:Heh. reduce() is broken in python (in that it’s not actually a fold function), so I don’t blame Guido for not being able to figure it out in his head. Rather than handling the zero- and one-element list cases properly, it (a) doesn’t take a basis element, (b) raises an error on empty lists and © RETURNS THE SINGLE ELEMENT WITHOUT CALLING A FUNCTION ON IT in the one-element case (true even in recursion). … The way it’s defined, reduce is not fold, it’s a broken fold.
Folding an empty list results in an error? If that is the case, well, it’s no wonder it wasn’t used in Python very much. I’d very much rather Python rip out a half-arsed fold function altogether rather than trying to make it semi-functional (pun intended). That only gives a bad impression about functional programming, and doesn’t benefit anyone. (Disclaimer: I haven’t double-checked the above claim myself, so I don’t know if what Jacob says it’s true. The Lambda the Ultimate folks usually have their heads screwed on very right when it comes to anything to do with programming language semantics, though …)
For the record, I also disagree with Guido’s assertions that
map()
andfilter()
should go away just because list comprehensions exist.map
andfilter
have single purposes: to transform lists, and filter lists. Since list comprehensions can do the job of both map and filter, it’s not immediately obvious what they do, because they now give you more choice, and more choice means less immediate obviousness. If you see a map or filter, you know it’s just doing a list tranformation or a list filter, and that’s it. If you see a list comprehension, you have to read its innards to understand what it’s doing. Or (using Haskell syntax) do you really think[ x | x <- [1..10], isEven x ]
more immediately obviousfilter (isEven) [1..10]
? Considering Python’s heavy emphasis on code readability, that sounds like a step backwards to me.Update: As pointed out, if you use an initialiser with
reduce()
, you get sane behaviour back. That’s good. However, I find it a bit odd that an initialiser is optional, rather than mandatory. (It’s managed to fool at least one user into thinking fold is broken — how many more people had the same misconception?)Update #2: Shane Stephens points out that the optional-initialiser-version of
reduce()
is actually quite useful. Rather than try to repeat it abysmally, I’ll just clag in a part of Shane’s email here:… there’s a very good (but possibly non functional-programming-oriented) reason for the optional lack of a basis in python’s reduce function: sometimes you don’t WANT to run the function on a single element. A good example is concatenating strings:
reduce(lambda a, b: a + ", " + b, some_array)
.Indeed, this is 100% analagous to the
foldl1
function in Haskell, which is the same as afold
, but doesn’t take an initialiser element. So, it looks like half of this article of mine is full of crap. :) -
YzShadow
I just found a little gadgety program for Windows named Y’z Shadow: all it does is add a little shadow effect to your windows (similarly to Mac OS X’s window shadow). While it sounds gimmicky, it’s amazing just how much difference a little shadow makes in distinguishing one window from the next. Try it out and see if it makes window management just that little bit easier for you!
Update: It looks like the YzShadow link above is dead, but you can appear to download it from at least one other website.
-
Paul Graham on Usability
Paul Graham has a new article titled How to Start a Startup, which is an excellent article for hackers who are interested in business. There’s lots of gems in there, but I particularly liked this one:
It’s worth trying very, very hard to make technology easy to use. Hackers are so used to computers that they have no idea how horrifying software seems to normal people. Stephen Hawking’s editor told him that every equation he included in his book would cut sales in half. When you work on making technology easier to use, you’re riding that curve up instead of down. A 10% improvement in ease of use doesn’t just increase your sales 10%. It’s more likely to double your sales.
Maybe Graham can get through to hackers where Jakob Neilsen and other usability experts have failed. That one paragraph is a concise summary of a point that Neilsen has been trying to advocate for years: spend the time and money on improving your software’s usability, and it’ll turn out to be a net profit.
-
JWZ: Groupware Bad
Boring summary: the ever-entertaining Jamie Zawinski talks about why groupware is stupid.
Fun summary: Jamie Zawinski vs Nat Friedman, awesome JWZ-style swearing throughout the article, paying out on stupid managers, and, as usual, telling us how crap Netscape went from version 2 to version 4.
(Props to Joel on Software for pointing out the article.)
-
Consider Phlebas
First, new blog category: “Books”. Go me. One of my New Year’s promises was to read more (fiction) books. Well, it wasn’t really a New Year’s promise — more of a general promise I’ve been wanting to keep to myself for about the last 5 years, so hopefully blogging about it will bring my non-book-readingingness out of inertia.
Anyhoo, the subject of today’s bookdom is Consider Phlebas by Iain M. Banks. If you like big, grand, massive sci-fi scales and plots, this should float your boat quite nicely. The back-page summary of “a space opera of stunning power and awesome imagination” fits it very nicely. If you’ve ever played the magnificent computer game Freespace 2 and gaped in awe at capital ships which are kilometres long and supported thousands of crewmembers, this book evokes the same feeling — only several orders of magnitudes more epic. The main character, Horza, is interesting and is fleshed out quite well, and the supporting cast are decent too. Banks’s universe is filled with great, non-boring detail, from the philosophies of the Culture to the concepts in the Damage gambling game.
To top it all off, the ending of the book is quite interesting, in that the extra “factual pages” at the end of the book give it a sense of closure, while not completely resolving the main plotline. You’ll have to read it to understand what I mean, I suppose.
It’s not a thought-provoking kind of novel like the Ender series is, but that’s not a bad thing considering it clearly never has that goal in mind. If you want serious thought-provoking material, I’ve heard that some of Iain Bank’s numerous other books are quite the hardcore sort. (i.e. At least one person I know simply can’t read his other books simply because they’re so … grim.) As for Consider Phlebas, I loved it. I haven’t read an excellent epic sci-fi tale in a very long time. Recommended.
-
"Witch" Window Switcher
A man named Peter Maurer has published a most excellent bit of software for the Mac named Witch. Witch is a window switcher, in the spirit of LiteSwitch X in the pre-Panther days. I quite like the standard ⌘-Tab window switcher that’s built into Panther, so I won’t be using Witch for that. However, Witch’s killer feature for me is that it can also replace the ⌘-` key with its own switcher, which works in a MRU (Most-Recently-Used) fashion, similarly to how ⌘-Tab works.
Witch’s standard ⌘-Tab window switcher replacement also cycles through all documents in all windows, rather than only cycling through the active windows, which is gives more Windows-like behaviour if you prefer that. It also has other nifty features like being able to assign window zoom/minimise to keyboard shortcuts — but IMHO, that’s all small candy compared to the excellent ⌘-` document switcher replacement!
-
Martin Pool on Revision Control Systems
Coders of the world rejoice, for Martin Pool is building a distributed revision control system:
I am not working directly on Ubuntu, but rather on improving the tools used by open source developers inside and outside of Canonical. The charter is to build a distributed version-control system that open-source hackers will love to use.
Knowing Martin, this will have the usability of Subversion and Darcs, the algorithms of Arch, and the pure leetness of rsync. Beware, other RCS authors: your days are numbered!
-
Australian Open 2005
I just wanted to make a short comment to say how absolutely awesome the tennis in the Australian Open has been this year. The level of play is fantastic and the competition has been great (a crazy number of five-setters!). I don’t ever remember an Australian Open which has been this good. I only wish I were in Melbourne!
-
SD card with built-in USB
Mmm, I want one of these (never mind that I already have a 1GB SD card and a tiny 1GB USB flash drive):
SanDisk has today announced a unique SD card which has a hinged portion, flip this over and the card becomes a USB 2.0 Flash Drive. This neat piece of engineering means that you can flip the card out of your camera and straight into your computer without the need for any card readers or cables. Clever. SanDisk expect to be able to produce this new card in capacities of up to 1.0 GB, they will have more detail and initial samples at the upcoming PMA 2005 show.
-
Windows Calling Conventions
I found an excellent webpage about Win32 calling conventions when I had the pleasure of writing a C++ Apache 2 module. If you’re a UNIX guy who’s learning to deal with anything that involves both C and C++ on Windows, and you’re getting stack dumps which just does not make sense, it could be a calling convention problem. If you don’t think that’s too bad, just wait until you have to write
typedef
s and use type casts which involve calling conventions! (C’stypedef
syntax seriously needs a kick in the nuts.) -
DownloadComment
If you’re like me and have about 100 files sitting in your Safari downloads folder, have a look at DownloadComment:
When you download things in Safari, DownloadComment will put the original URL into the saved file’s Finder Comments. Now you’ll always know where your downloads came from.
Cmd-I in Finder to display the file comments, and BAM! Instant reminder where on earth you got that file from and why. I’ve been using it for less than a week, and it’s already proven itself useful.
-
Linux Kernel Patch of the Week
And the Linux Kernel Patch of the Week award goes to …
Jake Moilanen provided a series of four patches against the 2.6.9 Linux kernel [story] that introduce a simple genetic algorithm used for automatic tuning. The patches update the anticipatory IO scheduler [story] and the zaphod CPU scheduler [story] to both use the new in-kernel library, theoretically allowing them to automatically tune themselves for the best possible performance for any given workload.
Whether it really is truly effective will only be seen, but the coolness factor is so there …
-
Guido gets serious about types in Python
Hmm, so Guido’s blogged even more about adding static typing to Python. I’m not sure if that’s a good idea. While I’m certainly a static typing evangelist, Python has always been a dynamic language, and shoe-horning a static type system on to a language which was never designed for it sets off alarm bells in my head. Objective-C deals with ‘static typing’ quite nicely: you get compiler warnings if the types don’t match. This doesn’t limit any of its dynamism, but you get some extra safety if you decide to use types in your program. Patrick Logan doesn’t like Guido’s proposal either, although that’s no surprise.
So, Python might just get static typing in the future. What’s next, Haskell getting more dynamic?