Sunday, June 28, 2009

Video interviews with Uncle Bob aka Robert C. Martin

Software guru Robert C. Martin has some really interesting views on being a software professional and TDD: A developer that is not testing his code is like a doctor that doesn't wash his hands before examining the patient.

Wednesday, June 24, 2009

10 UI Design Patterns You Should Be Paying Attention To

A great article from Smashing Magazine on some of the most useful UI design patternsSmashing Magazine
  1. Lazy Registration: Allow user to check out the site before requiring registration-
  2. Progressive Disclosure: Show what's relevant now, hide details and reveal when requested.
  3. Forgiving Format: Allow different input formats, like ZIP or Address in the same input field.
  4. Clear Primary Actions: Emphasize the primary action (e.g "Save") and de-emphasize the secondary (e.g Cancel).
  5. Breadcrumbs: Show the path to the current information (e.g Shop > Laptops > Toshiba).
  6. Account Registration: Improve user experience by letting users register, only neccessary information.
  7. Required Field Marker: Clearly label required fields.
  8. Steps Left: Clearly show current steps in a registration sequence.
  9. Subscription Plans: When a product or service is provided, give different options to the user. Highlight what you want to sell.
  10. Hover Controls: Hide tools until objects are hovered (e.g show Edit button when an editable list is hovered).

Friday, June 19, 2009

Thursday, June 18, 2009

Custom Font Size in AdSense

From the Google AdSense Blog (June 17th 2009):
We're now happy to announce the launch of a [-] feature you've been asking for -- the ability to change the font size of the text in your ad units. You can now select from small, medium, and large font sizes for ad units [-] ... the actual font size will vary for each format size, font face, and user-specific settings such as browsers and operating systems.

WebmasterWorld discussion: Font Size Mania

Wednesday, June 17, 2009 Cool and usable

I stumbled upon an article at today, and immediately enjoyed the design and usability on their site:
  • Main menu opacity looks good
  • Balloons.. cool header
  • Tweet this: Promoted social bookmark, highly visible
  • Not just tags - also topics and sectors (main site categories)
  • Related content
  • HTML / formatting in comments
  • Nice footer. Notice search and extra footer with copyright / privacy policy
  • "Popular" box: Tags, authors, sectors, topics
  • Author info with Twitter and LinkedIn links
  • Content: Pyramid - main point early, then details (conversion intent)
  • Content: List - advises divided into short points, easy to scan

Friday, June 12, 2009

Why Cal Henderson Hates Django

Cal Henderson, the Flickr guy, gives one of the funniest presentations I've seen, at least in the nerdy sphere. Watch, and learn :)

Funny Presentation Recipe

  1. Be hung over and mention last night
  2. Use funny images from Flickr, with funny text
  3. Swear (a lot)
  4. Be a cocky, rich dude
  5. Use irrational logic (e.g founder has a big beard, these guys must be serious)
  6. Show a stupid, funny graph
  7. Get serious in the end

Tuesday, June 9, 2009

Util Classes Must Die

Using a lot of static methods in utils classes will make your application procedural rather than object oriented.

Util classes cause problems with / violates:

* OO in general: Code is not object oriented
* Testability: Static is hard to test
* Inheritance: You can not extend a helper class
* Polymorphism: Helper class can not derive from an interface / base class
* Cohesion: Several responsiblilties in a class breaks the single responsibility principle
* Encapsulation: Helper methods are procedures

Anti-Patterns and Worst Practices – Utils Class

Chris Missal blogs about Anti-Patterns and Worst-Practices, and mentions the utils class as an indicator of lazyness and lack of domain knowledge:
[...] know that there’s probably a better way. Since the problem I see with Utility classes is that they’re usually just a collection of a whole bunch of stuff that doesn’t really belong together, they probably exist for common reasons.

Are Helper Classes Evil?

Nick Malik has written two articles about the subject, and calls the helper classes an extraordinarily bad idea that should be avoided most of the time. Malik shows how helper classes breaks completely with object orientation (encapsulation, behavior) and several OO pronciples.
[-}the notion of functional decomposition is so easy that we drop to it when we come across an algorithm that doesn't seem to "fit" into our neat little object tree, and rather than understand the needs, analyze where we can get the best use of the technology, and place the method accordingly, we just toss it into a helper class. And that, my friends, is laziness.
What about making reusable code? Here's what Nick has to say about it:
The largest reusable code base that all your developers are already using is the .Net Framework. The vast majority of the framework uses instantiated classes, not static helper classes (there are exceptions, unfortunately). So, the need for reuse is NOT a good argument for helper classes.

Helper Classes Are Evil

Eric Lee from Microsoft Game Stuidos takes a similar stand against the helpers in his blogpost Helper Classes Are Evil:
I very much dislike them in an OOP design because inevitably they becomes a dumping ground for all kinds of things that don’t relate to each other at all in the problem domain. It’s an attractive nuisance, to use a legal term. [-] a real adherence to OOP means that you’ll have lots and lots of small, single-purpose classes.
Next time you're tempted to put code into a helper class, take a step back and think for a second. Will this code violate OO and OO principles? Probably. What does the helper methods do? Can you design this so that the code is placed in a separate class with data and behavior? Don't be lazy. Try to understand the problem domain and come up with an object oriented solution rather than a lazy, procedural one.

So, must helper classes die? Let me paraphrase Nick:
I don't believe that software practices qualify in the moral sphere, so there is no such thing as evil code.

Saturday, June 6, 2009

Jeremy D. Miller: The Joys and Pains of a Long Lived Codebase (Video)

In this presentation recorded at QCon SF 2008, Jeremy D. Miller shares lessons learned while developing a project over 5 years. He talks about his mistakes, what to avoid and how to design, code and test better.