pleasant things work better

I watched Don Norman’s TED Talk “3 ways good design makes you happy” last night:

This part of his talk really stuck out for me (transcription errors mine):

I really had the feeling that pleasant things work better and that never made any sense to me, until I finally figured it out. Look:

I’m gonna put a plank on the ground. So imagine I have a plank about 2′ wide and 30′ long. And I’m going to walk on it. See I can walk on it without looking, and go back and forth, and I can jump up and down. No problem. Now I’m going to put the plank 300′ feet in the air… and I’m not going to go near it, thank you. Intense fear paralyzes you. It actually affects the way your brain works.

If you’re happy, things work better because you’re more creative. You get a little problem, you say “Ah, I’ll figure it out. No big deal.”

Don Norman’s ideas may be more relevant to industrial design, but I think this can safely be applied to software design (more my domain). Don points to how being fun and beautiful can make something better — not just seem better, but work better. That’s an important point in the common trade off in software development between spending more time on features or bugs vs. spending some time on making a UI “pretty”. Occassionally in work debates — whether on Komodo or on some of the ActiveState websites I’m involved in — that “pretty” is said dismissively. I’m happy to have Don Norman’s talk as a debate point.

Miro

miro

BTW, thanks to stephen. A few weeks ago I reinstalled my Mac book and posted a list of the software I use. Stephen suggested I add Miro to that list. Cue many evenings of watching TED talks (including the above talk) and other programs.

After installing Miro, visit https://miroguide.com/feeds/2014 to get the latest TED Talks.

How to install MySQL-python 1.2.3c1 on Mac OS X

Introduction

Just a quick note on getting MySQL-python (aka import MySQLdb) 1.2.3c1 (the current latest version) to build and install on Mac OS X, because I hit something that I didn’t see mentioned in a number of similar posts.

Here are some links that discuss getting MySQL-python to build on Mac OS X:

What follows are the steps (slightly different) that I needed to get MySQL-python to install.

How to install MySQL-python on Mac OS X

  1. My Setup

    Mac OS X 10.5/Intel
    Xcode 3.0
    ActivePython 2.6
    

    Though I am using ActivePython, the issues should be the same for a Python from python.org.

  2. Download and install MySQL ‘pkg’ format install for Mac OS X. For me this was the “Mac OS X 10.5 x86″ package: mysql-5.1.34-osx10.5-x86.dmg The following might work:

    wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.34-osx10.5-x86.dmg/from/http://mirror.csclub.uwaterloo.ca/mysql/
    
  3. Download the latest MySQL-python package.

    cd /tmp
    wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz
    tar xzf MySQL-python-1.2.3c1.tar.gz
    cd MySQL-python-1.2.3c1
    
  4. Build it.

    # ensure mysql_config is on your PATH
    export PATH=$PATH:/usr/local/mysql/bin
    python setup.py build
    

    For me this failed as follows:

    gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.6/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-i386-2.6/_mysql.so
    ld: warning in build/temp.macosx-10.3-i386-2.6/_mysql.o, file is not of required architecture
    ld: warning in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture
    ld: warning in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture
    

    I didn’t see this mentioned in others’ post on this. I suspect they may not have hit this because they were building against the system Python (in /usr/bin/python, /System/Library/Frameworks/Python.framework/Versions/Current) which may have some tweaks to just handle this.

    In any case the problem here is that my Python install (ActivePython 2.6) is a universal build (including i386 and ppc). By default distutils (the library behind python setup.py build) tries to build binary Python extensions for all the same architectures. However, the MySQL you just installed is only for x86 so it borks.

    The fix is to use the ARCHFLAGS environment variable that distutils will pick up on to only build for your architecture:

    ARCHFLAGS=`arch` python setup.py build
    
  5. Install it.

    sudo python setup.py install
    

Komodo 5.1.3 released

We (ActiveState) released Komodo 5.1.3 today. Get it here:

