Month: October 2006

  • Business Logic Code Generation

    On numerous occasions I’ve seen Java code generated by other Java code as part of a standard build process. I’m not talking about “stub” or “boiler-plate” model code produced by tools such as rmic or hibernate, respectively, but logic code produced by a script. I’ve also seen this done in other languages, but it particularly bothers me when I see it done in an object-oriented language such as Java. Almost invariably it occurs for one of two reasons: an external dependency or structure prevents sane reuse practices, or a lack of modern object-oriented analysis and design skills. (The former case simply implies the latter on someone else’s part.)

    Lame Dependencies
    Some dependencies introduce more liabilities than benefits, yet are nevertheless necessary due to business or technological constraints. Libraries and frameworks that force you to extend specific classes (as opposed to interfaces) lessen your ability to create a flexible, adaptable application on top. When large amounts of boiler-plate code are necessary to satisfy a dependency, it might be reasonable to apply code generate techniques to avoid monotony; however, the generated code should at least adapt or delegate to a separate, reusable implementation.

    Lame Developers (a.k.a. the people that write Lame Dependencies)
    The pisser scenario that is often hard to differentiate from the former is a lack of OOA&D skills on behalf of the application designer. In particular, those accustomed to procedural thought may want to introduce “procedure generation” as a sort of clever closure mechanism which is more common in languages other than Java. This translates to large amounts of redundant, unnecessary code that could likely be avoided by applying modern design patterns and generics.

    Conclusion
    Classes are more than the place you put data and methods; together they implement a higher-level design which can be expressed in higher-level terms, isolated into components, and tested and maintained as such. If you have a system composed of a mesh of interwoven procedures with many statically bound components, mutual dependencies and generated logic, it may be more procedural than object-oriented.

  • Must-Have OS X Freebies

    As far as I’m concerned, no Mac is complete without these great freebies..

    Cyberduck
    Great SFTP/FTP rich-client.

    Colloquy
    An intuitive, native IRC client

    VLC
    Dirt simple media player capable of handling things that QuickTime can’t.

    Handbrake
    All-in-one DVD ripping and encoding utility. Provides plenty of features for most of us without be overly complicated.

    Skype
    Easy-to-use VOIP client. Works with MacBook (Pro)/PowerBook microphones out-of-the-box, and provide free calls to other Skype users.

    CrossOver Mac Beta
    Every OS X user I know must operate in a Windows environment on a regular basis. The recent release of Parallels for Intel-based macs (basically VMWare workstation-style guest-OS host virtualization) has made life one tick easier by allowing us to run Windows on our Core Duo systems, and the new CrossOver Beta for Intel Macs provides a great complementary technology. CrossOver Mac, by CodeWeavers of wine fame, allows you to run some Windows applications directly on your Intel Mac, without having to host a full-fledged copy of Windows by implementing the applications APIs dependencies on the Mac. The beta is free.

    QuickSilver
    Provides Spotlight-like capabilities, but faster and way, way better. The extremely brisk find-and-launch concept will be new for many users, but will be hard to live without once understood.