November 19, 2010

Unicode code converter (online)

Unicode Code Converter v7.03

Type or paste text in any of the green or grey shaded boxes and click on the button Convert button above it.

November 12, 2010

Open-plan offices sickening, unproductive

"All the studies we reviewed had the same conclusion - that the open-plan work environment is one of the worst environments in which you can put an employee.

"The only advantages of working in such an environment is that you can give people the opportunity to communicate better. It can be a much friendlier environment."

However, the cons far outweigh the pros

September 16, 2010

Autocomplete static imports in eclipse

Here's a recipe on how to get autocomplete on assertEquals, and have eclipse automatically add the static import for you.

September 10, 2010

On Lean And Agile (Gil Broza from Agile 2010 panel)

Gil Broza Article: Lean And Agile — Roommates, Married Or Twins?
Our panelists were all experienced Agilists who incorporate deep Lean thinking: Mary Poppendieck, Jim Shore, Alan Shalloway and Jean Tabaka.
....
Mary led with a quick definition: “Lean is delivering constantly increasing customer value for continually decreasing effort, leveraging energy and creativity”. The panelists all agreed that Agile is really a subset of Lean.
....
While Lean thinking can certainly improve the value flowing out an Agile team, its strong suit is in wider-scale application to the business and the whole value chain, “from concept to cash”. We have to pay attention to metrics that traditionally sat on the business side, as Agile lacks discipline around business methods. Teams must understand the business justification — and focus on delivering its promise.
Some people claim that “you can't improve what you can't measure”. But we manage things that we can't measure all the time. .... Lean will help us improve stuff even if it's not measurable.
Lean has us pay attention to throughput and value flow; it encourages having mechanisms for flow control. Agile's mechanism is the iteration ... Kanban's mechanism is the work-in-progress (WIP) limit
....
[the most common mistakes when implementing Lean?] Emphasizing practices over principles and culture; taking Scrum roles as gospel; not realizing the true nature of change (believing the only thing that needs to change are the programmers).
I was surprised by the panel's answers to the question, “What should teams be trained in?” Jean answered: “Reflection” — so the team can even take in the rest of the training, and apply continuous improvement. The other three all said, “Writing testable code!” They all emphasized the point of having great technical skill and writing acceptance-driven, defect-free code.

September 4, 2010

Script Junkie | How to Debug Your jQuery Code

  • Firebug—Although many developers have used Firebug, I don't think that many understand the true potential of its debugging capabilities. If you know your tools inside out, you can become a more productive and efficient programmer. Note: If you aren't using Firefox, the Firebug Lite bookmarklet can come in handy to provide many of the nice debugging features of its Firefox add-on counterpart. I tend to use this bookmarklet primarily with Google Chrome.
  • FireQuery—This Firefox Firebug add-on provides some nice features to Firebug, such as letting you see which jQuery events are attached to what DOM elements, displaying any data elements that are attached to a DOM element, and providing the ability to inject jQuery into Web pages that don't have it already loaded.
  • FireFinder—This Firefox Firebug add-on can help you find the selector you are looking for. You can test the selector you have, and it will highlight all those items on your Web page.
todo: checkout firequery, firefinder...

Defect Driven Testing: Your Ticket Out the Door at Five O'Clock

are you not doing TDD yet? start with DDT...

Defect Driven Testing: Your Ticket Out the Door at Five O'Clock:
Test automation is not a controversial topic in most circles. Even developers who don't write automated tests agree it's a great idea. They just don't have time to work on it very often.
....
DDT is a fairly simple concept. When you find a bug, add a test.

Why take this approach?

First, no one can dispute the need for the test. If an issue was found, then it had been missed earlier. Perhaps the developer missed it and QA spotted it. Maybe it slipped past everyone and it was reported by your customer. Whenever it's reported, it needs to be fixed in a way that will prevent it from reappearing.
....
DDT is a gradual approach.
....
Over time you'll find that DDT creates an extremely effective test suite that targets the most problematic parts of your code base. Run your defect driven tests inside of a continuous integration system and you'll find your code running more cleanly every day.

August 27, 2010

tapestry 5 custom validation error message

