Monday, June 25, 2007

Google Developer Podcast

The only podcast that I regurarly listen to nowadays is The Java Posse. Recently Google launched a developer oriented podcast called the Google Developer Podcast. Since Dick Wall and Carl Quinn from the Posse are participating in the GDP it's almost like listening to a special edition of the Java Posse. For me this is a very good thing.

When I started going to the gym more I subscribed to tons of different podcasts: Python411, Drunk and Retired (Java), Digg Nation, Floss Weekly, etc. In the long run however I found that most of them are too unprofessional for my taste or don't have the right topics and especially signal to noise ratio. So I ended up listening to them only occasionally and stuck with the Posse in the last few months.

Are there any good developer podcasts you recommend?

Thursday, June 21, 2007

Django, TurboGears, Pylons comparison

It doesn't even try to be "scientific" but I still found this comparison of the currently popular Python web frameworks very informative:

Unscientific and biased comparison of Django, Pylons, and TurboGears

Tuesday, May 01, 2007

Guido's Python 3000 Talk

I somehow missed this talk Guido gave at Google about Python 3000. I found it through StumbleUpon now.

Saturday, February 24, 2007

Python web frameworks quote

Reading through the PyCon 2007 notes:

There are more Python frameworks than reserved Python keywords.


Funny because it's true. :)

Saturday, February 03, 2007

Open Office and regular expressions

For the first time in my life, I tried to use Open Office for more than 15 minutes. While converting data from an HTML page into a chart I noticed that regular expressions don't seem to work in the Replace part of the Find/Replace dialog.

This must be a joke. My problem is trivial: Convert "8.1 k" into "8100" and "9k into 9000". I can't do it the straightforward way with 2 regular expressions. On an ideological level I'm a big supporter of Open Office, but today all I see is that it's wasting my time. (The corresponding online help for the dialog is not very useful either.)

Monday, January 08, 2007

Periodic Table of Visualization Methods



An extremely cool collection of visualization methods. You can mouse over to get an example of each.

Friday, January 05, 2007

PEP 8 checker

PEP 8 checker for the anal retentive in all of us. :)


/Users/gergely/twp/twp/bot.py:32:16: W291 trailing whitespace
sys.exit(1)
^
JCR: Trailing whitespace is superfluous.

/Users/gergely/twp/twp/bot.py:34:1: E302 expected 2 blank lines, found 1
def refresh_images(limit=dbbot._default_limit):
^
Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank line.

Extra blank lines may be used (sparingly) to separate groups of related
functions. Blank lines may be omitted between a bunch of related
one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical sections.


I'm the kind of masochistic guy who actually enjoys this kind of thing, but I need to figure out a better way to integrate it with PyDev. I wonder what's the easiest way to make Eclipse jump to the line where the error happened. Hmm...

TurboGears 1.0 and beyond

Kevin Dangoor, TurboGears project lead announced 1.0 this week on IRC.

I was there and I have this pretty screenshot to prove it! :)



Maybe even more importantly, TurboGears has a new leader: Alberto Valverde.

I was too busy to stay there for the followup discussions, but the gist of it seemed to be that a heavily WSGI based approach (sounded much like Pylons) will solve all problems including world hunger and the conflict in the Middle East.

Another equally important thing was the direction that is planned for TurboGears 2.0: decentralization and modularization. From what I understand people want to fork off chunks of TurboGears into fairly independent and externally reusable projects and keep TurboGears a small chunk of glue code that connects them together.