Komodo IDE: http://www.activestate.com/komodo/downloads/
Komodo Edit: http://www.activestate.com/komodo_edit/downloads/

Or, if you are currently running any previous Komodo 5, click “Help > Check for Updates…”. This is a bug fix release and is recommended for all users. See below for details.

Bug fixes

Some bug fix highlights:

  • The fast open (aka “Go to File”) dialog had a few improvements:

    • Tab now autocompletes instead of moving to the next match. This makes it much more natural (if you’re used to the shell) to navigate directories in the dialog. (Bug 82677)
    • Removed duplicates in “Go to File” list. (Bug 82705)
    • Current search is aborted when the “Go to File” dialog is closed. (Bug 82529)
    • Added Ctrl+n & Ctrl+p keybindings for down/up navigation for Emacs-heads. (Bug 82678)
  • Komodo’s Vi Emulation is ever improving:

    • Comment/uncomment working correctly in visual line mode. (Bug 82369)
    • Fixed visual line selection mode indent/dedent problems. (Bug 82368)
    • The cc command now maintains line indentation. (Bug 82707)
  • There have been a number of improvements for using Komodo’s color schemes and package (.kpz) files. More on that in a separate post later this week.

  • One of the side-effects of the work for color schemes is the addition of

     <notificationbox id="komodo-notificationbox"/>
    

    in komodo.xul. This may be of interest to Komodo extension authors that would like to use a notificationbox instead of alert dialogs or other mechanisms to give feedback to users.

    Eventually I think Komodo’s editor tabs should also grow a notification box — as Firefox has one for each browser tab.

  • Again, goofy from babelzilla has been diligently providing localization patches for Komodo: bug 82580, bug 82819, bug 82821, bug 82822, bug 82824, bug 82825.

  • A bug where terminating run commands on Windows would not always work was fixed. (Bug 82655) The right answer for being able to kill a process and its child processes on Windows is to use a Windows Job object. Answer courtesy of Benjamin Smedberg’s killableprocess.py. Komodo now uses code based on this. I’d like to find the time to get something based on this into Python’s core subprocess module.

See the Release Notes for a full list of changes.

Komodo extensions

For those who haven’t noticed, Stan Angeloff has been doing some spectacular work in his HTML Toolkit and Tab Abbreviations Komodo extensions.

HTML Toolkit screenshot

HTML Toolkit screenshot

What about 5.1.2?

There was a bug in the Komodo 5.1.2 release from yesterday that broke attempts to terminate processes on Windows. This most commonly could affect debugging in Komodo IDE.

General information

Komodo IDE 5.1 is a free upgrade for Komodo IDE 5.x license holders. Your license entitles you to run Komodo IDE on any of the platforms we support (Windows, Mac OS X and Linux). Komodo Edit 5.1 is, as ever, open-source and free.

downloadsKomodo IDE | Komodo Edit
forumshttp://community.activestate.com/products/Komodo
emailhttp://listserv.activestate.com/mailman/listinfo/komodo-discuss
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo

re-installing Mac OS X: software I use

I recently wiped my Mac laptop to upgrade to 10.5. (Finally! At least I installed Leopard before Snow Leopard comes out.) This post is mainly for me to list all the stuff I install — a list I generated when scouring my machine before wiping it.

~/bin/
    wget
    p4
darwin ports (/opt/local)
ActivePython (all versions)
ActivePerl (/usr/local/ActivePerl-*...)
MySQL (/usr/local/mysql)
XCode (from Leopard CD, dunno if need more recent one)
Growl
/Applications
    Skype
    Google Notifier
    Caffeine
    Firefox
    Adium
    Colloquy
    Transmission
    PDK
    Komodo
    Pixelmator.app
    Snapz Pro X
    Thunderbird
    TweetDeck^H Twitterific
    UnRarX
    VLC
    ffmpegX
    iTerm
    iTunes
    iPhoto
    ImageMixer 3 for Panasonic (for getting video off my video camera)