in our system/ configuration, in order to customize T5 validation messages using the T5 validation message language key conventions, i had to use the following language keys:
  • "required" as language key for a required field
    - f.ex. when i use t:validate="required" in a .tml file
  • "number-format-exception" for a number field, and integer-format-exception for an integer field
    - when an input field attached to an integer property gets a letter, f.ex. 
using "%s" in the language expression will give access to the name of the field, f.ex. having an error message like "%s must be completed".
    what did NOT work for us, even if it worked for others (ref information below), was any prefix with field or form name, or a postfix of -message...


    Apache Tapestry - Form Input and Validation:
    Customizing Validation Messages

    Each validator (such as "required" or "minlength") has a default message used (on the client side and the server side) when the constraint is violated; that is, when the user input is not valid.

    The message can be customized by adding an entry to the page's message catalog (or the containing component's message catalog). As with any localized property, this can also go into the application's message catalog.

    The first key checked is formId-fieldId-validatorName-message.
    • formId: the local component id of the Form component
    • fieldId: the local component id of the field (TextField, etc.)
    • validatorName: the name of the validator, i.e., "required" or "minlength"
    If there is not message for that key, a second check is made, for fieldId-validatorName-message.

    If that does not match a message, then the built-in default validation message is used.

    http://tapestry.1045711.n5.nabble.com/T5-Overriding-integer-validation-message-td2436931.html#a2436931:

    (from the answers)

    You should add a prefix consisting of the field id (and optionally the form 
    id).
    (Igor)

    To generalize messages overrides for all form, you can contribute to ValidationMessagesSource service in your AppModule class with your own
    property file. (Christophe)

    Trial and error have yielded: [field id]-integer-message  (xfile80303)
    Blogged with the Flock Browser

    Dennis Stevens: We are Doing QA All Wrong

    A few interesting things from an article by Dennis Stevens, very loosely quoted...

    • We Don’t Understand Quality Assurance
    • We Don’t Understand the Cost of Rework
      • Rework from failed QA tests are extremely expensive to flow. Sending work back into development interrupts work in process. This has a dramatic effect on cycle time across the system – which results in increased cost of every item in the system.
    • the cost of setting up testing environments is much lower
    • Quality Assurance needs to be part of the development team and process. We need to change our thinking around this. So we need to integrate Quality Assurance very early in the process.
    • We have the Wrong Expectations
      • We Expect Perfection - Not Improved Value
      • We Expect Local Optimization - Not Flow
    • Enable value, flow, and ongoing improvement
    Dennis Stevens » Blog Archive » We are Doing QA All Wrong 

    From the comments:
    • One thing: No one can assure quality. Can I convince you to change the reference to “Quality Assistance?” (Jon Bach)
    • I prefer ‘testing’ and ‘tester’ to ‘quality assurance’ and ‘QA engineer’ or whatever. But these are nits. The message of Dennis’s post is the point – focus on value, improvement, delivering a better product. (Lisa Crispin)
    • I introduce myself to teams as the “public health nurse” for their project, and then subtly place ‘quality assistance’ in my email signature. (Adam Geras) 
    • testing is a complex, organic, cognitive activity, rather than a rote, bureaucratic, clerical one. (Michael Bolton)  

    Blogged with the Flock Browser

    May 26, 2010

    TDD w/javascript using jsTestDriver and (f.ex) QUnit

    JsTestDriver is seemingly yet another unit testing framework, and it stems from Google. I say seemingly, because the JsTestDriver guys has made some delicious improvements over the normal work flow which sets it apart from other unit testing frameworks for JavaScript so much it's not even funny to compare.

    Having said that, JsTestDriver is (as the name implies) really more of a test runner. It ships a default assertion framework, however it doesn't offer all kinds of JavaScript specific assertions. Instead, JsTestDriver makes it fairly accomplish-able to use your current assertion framework of choice with JsTestDriver by providing a bridge. Last time I checked, both QUnit and YUI Test had functional bridges.
    Test driven JavaScript done right / JavaScript - cjohansen.no

    There's also an eclipse plugin.

     ff
    Blogged with the Flock Browser

    March 8, 2010

    Spring Batch

    Many applications within the enterprise domain require bulk processing to perform business operations in mission critical environments. These business operations include automated, complex processing of large volumes of information that is most efficiently processed without user interaction. These operations typically include time based events (e.g. month-end calculations, notices or correspondence), periodic application of complex business rules processed repetitively across very large data sets (e.g. insurance benefit determination or rate adjustments), or the integration of information that is received from internal and external systems that typically requires formatting, validation and processing in a transactional manner into the system of record. Batch processing is used to process billions of transactions every day for enterprises.

    Spring Batch is a lightweight, comprehensive batch framework designed to enable the development of robust batch applications vital for the daily operations of enterprise systems. Spring Batch builds upon the productivity, POJO-based development approach, and general ease of use capabilities people have come to know from the Spring Framework, while making it easy for developers to access and leverage more advance enterprise services when necessary.
    Spring Batch
    Blogged with the Flock Browser

    February 23, 2010

    so you haven't seen complaints about maven?

    have you only heard good things?  i'm surprised...

    here's some stuff to balance it out.

    first, a couple of common complaints:
    • too complex
    • too rigid
    • too buggy
    • too opaque
    • difficult and time-consuming to debug problems
    then, a couple of links:
    Howard @ tapestry, maven vs ivy
    a collection of links on negative maven experiences


    February 18, 2010

    Separate Estimating from Committing

    Don’t let your estimates become commitments. Remember the difference between an estimate and a commitment and keep the two activities separate, educating management and customers as necessary.
    Separate Estimating from Committing | Mike Cohn's Blog - Succeeding With Agile®
    Blogged with the Flock Browser

    January 31, 2010

    interface code smells

    Interfaces are a very useful language feature, but are much abused. Symptoms include:
    1. An interface is only implemented by one class
    2. A class implements multiple interfaces. Often touted as an advantage of interfaces, usually it means that the class in question is violating the principle of separation of concerns.
    3. There is an inheritance hierarchy of interfaces (often mirrored by a hierarchy of classes). This is the situation you're trying to avoid by using interfaces in the first place. Too much inheritance is a bad thing, both for classes and interfaces.
    All these things are code smells, IMO.
    (Jim Cooper)
    Why do most system architects insist on first coding to an interface? - Stack Overflow
    Blogged with the Flock Browser

    January 27, 2010

    building from scratch is mind-bogglingly easy compared to changing something

    Building something with a single purpose from scratch is mind-bogglingly easy compared to changing something that already exists. 
    ....
    The real cost of complexity increases exponentially.
    ....
    One guy wrote eBay in a day -- one guy, one day! When they built version 2, the project took the same guy many weeks. Version 3 took many years. There can never be a version 4
    ....
    why does each version take longer -- even if replacing the system in full? The answer is that small amounts of increases in perceived complexity (e.g. each new requirement) expands the real complexity of the system exponentially. Want examples? Take a hand-built web-site and add internationalization / localization. Add accessibility support. Add support for other devices, such as an iPhone. Add scale-out. Add high availability. Add security. If you know someone that thinks it's easy, then whatever you do, don't hire that person, fire them if they already work for you, and quit if you work for them.
    /dev/null : Weblog
    Blogged with the Flock Browser

    JsUnit - unit testing javascript

    JsUnit is a Unit Testing framework for client-side (in-browser) JavaScript. It is essentially a port of JUnit to JavaScript.

    JsUnit
    Blogged with the Flock Browser

    January 19, 2010

    BugsVoice - turn bugs into opportunities

    BugsVoice is ... serving friendly error pages and saving the exceptions and feedbacks on your account.

    So if you get a trapped exception in your application (or in your web server), this will print out the script copied from your BugsVoice account, display the friendly error page to your customers, and collect their eventual feedback. All this will be saved in your account, and you can access any time to inspect the bug, feedback the customer etc. :-) .
    BugsVoice - turn bugs into opportunities
    Blogged with the Flock Browser

    January 18, 2010

    powermock

    PowerMock is a framework that extend other mock libraries
    ....
    By using a custom classloader no changes need to be done to the IDE or continuous integration servers which simplifies adoption.
    ....
    PowerMock aims to extend the existing API's with a small number of methods and annotations to enable the extra features. Currently PowerMock supports EasyMock and Mockito.
    powermock - Project Hosting on Google Code
    Blogged with the Flock Browser