Velocimacro - Generate a HTML Select box and its Options
A quick and simple Velocimacro to generate HTML Select boxes and its Options; automatically selects the correct option based on the value given. You can place this #macro anywhere in your Velocity templates but I used my global VM_global_library.vm file. Code ``` #macro( generateSelectBox $name $options $value ) #foreach ( $option in $options ) #set( $selected = "" ) #if ( $option == $value ) #set( $selected = "selected='true'" ) #end $option #end #end ``` Example Usage ``` #generateSelectBox( "enabled" ["Y","N"] $form.enabled ) ``` The resulting HTML: ``` Y N ``` Addendum 11th November 2005 : Thanks to MATT for pointing out the FreeMarker template engine as a promising replacement for Velocity. ;)
The Cutler.sg Newsletter
Weekly notes on AI, engineering leadership, and building in Singapore. No fluff.
Two Papers That Puncture the Hype
One paper shows frontier models degrade as context grows — even on trivial tasks. The other shows reasoning models hit a wall and think less as problems get harder. Read carefully, both point at the same engineering response.
The 30 Principles for Agentic Engineering — Part 5: Calibration and Reality
Principles 26–30. The calibration layer that catches what the rest of the framework would miss: a PR-noise budget, independent verification, model-swap regression discipline, the 15-tool-call rule, and protecting junior development.
The 30 Principles for Agentic Engineering — Part 3: The Harness
Principles 15–20. The harness configuration that keeps the kernel and lifecycle cheap: CLAUDE.md under 200 lines, hooks for real incidents, skills that auto-invoke, subagent isolation, pinning, and Stage 5 distribution.