1. links for 2006-01-01

    December 31st, 2005

  2. Wise words

    December 28th, 2005

    64177308_d25b9edc1d_m[1].jpg

    Joel VanderWerf, on whether or not Ruby’s open classes are dangerous:

    A chef will tell you that sharp knives are safer than dull ones, since they do not have to be forced.

    Image by MWords

  3. Forced minimalism is the wrong approach

    December 28th, 2005

    Over at lesscode, Alex Bunardzic is asking:

    Now, that’s an interesting way to look at the problem of understanding the code. Would you agree that the more verbose the source code is, the easier it gets to understand it?

    Finally (and inevitably), the sacred cow of corporate computing (Java) is dragged in to demonstrate the benefits of verbosity as a feature that encourages reusability through increasing the level of abstraction.

    I don’t consider verbosity itself to be a problem.

    I’m glad we moved to long variable and method names, away from the short and cryptic C code. Documentation adds to verbosity, so do unit tests, but they both help in code maintenance and evolution. Keeping methods smaller and building for reuse tends to increase verbosity. Error checking and recovery add weight to the code.
    Yet, all of these are indicators for good code quality: they add to the code.

    Verbosity itself is not an issue, but two aspects of verbosity are: redundancy and repetition. Redundancy results in layers of code that hides the essence of the algorithm. It takes more time to set up the stage before you can get to the actual logic, there’s more places where things can get wrong, and it’s harder to distill the application logic when it’s hidden in pages and pages of redundant code.

    Redundancy is definitely more pronounced in Java than in dynamic languages. Java’s approach favors minimalism of the language, whereas the LAMP languages favor minimalism of the code.

    Repetition leads to the same information being repeated in code, in objects that control access to the code (EJB), in binding files, configuration files, build files. It’s not uncommon to find the same piece of code described in five different places. That’s a form of verbosity that doesn’t add to the code, but makes the code less accessible.

    Repetition is not specific to Java, but it is a problem of J2EE. The intentions are good: platform, language and protocol neutrality. But is the resulting complexity worth the gains? I had vested interest in seeing this approach succeed, but now I consider it a failed experiment that ended up missing its key design objective: easier code maintenance.

    Like verbosity, abstraction is neither black or white. Abstraction results in reusable code, in putting focus on the algorithm, in breaking up complex problems into layers that are easier to develop and maintain. But too much abstraction leads to redundancy, repetition and SphagettiO.

    It’s forced minimalism in one part of the solution — be it the language, the libraries, or the code — that tends to lead to complexity everywhere else. The elegance of a language is a fine problem to solve in isolation, but as software engineers we need to look at the overall picture. It’s time to reconsider Java and look for better alternatives, but it would be a mistake to react to Java’s forced minimalism by siding with a different forced minimalism.

    What we should be looking for is not minimalism of language or code, but simplicity of development, delivery and maintenance.

  4. Enterprise software is 21st century legacy

    December 28th, 2005

    Looks like I’m not the only one willing to eat their hat over this prediction. From 37signals:

    Enterprise will follow legacy to become a common insult among software creators and users.

    I didn’t want to use the word “insult”, so I went with a thinly vailed euphamism:

    Enterprise Computing will become synonymous with complex, legacy code, the 21st century version of COBOL. The new cool thing? Web computing.

    Software that tries to do 100% of the work will end up being too expensive to license, operate and maintain. It already is, even if most customers are not yet aware of the alternatives.

    Of course software has to do 100% of what you intend it to do. But for an enterprise software vendor, 100% of what one customer needs is not 100% of what another customer needs. So they end up delivering 20% that gets used by everyone, and 80% they ends up a dead weight on anyone. That’s not a sustaintable approach.

    In 2006 we’re going to see more focus on core features, simplicity and a return to integration. But it won’t be the EAI of yesterday. “Built to integrate” will be part of the initial design, and deliverables will be measured by how simple they are to pull apart and use.

    The fore runners are mashups, simple solutions to well defined problems that arise from the integration of core features: maps, searches, listings. But the trend setters will be the big guys deciding to open up their APIs, and use simple interfaces designed from the bottom up.

    Wait. That already happened.

  5. links for 2005-12-27

    December 26th, 2005

  6. Happy 2.0 for WordPress

    December 26th, 2005

    WordPress 2.0 is out, along with a redesigned site.

    I want to use this post to personally thank James of brothercake.com. James created DBX, used in the WP 2.0 editing page to add features without clutter:

    Docking boxes (dbx) adds animated drag’n’ drop, snap-to-grid, and show/hide-contents functionality to any group of elements. And … in what might be another world-first for brothercake - dbx is fully accessible to the keyboard as well as the mouse, an action I’ve dubbed press ‘n’ move :-D

    While working on a WP plugin for posting events, I found that DBX doesn’t get along with prototype.js. I e-mailed James, and he quickly came up with a fix, just in time to include it in the 2.0 release. So thanks James you for the quick fix, and Matt for the putting it in.

  7. Advanced editing for WordPress 2.0

    December 26th, 2005

    advanced-wysiwyg.png

    One of the best features in WordPress 2.0 is WYSIWYG post editing. It takes the pain out of formatting, linking and adding images.

    WordPress 2.0 comes with a bunch of editing buttons, but not enough for what I need it to do. So I dug into the source code and found out there are hooks for adding more controls. After playing with it for a few minutes, I was able to add buttons for:

    • Selecting formats: paragraph, formatted, headers, etc.
    • Underline, subscript, super script, full justification.
    • Copy, cut, paste.
    • Insert table.
    • Foreground color, background color.
    • Character map.
    • Full screen editing.

    I created a simple plugin that automagically adds all these buttons. Download advanced-wysiwyg.php into your wp-content/plugins directory and activate. Enjoy!

    PS: The table controls and full screen editing rely on additional TinyMCE plugins. So if you want these two features as well, you’ll have to download TinyMCE plugins and install those separately. For WordPress 2.0.4 users, try the TinyMCE 2.0 RC4 plugins. Or check the comments to find out what works for other people.

    Update: I added two more filter functions. If you find that the toolbar is too wide, you can move the buttons to a second and even third toolbar (or add more buttons as you please).

    Update: Thanks to Andy, we now have French support.

  8. links for 2005-12-26

    December 25th, 2005

  9. BayArea Ruby Beer & Pizza

    December 25th, 2005

    Starts: 8:00 pm, December 28, 2005
    Location: Map It!Wild Pepper
    3601 26th. St.
    San Francisco CA

  10. Ruby 1.8.4 released

    December 25th, 2005

    ruby-gem.png

    More info.

    Update: To install on Cygwin, unpack the sources and:

    ./configure
    make test
    make install
    make install-doc

    On my computer 1.8.4 was places in /usr/local/bin/ruby, but the previous installation was located in /usr/bin. Similarly, the libraries are now located in a different path, which required either re-installing rubygems or just copying the old libraries.