Subversion (Leopard has 1.4.4, want 1.5?)
Mercurial
Git   [TODO]
System Preferences:
    Growl
    MySQL
    SlimServer (now called SqueezeCenter)  [TODO]
    Perian (http://perian.org/, teaches QuickTime about more formats, TODO)

Komodo: about.com’s Webdesign pick of the week

Nice to see Komodo Edit get about.com’s Webdesign/HTML blog’s pick of the week:

This week I took a look at the latest version of my favorite XML and HTML text editor: Komodo Edit. The new version adds in some nice features like history and search highlighting. I still find this editor to be the best free XML and text HTML editor you can get for any operating system. I use it every day.

Those interested should also look at Komodo IDE.

Komodo 5.1.1: fixes, path mode in Fast Open dialog, Perl::Critic integration

We (ActiveState) released Komodo 5.1.1 today. Get it here:

Komodo IDE: http://www.activestate.com/komodo/downloads/
Komodo Edit: http://www.activestate.com/komodo_edit/downloads/

Or, if you are currently running Komodo 5.1.0, click “Help > Check for Updates…”. This is a bug fix release and is recommended for all users. See below for details.

Bug fixes

Two important bug fixes in this release are:

  1. Fixed problem in re-generating the variable tabs in the debugger (Komodo IDE) which caused slowdowns and hangs when debugger was run repeatedly. (Bug 82518, bug 82542, bug 82426, bug 82557).

  2. Fixed a bug where closing a tab would switch to the wrong remaining tab causing potential problems, such as the Komodo window titlebar no longer updating properly (bug 82474).

See the Release Notes for a full list of changes.

A couple new features

This release also include two tweaks to existing features that didn’t quite make the final 5.1.0 release.

Fast Open dialog

The Komodo 5.1.0 release included the new “Fast Open” dialog. In Komodo 5.1.1 the fast open dialog now has path mode support. This means that you can now use the fast open dialog for opening:

  • an absolute path: /etc/httpd/httpd.conf
  • a relative path (where relative is relative to the directory of every tab you have open in your Komodo window): ../foo.py
  • a path under your HOME directory: ~/wrk/coolstuff.rb

Note that the latter also works on Windows if you manually set a HOME environment variable to whereever you tend to put your files. For example, on Windows XP, I certainly don’t use “C:\Documents and Settings\trentm” as my main working directory.

PerlCritic

Perl users of Komodo can now easily get syntax checking results from Perl::Critic — “a static source code analyzer based (mostly) on Damian Conway’s book ‘Perl Best Practices.’”. To setup you just need the “Perl-Critic” and “criticism” Perl modules installed. With ActivePerl you can do this:

ppm install Perl-Critic
ppm install criticism

Then select the warning level in Komodo’s “Perl” preferences panel. This screenshot shows the result of “Brutal” warnings on Gisle Aas’s LWP::UserAgent.

Perl::Critic integration in Komodo 5.1.1

Users interested in more in-depth analysis and integration with Perl::Critic should take a look at ActiveState’s Perl Dev Kit 8.0.

General information

Komodo IDE 5.1 is a free upgrade for Komodo IDE 5.x license holders. Your license entitles you to run Komodo IDE on any of the platforms we support (Windows, Mac OS X and Linux). Komodo Edit 5.1 is, as ever, open-source and free.

downloadsKomodo IDE | Komodo Edit
forumshttp://community.activestate.com/products/Komodo
emailhttp://listserv.activestate.com/mailman/listinfo/komodo-discuss
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo

unladden swallow: a (potentially *much*) faster CPython

Discussed a bit at the Python Language Summit at PyCon this morning: unladen-swallow is a Google project to do a lot of performance work on CPython’s VM.

  • Currently have about 30% speed up.
  • Currently for Python 2 (2.4, I think).
  • Currently focused on Linux and Python 3, but committed to get patches back to the core (which implies Python 3 support). “This is a branch, not a fork.”
  • Currently in use on Youtube (where most of the frontend is Python).

They are shooting for a 5x speedup. From the ProjectPlan:

Our long-term proposal is to replace CPython’s custom virtual machine with a JIT built on top of LLVM, while leaving the rest of the Python runtime relatively intact. We have observed that Python applications spend a large portion of their time in the main eval loop. In particular, even relatively minor changes to VM components such as opcode dispatch have a significant effect on Python application performance. We believe that compiling Python to machine code via LLVM’s JIT engine will deliver large performance benefits.

Jesse has a good write-up.

Komodo 5.1 released (fast open, history, hyperlinks, etc.)

We (ActiveState) released Komodo 5.1 today! Get it here:

Komodo IDE: http://www.activestate.com/komodo/
Komodo Edit: http://www.activestate.com/komodo_edit/

Komodo IDE 5.1 is a free upgrade for Komodo IDE 5.x license holders. Your license entitles you to run Komodo IDE on any of the platforms we support (Windows, Mac OS X and Linux). Komodo Edit 5.1 is, as ever, open-source and free.

Fast Open dialog

On to the features. A goodie in the Komodo 5.1.0 release that wasn’t in the previous releases is the new fast-open (a.k.a. “Go to File”) dialog.


Fast open in Komodo 5.1 from Trent Mick on Vimeo.

The fast-open dialog is a quicker way to open files for editing. Komodo needed it: the system native File Open dialogs can be a pain (ever try to go up one directory in the Mac OS X File Open dialog?), poking around in a Komodo project tree to find just the file you want is slow. Worse than slow, it is distracting. With the fast-open dialog you typically just need to type a few characters in the base name of the file you want to open and hit <enter> to open the file.

The fast-open dialog makes it easy to:

  • switch to open tabs (especially useful if you have many many files open in Komodo),
  • open recent files (tieing in with Komodo 5.1’s new History feature),
  • open files in the current directories (i.e. the directories of currently open files), and
  • open files in your current project.

The filter textbox supports multiple tokens, so while a search for ‘mark‘ with match:

Markdown.pl
markdown2.py
markdown.php
markdown.py

a search for ‘mark py‘ will match:

markdown2.py
markdown.py

Re-open recently closed tabs

A feature I love in Firefox is Ctrl+Shift+T (Cmd+Shift+T on the Mac) to re-open the most recently closed tab. Komodo now has that.

Hyperlinks, Find highlighting, History

On the road to this Komodo 5.1 release we introduced hyperlinks in Komodo 5.1b1:

Komodo hyperlink colors

find highlighting in Komodo 5.1a2:

editor history in Komodo 5.1a1:

screenshot of Komodo 5.1's history feature

and support for a new platform — Linux/x86_64.

Along with dozens of bug fixes, XML/HTML tag highlighting and jump to matching tag, upgrades to our xdebug builds for PHP 5.3 debugging, and regular nightly builds for Komodo IDE and Edit… this is a good release. Try it out:

downloadsKomodo IDE | Komodo Edit
forumshttp://community.activestate.com/products/Komodo
emailhttp://listserv.activestate.com/mailman/listinfo/komodo-discuss
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo

PyCon 2009

PyCon 2009: Chicago

I’ll be attending PyCon this year. It’s been a few years since I’ve attended and wow has it ever grown: 11 keynotes, 120 talks, 5 hours of lightning talks, the Python Language Summit, preceded by tutorial days and followed by days of sprints.

I’m looking forward to diving back into pure Python for a little while — something I’ve had difficulty finding the time for with my work on Komodo. I’m especially looking forward to the “Package distribution & installation” session at the Python Language Summit, not the least of which is because ActiveState is starting to devote more resources to this area. My newest co-worker Sridhar Ratnakumar is currently looking at how ActiveState can help here.

Pixelmator

In the bright pre-recession days of 2008 I, and a bunch of my co-workers, bought into MacHeist: get a bunch of Mac OS X apps for about $30. One of those apps was Pixelmator.

Pixelmator icon

Pixelmator is basically a lite Photoshop-clone for Mac OS X. Some thoughts on it:

  • It’s sexy. Popup-notices when undoing actions. Cute tool pallete (especially like the eye-dropper).

    Pixelmator eyedropper tool

  • It works. It is fullfilling my needs for recent work (cutting up screenshots, the odd tweak for images in Komodo. I’m not a graphics guy but I’ve played enough with Photoshop to suspect that the “lite” I mention above is a good thing for me. 1

  • If it helps others, here is my hyperlink_color.pxm Pixelmator file for the “Komodo color hyperlinks” screenshot in my previous blog post. This set of free arrow images is a great resource for slapping arrows into your screenshots.

The version that was current when I bought it was a little crashy, but at some point between then and now them seemed to have fixed whatever crashes I was hitting. This is the best $30 I’ve spent on the web.


  1. I’d be interested to hear from anyone who has real experience with Photoshop and Pixelmator if it actually is “lite Photoshop”. Poking around the menus there doesn’t seem to be a whole lot less in Pixelmator. Perhaps the big part of Photoshop is the set of 3rd party extensions and integration with other tools like Illustrator? 

hyperlinks in Komodo 5.1.0b1

We released Komodo 5.1 beta 1 yesterday! Get it here:

http://downloads.activestate.com/Komodo/releases/5.1.0b1/

Please try it out and give us your feedback:

emailhttp://listserv.activestate.com/mailman/listinfo/komodo-beta
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo
forumshttp://community.activestate.com/products/Komodo

This is the third release of Komodo 5.1 on the way to a planned final release very soon (hopefully within a week or two). Here are a few goodies in this release. (See my previous posts about the Komodo 5.1a1 and Komodo 5.1a2 releases.)

Hyperlinks

Many IDEs that have code intelligence support allow you to Ctrl+click (Cmd+click on a Mac) on a symbol to Go to Definition. Here was Komodo’s feature request for that. This is now implemented in Komodo 5.1b1.

Komodo hyperlink go to definition

However, we’ve gone one step further and made a generic system where Ctrl+mouse-hover will underline interesting regions (hyperlinks) in your text for clicking on. The most common type of hyperlink is a symbol for “Go to Definition”. However other types of hyperlinks include:

  1. Colors in CSS (including CSS in HTML files):

    Komodo hyperlink colors

    As in Firebug, you’ll get a swatch of the color when hovering over the color. What’s more, Ctrl+click will bring up the system’s color picker with which you can change the color.

  2. HTTP and FTP URLs:

    Komodo hyperlink URL

    Ctrl+click will load that URL in your browser.

  3. Regular expression mapping to an HTTP URL.

    Komodo hyperlink regex

    Currently 5.1.0b1 includes a regex to map occurrences of “bug \d+” to the appropriate bug in ActiveState’s bug database. Eventually we’ll have a preferences dialog where adding these mappings will be easier, but for now here is how you can add your own.

  4. A generic handler to do whatever you can think of.

    The hyperlinks above are all implemented with a simple mechanism in Komodo’s ko.hyperlinks JavaScript namespace. You can add your own handlers to do other things. Following how the regexhandler works is a good place to start. We’ll try to give more examples later.

Note: The hyperlink types other than “Go to Definition” are only in Komodo IDE (i.e. not in Komodo Edit) for the 5.1.0b1 release. So, if you want to play you should either use Komodo IDE 5.1.0b1 or use the latest nightlies.

koext updates

koext is a command-line tool for helping in building Komodo extensions. There are some great Komodo extensions that users have been building here. However, it is far from as easy as it should be to dig in and build Komodo extensions. Part of the solution is the koext tool. (Another part is documentation for extension authors, but that is a story for another time.)

We’ve started doing some updates to koext again (see the change log). Recent changes are working towards making it easier to have a quick development cycle — i.e. make it so that to test a change to your extension you just need to:

  1. make your edit;
  2. possibly run koext build --dev, e.g. if you changed an IDL file; and
  3. re-start Komodo

Instead of the more laborious:

  1. make your edit;
  2. run koext build to build a new .xpi file;
  3. re-install that .xpi in Komodo;
  4. re-start Komodo

In a subsequent post I’ll describe how I setup to build a Komodo extension. Here is a brief intro to koext from way back

Other stuff

A quick list of other feature work, notable bug fixes and fixed annoyances in Komodo 5.1.0b1:

  • Komodo’s new “History” feature now has session support which is currently used to make your history specific to a single Komodo window.

  • In Komodo IDE, the History now shows the section title for locations in the History. This can make the “Recent locations” menu a lot more useful:

    Komodo section titles in recent history list

  • In XML (and HTML and PHP, etc.) files, clicking on a tag will briefly flash (highlight) the matching tag (bug 81606).

  • Komodo’s “jump to matching brace” now works as you’d expect for opening and closing tags in XML/HTML (bug 43239).

  • We’ve done some crash fix work so that Komodo 5.1b1 should be more stable that 5.1a2. It is hard to quantify and we continue to look for crash issues in Komodo.

  • Greatly improved the annoyance of it being very hard to grab the bottom-pane and sidebar splitters on Mac OS X (bug 80756).

  • Fixed the annoyance of being unable to resize Name/Type/Value panes in Locals/Globals debugger window (bug 80566).

  • fix: codeintel: calltips cannot show unicode doc comments http://bugs.activestate.com/show_bug.cgi?id=70448

  • Added a “duplicate line or selection” command.

  • Added Korean and Japanese JIS encodings (bug 80890).

As well there is more coming. Try out the Komodo nightly builds for the very latest stuff:

http://downloads.activestate.com/Komodo/nightly/

Find highlighting and Linux/x86_64 support in Komodo 5.1a2

We released Komodo 5.1 alpha 2 a couple of days ago (shame on me for not announcing until now). Get it here:

http://downloads.activestate.com/Komodo/releases/5.1.0a2/

Please try it out and give us your feedback:

emailhttp://listserv.activestate.com/mailman/listinfo/komodo-beta
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo
forumshttp://community.activestate.com/products/Komodo

This is the second release of Komodo 5.1 on the way to a planned final release around mid-May. There are a few goodies worth talking about in this release. (See my post about Komodo 5.1a1 here.)

Find highlighting

Komodo now highlights find/search matches in your buffer. Here is a short video showing it off. Sorry, no sound. This is my first screencast. :)

Here I’m doing a couple of searches using Komodo’s Vi mode. That highlighting makes a big difference for helping your eyes find where you want to navigate to.

Find highlighting is one of those “well, duh” features that we are now able to add with indicator support in Komodo’s editing component Scintilla. Indicators in Scintilla allow one to put visual markers on regions of the editor buffer independent of the syntax coloring information. Before indicators, syntax coloring styling and other styling (squiggly underlining for syntax errors/warnings, find highlighting, …) had to share 8-bits of data for each position (i.e. each character). That was awkward (playing with bit masks) and limiting (ran out of space in, e.g., HTML which uses 7 of those 8 bits for all the different syntax coloring styles). Another example is Komodo’s Tabstops — which were made a lot more usable in 5.0 because of what we could do with indicators.

Linux/x86_64 support

We’ve added support for a new platform: Linux/x86_64. This is our first native 64-bit platform build. Linux x86_64 installs are getting to be quite common, and typically the default install of Linux distros on x86_64 don’t include the 32-bit compatibility libraries. This means that attempting to use Komodo’s 32-bit Linux build wouldn’t work out of the box (it tends to work fine once the distro’s 32-bit compat libs are installed) — and hence was a common support issue. Hopefully, no more. As well, Linux/x86_64 users will possibly enjoy a slight performance benefit.

Localization patches from Davide Ficano (l10n)

Way back in the heady days of 2008 (before Komodo 5.0 was released) Davide Ficano (aka dafi) made this post on Komodo’s forums:

Localizing Komodo using Babelzilla dream team

that kicked off some starter work towards localizing Komodo. One of the necessary steps to getting good localizations of Komodo was to update Komodo’s chrome to more rigorously use DTDs for XUL (we were using these fairly well) and string bundles for JavaScript code (we weren’t doing so well here). Dafi whipped up a bunch of patches for this. Todd has finally managed to get those all checked in, so that Komodo is now in a pretty good state to start being localized.

Other stuff

In addition to the above, Komodo’s History feature is coming along:

  • The same keybindings as your browser for Back/Forward should be working on all platforms.
  • The side mouse buttons on 5-button mice should work for navigating the history.
  • This history will now properly handle cleaning out URLs from finished remote debugging sessions.

As well we’ve a few more goodies that should be ready to show for a beta 1 release in a week or two. As ever, try out the Komodo nightly builds for the very latest stuff:

http://downloads.activestate.com/Komodo/nightly/

“duplicate line or selection” in Komodo

I saw this blog entry this morning:

Duplicate Line/Selection in Komodo 5

Exploring the ability to create macros and bind them to key commands in Komodo IDE. I’m reposting the below macro that duplicates the lines or the current selection. Thus functionality was previously is Zend Studio 5, went missing from 6, and thanks to the macro, is available in Komodo. Enjoy!

I thought I should mention the Komodo bug — Extend functionality of the “duplicate line” function — on which Eric added a new core command to Komodo to do just this… with the added bonus that it also works for block/column selections. This was added just yesterday. Here is the checkin to Komodo Edit’s repository. The nightly builds of Komodo 5.1.0a2 from last night has this in it:

Komodo IDE: http://downloads.activestate.com/Komodo/nightly/komodoide/latest-trunk/

Komodo Edit: http://downloads.activestate.com/Komodo/nightly/komodoedit/latest-trunk/

You can assign any key to this command in Komodo’s “Editor | Key Bindings” preferences panel. The command name is “Editor: Duplicate Line or Selection”.

hard disk warranty

My father-in-law wanted to be careful to ensure personal data wouldn’t be lifted from the hard disk of the old computer that he is getting rid of. I love his documentary evidence:

Computer
HardDisc
warranty

RobH’s sketches for the Komodo logo

Rob Hernandez is an ex-ActiveState employee. When he worked here he was responsible for the excellent designs that became the ActiveState critter logos — since, and still, used on t-shirts and for ActiveState application logos.

I was happy to see that he recently put up some of his work on Flickr:

including his sketches for the Komodo head logo:

The latter are the precursor to the current Komodo IDE and Komodo Edit head icons:

Komodo IDE and Komodo Edit logos

Here is the full set

And if you are more into the realism thing, check out this Komodo head.

History feature in Komodo 5.1.0 alpha 1

We released Komodo 5.1.0 alpha 1 today! Get it here:

http://downloads.activestate.com/Komodo/releases/5.1.0a1/

Please try it out and give us your feedback:

emailhttp://listserv.activestate.com/mailman/listinfo/komodo-beta
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo
forumshttp://community.activestate.com/products/Komodo

This is the first release of Komodo 5.1 on the way to a planned final release around mid-May [Update: mid-March. Subconsciously I keep hoping for more time. :)]. (I’ll write about our Komodo 5.1 plans in a separate post). Here I want to talk about Komodo’s new “History” feature.

