1. Rounded Corners - 86

    December 31st, 2006

    A Sign From Above

    Predictions. Prediction markets: the best way to determine if your software will ship on time? Or is it just for US companies, as one of the commentators says?

    JsonML. A way to represent XML in … well … not XML.

    Null over this. Does null break polymorphism? More often than not?

    And ponder this. Zed Shaw about control and reponsibility, and the customer, collaborator; innovation, implementation matrix.

    Friendly reminder. Happy new year.

  2. More on the Java/Ruby cross-over

    December 30th, 2006

    Ryan Tomayko on The Pending Ruby/Java Co-op:

    You can take Java’s crippled OO foundation, enterprise scalability, vendor supported JEE containers and just throw it all out the window: I don’t care. Memory management is the reason to consider using Java over C right now.

    So why Java? Ryan has a lot of good arguments, I want to add two more:

    1. Venn. Most of the developers I know who are working with or looking at Ruby have a Java background. That’s anecdotal evidence, but I think the cross-over is significant. Check out some of the Java resources, and you can gauge that interest for yourself.
    2. Ears. Looks like Sun is listening to this one, and listening well.

    And then, there’s timing. We all believe the best technology choices are made on their own merits, but sometimes it’s just a matter of being in the right place at the right time. I think that’s the no. 1 reason Java and Ruby might soon exchange vows.

  3. Ruby: A Better Build for Java

    December 30th, 2006

    When I look back at 2006, one of the biggest mistakes I made was switching a project to Maven 2.0. It was tempting, On paper, Maven 2.0 looks like it does all the right things.

    Maven will handle the order of dependency when building modules, and when importing external artifacts. It has pre-canned plugins for all the common tasks, and if you follow the default project structure, you don’t need to configure anything. You can plug extensions for code generation, resource manipulation and packaging. It all looks good.

    But when the rubber meets the road, it starts falling apart. It’s XML-based, so the language is dead simple, or dumb, depending on your point of view. There’s too many things you just can’t do with dumbed down languages, not to mention the propensity for verbosity. A build file that can be summarized in a few sentences takes over a few pages.

    It’s declarative, which means you can’t do anything procedural. You can mix Ant, only to find out the Maven/Ant integration is far from perfect and limits what Ant can do. Even the declarative dependency mechanism gets in the way on the few occasion when you need to override it, and sometimes the only solution is to not use an artifact, just because you can’t fix things easily.

    At some point, you spend so much time fighting Maven for control, you have no time left for writing code.

    A good build system is neither Ant nor Maven. It needs to be procedural so you can perform any task that you need, even — especially — if you only need it for that one project. It’s nice to have pre-canned tasks, but you can’t be limited to the few that are designed for the very generic case. Building tasks and plugins in Java complicates the build process, especially when you’re procedural code is effectively one line of code.

    A good build system needs to be declarative, but it’s not about the dependencies. Declarative is about writing the least amount of build code, and not having to write the same thing twice. Out of that comes dependency management, but you also want abstractions to process a set of files in one go, use patterns to collect resources, or to pick the right SQL DDL based on your test database.

    I can think of more examples, but it all comes down to having a generic language that’s easy to script.

    Martin Fowler captures the point when he says:

    “The thing with build scripts is that you need both declarative and procedural qualities. The heart of a build file is defining tasks and the dependencies between them. This is the declarative part, and is where tools like ant and make excel. The trouble is that as builds get more complex these structures aren’t enough. You begin to need conditional logic; in particular you need the ability to define your own abstractions.”

    When I work on said Java project, I always envy the build system I use in my Ruby projects. That one is short and sweet, uses a lot of canned tasks, but also creates its own custom tasks. Keeps repetition to a minimum, anything I need more than once is wrapped into a variable or a function. It captures more information in less lines without obfuscation. And there’s no fear that breaking one line will bring the entire system down.

    I’m looking forware to JRake and Raven maturing, so we can start doing the right thing in Java land.

  4. Rounded Corners - 85

    December 29th, 2006

    Delegation in Rails. Cool Rails trick, courtesy of Jeffrey Allan Hardy.

    rel=”nsfw” Enough said.

    Focus on maintainability. Jeremy D. Miller: “Instead of focusing on future proofing code in a few “strategic” spots, concentrate on making your code easy to change as a simple matter of course.”

    Scalability as a state of mind. “That, in turn, suggests that the key test of scalability is not so much how each architecture stage scales, but how readily a company or an organization can move an application from one architecture step to the next.” More in Frank Sommers’ Scaling: Not Just About Architecture.

    Memo to Apple. Ok, you’ve got my money. I like the iPod and the iMac, great products. But please return kindness with kind. Stop. Shipping. DHL. Thank you.

  5. Rounded Corners - 84

    December 28th, 2006

    Fashion geekery. One of the benefits of being a in mixed couple is that we don’t echo-chamber each other. The girl tells me stories about life in the fashion industry, and I regurgitate TechMeme. But sometimes worlds collide, like when fashion invades Teh Geekosphere.

    Show me the money. “The point is that business is not a sporting event. Victory for one company doesn’t mean defeat for everyone else.” Every once in a while we get a company, like Nintendo, to remind us that it’s not about being No. 1. It’s about being profitable.

    Show me your toolbox. Dan Pritchett asks: “Why then do we, as software engineers, have to work so hard to reduce our toolbox to the ultimate tool?”

    Show me your functions. Justin Palmer rounds up the cool functional features of prototype.js. If you thought prototype.js is just about AJAX calls, think again. If you need a little help understanding each, map and inject, this post is the place to start.

    About those functions … Wesner Moise: “One problem with functional languages comes from its heritage in academia. … Functional programming languages look hard or too mathematical, when in fact they should actually be conceptually easier.”

  6. Rounded Corners - 83

    December 27th, 2006

    Vectors of attack. For your convenience, rbaldwin collected some of the commons ways to attack Rails. Now, can we get that in a PowerPoint to present at the corporate meeting?

    Go the distance. Blake Ross thinks that Google tips have gone too far, and crossed into Windows/IE terittory. One comment says: “Absolute power corrupts absolutely.”. How long do you think before Google grows out of its “no evil” policy?

    The Napkin Look & Feel. Brilliant. When you show non-technical users a polished UI, they think you’re done with the code. For your own good, keep prototypes looking rough. The Napkin Look & Feel does just that. (Via Kathy Sierra).

    CRAP Content Restriction Annulment and Protection, aka DRM. Via an ArsTechnica article that reminds us one again that P2P users want more entertaining content and a better TiVo.

    Coffee. I’ll take “How To Get Started On Anything?” for $1.50.

  7. In defense of verbosity

    December 26th, 2006

    From Daily WTF:

    existingCustomerForm.setError(Boolean.FALSE.booleanValue());

    Can you think of a longer way to write ‘false’? But what if this is a better way to write false?

    You can stop laughing now … ok, I’ll wait … done?

    I’m not talking about some parallel universe where verbosity is a form of art, but the universe we live in. Just a few cubicles across from you.

    Think about it for a second. Boolean is the class in charge of all things true or false, so it’s a form of authority on the subject. FALSE is a constant, and constants as we all learned in Programming 101, don’t change. And booleanValue is more reliable than the dark magic of auto-boxing. Put them all together, and you’ve got three measures to make sure you got the right value!

    Yeah, that was funny, but what if it’s true?

    Code … you spend a while writing it, and it doesn’t work. You spend longer fixing it, and it works for you. Then come the users, and another round of fixing. Q&A, more data, new features, custom extensions, it’s a never ending cycle of breaking and fixing, and fixing the fixes.

    Computers may operate on zeros and ones, but code is flakey, annoyingly unpredictable and sometimes downright evil.

    Against this backdrop, some developers try to attack every problem by bringing it to its logical solution. They practice their craft daily, always striving to be more learned in the dark art of fixing and testing. Some developers simply stay away from fixing touching the private parts. They practice a voodoo mentality: whatever works.

    For the later, this example is not a practice in verbosity, but an anchor in safety. A guarantee that maybe things won’t explode in you face when you hit ‘run’. If it sounds like an emotional reaction to code, that might be it, but then software doesn’t alway behave rationally. It’s only us fools who think logic is the best solution.

    Picture by David Wilmot.

  8. Rounded Corners - 82

    December 26th, 2006

    Rail$. Andrew Stewart grants Rails a x-mas present and gives us acts_as_enterprisey.

    Gateway drug. Chad Fowler: “Rails is a gateway drug to both Ruby and the rest of the world of dynamic and previously-fringe programming languages.”

    The programmer hierarchy. Revised.

    The season for eating. Todd Hoff, on what you can learn from Chef Gordon Ramsay when building your own software.

    Humble Ruby. Jeremy just released his Mr. Neighborly’s Humble Little Ruby Book. The PDF is free, $10 gets you the Bedside Reading Edition and bragging rights.

  9. One is easier than the other

    December 26th, 2006

    Registration with sername/password
    Registration
    1. Pick and enter username
    2. Pick and enter password
    3. Enter password again
    4. Enter e-mail address, and
    5. Click ‘Register’
    E-mail Click verification link
     
    Registration with OpenID
    Registration
    1. Enter OpenID URL, and
    2. Click ‘Register’
    OpenID login
    1. Enter username/password, and
    2. Click ‘Login’
    OpenID authorization Authorize access
    Registration
    1. Confirm username
    2. Confirm e-mail address, and
    3. Click ‘Register’
    E-mail Click verification link
  10. Rounded Corners - 81

    December 24th, 2006

    Better living through typography. A practical guide to typography on the Web. (Via Matthew Margolis) And designing logos with letters, from Before & After. B&A looks like a good read for the incidental Web stylist in me.

    With what? One of my favorite tricks in Ruby, the with method.

    Balanced view. A bit more about XML & JSON, Mike Champion has a good summary. If you don’t feel like being in one camp and denouncing the other, go there for a more balanced view.

    Kick ass.

    And be nice. Phillip J. Eby found out that hiring people based on personality affects the gender balance. In a good way.