On the one hand this is not new, TurboGears started out by integrating a bunch of preexisting tools. ToscaWidgets was forked off recently from the TurboGears widget code. I agree that this approach can work to a certain extent. My guess is that in the case of TG the current change of direction (actually returning to its minimalistic roots) was more organizational than architectural. (Not that you can separate the two: see Conway's Law)

But there are pros and cons to decoupling. Unix command line tools are a good example. They were great, because there were standard interfaces between them which let them develop and be tested independently. But there is also a huge lack of conceptual integrity compared to monolithic frameworks. The naming conventions are inconsistent, different switches are used for the same functionality in different programs, etc.

The big advantage of monolithic frameworks is consistency in design. Modules use the same naming and coding style, have similar layouts. They reuse the low level utility code, the documentation tool, the testing framework, the bug reporting, the build and packaging system. There is one well known place to ask questions, to look for documentation, to download the latest stable release.

Linux distributions are a good example of both the strengths and weaknesses of heavily modularized systems. Probably the biggest advantage is that there is a huge amount of code reuse, and you can decentralize work to thousands of volunteers, maintaining the individual packages which can evolve independently.

On the other hand some combinations of packages are not tested properly, only certain combination of packages are well supported. If you report a bug that has been fixed in the upstream version, but not in your distro, you're on your own. Linux and Firefox is a good example.

People who want to support your software have a harder time when instead of a standard way, you have an infinite combination of modules. Just think of LSB and desktop Linux vs Mac OS or Windows.

We'll see how loose coupling works out for TurboGears. Interesting times ahead.

Tuesday, January 02, 2007

7zip is amazing

7zip just blew my pants off. Back in the day I though I was edgy when I used bzip2 instead of gzip, but this is just amazing.

I downloaded the full edit history of the Hungarian Wikipedia to run some analysis on it and 7z compressed it to 1/87th of its original size.

barcika:~/wp/huwiki$ du -k *
11502112 huwiki-20061205-pages-meta-history.xml
131808 huwiki-20061205-pages-meta-history.xml.7z
Of course this was superverbose XML, but the compression rate is still very impressive. The same original compressed with bz2 is almost 4 times as big. 7zip gonna be my first choice for archiving large log files.

Tuesday, December 05, 2006

Switching is hard: learning keyboard navigation on Mac OS X

I was very excited to get my first Mac, a 17'' MacBook Pro a couple of days ago. It's my new development machine and it gives me great satisfaction that I finally got one box where I can just plug in my camera or iPod and they work, play a video from a website and it works, then type

sudo apt-get install postgres
man 2 recv
and they all work, too. I became a big fan of Front Row, the fonts on websites look great, Expose is easy to miss when going back to another system. Seems like heaven, except...

I found that keyboard navigation on the Mac sucks. Note that this is my first impression after only 2-3 days of use with no Mac guru around to teach me the secret art of Using a Mac Without a Mouse.

Examples:
  • I found no way to maximize the Safari window without using the mouse. Use case: I read Dilbert in Google Reader and it doesn't fit in the Window horizontally.
  • Navigating the menus by keyboard is really cumbersome. Instead of Alt-T, I need to press Ctrl-F2, T, Enter to get to the Tools menu for example.
  • I found no simple way in Finder to move or even rename files or directories without using the mouse.
  • I'm still looking for a Total Commander replacement. I tried MuCommander and XFolders, but they both lack a command line. I also managed to set up Midnight Commander inside iTerm after changing the terminal emulation and keyboard settings to xterm, but I still have trouble mapping the keys to the right functions. Having no insert key really hurts.
  • BTW, what's the deal with putting such a cramped keyboard on a 17 inch notebook? The old 17 inch HP laptop that I used had a full keyboard including a numeric keypad. There would have been plenty of room to put a few extra keys on the Mac, too.
My biggest gripe currently that navigating dialogs is a pain without the Windows/Linux Alt style shortcuts.
Example 1:

I'm in Eclipse and want to replace the string "foo" with "bar" in the text editor. I press Command-F for the Find dialog, type in "foo", press Tab, type in "bar". So far, so good. But how do I get to the Replace button without using the mouse? Press Tab 9 times? On Windows/Linux I press Alt and the corresponding keyboard shortcut. I haven't found the equivalent on Mac OS X.



BTW, I can't even get to the menu bar with Ctrl-F2 in Eclipse. It doesn't work out of the box.

Example 2: I don't know how to operate this dialog in iTunes with the keyboard. Tab doesn't work.



Please, someone tell me I'm a complete noob and there is a simple solution for everything described above. So far, I'm thinking about creating a big fat Windows partition in Bootcamp since I except that I'm gonna spend a lot of time back in Microsoft World (sacrilege!) if I can't get back to my original productivity level in Mac OS X.

Time to ask around the forums some more...