History overview

screenshot of Komodo 5.1's history feature

Komodo’s History feature is like your browser’s history, but for the editor. Back and Forward buttons in the toolbar. Same default keybindings as in Firefox 1. Simple.

Komodo’s history is a bit different than a browser’s. In a browser, you have a separate history session for each tab. This doesn’t make as much sense for an editor. Komodo’s history is per-window 2. That means that the Back button will move you back to the last place you were, be that in the current file or in another file in the same window. This means that jumping back:

  • after a Go To Definition, or
  • after opening a new file, or
  • after jumping to a find result

is as easy as clicking “Back”.

More than any new feature in Komodo, the first time we hooked the feature up it felt immediately useful. Of course, this is just an alpha release so there is lots of polishing to do. Read on for some of the other things we hope to do with this.

Future work

Some other things Komodo will be able to support with this:

  • Opening recent files quickly. Chances are good that a file you want to open in your editor is a file you’ve edited before (and recently). The history database now provides Komodo with the data it needs to support that.
  • Find in recent files. Often I’ll want to look at some snippet of code that I remember writing in the last few days, but can’t remember what file (or even what project) that was in.
  • Support '' command in Vi-mode. From the Vim help:

    ''  ``                  Move to the position before latest jump.
    
  • Hooking Back and Forward into the MS Intellimouse’s (and other mice, I suspect) side buttons — as is the default in Firefox.

Backend code

For those interested, most of the backend of the history system is here in “editorhistory.py” in the Open Komodo subversion repository.

For JavaScript code (most interesting to Komodo extension developers) there is a new ko.history API with the most relevant methods being:

  • ko.history.note_curr_loc(view): Tell the history system to note the current editor location before jumping somewhere.
  • ko.history.history_back(n): Go back n locations.
  • ko.history.history_forward(n): Go forward n locations.

Komodo’s history database shares some ideas with Firefox 3’s Places database. In particular the idea of splitting visited locations (URLs in Firefox, editor locations in Komodo) and visits into separate database tables was helpful. They are, of course, both SQLite3 databases.


  1. The keybindings aren’t yet there for Mac OS X in alpha 1. They will be there for alpha 2. 

  2. Currently it is shared by multiple Komodo windows, but will be changed to be per window. 

recipe for cranberry-pear relish

This is recipe that my parents found in, IIRC, a 1980’s Gourmet Christmas special magazine. Our family has been making this relish for Thanksgiving and Christmas turkey dinner every since. I generally prepare this one or two days before the big meal, so it doesn’t add to the burden of preparing everything else.

Cranberry-pear relish

In a big soup pot bring 1 1/4 cup sugar, 1 cup water and 1/4 cup lemon juice to boil. Simmer for 5 minutes.

Add 5 pears (peeled, cored and cubed into about 1cm cubes). Simmer for 5 minutes.

Add 3 cups cranberries. Boil at med-high heat, stirring occasionally until most of the cranberries pop — usually about 5-10 minutes. “Three cups cranberries” is basically just the entire bag of frozen cranberries that are commonly available at supermarkets around Thanksgiving and Christmas time.

Remove from heat and stir in 1 1/2 tsp lemon rind (optional), 1/4 tsp cinnamon and 1/4 tsp allspice.

Let cool and store in the fridge.

mini-mick 2

mini-mick2 ultrasound (close-up)
mini-mick 2 ultrasound at 18 weeks
mm2 (code name joaquim) is on his or her way — due in early July. Above are scans from mm2’s ultrasounds at 12 and 18 weeks.

ActivePython 2.6.1.1 and 3.0.0.0 released!

All ActivePython downloads are also available here.

Python 3.0 was released last week and we’ve 1 managed to get ActivePython builds for all our platforms and give them a smoke test.

Now that Python 3.0 is final I’m really looking forward to seeing where Python 3 goes. I’m sure it will be (and feel like) a long transition from Python 2, but I think a year or two from now we’ll look back at the rare Python 2 usage not miss it. The semantic changes involved in the str/unicode/bytes changes will be a royal pain, but this had to be done and the long term benefits of sane Unicode handling will be huge.


  1. For the last few years I’ve been maintaining ActivePython myself. For these latest releases I’m happy to have Andreas Kupries helping out with ActivePython build engineering. 

important Firefox bug

https://bugzilla.mozilla.org/show_bug.cgi?id=448604