<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.dzone.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
  <title>JRoller</title>
  <link>http://www.jroller.com</link>
  
  <description>Javalobby Community Weblog Service</description>
  <language>en-us</language>
  <copyright>Copyright 2007</copyright>
  <lastBuildDate>Tue, 17 Jul 2007 11:08:23 -0400</lastBuildDate>
  <generator>Apache Roller (incubating) 3.1 (20070421020349:dave)</generator>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://jroller.com/rss" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fjroller.com%2Frss" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fjroller.com%2Frss" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fjroller.com%2Frss" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://jroller.com/rss" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fjroller.com%2Frss" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fjroller.com%2Frss" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fjroller.com%2Frss" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
    <guid isPermaLink="false">http://www.jroller.com/RickHigh/entry/thoughts_on_django</guid>
    <title>Thoughts on Django</title>
    <dc:creator>Rick Hightower</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/WcCxxb_LXq8/thoughts_on_django</link>
        <pubDate>Sun, 8 Nov 2009 16:41:13 -0500</pubDate>
    <category>technology</category>
            <description>&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 11px; white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; white-space: normal; font-size: medium; "&gt;&lt;p&gt;&lt;em&gt;Django&lt;/em&gt;&amp;nbsp;will make hair grow on the top of your head, and chicks will dig you. Ok, not so much!&amp;nbsp;&lt;/p&gt;&lt;p&gt;Django is yet another rapid development web framework. Where Django differs from many other rapid development web frameworks is quality and consistency. Django aims to greatly simplify developing web applications. Finally, web developers can assemble an application soup to nuts without managing 50 other dependencies.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;quot;Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.&amp;quot; (The Django project website)&lt;/p&gt;&lt;p&gt;&amp;quot;Django focuses on automating as much as possible and adhering to the DRY principle.&amp;quot; (The Django project website)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Django is an end to end web development environment. It is everything you need to write a web application. And in true Python style, it is batteries included.&lt;/p&gt;&lt;p&gt;Batteries included means, you don't have to go and find and manage 50 other dependencies to write a full functioning web site.&lt;/p&gt;&lt;p&gt;Django provides the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;easy-to-use object relational mapper,&lt;/li&gt;&lt;li&gt;admin console for easily mapping your model to an editable GUI&lt;/li&gt;&lt;li&gt;extensible forms management when you need a custom GUI&lt;/li&gt;&lt;li&gt;create and add custom widgets (with JavaScript delivery thought out),&lt;/li&gt;&lt;li&gt;create and add custom fields,&lt;/li&gt;&lt;li&gt;extensible request handling through &amp;quot;middleware&amp;quot; support&lt;/li&gt;&lt;li&gt;out of the box security system with Users, roles and permissions&lt;/li&gt;&lt;li&gt;and much more&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Django is easy to extend and modularize. It is easy to turn an application into a module that decorates many other projects. Developing with Django is a pleasure. For the most part, everything just works like you would expect.&lt;/p&gt;&lt;p&gt;(Expect this to be edited a few times as I flush out some more ideas...)&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/WcCxxb_LXq8" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/RickHigh/entry/thoughts_on_django</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/xtecuan/entry/felicidades_diana_y_angel_posada</guid>
    <title>Felicidades Diana y Angel (Posada Miranda)</title>
    <dc:creator>Julian Rivera Pineda</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/jNJIxn4b1X4/felicidades_diana_y_angel_posada</link>
        <pubDate>Sun, 8 Nov 2009 14:51:40 -0500</pubDate>
    <category>Java</category>
            <description>Les deseamos toda la felicidad y bendiciones que Dios y la Virgencita les puedan dar, que en su hogar reinen la paz y el amor, son los deseos sinceros de la Familia Rivera Hernández (Xtecuan, Pocahontas y PrincessCuan)&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=777fd614-adf5-8447-96d0-3494d7b0b048" /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/jNJIxn4b1X4" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/xtecuan/entry/felicidades_diana_y_angel_posada</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/broneill/entry/carbonado_1_2_1_released</guid>
    <title>Carbonado 1.2.1 released</title>
    <dc:creator>Brian S O'Neill</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/P9U3juc5K1g/carbonado_1_2_1_released</link>
        <pubDate>Sun, 8 Nov 2009 13:21:56 -0500</pubDate>
    <category>Java</category>
    <category>bdb</category>
    <category>berkeleydb</category>
    <category>carbonado</category>
    <category>jdbc</category>
    <category>orm</category>
            <description>&lt;p&gt;&lt;a href="http://carbonado.sourceforge.net/"&gt;Carbonado&lt;/a&gt; is another project I work on, providing relational abstraction for JDBC and Berkeley DB. I just released version 1.2.1, one year after the release of 1.2. I should have released sooner, but I've been busy with other projects.&lt;/p&gt;


&lt;p&gt;Version 1.2.1 is mostly a bug fix release, but it adds a few new features as well. The most notable feature addition is value compression for Berkeley DB. It is enabled on the BDBRepositoryBuilder:&lt;/p&gt;


&lt;p&gt;&amp;nbsp;&amp;nbsp;BDBRepositoryBuilder builder = new BDBRepositoryBuilder();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;...&lt;br/&gt;
&amp;nbsp;&amp;nbsp;// Enable compression for a few types.&lt;br/&gt;
&amp;nbsp;&amp;nbsp;builder.setCompressor(MyStorable.class.getName(), "GZIP");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;builder.setCompressor(AnotherStorable.class.getName(), "GZIP");&lt;/p&gt;


&lt;p&gt;Compression is applied to all the data values of the Storable, but the key is never compressed. The design allows compressed and uncompressed records to co-exist, and changing the option does not alter existing records. An explicit update is required to force an existing record to be converted.&lt;/p&gt;


&lt;p&gt;The design also allows additional compression algorithms to be supported, but only GZIP is provided for now. Records which have been compressed with different algorithms can also co-exist.&lt;/p&gt;


&lt;p&gt;The compression feature should only be enabled for types which are relatively large. Otherwise, GZIP will add needless performance and storage overhead. GZIP needs to encode a little extra data even to indicate that the record wasn't compressed at all.&lt;/p&gt;


&lt;p&gt;All the changes to Carbonado 1.2.1 are summarized in the release notes:&lt;/p&gt;


&lt;p&gt;- Fixes in replicated repository resync when encountering corrupt records.&lt;br/&gt;
- Fixes for derived properties.&lt;br/&gt;
- Added option to allow derived properties to be copied to other Storables.&lt;br/&gt;
- Added record compression support for BDB repositories.&lt;br/&gt;
- Added hot backup capability for BDB repositories.&lt;br/&gt;
- Added nested rollback support for BDB-JE.&lt;br/&gt;
- More BDB options exposed.&lt;br/&gt;
- JDBC logging includes bind variable values.&lt;br/&gt;
- Fixes for JDBC CLOB updates.&lt;br/&gt;
- Fixes for excessive class generation.&lt;br/&gt;
- Query.after and Query.fetchAfter support subclass parameter.&lt;br/&gt;
- Support covariant storable properties when subclassed. &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/P9U3juc5K1g" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/broneill/entry/carbonado_1_2_1_released</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/DhilshukReddy/entry/swing_resources</guid>
    <title>Swing Resources</title>
    <dc:creator>Dhilshuk Reddy Jeeru</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/ZQktXhqoh6I/swing_resources</link>
        <pubDate>Sat, 7 Nov 2009 10:02:25 -0500</pubDate>
    <category>Swing Resources</category>
            <description>&lt;!--
To change this template, choose Tools | Templates
and open the template in the editor.
--&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;/head&gt;
&lt;h3&gt;Best Sites for Java Swing &lt;/h3&gt;
Please visit the sites below they are real helpful.I Might be missing many valid sites.
&lt;br&gt;Please mention those list of site in comments so that I can add to existing list&lt;/br
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/desktop/"&gt;Java Desktop&lt;/a&gt;&lt;li&gt;
    &lt;li&gt;&lt;a href="http://community.java.net/javadesktop"&gt;Java Desktop Community&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://javadesktop.org/rollups/components/index.html"&gt;Swing Depot&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.manageability.org/blog/stuff/"&gt;http://www.manageability.org/blog/stuff/&lt;/a&gt;&lt;/li&gt;
    &lt;lI&gt;&lt;a href="http://www.javootoo.com/"&gt;http://www.javootoo.com/&lt;/a&gt; Java Look and Feel&lt;/li&gt;

&lt;/ul&gt;
&lt;UL&gt;
&lt;li&gt;
    &lt;h3&gt;
        General Purspose component Libraries
    &lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&lt;a href="https://swingx.dev.java.net"&gt;SwingX&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jidesoft.com/"&gt;JIDE&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.l2fprod.com/"&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.thinlet.com/swing.html"&gt;Thinlet Components&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="https://jna.dev.java.net/"&gt;JNA&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jgoodies.com/"&gt;JGoodies&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.ilog.com/products/jviews/"&gt;ILOG&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.infonode.net/"&gt;InfoNode&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.japisoft.com/buy.html"&gt;Japisoft&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jproductivity.com/products/components/components.htm"&gt;JProductivity&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.quest.com/jclass/overview.aspx"&gt;Quest&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.vlsolutions.com/en/index.php"&gt;VLSoltions&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://javadesktop.org/rollups/components/index.html#wingz"&gt;Win-Z Solutions&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://code.google.com/p/macwidgets/"&gt;Mac Widgets for Java&lt;/a&gt;&lt;/li&gt;

    &lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt; Components &amp; Tools for Specialized Applications&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.ephox.com/products/editlivejavabean/demo/"&gt;Ephonx&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;A href="http://www.icesoft.com/company/about-icesoft.html"&gt;ICE Soft&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.tomsawyer.com/products/analysis/java/index.php"&gt;Tom Sawyer Software&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt; Graphs,Diagrams and Charts&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.jfree.org/jfreechart/JFreeChart"&gt;JFreeChart&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jgraph.com/"&gt;JGraph&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.singleton-labs.com/"&gt;Singleton Labs&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.yworks.com/en/products.html"&gt;Yworks&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt; Date Choosers&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.lavantech.com/datetimepicker/"&gt;Lavantech&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://microba.sourceforge.net/"&gt;Microba&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.migcalendar.com/"&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.toedter.com/en/jcalendar/"&gt;Toedter&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt; Layouts&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.jgoodies.com/download/libraries/forms/forms-1_2_1.zip"&gt;FormLayout&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="https://tablelayout.dev.java.net/"&gt;TableLayout&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/uiswing/layout/group.html"&gt;GroupLayout&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.miglayout.com/"&gt;MIGLayout&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.datadosen.se/riverlayout/"&gt;RiverLayout&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://pagelayout.sourceforge.net/"&gt;PageLayout&lt;/a&gt;&lt;/li&gt;

    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;JTable &amp; JList&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://publicobject.com/glazedlists/"&gt;GlazedLists&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Swing and CSS&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://weblogs.java.net/blog/enicholas/archive/2008/07/introducing_jav.html"&gt;Introducing Java CSS&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://today.java.net/pub/a/today/2003/10/14/swingcss.html"&gt;Swing and CSS&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.ilog.com/products/jviews/demos/wf-monitor/index.cfm"&gt; Graphical Data Displays with CSS&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;Introducing Java CSS&lt;/li&gt;


    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Look and Feels&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;
            Free Look And
            Feel&lt;/a&gt;

            &lt;ul&gt;

                &lt;li&gt;&lt;a href="http://www.infonode.net/index.html?ilf"&gt;InfoNode Look and Feel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://www.jgoodies.com/freeware/looks/index.html"&gt;JGoodies Looks&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="../../plaf/lipstik/index.html"
                       rel="self"&gt;LipstikLF&lt;/a&gt;&lt;/li&gt;


                &lt;li&gt;&lt;a href="http://fifesoft.com/officelnfs/"&gt;Office Look And Feels&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="https://pgslookandfeel.dev.java.net/"&gt;PgsLookAndFeel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://www.javootoo.com/plaf/quaqua/index.html"&gt;Quaqua Look And Feel&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="https://liquidlnf.dev.java.net/"&gt;Liquid Look And Feel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://napkinlaf.sourceforge.net/"&gt;Napkin Look &amp;amp; Feel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://personales.ya.com/nimrod/index-en.html"&gt;NimROD Look &amp;amp; Feel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://squareness.beeger.net/"&gt;Squareness Look And Feel&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://www.muntjak.de/hans/java/tinylaf/index.html"&gt;TinyLAF&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://www.digitprop.com/tonic/tonic.php"&gt;Tonic Look And Feel&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;

        &lt;/li&gt;
        &lt;li&gt;
        Commerical Look and Feel&lt;/li&gt;
        &lt;ul&gt;

            &lt;li&gt;&lt;a href="http://www.jtattoo.net/"&gt;JTattoo&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="http://lookandfeel.incors.com/"&gt;Alloy Look And Feel&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="http://www.javasoft.de/jsf/public/products/synthetica"&gt;Synthetica&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;li&gt;
            Free &amp;amp; Skinnable
            Look And Feel

            &lt;ul&gt;
                &lt;li&gt;&lt;a href="http://www.easynth.com/"&gt;EaSynth&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href="http://l2fprod.com/skinlf/"
                       rel="self"&gt;Skin Look And Feel&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="https://substance.dev.java.net/" rel="self"&gt;Substance&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;

        &lt;/li&gt;

    &lt;/ul&gt;

&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;BallonTips&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="https://balloontip.dev.java.net/"&gt;BalloonTip&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Java Visualization&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;a href="http://csbi.sourceforge.net/"&gt;GINY&lt;/a&gt;
        &lt;/li&gt;

        &lt;li&gt;
            &lt;a href="http://jung.sourceforge.net/"&gt;JUNG&lt;/a&gt;
        &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://hypergraph.sourceforge.net/"&gt;HyperGraph&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="https://jdigraph.dev.java.net/"&gt;JDigraph&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
            &lt;a href="http://www.wilmascope.org/"&gt;WilmaScope&lt;/a&gt;
        &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://jgrapht.sourceforge.net/"&gt;JGraphT&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://touchgraph.sourceforge.net/"&gt;TouchGraph&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://gvf.sourceforge.net/"&gt;GVF&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://www.jharris.ca/JGraphEd/"&gt;JGraphEd&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;
        &lt;a href="http://www.eng.auburn.edu/csse/research/graph_drawing/vgj.html"&gt;VGJ&lt;/a&gt;   &lt;/li&gt;

        &lt;li&gt;

        &lt;a href="http://www.hpl.hp.com/shl/projects/graphs/"&gt;Zoomgraph&lt;/a&gt; &lt;/li&gt;


        &lt;li&gt;
        &lt;a href="http://www.caida.org/tools/visualization/walrus/"&gt;Walrus&lt;/a&gt;&lt;/li&gt;

        &lt;li&gt;&lt;a href="http://prefuse.sourceforge.net/"&gt;Prefuse&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;&lt;a href="http://zvtm.sourceforge.net/index.html"&gt;ZVTM&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://iv.slis.indiana.edu/sw/"&gt;InfoVis Toolkit&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="http://sourceforge.net/projects/ivc/"&gt;InfoVis Cyberinfrastructure&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://bioinformatics.icmb.utexas.edu/lgl/"&gt;Large Graph Layout&lt;/a&gt; &lt;/li&gt;

        &lt;li&gt;&lt;a href="http://web.mit.edu/bshi/Public/nv2d/"&gt;NV2D&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://graphexploration.cond.org/"&gt;GUESS&lt;/a&gt;&lt;/li&gt;

        &lt;li&gt;&lt;a href="http://www.caida.org/tools/visualization/otter/"&gt;Otter&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://gravisto.fim.uni-passau.de/"&gt;Gravisto&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.softwaresecretweapons.com/jspwiki/Wiki.jsp?page=LinguineMaps"&gt;Linguine Maps &lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.roxgt.org/"&gt;Rox Graph Theory Framework&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.cs.cmu.edu/~quixote/"&gt;JIGGLE&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.eclipse.org/mylar/zest.php"&gt;Zest&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://relo.csail.mit.edu/"&gt;Relo&lt;/a&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.stanford.edu/group/sonia/"&gt;SoNIA&lt;/a&gt;
        &lt;/li&gt;

    &lt;/ul&gt;


&lt;/li&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Java WorkFlows&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;

        &lt;li&gt;&lt;a href="http://shark.enhydra.org/"&gt;Enhydra Shark&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://werkflow.codehaus.org/"&gt;Codehaus Werkflow&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.opensymphony.com/osworkflow"&gt;OpenSymphony OSWorkflow&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jbpm.org"&gt;jBpm&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://wfmopen.sourceforge.net"&gt;wfmOpen&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.ofbiz.org/docs/workflow.html"&gt;OFBiz Workflow Engine&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://bonita.forge.objectweb.org"&gt;ObjectWeb Bonita&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.bigbross.com/bossa/"&gt;Bigbross Bossa&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://taverna.sourceforge.net/"&gt;Taverna&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jfolder.com/"&gt;JFolder&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://obe.sourceforge.net/ "&gt;Open Business Engine&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://openwfe.sourceforge.net/"&gt;OpenWFE&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://freefluo.sourceforge.net/"&gt;Freefluo&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.tripodsoft.com/products/intro.htm"&gt;ZBuilder&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://micro-workflow.com/Downloads.phtml"&gt;Micro-Workflow&lt;/a&gt;  &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://concern.sourceforge.net/"&gt;con:cern&lt;/a&gt;    &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.smartcomps.org/twister/"&gt;Twister&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://yawlfoundation.org/"&gt;YAWL&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://zebra.tigris.org/"&gt;Zebra&lt;/a&gt;            &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.activebpel.org/"&gt;ActiveBPEL&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://www.kgionline.com/xflow2/"&gt;XFlow2&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://wiki.apache.org/agila/"&gt;Apache Agila&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://antflow.onionnetworks.com/"&gt;Antflow&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://mobe.objectweb.org"&gt;MidOffice BPEL Engine&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://www.fivesight.com/pxe.shtml"&gt;PXE&lt;/a&gt;           &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://bexee.sourceforge.net/"&gt;Beexee&lt;/a&gt;
        &lt;li&gt;&lt;a href="http://syrup.sourceforge.net/"&gt;Syrup&lt;/a&gt;
        &lt;li&gt;&lt;a href="https://dalma.dev.java.net/nonav/maven/index.html"&gt;Dalma&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://sourceforge.net/projects/pi4soa/"&gt;Pi Calculus for SOA&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.intalio.com/products/os.html"&gt;Intalio|BPMN&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www-unix.globus.org/cog/projects/gridant/"&gt;GridAnt&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="http://kepler-project.org/Wiki.jsp?page=KeplerProject"&gt;Kepler Project&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.jopera.ethz.ch/"&gt;JOpera&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://wiki.apache.org/incubator/OdeProposal"&gt;Ode - Orchestration Director Engine&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.imixs.org/websites/imixs-org_en.nsf/chapter/0000.?OpenDocument"&gt;Imixs &lt;/a&gt;  &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://incubator.apache.org/servicemix/beanflow.html"&gt;BeanFlow&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.arsretia.net/jawflow/index.php"&gt;jawFlow&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://uengine.sourceforge.net/"&gt;uEngine&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.bpmscript.org"&gt;BpmScript&lt;/a&gt; &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://wiki.apache.org/ode/Jacob"&gt;JaCOB&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.intalio.org/confluence/display/TEMPO"&gt;Tempo&lt;/a&gt;&lt;/li&gt;


    &lt;/ul&gt;

&lt;/li&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Java Expression Builders&lt;/h3&gt;
    &lt;hr align="left" noshade="true" size="6" width="40%"&gt;&lt;/hr&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="https://jevaluate.dev.java.net/"&gt;JEvaluate&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="https://jevaluate.dev.java.net/"&gt;JEP&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://kinetic.dnsalias.org/JEL/"&gt;JEL&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://sourceforge.net/projects/jec/"&gt;JEC&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="http://commons.apache.org/jexl/"&gt; JEXL &lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="https://eval.dev.java.net/"&gt;Eval&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a href="http://www.bestcode.com/html/jbcparser.html"&gt;Jbcparser&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.janino.net/use.html"&gt;janino&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

&lt;/li&gt;
&lt;/UL&gt;


&lt;/body&gt;
&lt;/html&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/ZQktXhqoh6I" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/DhilshukReddy/entry/swing_resources</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/dmdevito/entry/portlet_life_looks_like_ejb</guid>
    <title>Portlet life looks like EJB, but future sounds like GWT </title>
    <dc:creator>Dominique De Vito</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/RFBdqLSlty0/portlet_life_looks_like_ejb</link>
        <pubDate>Sat, 7 Nov 2009 04:52:44 -0500</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;
Portlets face different problems,
but GWT looks like the solution.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Portlets are not small applications&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
Some documents, like this
&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/topic/com.ibm.wp.zos.doc/wpf/fea_portlets.html"&gt;one&lt;/a&gt;, 
say
"&lt;i&gt;Portlets are small applications that are independently developed, deployed, managed, and displayed&lt;/i&gt;".
I disagree.
Because this vision is somewhat exaggerated.
&lt;/p&gt;
&lt;p&gt;
If portlets were small applications,
they should 
have OSGi-like features,
like a unique id(entification),
dependency definition and management,
public part (API)
and private part (implementation), etc.
AFAIK, portlets don't have such features,
and
don't 
look really
like
small applications.
&lt;/p&gt;
&lt;p&gt;
I believe the game portlet/OSGi
may end up
like a remake of the game
between
specialized supercomputers using ad hoc technologies (~ portlet)
versus
clusters of PC (~ OSGi)
using
&lt;a href="http://en.wikipedia.org/wiki/Commercial_off-the-shelf"&gt;COTS&lt;/a&gt;:
at the end, OSGi will win 
as written in
&lt;a href="http://www.jroller.com/dmdevito/entry/portlets_in_the_light_of"&gt;Portlets in the light of OSGi and other technologies&lt;/a&gt;,
because OSGi modules are much more small applications than portlets.
Well,
there are already some JavaEE servers out there
that enable to
deploy OSGi modules
authorized
to call JavaEE API
(see Spring or JOnAS servers).
So, yes, one could imagine to implement portlets as OSGi modules.
&lt;/p&gt;

&lt;table style="" align="right"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align="center"&gt;
&lt;a href="http://www.jroller.com/dmdevito/resource/mozilla-raindrop.jpg"&gt;
&lt;img src="http://www.jroller.com/dmdevito/resource/mozilla-raindrop.jpg" width="300"&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt; 
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;
&lt;u&gt;Portals should have less priority than business solutions&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
	Some architects
	layer
	the back-office
	while separating the presentation layer (think JSP) 
	and the business layer on different machines.
From the same point of view as above,
I don't see portlets
living
into the business layer,
but into the presentation layer,
and then, accordingly,
I don't see portlets as small applications.
&lt;/p&gt;




&lt;p&gt;
So, again,
IMHO, portlets are much more about (graphical) integration
than business integration
(even security, said to be specific to the portlet side, 
could be, in fact, set outside - think
about servlet filter).
One proof that 
portals are about integration,
and that a good part of it is graphical integration,
is one could see portal incarnations moving on client-side.
Mozilla recently announced its latest project  
&lt;a href="http://labs.mozilla.com/raindrop/"&gt;Raindrop&lt;/a&gt;,
as said 
&lt;a href="http://java.dzone.com/news/dzone-daily-dose-20091026"&gt;here&lt;/a&gt;:
it's 
"&lt;i&gt;an application intended to bring all of your online messages to one portal; 
That includes Email, tweets, RSS, and social network updates all in one place.&lt;/i&gt;" 
Another portal 
incarnation from Mozilla
is 
&lt;a href="http://labs.mozilla.com/snowl/"&gt;Snowl&lt;/a&gt;
- see my post
&lt;a href="http://www.jroller.com/dmdevito/entry/snowl_a_portal_concurrent_solution"&gt;Snowl, 
	a portal concurrent solution on the client-side&lt;/a&gt;.
&lt;/p&gt;


&lt;table style="" align="right"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align="center"&gt;
&lt;a href="http://www.jroller.com/dmdevito/resource/mozilla-snowl.png"&gt;
&lt;img src="http://www.jroller.com/dmdevito/resource/mozilla-snowl.png" width="200"&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt; 
&lt;/tbody&gt;&lt;/table&gt;



&lt;p&gt;
Let's imagine one want to develop
a portal with content presentation/management features.
I am more keen to choose a 
&lt;a href="http://en.wikipedia.org/wiki/Content_management_system"&gt;CMS&lt;/a&gt;/&lt;a href="http://en.wikipedia.org/wiki/Enterprise_content_management"&gt;ECM&lt;/a&gt;,
and next, to choose a portal 
if it's really needed
and brings
added-value;
then, 
IMHO 
business compliance 
should be first
and presentation
has only a second-level 
priority,
as portals, then, do have.
&lt;/p&gt;

&lt;p&gt;
I have already wrote
&lt;a href="http://www.jroller.com/dmdevito/entry/portlets_in_the_light_of"&gt;here&lt;/a&gt;
that
many claim a portlet is sweet because it enables to include multiple views inside a single page. 
OK. But it's only about the entry page (in most cases). 
Then, on the technology side, using portlets for developing a portal web site is just like a house builder that 
would choose to build a wooden house just because one single reason, that is, because they have chosen first a wooden door! 
It just sounds like weird! 
Are you going to buy a business solution because 
your top priority is 
the look and feel of the entry page ? 
I don't think so.
&lt;/p&gt;


&lt;p&gt;
So, portals are not 
&lt;a href="http://en.wikipedia.org/wiki/Silver_bullet"&gt;silver bullets&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Portlets have had different lifes, like EJB&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
Portlets have had different lifes and a hard beginning.
&lt;/p&gt;
&lt;p&gt;
I remember my first contact with a portlet solution. The vendor
told me the following about its portal solution:
&lt;br/&gt;
- Session clustering was not possible because
some misalignment (?) between portlet session and http session.
&lt;br/&gt;
- Presentation coding was not anymore possible within JSP:
developers have had to code presentation into... servlets (oops).
&lt;/p&gt;
&lt;p&gt;
	Hard time, for sure.
&lt;/p&gt;

&lt;p&gt;
Portlets have improved.
And they
have been kicked by AJAX arrival,
so again
they have given an old-style feeling.
And they 
have improved again.
So, portlets have surfed some times
on top of the wave, at least, the buzz wave, 
and 
they have been, quite often too, 
at the bottom!
&lt;/p&gt;
&lt;p&gt;
And it looks like portlets are going to be kicked again by other technologies
(see below).
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Portlets may have been simpler through more convention over configuration&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
I wonder if the problems portlets face 
may come from
the fact that
portlets are defined at the API-level,
but also at other levels,
like architecture design and at the framework level too,
as the 2 following points of the specification suggest:
&lt;br/&gt;
# two phases of action processing and rendering in order to support the Model-View-Controller pattern.
&lt;br/&gt;
# portlet modes, enabling the portal to advise the portlet what task it should perform and what content it should generate
&lt;/p&gt;

&lt;p&gt;
While portlet design
is not enough on the server-side, it has impacts:
&lt;br/&gt;
- if one choose first to develop portlets,
the choice, next, of a web framework,
and its integration with portlets,
could be cumbersome 
(that's the reason
bridges were proposed), 
and that's annoying because
a web framework is more important
than 
portlets that are here 
to design only the home page.
&lt;br/&gt;
- another way
is to choose a framework web
(other that portlet's one) 
and next, to follow
architecture design of the portlets
(without using such a dedicated portlet framework);
it's much more
doable these days
as, for example, existing
JavaScript frameworks 
provide
building bricks.
&lt;/p&gt;

&lt;p&gt;
I wonder too if the portlet specification
would not have been simpler
following convention over configuration approach
(for example, 
while defining a jportletid parameter, like there is a jsessionid at servlet level).
May be portlet definition 
would have been simpler,
without portlet framework, 
leaving
developers to use their preferred web framework
for implementing portlets.
&lt;/p&gt; 



&lt;table style="" align="right"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align="center"&gt;
&lt;a href="http://www.jroller.com/dmdevito/resource/gwt portal layout-1.jpg"&gt;
&lt;img src="http://www.jroller.com/dmdevito/resource/gwt portal layout-1.jpg" width="300"&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td vspace="10" align="center"&gt;
&lt;a href="http://www.extjs.com/deploy/dev/examples/portal/portal.html"&gt;Portal layout&lt;/a&gt; 
using GWT
with
&lt;a href="http://www.extjs.com/products/extjs/"&gt;Ext JS&lt;/a&gt; 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;



&lt;p&gt;
&lt;u&gt;GWT is going to be a portlet alternative: in fact, GWT sounds like portlet death&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
Well,
I think the 
more important 
portlet's problem
comes from
it's a technology 
with ass 
between two chairs!
This technology sits
within 
the architecture/framework/API different levels, 
is both present into client/server side, 
is at the presentation/business interface...
Then,
portlets 
fight
on all sides.
So, they fight to compete
with various solutions, 
and they are
often shaken up
by
forward 
moves
into connex/close domains
(e.g. AJAX introduction).
So,
the portlet 
&lt;a href="http://en.wikipedia.org/wiki/Rate_of_return"&gt;ROI&lt;/a&gt;
 is under pressure.
&lt;/p&gt;

 


&lt;p&gt;
Portlets have had hard time where AJAX appeared,
but now they are going to have much more hard time trying to compete with GWT.
&lt;/p&gt;
&lt;p&gt;
GWT sounds like portlet death.
&lt;/p&gt;
&lt;p&gt;
Why ?
Portlets are cross-frontier technologies,
being on the client-side
and on the server-side too.
And guess what !?
GWT is a cross-frontier technology
too, quite pretty good
to mix easily
JavaScript/Java and
client/server sides.
&lt;/p&gt;

&lt;table style="" align="right"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align="center"&gt;
&lt;a href="http://www.jroller.com/dmdevito/resource/gwt portal layout-2.jpg"&gt;
&lt;img src="http://www.jroller.com/dmdevito/resource/gwt portal layout-2.jpg" width="300"&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td vspace="10" align="center"&gt;
GWT-based &lt;a href="http://www.extjs.com/deploy/dev/examples/portal/portal.html"&gt;portal layout&lt;/a&gt; 
in action
with
&lt;a href="http://www.extjs.com/products/extjs/"&gt;Ext JS&lt;/a&gt; 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;
So, if one
would have to specify
portlet again from scratch,
IMHO 
a GWT-inspired
approach would be at the center of such work.
&lt;/p&gt;

&lt;p&gt;
Just take a look at
&lt;a href="http://www.extjs.com/products/extjs/"&gt;Ext JS&lt;/a&gt; 
widget library	for GWT.
Ext JS library
provides portal appearance:
take a look at this 
&lt;a href="http://www.extjs.com/deploy/dev/examples/portal/portal.html"&gt;demo&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
So, on one side,
you have
portlet frameworks,
with a lot
of associated problems,
like integration
with your favorite
web framework,
and learning curve.
On the other side,
you have the quite popular, and powerful, GWT framework.
GWT is evolving fast,
and provides
already
most of the portlet features,
except may be 
the hot deploy of a new kind of portlet on
the server-side;
but, still,
GWT is evolving fast,
and I prefer
to bet on it instead of portlet technology.
&lt;/p&gt;

&lt;p&gt;
While GWT could provide already
most features portlets provide too,
and much more,  
while GWT
is a general purpose framework, and portlet frameworks
are specialized ones, 
while GWT has a huge and growing community,
the question is:
are
you going to bet on GWT or on portlets ?
I don't believe
in the second answer,
over the first one.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Conclusion !?&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
I have written
previously
&lt;a href="http://www.jroller.com/dmdevito/entry/the_term_portal_is_at"&gt;the 
	term "portal" is, at least, rather confusing!&lt;/a&gt;
	But one thing is clearer now,
	portlets,
	as we know them today,
	have a dark future, close to no future at all; 
	or to say things differently,
	I have difficulties to see portlet future.
	There could be specific use cases,
	but they seem a minority.
	&lt;/p&gt;
	
	&lt;p&gt;
		This being said,
		while 
		this post is mainly discussing 
		the portlet concept,
it is not against portals,
even if I don't forget to 
keep my eyes open when
I read the word 'portal' as this is quite a 
fuzzy concept as I have written
&lt;a href="http://www.jroller.com/dmdevito/entry/the_term_portal_is_at"&gt;here&lt;/a&gt;.
	&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/RFBdqLSlty0" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/dmdevito/entry/portlet_life_looks_like_ejb</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/holy/entry/preview_of_the_portlets_in</guid>
    <title>Preview of the Portlets in Action book available</title>
    <dc:creator>Jakub Holý (Holy)</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/_zlRl_l9sOY/preview_of_the_portlets_in</link>
        <pubDate>Sat, 7 Nov 2009 04:40:24 -0500</pubDate>
    <category>Portlets</category>
    <category>book</category>
    <category>jsr168</category>
    <category>jsr286</category>
    <category>mvc</category>
    <category>portlet</category>
    <category>spring</category>
    <category>web</category>
            <description>&lt;p&gt;The book Portlets in Action being written by Ashish Sarin, which I've already mentioned and which looks really promising, has been made &lt;a href="http://www.manning.com/sarin/"&gt;available via the Manning Early Access&lt;/a&gt; Program. As of today there are two chapters available and you can read the first one &amp;quot;&lt;a linkindex="38" href="http://www.manning.com/sarin/Sarin_MEAP_Ch1.pdf" target="_blank"&gt;Introducing Portals and Portlets&lt;/a&gt;&amp;quot; for free.&lt;/p&gt;&lt;p&gt;What I find to be the most attractive features of this book is that it concentrates on the &amp;quot;new&amp;quot; JSR 286 also known as Portlets 2.0 and goes beyond teaching portlets with its intorduction of Spring MVC and Ajax libraries suitable for portlets.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/_zlRl_l9sOY" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/holy/entry/preview_of_the_portlets_in</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/DhilshukReddy/entry/java_softwares_and_ides_and</guid>
    <title>Java Softwares and IDEs and Builders</title>
    <dc:creator>Dhilshuk Reddy Jeeru</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/bgWEC3qJatg/java_softwares_and_ides_and</link>
        <pubDate>Sat, 7 Nov 2009 02:46:19 -0500</pubDate>
    <category>Swing Softwares</category>
            <description>&lt;!--
To change this template, choose Tools | Templates
and open the template in the editor.
--&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;h1&gt; Java Softwares and IDEs and Builders:&lt;/h1&gt;
        &lt;ul type="circle"&gt;
            &lt;li&gt;
                &lt;h3&gt;Java SDK&lt;/h3&gt;
                &lt;h4&gt; &lt;font color="Blue"&gt;Install the Latest Release of the Java SE Platform&lt;/font&lt;/h4&gt;
                You can download the latest release of the JDK for free from
                &lt;a href="http://java.sun.com/javase/downloads/widget/jdk6.jsp."&gt;here&lt;/a&gt;
            &lt;/li&gt;


            &lt;li&gt;
                &lt;h3&gt;IDE's&lt;/h3&gt;
                &lt;ul type="circle"&gt;
                    &lt;li&gt;&lt;a href="http://www.netbeans.org/downloads/start.html?platform=windows&amp;lang=en&amp;option=javase&amp;version=6.7.1"&gt;NetBeans&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-java-galileo-SR1-win32.zip"&gt;Ecilpse&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;


            &lt;li&gt; &lt;h3&gt;GUI Builders&lt;/h3&gt;
                &lt;ul&gt;
                    &lt;li&gt;Open Source &amp; Free&lt;/li&gt;
                    &lt;ul&gt;
                        &lt;li&gt;&lt;a href="http://www.netbeans.org/downloads/start.html?platform=windows&amp;lang=en&amp;option=javase&amp;version=6.7.1"&gt;NetBeans&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://formlayoutmaker.sourceforge.net/"&gt;FormLayout Maker&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="https://abeille.dev.java.net/"&gt;Abielle Form Designer&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://www.eclipse.org/vep/"&gt;Eclipse Visual Editor&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;
                    &lt;li&gt;Commerical &lt;/li&gt;
                    &lt;ul&gt;
                        &lt;li&gt;&lt;a href="http://www.jformdesigner.com/"&gt;JForm Designer&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://www.jvider.com/"&gt;Jvider&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://cloudgarden.com/jigloo/"&gt;Jigloo&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://www.embarcadero.com/products/jbuilder"&gt;JBuilder&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="http://www.mars3000.com/"&gt;JFrame Builder&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;

    &lt;/body&gt;
&lt;/html&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/bgWEC3qJatg" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/DhilshukReddy/entry/java_softwares_and_ides_and</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/anylabs/entry/links_matter_for_seo</guid>
    <title>Links Matter For SEO </title>
    <dc:creator>evans</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/rjUz0wKSqOs/links_matter_for_seo</link>
        <pubDate>Sat, 7 Nov 2009 00:44:00 -0500</pubDate>
    <category>Java</category>
            <description>&lt;h1&gt;Links are a source of traffic.&lt;/h1&gt;

The more inbound links you have to your website, the higher the chance your potential customers could discover your products or services.
&lt;p /&gt;
Relevant inbound links improve your organic search engine rankings.
&lt;p /&gt;
Search engine robots crawl the web to analyze the vast amount of websites' contents and prioritize the relevancy of each website. Building relevant inbound links to your website with relevant anchor text is the most important thing you can do to improve your organic search engine ranking.
&lt;p /&gt;
Your Website's Content And Inbound Links
&lt;p /&gt;
Both content and inbound links are important for your website to rank high in search engine. Google controls 70% of search market and one of the most important factors in Google's search algorithm is inbound link popularity. The important factors when building inbound links are:
&lt;ul&gt;
    &lt;li&gt; The number of inbound links to your website&lt;/li&gt;
    &lt;li&gt; The quality of sites that link to your website&lt;/li&gt;
    &lt;li&gt; The relevancy of sites that link to your website&lt;/li&gt;
    &lt;li&gt; The anchor text (&lt;a href="http://amazon.com"&gt;Anchor Text&lt;/a&gt;) of links to your website&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;Ways To Get Inbound Links To Your Website&lt;/h4&gt;

There are multiple ways to get inbound links to your website depending on your budget. Many small webmasters or bloggers often do manual link exchanges with other relevant sites. This process takes a long time and efforts, and two-way links are not as favorable as one-way links.
&lt;p /&gt;
Larger companies often hire SEO professionals to do the arduous tasks of link building.
&lt;p /&gt;
An effective method to build inbound links is to buy text links ads on relevant websites.

Tips When Buying Links
&lt;ul&gt;
    &lt;li&gt; Buy links from relevant websites
      some companies have search functionality that allows you search for keywords that exist in the publishers' websites.&lt;/li&gt;
    &lt;li&gt; Use various anchor
      text that reflects your Top Keywords. e.g: "Bad Credit", "Credit Card Loans", "Buy Home Insurance"&lt;/li&gt;
    &lt;li&gt; Buy links that point to an important page in your website
      e.g: You may want to link directly to the category page of your e-commerce website. If you sell electronics, then you may want to link directly to LCD TVs category ( http://www.mystore.com/widescreen-television )&lt;/li&gt;
    &lt;li&gt; Keep your links for at least three months to see results&lt;/li&gt;
    &lt;li&gt; Search engines also classify websites based on their IP addresses. The more unique websites with different IP addresses linking to your website, the better.&lt;/li&gt;
    &lt;li&gt; Track your results by looking at your web analytics (Google Analytics, Omniture, etc). Look at "organic" traffic referral for Keywords. e.g: "Bad Credit", "Personal Loans", "Buy Home Insurance".&lt;/li&gt;
    &lt;li&gt; Use Yahoo's Site Explorer to track the number of inbound links to your site. You can do query such as: "link:http://www.yoursite.com"&lt;/li&gt;
&lt;/ul&gt;

To sum up, inbound links are important factor for you to increase your traffic from search engines. The right content optimization and link building campaign can help make your website appear at the top of search engine's results for your keywords, and thus bring more customers to your website.
&lt;p /&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/rjUz0wKSqOs" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/anylabs/entry/links_matter_for_seo</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/hakan/entry/jboss_best_practices_to_do</guid>
    <title>JBoss Best Practices &amp; To Do List Before Production</title>
    <dc:creator>Hakan ERDOGAN</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/JQYITryaFBI/jboss_best_practices_to_do</link>
        <pubDate>Fri, 6 Nov 2009 17:09:29 -0500</pubDate>
    <category>Java</category>
    <category>&amp;</category>
    <category>before</category>
    <category>best</category>
    <category>do</category>
    <category>jboss</category>
    <category>list</category>
    <category>practices</category>
    <category>production</category>
    <category>to</category>
            <description>&lt;ul&gt;
&lt;li&gt;
&lt;font color="red"&gt;&lt;b&gt;[Important]&lt;/b&gt;&lt;/font&gt; Do not use &lt;b&gt;all&lt;/b&gt;, &lt;b&gt;default&lt;/b&gt;, and &lt;b&gt;minimal&lt;/b&gt; nodes. Just copy whichever you need and rename it such as &lt;i&gt;myapp_node&lt;/i&gt;, configure it, and keep this node in a SCM tool such as SVN or CVS.&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="red"&gt;&lt;b&gt;[Important]&lt;/b&gt;&lt;/font&gt; Secure your JBoss consoles (&lt;i&gt;jmx-console, web-console, jbossws&lt;/i&gt;), root application and change the context path of the root application. Here is the guide:&lt;br/&gt; 
&lt;a href="http://www.jroller.com/hakan/entry/jboss_security"&gt;http://www.jroller.com/hakan/entry/jboss_security&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;&lt;font color="red"&gt;&lt;b&gt;[Important]&lt;/b&gt;&lt;/font&gt; Log4j Configuration. Use RollingFileAppender instead of DailyRollingFileAppender to prevent storage problem (use fixed size and number of log files).Here is the guide:&lt;br/&gt;
&lt;a href="http://www.jroller.com/hakan/entry/defining_a_rolling_file_appender"&gt;http://www.jroller.com/hakan/entry/defining_a_rolling_file_appender&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="red"&gt;&lt;b&gt;[Important]&lt;/b&gt;&lt;/font&gt; Start your JBoss with -c and -b parameters (-c config_name -b bind_ip). It supports multiple JBoss instances running on a same server.&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Secure your EJB's, Webservices, public access resources, etc.&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Hsqldb to Mysql migration (for JMS, EJB3 Timers, etc.)
Here is the guide:&lt;br/&gt;
&lt;a href="http://www.jroller.com/hakan/entry/jboss_hsqldb_to_mysql_migration"&gt;http://www.jroller.com/hakan/entry/jboss_hsqldb_to_mysql_migration&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Change WSDL's ip address with pool ip, if you have a load balancer or a domain name for your webservices.Here is the guide: &lt;br/&gt;
&lt;a href="http://www.jroller.com/hakan/entry/changing_wsdl_s_ip_address"&gt;http://www.jroller.com/hakan/entry/changing_wsdl_s_ip_address&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Enable Clustering and Session Replication (for Web App.)&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Set Login Modules Configuration &amp; Auth Policies (LDAP, DB, File, etc)&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font color="green"&gt;&lt;b&gt;[Optional]&lt;/b&gt;&lt;/font&gt; Set Transaction timeout, JVM Startup Arguments&lt;br/&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/JQYITryaFBI" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/hakan/entry/jboss_best_practices_to_do</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/javawug/entry/javawug_projam_1_jquantlib</guid>
    <title>JAVAWUG PROJAM #1 JQuantLib</title>
    <dc:creator>Peter Pilgrim</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/gHT4AM5E_1g/javawug_projam_1_jquantlib</link>
        <pubDate>Fri, 6 Nov 2009 10:28:15 -0500</pubDate>
    <category>Java</category>
    <category>first</category>
    <category>gomes</category>
    <category>jam</category>
    <category>javawug</category>
    <category>jquantlib</category>
    <category>night</category>
    <category>professional</category>
            <description>&lt;div&gt;&lt;br id="b5hq"&gt;
&lt;h1 id="b5hq0"&gt;
  JAVAWUG PROJAM 1 JQuantLib&lt;br id="zhsp"&gt;
&lt;/h1&gt;
&lt;table id="b5hq1" class="zeroBorder" align="right" border="0" cellpadding="3" cellspacing="0" hspace="25" vspace="25" width="275"&gt;
  
&lt;tbody id="b5hq2"&gt;
  
&lt;tr id="b5hq3"&gt;
    
&lt;td id="b5hq4" align="center" bgcolor="#f0f0ff"&gt;
      
&lt;div id="b5hq5" style="background: white none repeat scroll 0% 50%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;
        &lt;a href="http://www.javawug.com" id="b5hq6"&gt; &lt;img id="b5hq7" src="http://www.jroller.com/javawug/resource/JAVAWUG07-256w266h.png" border="0" height="256" hspace="10" vspace="10" width="266"&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  
&lt;tr id="b5hq8"&gt;
    
&lt;td id="b5hq9" align="center" bgcolor="#f0f0ff"&gt;
      &lt;font id="b5hq10" color="#000000" size="+1"&gt; &lt;b id="b5hq11"&gt;PRO JAM #1&lt;br id="b5hq12"&gt;
&lt;span id="x-jh" style="color: rgb(204, 0, 0);"&gt;
      Tuesday&lt;/span&gt;, &lt;span id="n3e-" style="color: rgb(204, 0, 0);"&gt;17&lt;/span&gt;&lt;sup style="color: rgb(204, 0, 0);" id="f8nb"&gt;th&lt;/sup&gt; &lt;br&gt;
November 2009&lt;br id="b5hq14"&gt;
      &lt;/b&gt; Skills Matter, London, UK&amp;nbsp;&lt;/font&gt;&lt;span id="b5hq15" style="color: rgb(255, 0, 0);"&gt;&lt;b id="b5hq16"&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p id="b5hq17"&gt;
  &lt;font id="qof5" size="5"&gt;&lt;span id="qof50" style="color: rgb(204, 0, 0);"&gt;STOP PRESS: SKILLS MATTER HAVE MOVED OFFICES!&lt;/span&gt;&lt;/font&gt;&lt;br id="ftfp"&gt;
&lt;/p&gt;
&lt;p id="qof51"&gt;&lt;br id="qof52"&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;p id="kdgk"&gt;&lt;br id="kdgk0"&gt;
&lt;/p&gt;
&lt;p id="kdgk1"&gt;&lt;/p&gt;
&lt;div id="ctzi" style="text-align: left;"&gt;&lt;img src="File?id=df5jk3g7_317fzhsp2hb_b" height="248" width="494"&gt;&lt;/div&gt;
&lt;br id="qof54"&gt;

&lt;p id="sno3"&gt;&lt;font size="1"&gt;This wonderful London night time was by the talented and versatile &lt;a title="imutto" href="http://www.flickr.com/photos/imuttoo/" id="t2e2"&gt;imutto&lt;/a&gt;, Creative Commons license on &lt;a title="Flickr" href="http://www.flickr.com/photos/imuttoo/1362995125/" id="k_ja"&gt;Flickr&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p id="h66f"&gt;&lt;br&gt;

  &lt;/p&gt;
&lt;p id="em_5"&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p id="k83h"&gt;Dear All
&lt;/p&gt;
&lt;br id="zhsp0"&gt;
&lt;div id="i6ht" style="text-align: left;"&gt;
  
&lt;/div&gt;
I would like to formally announce that the very first &lt;b id="b5hq27"&gt;JAVAWUG&lt;/b&gt;&lt;b&gt; PROFESSIONAL JAM&lt;/b&gt; (Java Web User Group) taking place at new location &lt;b id="b5hq28"&gt;Skills Matter&lt;/b&gt; on &lt;span id="tc:e" style="color: rgb(204, 0, 0);"&gt;Wednesday&lt;/span&gt;, &lt;span id="tc:e0" style="color: rgb(255, 0, 0);"&gt;17&lt;/span&gt;&lt;sup style="color: rgb(255, 0, 0);" id="b5hq29"&gt;th&lt;/sup&gt;
&lt;p id="b5hq26"&gt; November 2009 from 18:30 until 20:30.
&lt;/p&gt;
&lt;br id="qof56"&gt;
&lt;font id="qof57" size="5"&gt;&lt;span id="qof58" style="color: rgb(204, 0, 0);"&gt;&lt;br id="qof59"&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;h2 id="b5hq35"&gt;
  Talk
&lt;/h2&gt;
&lt;p id="a46r"&gt;&lt;b&gt;&lt;font size="3"&gt;Title: JQuantLib and Financial applications&lt;br&gt;
&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p id="gs.x"&gt;&lt;b&gt;&lt;font size="3"&gt;Your ProJam Organiser: Richard Gomes&lt;br&gt;
&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p id="jd64"&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div id="iwao" style="text-align: left;"&gt;
  &lt;img id="lo7n" src="File?id=dqs3mkm_0gx8dv6cg_b" style="width: 320px; height: 240px;"&gt;
&lt;/div&gt;
&lt;p id="q550"&gt;
  &lt;/p&gt;
&lt;p id="r_o."&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p id="ocg-"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/p&gt;
&lt;p id="jack"&gt;&lt;/p&gt;
&lt;p id="b_8f"&gt;&lt;/p&gt;
&lt;p style="color: rgb(255, 0, 0);" id="koq_"&gt;&lt;/p&gt;
This talk demonstrates how open source software can be employed to implement enterprise financial applications in pure Java. There will be a mix of business concepts and technical details being presented in order to converge to a working demo application which could be deployed typically in a computing grid.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Target audience&lt;br&gt;
&lt;/b&gt;This presentation is intended to experienced Java developers.&lt;br&gt;
Previous experience on Eclipse IDE and Maven2 are desirable but not required to take advantage of the presentation.&lt;br&gt;
Interest on financial applications in enterprise environments is desirable.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;What you will learn&lt;/b&gt;&lt;br&gt;
. Basic business knowledge about option price valuation;&lt;br&gt;
. Support classes needed to represent those business concepts involved;&lt;br&gt;
. Hello world: performing a simple option price valuation;&lt;br&gt;
. Going further: the architecture of our distributed demo application;&lt;br&gt;
. Implementing and executing a distributed application which valuates live market data.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;What you will be doing&lt;/b&gt;&lt;br&gt;
You can opt for bringing a laptop to this presentation, download the demo application and try it out yourself.&lt;br&gt;
The location for download will be announced in the beginning of the presentation.&lt;br&gt;
In theory, all you need installed in your PC, Mac or Linux laptop is:&lt;br&gt;
&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;. JDK6&lt;br&gt;
. Ant 1.7.1 or more recent&lt;br&gt;
. Maven 2.2.1or more recent&lt;br&gt;
. Eclipse 3.5&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;b&gt;More information&lt;/b&gt;&lt;br&gt;
JQuantLib
is a free, open-source, comprehensive framework for quantitative
finance, written in pure Java.&lt;br&gt;
It offers several mathematical and
statistical tools needed for valuation of financial instruments like
options, bonds, swaps, commodities and alike.&lt;br&gt;
See also: &lt;a title="http://www.jquantlib.org/" href="http://www.jquantlib.org/" id="un2j"&gt;http://www.jquantlib.org/&lt;/a&gt;&lt;br&gt;

&lt;table class="zeroBorder"width="220" align="right" border="0" cellspacing="4" hspace="2r" vspace="25"   &gt;
&lt;tbody&gt;
&lt;tr&gt; 
&lt;td bgcolor="#e0e0ff"&gt;
&lt;a href="http://devpoxx.com"&gt;&lt;img src="http://www.devoxx.com/download/attachments/1706305/Devoxx09-125x125.gif" align="left" border="0"&gt;&lt;/a&gt;
&lt;h3&gt;Devoxx Linked-Up&lt;/h3&gt;

Peter Pilgrim is sadly at Devoxx 2009 when the projam takes place. It might be possible to arrange live link-up of 20 to 30 minutes between Antwerp and London. Although technical difficult to know before the  head-scape in order to achieve this fantastic                                                                                                         goal.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
                                                                                    &lt;br&gt;
These are some introductory information related to Quantitative Finance:&lt;br id="ezpi"&gt;
&lt;a href="http://en.wikipedia.org/wiki/Financial_markets" id="qyxk" title="http://en.wikipedia.org/wiki/Financial_markets"&gt;http://en.wikipedia.org/wiki/Financial_markets&lt;/a&gt;&lt;br id="bz:v0"&gt;
&lt;a href="http://en.wikipedia.org/wiki/Derivative_%28finance%29" id="hgvb" title="http://en.wikipedia.org/wiki/Derivative_(finance)"&gt;http://en.wikipedia.org/wiki/Derivative_(finance)&lt;/a&gt;&lt;br id="p.o4"&gt;
&lt;a href="http://en.wikipedia.org/wiki/Quantitative_analyst" id="o.lp" title="http://en.wikipedia.org/wiki/Quantitative_analyst"&gt;http://en.wikipedia.org/wiki/Quantitative_analyst&lt;/a&gt;&lt;br id="st980"&gt;
&lt;br id="b5hq38"&gt;
&lt;h2 id="b5hq39"&gt;
  Biography&lt;br id="b5hq40"&gt;
&lt;/h2&gt;
Richard Gomes is Brazilian and graduated at &lt;a href="http://www.unicamp.br/unicamp/en" id="pl7h" title="Unicamp"&gt;Unicamp&lt;/a&gt;, Brazil.&lt;br id="dluf"&gt;
&lt;br id="tzr1"&gt;
In the beginning of his career he developed numeric libraries in assembly language and a symbolic debugger whilst working for &lt;a href="http://www.cpqdusa.com/about/index.html" id="hxfx" title="CPqD/Telebras R&amp;amp;D Center"&gt;CPqD/Telebras R&amp;amp;D Center&lt;/a&gt;, which was a key player in the emerging Brazilian telecommunications scenario at that time.&lt;br id="t20-"&gt;
&lt;br id="g_5m"&gt;
He has several years of experience in IT and experience with full software life-cycle, working as developer, architect, production support analyst and configuration manager in complex projects with multiple development branches. He has experience with high volume, low latency, critical systems specially in banking and telecommunication sectors. He worked for companies such as: Groupe Bull, IBM, EDS and Unibanco.&lt;br&gt;
His contact information and curriculum vitae can be obtained from &lt;a title="http://tinyurl.com/frgomes" href="http://tinyurl.com/frgomes" id="ekuh"&gt;http://tinyurl.com/frgomes&lt;/a&gt;&lt;br id="dluf0"&gt;
&lt;br id="e5kc"&gt;
Richard is settled in London since September/2006.&lt;br id="ya5m"&gt;
&lt;br id="b5hq41"&gt;
&lt;h2 id="b5hq42"&gt;
  Registration
&lt;/h2&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p id="b5hq43"&gt;
  Afterwards members can retire to the nearby pub/restaurant for more in depth discussion dinner, food and drink ...
&lt;/p&gt;
&lt;p id="b5hq46"&gt;
  &lt;br id="b5hq47"&gt;
&lt;/p&gt;
&lt;p id="b5hq48"&gt;
  The address is:
&lt;/p&gt;
&lt;p id="xpn." style="background-color: rgb(255, 102, 0); color: rgb(255, 255, 255);"&gt;&lt;b&gt;The Skills Matter eXchange&lt;/b&gt;&lt;br&gt;
116-120 Goswell Road&lt;br&gt;
London, EC1V 7DP&lt;br&gt;
United 
Kingdom&lt;br&gt;
&lt;/p&gt;
&lt;p id="xty8" style="background-color: rgb(255, 102, 0); color: rgb(255, 255, 255);"&gt;Phone: 020 7107 2620&lt;br id="b5hq53"&gt;
  Fax: 020 7107 2621&lt;br id="b5hq54"&gt;
&lt;/p&gt;
&lt;p id="b5hq55"&gt;
  &lt;br id="i70t"&gt;
&lt;/p&gt;
&lt;p id="rixb58"&gt;
  If you would like to attend: &lt;span style="color: rgb(255, 0, 0);"&gt;NEED TO UPDATE THE REGISTRATION&lt;/span&gt;&lt;br&gt;
&lt;/p&gt;
&lt;ol id="rixb59"&gt;
  
&lt;li id="rixb60"&gt;
    &lt;b id="rixb61"&gt;Please REGISTER&lt;/b&gt; so that you can be added to the &lt;a href="http://skillsmatter.com/event/java-jee/jquantlib" id="rixb62" title="SECURITY DETAIL with     Skills Matter Limited"&gt;&lt;b id="rixb63"&gt;SECURITY DETAIL with Skills Matter Limited&lt;/b&gt;&lt;/a&gt;.
  &lt;/li&gt;
  
&lt;li id="rixb64"&gt;
    If you aren't a &lt;b id="pxk4"&gt;JAVAWUG member&lt;/b&gt; why not join the &lt;a href="http://groups.google.com/group/javawug" id="rixb65"&gt;&lt;b id="rixb66"&gt;JAVAWUG at Google Groups&lt;/b&gt;&lt;/a&gt;?&lt;br id="meba"&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;br id="pxk40"&gt;
For problems, send an email to &lt;b id="rixb67"&gt;peter (dot) pilgrim (at) gmail (dot) com&lt;/b&gt; and &lt;b id="v9ur"&gt;emin (dot) tatosian (at) gmail (dot) com&lt;/b&gt;.
&lt;p id="ynfs"&gt;
&lt;/p&gt;
&lt;br id="i70t0"&gt;
&lt;p id="b5hq69"&gt;
  Here is some relevant travel information:
&lt;/p&gt;
&lt;ul id="b5hq70"&gt;
  
&lt;li id="b5hq71"&gt;
    By Underground: -&lt;br id="b5hq72"&gt;
    &lt;a title="Barbican" href="http://www.tfl.gov.uk/" id="b5hq73"&gt;&lt;b id="b5hq74"&gt;Barbican&lt;/b&gt;&lt;/a&gt;: Come out the station turn left to facing the o&lt;br&gt;
&lt;/li&gt;
  
&lt;li id="b5hq75"&gt;
    Map: &lt;a title="Google Maps Link to 116 Goswell Street" href="http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=116-120+Goswell+Rd,+London+EC1V,+UK&amp;amp;sll=51.362751,-0.07163&amp;amp;sspn=0.109327,0.21801&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=116-120+Goswell+Rd,+London+EC1V+7DP,+United+Kingdom&amp;amp;z=16" id="b5hq76"&gt;&lt;b id="b5hq77"&gt;Google Maps Link to 116 Goswell Street&lt;/b&gt;&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p id="b5hq78"&gt;
  &lt;br id="b5hq79"&gt;
&lt;/p&gt;
&lt;p id="b5hq80"&gt;
  The venue has graciously been organised by &lt;b id="b5hq81"&gt;Skills Matter&lt;/b&gt; team. We all appreciate this generous gift.
&lt;/p&gt;
&lt;p id="b5hq82"&gt;
  &lt;a href="http://www.javawug.com/" id="b5hq83"&gt;JAVAWUG.com&lt;/a&gt;
&lt;/p&gt;
&lt;p id="b5hq84"&gt;
  &lt;br id="zeq."&gt;
&lt;/p&gt;
&lt;h2 id="ynfs0"&gt;
  Media Copyright Notice&lt;br id="zeq.0"&gt;
&lt;/h2&gt;
&lt;i id="itqp"&gt;JAVAWUG BOF Events&lt;/i&gt; are video recorded, edited and published freely. We normally recorded the speaker and administrators. You can find examples on &lt;a href="http://www.vimeo.com/videos/search:JAVAWUG" id="ack4" title="JAVAWUG BOF Videos on Vimeo.com"&gt;Vimeo&lt;/a&gt; and &lt;a href="http://video.google.com/videosearch?q=javawug&amp;amp;sitesearch=#" id="u:fs" title="JAVAWUG Videos on Google Video"&gt;Google Video&lt;/a&gt;. On the rare occasion we record some audience members. Please let us know if you &lt;i id="qw4j"&gt;personally &lt;/i&gt;would rather not been filmed. We reserved the Copyright 2008 © JAVAWUG Video Productions, Creative Commons (Attributions: &lt;b id="h_-_"&gt;Attribution&lt;/b&gt; (by): Licensees may copy, distribute, display and perform the work and make derivative works based on it only if they give the author or licensor the credits in the manner specified by these.).&lt;br id="zeq.1"&gt;
&lt;br id="zeq.2"&gt;
&lt;p id="ynfs1"&gt;
&lt;/p&gt;
&lt;p id="b5hq86"&gt;
  This is &lt;a href="http://jroller.com/page/peter_pilgrim" id="b5hq87"&gt;Peter Pilgrim&lt;/a&gt;, Out.
&lt;/p&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/gHT4AM5E_1g" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/javawug/entry/javawug_projam_1_jquantlib</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/desmax/entry/roma_springframework_meeting_slides</guid>
    <title>Roma SpringFramework Meeting Slides</title>
    <dc:creator>Massimiliano Dessì</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/iU4nWBuRKSY/roma_springframework_meeting_slides</link>
        <pubDate>Fri, 6 Nov 2009 09:26:03 -0500</pubDate>
    <category>Java</category>
    <category>android</category>
    <category>database</category>
    <category>jcr</category>
    <category>lambdaj</category>
    <category>ldap</category>
    <category>mongodb</category>
    <category>scala</category>
    <category>spring</category>
            <description>&lt;p&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://www.slideshare.net/desmax74/mongodb-scala-roma-springframework-meeting2009"&gt;MongoDB and Scala&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://www.slideshare.net/sbtourist/scale-your-database-and-be-happy"&gt;Scale your database and be happy&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://www.slideshare.net/salvatore.incandela/spring-jcr-extension-2401185"&gt;Spring JCR Extension&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://www.slideshare.net/PiergiorgioLucidi/spring-ldap"&gt;Spring Ldap&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://lambdaj.googlecode.com/files/lambdaj-2.0-presentation.pdf"&gt;LambdaJ&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href="http://www.slideshare.net/jesty/non-conventional-android-programming"&gt;Non conventional Android programming&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/iU4nWBuRKSY" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/desmax/entry/roma_springframework_meeting_slides</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/dmdevito/entry/the_term_portal_is_at</guid>
    <title>The term "portal" is, at least, rather confusing!</title>
    <dc:creator>Dominique De Vito</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/uGZWzzohrko/the_term_portal_is_at</link>
        <pubDate>Fri, 6 Nov 2009 05:12:43 -0500</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;
The Gartner's research note
&lt;a href="http://www.gartner.com/technology/media-products/reprints/oracle/article95/article95.html"&gt;Magic Quadrant for Horizontal Portals&lt;/a&gt; 
(september 2009)
gives the following market vision:
"&lt;i&gt;By 2011, Gartner expects at least 15% of new enterprise portal projects in Global 2000 firms 
to use open-source horizontal portal frameworks&lt;/i&gt;"
and
"&lt;i&gt;By 2014, horizontal portal products based on portal containers will be used for no more 
than 60% of new enterprise portal projects.&lt;/i&gt;"
I have found this note into 
the French blog 
&lt;a href="http://www.touilleur-express.fr/2009/11/03/gatein-liferay-portail/#comments"&gt;Le Touilleur Express&lt;/a&gt;.
&lt;/p&gt;


&lt;p&gt;
&lt;u&gt;Well, the term "portal" is, at least, rather confusing!&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
There is 
often 
confusion 
between
integrated access
(it's about interface)
and collaborative suite
(it's all about implementation(s)).
And these categories could 
be
even
refined into portlet-based solutions or other solutions.
&lt;/p&gt;


&lt;p&gt;
&lt;u&gt;So, what about the future ?&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
I could imagine 
that most firms will be using, by 201X, 
a collaborative suite
or parts of it.
From that point of view, I could agree with Gartner.
But I have hard time to believe 
that 
most firms 
will be using massively 
portlet containers (see 
&lt;a href="http://www.jcp.org/en/jsr/summary?id=168"&gt;JSR-168&lt;/a&gt;
and
&lt;a href="http://www.jcp.org/en/jsr/summary?id=286"&gt;JSR-286&lt;/a&gt;
for example)
as chosen portals.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Portals sound like communism: the idea is good, but the problem is on the implementation side&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
Well, this communist metaphor is 
a bit harsh
for portals, because it could be applied
to 
many
other software solutions;
but portals deserve that metaphor, may be more than 
some other solutions,
because
the term "portal" 
is related to various realities,
particularly because
the
portal business 
is still evolving.
&lt;/p&gt;
&lt;p&gt;
Some could say
the confusion about portals
is natural, but it's 
still quite irritating
because
this confusion is related to
basic
&lt;a href="http://en.wikipedia.org/wiki/Separation_of_concerns"&gt;separation 
of concerns&lt;/a&gt;, that is, interace versus implementation!
I suspect
some
vendors, or 
consulting firms, 
may even take benefit from that confusion
and perspectives it draws.
&lt;/p&gt;

&lt;p&gt;
So, the sentence
"&lt;i&gt;By 2014, horizontal portal products based on portal containers will be used for no more 
than 60% of new enterprise portal projects&lt;/i&gt;"
says... little!
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/uGZWzzohrko" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/dmdevito/entry/the_term_portal_is_at</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/sebastianKuebeck/entry/when_it_s_ok_not</guid>
    <title>When It's OK Not to Write Unit Tests</title>
    <dc:creator>Sebastian Kübeck</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/-DZMFa1QhuA/when_it_s_ok_not</link>
        <pubDate>Fri, 6 Nov 2009 05:03:25 -0500</pubDate>
    <category>Developer</category>
    <category>tdd</category>
    <category>testing</category>
            <description>&lt;p&gt;In a recent &lt;a href="http://blog.objectmentor.com/articles/2009/11/05/its-ok-not-to-write-unit-tests-not"&gt;post&lt;/a&gt;, Uncle Bob is once again furiously defending Unit Testing against Cashto's post &lt;a href="http://blog.objectmentor.com/articles/2009/11/05/its-ok-not-to-write-unit-tests-not"&gt;It's OK Not to Write Unit Tests&lt;/a&gt;.
I personally don't thing there is anything to get outraged about Cashto's post. Cashto's claims are so superficial and weak that the whole post was probably just written to attract attention and it is likely that we see more such posts as long as Uncle Bob reacts this way. 
&lt;/p&gt;
&lt;p&gt;
However, there &lt;i&gt;are&lt;/i&gt; cases where you don't need to write Unit Tests.
&lt;/p&gt;
&lt;h3&gt;It's OK Not to Write Unit Tests if You Write Code That Doesn't Have to Work&lt;/h3&gt;
&lt;p&gt;
Not every code needs to work (see &lt;a href="http://www.jroller.com/sebastianKuebeck/entry/if_it_doesn_t_have"&gt;If it doesn’t have to work, I can get it done a lot faster!&lt;/a&gt;). Let's assume you write a prototype or do some experimenting with technology.
There's really no need to write Unit Tests for that. You might also sketch some initial drafts when you don't yet know how to implement functionality as I have illustrated in &lt;a href="http://www.jroller.com/sebastianKuebeck/entry/the_creative_programmer"&gt;When Quality Really Does Not Matter&lt;/a&gt;. 
&lt;/p&gt;
&lt;h3&gt;It's OK Not to Write Unit Tests for Functionality that is Tied To Infrastructure&lt;/h3&gt;
&lt;p&gt;
With infrastructure I mean databases, UI libraries etc. that don't provide a level of abstraction that lets you add &lt;i&gt;non fragile tests&lt;/i&gt; (see &lt;a href="http://www.jroller.com/sebastianKuebeck/entry/pricilpes_of_good_tests"&gt;Properties of Good Tests&lt;/a&gt;). In this case it's probaly better to write integration tests first. Then, you extract as much &lt;i&gt;idempotent&lt;/i&gt; (see &lt;a href="http://www.jroller.com/sebastianKuebeck/entry/limitations_of_automated_testing"&gt;Limitations of Automated Testing&lt;/a&gt;) functionality as possible into components that can be easily Unit Tested.
&lt;/p&gt;
&lt;h3&gt;It's OK Not to Write Unit Tests if The States They Should Cover Are Already Covered by a Different Verification Mechanism&lt;/h3&gt;
&lt;p&gt;
Let's say you are using &lt;a href="http://en.wikipedia.org/wiki/Design_by_contract"&gt;Design By Contract&lt;/a&gt; in addition to BDD as Greg Young explains in his talk &lt;a href="http://www.infoq.com/presentations/TDD-in-a-DbC-World-Greg-Young"&gt;TDD in a DbC World&lt;/a&gt;. In this case, you can limit your test writing efforts to what is necessary to drive your behaviour definition. The rest of the verification is covered by the contracts and verified by the theorem prover and/or a model checker.
&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;
Unit Testing isn't a religion. It's just a helpful method to improve the software development process in adding automated verification of functionality. For all folks that think like Cashto: I highly recommend that you start learning the craft instead of missing a chance to improve your programming skills. There are plenty of good books and training courses around. And believe me: it isn't rocket science. Most of the things you are doing in your current work are much more difficult than writing good Unit Tests!
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/-DZMFa1QhuA" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/sebastianKuebeck/entry/when_it_s_ok_not</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/rolsen/entry/patent_it</guid>
    <title>Patent It</title>
    <dc:creator>Russ Olsen</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/c4NnOJQYk1Q/patent_it</link>
        <pubDate>Thu, 5 Nov 2009 21:26:26 -0500</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;Here&amp;#8216;s another article I wrote for Art/Geek that I thought would be interesting here.&lt;/p&gt;

	&lt;p&gt;You can listen to the podcast over at &lt;a href="http://www.artslashgeek.com"&gt;www.artslashgeek.com&lt;/a&gt;&lt;/p&gt;

	&lt;p&gt;&lt;hr/&gt;&lt;/p&gt;

	&lt;p&gt;Techies and artists seem to have so little in common. We manipulate electrons and bits with manic precision. We dream of being the soul of a new machine. Their souls machine new dreams. We write code.They write koan. But when it comes right down to it, we are all in the business of creating ideas, concepts, schemes, designs. We do have some things in common though: Both artists and techies want to get our due for our work, if not in money than in credit.&lt;/p&gt;

	&lt;p&gt;The law provides for three ways to make sure that you get the benefit of your ideas, your work and your brand. In fact, if you live in the U.S., some of that protection is built right into the most basic law of the land, the Constitution. Article I, section 8 says that Congress has the power&amp;#8230;&lt;/p&gt;

	&lt;p&gt;&lt;blockquote&gt;&lt;br /&gt;
...To promote the progress of science and useful arts, by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries.&lt;br /&gt;
&lt;/blockquote&gt;&lt;/p&gt;

	&lt;p&gt;Lawyers generally interpret this to mean that Congress has two separate powers, one to grant patents  and a second, different power to grant copyrights. A patent is the right of an inventor to prevent others from using his or her invention. A patent is a kind of a bargain: The inventor gets the exclusive right to profit from their invention for a limited term (20 years in the U.S). In return, society as a whole gets the invention when the patent runs out. The idea behind patents is that it will be better for inventors to get a patent than to try and keep their invention secret.&lt;/p&gt;

	&lt;p&gt;Getting a patent is not easy, nor should it be since a patent is a very broad monopoly. If you hold a patent on some invention, I can&amp;#8216;t use that invention without your permission, even if I thought of it independently. In order to get a patent, you need to come up with some invention that is really novel, novel in the sense that no one has thought of it before. Recently there has been a lot of criticism of the U.S. patent system for granting patents on fairly obvious &amp;#8216;inventions&amp;#8216;. One of my particular favorites is U.S. patent 6,004,596 which provides a exclusive monopoly to the inventors of:&lt;/p&gt;

	&lt;p&gt;&lt;blockquote&gt;&lt;br /&gt;
A sealed crustless sandwich for providing a convenient sandwich without an outer crust which can be stored for long periods of time without a central filling from leaking outwardly. The sandwich includes a lower bread portion, an upper bread portion, an upper filling and a lower filling &amp;#8230;&lt;br /&gt;
&lt;/blockquote&gt;&lt;/p&gt;

	&lt;p&gt;Good thing this patent wasn&amp;#8216;t around when my mother used to stamp out sealed peanut butter and jelly sandwiches by making the regular kind and then using a coffee mug as a sort of cookie cutter.&lt;/p&gt;

	&lt;p&gt;In contrast to a patent, a copyright is easy to get. In fact it is automatic. Simply by typing these words as I am right now, I am magically creating a copyrighted work. Copyright protects the authors of any original work, be it prose, poetry, music, art and even computer programs. Copyright means that the author has exclusive ownership over the work for some period of time. For new works copyrighted in the United States (this article for example) the copyright lasts the whole life of the author, plus 70 years. Although copyrights are easy to get, they are a much weaker protection than a patent. A patent means that you more or less own the invention, the idea. A copyright means that you own your expression of the idea. Thus, while I own this article and could sue you if you turned the first few paragraphs into the lyrics of a Country and Western song, I would be helpless if you simply went out and wrote your own Country and Western song about patents and trademarks.&lt;/p&gt;

	&lt;p&gt;Although copyrights are automatic, you can register your copyright. Registration is mostly a processes of sending a copy or two of your work to the copyright office and paying a small fee. Even though you automatically own the copyright on whatever you create, registration strengthens your hand if you do need to sue over that Country and Western song.&lt;/p&gt;

	&lt;p&gt;Finally, there are trademarks. A trademark is a name or a symbol that you use to identify your business or product. The idea of a trademark is that you should be able to stake out some kind of symbol or name or catch phrase that uniquely identifies your product or business. Like copyrights, trademarks are pretty easy to get. In the U.S., you can register your trademark with the government in pretty much the same way that you register a copyright and for pretty much the same reasons: If someone violates your trademark, you are going to have an easier time in court if you took the trouble to register it first. Interestingly, different companies can use the same trademark, as long as they are in very different businesses. Sometimes this leads to interesting collisions, as when a small computer company founded in the 1970s took the same name, Apple, as an existing music publisher. After all, what could personal computers have to do with music? The rest is, as they say, legal train wreck history.&lt;/p&gt;

	&lt;p&gt;You can find all sort of further information at the web site of the &lt;a href="http://www.uspto.gov/"&gt;patent and trademark office&lt;/a&gt; and also the &lt;a href="http://www.copyright.gov/"&gt;copyright office&lt;/a&gt;.&lt;/p&gt;

	&lt;p&gt;Russ&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/c4NnOJQYk1Q" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/rolsen/entry/patent_it</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/greeneyed/entry/twittering_theserverside_java_symposium</guid>
    <title>"Twittering" TheServerSide Java Symposium</title>
    <dc:creator>Daniel Lopez</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/Ub5tsY6TZpU/twittering_theserverside_java_symposium</link>
        <pubDate>Thu, 5 Nov 2009 15:49:10 -0500</pubDate>
    <category>Java Tools</category>
    <category>java</category>
    <category>symposium</category>
    <category>theserverside</category>
    <category>twitter</category>
            <description>&lt;p&gt;I've had a couple of days to let things get back to normal after coming back from Prague, so I thought it was time to put write down about the overall experience of being at the &lt;a href="http://javasymposium.techtarget.com/?Offer=JSEnljavnet105"&gt;TSSJS Europe 2009&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Overall, I think it was a great experience, as I met people I already knew, made some new friends, listened to interesting topics and visited, even if for a short while, a nice city like Prague. Compared to past experiences like JavaOne and the then-called JavaPolis (now Devoxx) conferences, the TSSJS was smaller in scale, but that also meant it was less crowded and you got to more easily come across the same people during the conference, so getting to know them was easier.&lt;/p&gt;

&lt;p&gt;The first thing I felt was that the organization was very well done, as, for example, I received an email before going to the conference with straight to the point information about what I could expect from the conference. I was also able to browse quite complete summaries of the talks that were going to be presented, so I could decide if I was interested or not in the talk, and not feeling like you are being "cheated" to go to a session by a catchy titles and 2 sentences as it sometimes happens. The slides were also available before hand, but not many were up before the event, so that was a good point that didn't work 100%.&lt;/p&gt;

&lt;p&gt;The Clarion hotel is nice and as Geertjan Wielenga pointed out in &lt;a href="http://java.dzone.com/serverside-java-symposium-prague-2009"&gt;his report&lt;/a&gt;, the first thing to notice was that there were power cords almost everywhere in the rooms, so I was able to hook up my laptop and twitter about the sessions without worrying about the batteries running dry.&lt;/p&gt;

&lt;p&gt;That was my first time twitting ever, so I was not sure what people was expecting or what they wanted, but I hope it helped people get an idea of what was going on in the conference. Twitter failed during the last part of one session, Rapid Application Development with Apache Wicket - Andrew Lombardi,  and I could not get in again in time for the next one, Open Source Debugging Tools: The Top 10 App Boot Camp - Matthew McCullough, so that's one drawback of using "instant" report tools: if they fail, when they come back again you are already reporting something else so there's no time to go back and report what you missed except in a broad sense.&lt;/p&gt;

&lt;p&gt;Some people also wondered about the lack of personal opinions on the feed, but I felt it was not "fair" for the audience and the presenter to introduce my own subjective thoughts about it. One the things you notice when you go to conferences and actually listen is that everybody has its own background and what might sound familiar and obvious to you, might be new and eye-opening to other people, and vice versus, so I'd rather let everyone for their own opinion.&lt;/p&gt;
&lt;p&gt;Another interesting side effect of reporting through twitter is that you can see there are sessions that do not "translate" well to twitter language. Catchy phrases, short ideas in a structured order are easier to put into sentences of 140 words, whereas complex ideas with abstract elements that need a deep background explanation before getting to the point are difficult to put into such a concise way. That does not mean the session is not good, but it just makes it more difficult to broadcast it in short pieces of text and feels like watching a movie by just reading the subtitles.&lt;/p&gt;

&lt;p&gt;In any case, I hope it helped those that were not able to make it but remember that, as Geertjan also pointed out, half of what you get from a conference is networking with people, and that cannot be twittered, so if you were unable to make it due to being in the "wrong" J/K side of the Atlantic ocean, you have another chance in the upcoming &lt;a href="http://javasymposium.techtarget.com/?Offer=JSEnljavnet105"&gt;TheServerSide Java Symposium to be held in Las Vegas in March 2010&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A final word on the conference itself: The idea of labeling lunch tables with topics so people with similar interests can get together and talk while having lunch is nice, but the truth is that there was no room for everybody in some tables, there was not much time for lunch &amp; talk and it took quite a while for the last people to get their food... so everybody was busy enough finding a seat and then having lunch to worry much about the topic of the table or talk about it. I think the idea is interesting but it should be separated from the lunch time.&lt;/p&gt;

&lt;p&gt;Disclaimer: I attended the conference with a press pass offered by the organization so we could report on the conference; if someone thinks that this circumstance had any effect on what I wrote about the conference, then they probably don't know me well enough ;), but I felt it was fair for the readers to know.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/Ub5tsY6TZpU" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/greeneyed/entry/twittering_theserverside_java_symposium</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/tedgoddard/entry/learning_icefaces_through_icefusion</guid>
    <title>Learning ICEfaces through ICEfusion</title>
    <dc:creator>Ted Goddard</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/MDMrlCz5p78/learning_icefaces_through_icefusion</link>
        <pubDate>Thu, 5 Nov 2009 12:17:19 -0500</pubDate>
    <category>Java</category>
    <category>ajax</category>
    <category>ajaxpush</category>
    <category>icefaces</category>
    <category>icefusion</category>
    <category>java</category>
    <category>javaserverfaces</category>
    <category>jsf</category>
            <description>&lt;br&gt;
&lt;p&gt;&lt;a href="http://blog.rainer.eschen.name/icefaces/"&gt;Rainer Eschen's&lt;/a&gt; book &lt;a href="http://www.packtpub.com/icefaces-1-8-next-generation-enterprise-web-development"&gt;ICEfaces 1.8: Next Generation Enterprise Web Development&lt;/a&gt; is now available in print.  The book is as much about ICEfusion, a set of model classes and Facelet components built on ICEfaces,  as it is about ICEfaces itself.  Developing a framework that embodies the lessons of a book can be a very effective (and testable) way to communicate.  Many thanks to Rainer for this great contribution to the &lt;a href="http://www.icefaces.org"&gt;ICEfaces community&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;You may also want to check out Rainer's &lt;a href="http://blog.rainer.eschen.name/2009/11/06/the-icelocator-for-important-icefaces-information-goes-online/"&gt;ICEfaces Mind Map&lt;/a&gt;.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/MDMrlCz5p78" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/tedgoddard/entry/learning_icefaces_through_icefusion</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/DhavalDalal/entry/visualize_metrics_with_panopticode</guid>
    <title>Visualize metrics with Panopticode</title>
    <dc:creator>Dhaval Dalal</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/d4iZvntML28/visualize_metrics_with_panopticode</link>
        <pubDate>Thu, 5 Nov 2009 11:03:55 -0500</pubDate>
    <category>Java</category>
    <category>metrics</category>
    <category>panopticode</category>
            <description>I can't stop appreciating Neal Ford's book &lt;a href="http://productiveprogrammer.com/wiki/index.php/Main_Page"&gt;The Productive Programmer&lt;/a&gt;, full of good tips, one of which is "Generate Metrics with Panopticode".  I finished integrating Panopticode (&lt;a href="http://www.panopticode.org"&gt;http://www.panopticode.org&lt;/a&gt;) on my current Java Project to visualize metrics.   Panopticode uses Tree Maps to display the code complexity and coverage.  On my earlier projects, I have used several tools, and all generated different types of metrics, which I would have to then collate and make sense out of it, especially to strategize and prioritize parts of code that need Refactoring.  
&lt;p&gt;
With Panopticode, my collation and analysis task simply vanishes, instead now I can look at the Interactive Tree Map and the parts in RED refer to highly complex method.  Click on the RED square and all the metrics, CC, NCSS etc... for a method appear on the side.   Here is the Code Complexity Tree Map of my project.
&lt;/p&gt;
&lt;img src="http://www.jroller.com/DhavalDalal/resource/project.jpg" width="350" height="200"/&gt;
&lt;br /&gt;
&lt;p&gt;
Panopticode makes this novel use of Tree Maps for metrics visualization.  To know more about Tree Maps, read &lt;a href="http://www.cs.umd.edu/hcil/treemap-history/index.shtml"&gt; this article&lt;/a&gt; by Ben Shneiderman.  I also am not going to go into the details of how Panopticode works, but talking about it in a nutshell,  it basically uses other tools like Checkstyle, JDepend, JavaNCSS, Cobertura/Emma, Simian etc... and aggregates data from these tools.  The aggregated data is then rendered as Tree Maps.  It produces two Tree Maps, one for Code Complexity and another for Code Coverage.  
&lt;/p&gt;
&lt;p&gt;
I have found another interesting use of Tree Map from my colleague and friend Anurag and they basically use the Tree Maps to radiate the current state of architecture of various components across the entire project.  I don't know how they obtain the metrics, but the use of Tree Maps is noteworthy.
&lt;div style="width:95%;  overflow:auto;"&gt;
&lt;table border="0" cellspacing="1" cellpadding="1"&gt;
&lt;tr&gt;
     &lt;th&gt;
      Component
     &lt;/th&gt;
     &lt;th&gt;
      Scalability
     &lt;/th&gt;
     &lt;th&gt;
      Maintainability
     &lt;/th&gt;
     &lt;th&gt;
      Security
     &lt;/th&gt;
     &lt;th&gt;
      Availability
     &lt;/th&gt;
     &lt;th&gt;
      Performance
     &lt;/th&gt;
     &lt;th&gt;
      Extensibility
     &lt;/th&gt;
     &lt;th&gt;
      Reliability
     &lt;/th&gt;
     &lt;th&gt;
     Manageability
     &lt;/th&gt;
    &lt;th&gt;
     Usability
    &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
     &lt;td&gt;
      Component 1
     &lt;/td &gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;/td &gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
     &lt;td&gt;
      Component 2
     &lt;/td &gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
     &lt;td&gt;
      Component 3
     &lt;/td &gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
     &lt;td&gt;
      Component 4
     &lt;/td &gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="yellow"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="red"&gt;
     &lt;/td&gt;
     &lt;td bgcolor="green"&gt;
     &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
If you are a products company, you can extend this to your product suites as well...
&lt;p&gt;
If you have made use of Tree Maps on your project and would like to share, please use the comments below....or send to me the link and i'll embed it in this blog post.  Also, I don't know whether such a tool exists for the .NET world.  If you happen to know, drop in a line ;-)
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/d4iZvntML28" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/DhavalDalal/entry/visualize_metrics_with_panopticode</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/eyallupu/entry/spring_3_0_slides_from</guid>
    <title>Spring 3.0 - Slides from a Seminar I Presented</title>
    <dc:creator>Eyal Lupu</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/AJ9GDKXG98g/spring_3_0_slides_from</link>
        <pubDate>Thu, 5 Nov 2009 07:51:15 -0500</pubDate>
    <category>Spring Framework</category>
    <category>java</category>
    <category>spring</category>
    <atom:summary type="html">Hi all,&lt;br/&gt;
About two weeks ago I gave a 3 hours overview seminar about Spring 3.0 new features. For those of you who are interested you can find the slides &lt;a href="http://www.interbit.co.il/TechBreak/Spring%203.0%20TechBreak%20-%20slides.pdf"&gt;here&lt;/a&gt;.</atom:summary>        <description>Hi all,&lt;br/&gt;
About two weeks ago I gave a 3 hours overview lecture on Spring 3.0 new features in a seminar organized by &lt;a href="http://www.interbit.co.il"&gt;Interbit&lt;/a&gt;. For those of you who are interested you can find the slides &lt;a href="http://www.interbit.co.il/TechBreak/Spring%203.0%20TechBreak%20-%20slides.pdf"&gt;here&lt;/a&gt;.
&lt;br/&gt;
&lt;center&gt;
&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7548643028974164";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel = "";
google_color_border = "9191CD";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;/center&gt;
&lt;br/&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/AJ9GDKXG98g" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/eyallupu/entry/spring_3_0_slides_from</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/cagataycivici/entry/mobile_twitter_client_with_jsf</guid>
    <title>Mobile Twitter Client with JSF</title>
    <dc:creator>Cagatay Civici</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/V-2BDrC6LO8/mobile_twitter_client_with_jsf</link>
        <pubDate>Thu, 5 Nov 2009 04:26:48 -0500</pubDate>
    <category>Java</category>
            <description>&lt;p&gt;&lt;a href="http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/"&gt;http://cagataycivici.wordpress.com/2009/11/05/mobile-twitter-client-with-jsf/&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/V-2BDrC6LO8" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/cagataycivici/entry/mobile_twitter_client_with_jsf</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/desmax/entry/scala_and_mongodb</guid>
    <title>Scala and MongoDB</title>
    <dc:creator>Massimiliano Dessì</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/T7xZV-NHYgQ/scala_and_mongodb</link>
        <pubDate>Thu, 5 Nov 2009 04:17:25 -0500</pubDate>
    <category>Java</category>
    <category>actors</category>
    <category>concurrency</category>
    <category>driver</category>
    <category>java</category>
    <category>jug</category>
    <category>jugs</category>
    <category>mongodb</category>
    <category>scala</category>
    <category>scalable</category>
    <category>scalamongodbdriver</category>
    <category>spring</category>
            <description>&lt;p&gt;&lt;p&gt;&lt;div style="width:425px;text-align:left" id="__ss_2427271"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/desmax74/mongodb-scala-roma-springframework-meeting2009" title="MongoDB Scala Roma SpringFramework Meeting2009"&gt;MongoDB Scala Roma SpringFramework Meeting2009&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mongodbscalaromaspringmeeting2009-091105031637-phpapp02&amp;#38;stripped_title=mongodb-scala-roma-springframework-meeting2009" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mongodbscalaromaspringmeeting2009-091105031637-phpapp02&amp;#38;stripped_title=mongodb-scala-roma-springframework-meeting2009" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/desmax74"&gt;Massimiliano Dessì&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/T7xZV-NHYgQ" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/desmax/entry/scala_and_mongodb</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/nivanov/entry/gridgain_presents_at_dallas_java</guid>
    <title>GridGain presents at Dallas Java User Group, November 11th</title>
    <dc:creator>Nikita Ivanov</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/4bPsfq5O_kI/gridgain_presents_at_dallas_java</link>
        <pubDate>Thu, 5 Nov 2009 02:51:29 -0500</pubDate>
    <category>Technology</category>
    <category>cloud</category>
    <category>computing</category>
    <category>grid</category>
            <description>&lt;img src="http://www.gridgain.com/images/dallas.jpg"&gt;
&lt;p&gt;
GridGain will be presenting at &lt;a href="http://javamug.org/"&gt;Dallas Java User Group&lt;/a&gt; at Dallas, TX, on &lt;b&gt;Wednesday, November 11th&lt;/b&gt;. If you are around the Dallas area and interesting in Cloud Computing - come see our presentation. As usual we'll have lively discussion on clouds and grids and as always plenty of live coding that you won't see anywhere else - &lt;b&gt;live cloud application in 10 minutes from scratch!&lt;/b&gt;. We also going to show some sneak peek preview of &lt;b&gt;GridGain 3.0&lt;/b&gt;
&lt;p&gt;
Hope to you see there!&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/4bPsfq5O_kI" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/nivanov/entry/gridgain_presents_at_dallas_java</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/evans/entry/i_just_bought_the_iomega</guid>
    <title>I Just Bought The Iomega Home Media Network Attached Storage</title>
    <dc:creator>evans</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/L82fQwha1HA/i_just_bought_the_iomega</link>
        <pubDate>Wed, 4 Nov 2009 18:24:03 -0500</pubDate>
    <category>Java</category>
            <description>&lt;a target="_blank" href="http://www.amazon.com/gp/product/B001HZ1R9U?tag=bolala-20"&gt;&lt;img alt="Iomega Home Media Network" hspace="5" title="Iomega Home Media Network" src="http://ecx.images-amazon.com/images/I/41suFrDa4hL._SL500_AA280_.jpg" weight="200" height="200" align="left" border="0" /&gt; &lt;/a&gt;

&lt;p /&gt;I bought this product from PC world, after lots of exploration of the NAS drive market, for me it does the job nearly perfectly.
&lt;p /&gt;
I wanted a drive that I could consolidate all my media to, and access it centrally when I needed to. It also had to be dimensionally small, look good (so as not to distress the missus) and run quietly. It ticks all boxes here then.
It also had to fulfil my future requirement to &lt;a target="_blank" href="http://www.amazon.com/gp/product/B001OG7WGE?tag=bolala-20"&gt;stream media&lt;/a&gt; directly to the TV, which it will do no problems, via a suitable games console or any media streaming player.
&lt;p /&gt;
It plugged straight into my BT home hub, and the drives were viewable instantly under the Network link. The drive is formatted so that there are 5-6 differing folders, these can be mapped straight to '&lt;a target="_blank" href="http://www.amazon.com/gp/product/B001NPDKUI?tag=bolala-20"&gt;my computer&lt;/a&gt;' or you can install the software which will undertake this process for you.
&lt;p /&gt;
Network speed is pretty good, an 800 megabyte file transferred in under 5 minutesish. Plenty quick enough to stream video from it.

It does have back up software included, however I would always perform manual backups, so am not interested in this.
&lt;p /&gt;
It is quite easy to configure, with multiple configurable options I don't understand, or require even the &lt;a target="_blank" href="http://www.amazon.com/gp/product/B001UE6M9S?tag=bolala-20"&gt;LED's brightness&lt;/a&gt; can be adjusted.
&lt;p /&gt;
The only item that seems to be missing is a power saving function, as the drive does not seem to auto spin down when not in use. This does not bother me, as I have no problem with using the power switch on the unit. Hopefully this will be addressed in future firmware upgrades, unless I am a dimwit who has yet to learn how to utilise this function? If so please let me know. 
&lt;p /&gt;

&lt;!--Amazon Affiliate--&gt;
&lt;img src="http://www.amazon.com/b?node=283155&amp;tag=bolala-20&amp;camp=15329&amp;creative=331797&amp;linkCode=ur1&amp;adid=02EK3DM8DK0XFMWK3XCE&amp;" style="display:none;"/&gt;

&lt;img src='http://www.amazon.co.uk/b?node=266239&amp;tag=onyxtic-21&amp;camp=1654&amp;creative=6554&amp;linkCode=ur1&amp;adid=1A3H1N7TN3H6HJW0D8ZF&amp;' style='display:none;'/&gt;

&lt;img src="https://www.amazon.ca/b?node=916520&amp;tag=onyxtic0c-20&amp;camp=14957&amp;creative=330161&amp;linkCode=ur1&amp;adid=0338KY42N6ZQVXR7H2CM&amp;" style="display:none;"/&gt;

&lt;!--Amazon Affiliate Ends--&gt;

&lt;img src="http://www.odesk.com/referrals/track/eanyokwu" style="display:none;"/&gt;

&lt;img src="http://www.text-link-ads.com/?ref=210154" style="display:none;"/&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/L82fQwha1HA" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/evans/entry/i_just_bought_the_iomega</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/trickymar/entry/viewaframework_1_0_0_swing</guid>
    <title>Viewaframework 1.0.0 Swing framework</title>
    <dc:creator>Mario García</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/sOQQU-5JcZk/viewaframework_1_0_0_swing</link>
        <pubDate>Wed, 4 Nov 2009 11:02:23 -0500</pubDate>
    <category>Swing</category>
    <category>framework</category>
    <category>java</category>
    <category>swing</category>
            <description>&lt;p&gt;&lt;p&gt;After a couple of weeks I have published Viewa. Viewa is a java Swing application framework (nothing to do with the JSR296).&lt;br /&gt;
&lt;br /&gt;
I made Viewa as an experimental project for making Swing applications in an easy way. It is still a very little project and it lacks a lot of things but I think it could be useful for somebody trying to do a Swing application from the beginning.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Viewa is hosted at sourceforge &lt;a href="http://viewaframework.sourceforge.net" title="viewaframework"&gt;http://viewaframework.sourceforge.net&lt;/a&gt; . There is a &lt;a href="http://viewaframework.sourceforge.net/getting-started.html" title="Getting Started"&gt;getting started&lt;/a&gt; tutorial.&lt;br /&gt;
&lt;/p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/sOQQU-5JcZk" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/trickymar/entry/viewaframework_1_0_0_swing</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/serkanguler/entry/how_to_resolve_conflict_of</guid>
    <title>How to resolve conflict of DWR and jQuery</title>
    <dc:creator>Serkan Guler</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/VhcHqAMr3x8/how_to_resolve_conflict_of</link>
        <pubDate>Wed, 4 Nov 2009 07:44:59 -0500</pubDate>
    <category>Java</category>
    <category>development</category>
    <category>dwr</category>
    <category>jquery</category>
    <category>web</category>
            <description>&lt;p&gt;&lt;a href="http://serkanguler.info/2009/11/04/how-to-resolve-conflicts-of-dwr-and-jquery/"&gt;http://serkanguler.info/2009/11/04/how-to-resolve-conflicts-of-dwr-and-jquery/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/VhcHqAMr3x8" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/serkanguler/entry/how_to_resolve_conflict_of</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/RickHigh/entry/back_to_being_a_java</guid>
    <title>Back to being a Java blog</title>
    <dc:creator>Rick Hightower</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/cD9wYKOtGLo/back_to_being_a_java</link>
        <pubDate>Tue, 3 Nov 2009 19:12:40 -0500</pubDate>
    <category>technology</category>
            <description>&lt;p&gt;I am working at a company where I get moved between Java web, Python daemons, Python web and C/GTK.&lt;/p&gt;&lt;p&gt;It seems I will be working on a classic Java/Spring MVC web application for the next few months (Dec 31st).&lt;/p&gt;&lt;p&gt;I am installing the VMWare developer instance now.... (with all the developer tools preconfigured for developing the Java/Spring MVC/JBoss stack).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/cD9wYKOtGLo" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/RickHigh/entry/back_to_being_a_java</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/RickHigh/entry/django_and_jquery_integrating_django</guid>
    <title>Django and JQuery: Integrating Django and JQuery Autocomplete plugin</title>
    <dc:creator>Rick Hightower</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/tRzepjuYJFc/django_and_jquery_integrating_django</link>
        <pubDate>Tue, 3 Nov 2009 17:28:30 -0500</pubDate>
    <category>technology</category>
    <category>autocomplete</category>
    <category>django</category>
    <category>jquery</category>
            <description>&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px; "&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;I have many what would otherwise be very large select input fields. I need some autocomplete support. I decided on JQuery (&lt;a href="http://jquery.com/" class="external free" title="http://jquery.com" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: url(http://192.168.0.99/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-right: 13px; background-position: 100% 50%; "&gt;http://jquery.com&lt;/a&gt;) and its autocomplete plugin (&lt;a href="http://docs.jquery.com/Plugins/Autocomplete" class="external free" title="http://docs.jquery.com/Plugins/Autocomplete" rel="nofollow" style="text-decoration: none; color: rgb(51, 102, 187); background-image: url(http://192.168.0.99/wiki/skins/monobook/external.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-right: 13px; background-position: 100% 50%; "&gt;http://docs.jquery.com/Plugins/Autocomplete&lt;/a&gt;).&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;This assumes that you have at least gone through the Django tutorial.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;To support this I added the following to settings.py of the django instance.&lt;/p&gt;&lt;div dir="ltr" style="text-align: left; "&gt;&lt;pre class="source-python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: normal; overflow-x: auto; overflow-y: auto; "&gt;JQUERY_ROOT = &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'/home/csmadmin/tools/jquery'&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;The above has where I downloaded and installed JQuery and the JQuery autocomplete plugin.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Then to serve up these files I add the following to urls.py&lt;/p&gt;&lt;div dir="ltr" style="text-align: left; "&gt;&lt;pre class="source-python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: normal; overflow-x: auto; overflow-y: auto; "&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;r&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'^js/(?P&amp;lt;path&amp;gt;.*)$'&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'django.views.static.serve'&lt;/span&gt;,
        &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'document_root'&lt;/span&gt;: settings.&lt;span class="me1" style="color: black; "&gt;JQUERY_ROOT&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;,&lt;/pre&gt;&lt;/div&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Then I adapted the example they gave in the JQuery autocomplete plugin to work with django.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;I created two views to server up plain text and json respectively (for months and emails).&lt;/p&gt;&lt;div dir="ltr" style="text-align: left; "&gt;&lt;pre class="source-python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: normal; overflow-x: auto; overflow-y: auto; "&gt;months_data = &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;
January
Feburary
March
April
May
June
July
August
September
October
November
December
&amp;quot;&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
emails_data = &lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Peter Pan&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;peter@pan.de&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Molly&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;molly@yahoo.com&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Forneria Marconi&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;live@japan.jp&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Master &amp;lt;em&amp;gt;Sync&amp;lt;/em&amp;gt;&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;205bw@samsung.com&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Dr. &amp;lt;strong&amp;gt;Tech&amp;lt;/strong&amp;gt; de Log&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;g15@logitech.com&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Don Corleone&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;don@vegas.com&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Mc Chick&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;info@donalds.org&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Donnie Darko&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;dd@timeshift.info&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Quake The Net&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;webmaster@quakenet.org&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Dr. Write&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;to&amp;quot;&lt;/span&gt;: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;write@writable.com&amp;quot;&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;def&lt;/span&gt; months&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;request&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;:
    query = request.&lt;span class="me1" style="color: black; "&gt;GET&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;get&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;q&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
&amp;nbsp;
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;if&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;len&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;query&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; == &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;0&lt;/span&gt; &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;or&lt;/span&gt; query&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;0&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt; == &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot; &amp;quot;&lt;/span&gt;&amp;nbsp;:
        data = months_data
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;else&lt;/span&gt;:
        month_list = months_data.&lt;span class="me1" style="color: black; "&gt;split&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'&lt;span class="es0" style="color: rgb(0, 0, 153); font-weight: bold; "&gt;\n&lt;/span&gt;'&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
        &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;print&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;ml &amp;quot;&lt;/span&gt; + &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;month_list&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;
        &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;print&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;qy &amp;quot;&lt;/span&gt; + &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;query&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;
        data = &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&lt;span class="es0" style="color: rgb(0, 0, 153); font-weight: bold; "&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;join&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;month &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;for&lt;/span&gt; month &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;in&lt;/span&gt; month_list
                          &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;if&lt;/span&gt; month.&lt;span class="me1" style="color: black; "&gt;lower&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;find&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;query&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;!&lt;/span&gt;= &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;-1&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
        &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;print&lt;/span&gt; &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;dt &amp;quot;&lt;/span&gt; + &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;data&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;`&lt;/span&gt;
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; HttpResponse&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;data, mimetype = &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/plain'&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;def&lt;/span&gt; emails&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;request&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;:
    query = request.&lt;span class="me1" style="color: black; "&gt;GET&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;get&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;q&amp;quot;&lt;/span&gt;, &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
&amp;nbsp;
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;if&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;len&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;query&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; == &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;0&lt;/span&gt; &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;or&lt;/span&gt; query&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;0&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt; == &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot; &amp;quot;&lt;/span&gt;&amp;nbsp;:
        json = simplejson.&lt;span class="me1" style="color: black; "&gt;dumps&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;emails_data&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;else&lt;/span&gt;:
        json = simplejson.&lt;span class="me1" style="color: black; "&gt;dumps&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;&lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;email&lt;/span&gt; &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;for&lt;/span&gt; &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;email&lt;/span&gt; &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;in&lt;/span&gt; emails_data
                                 &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;if&lt;/span&gt; &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;email&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'name'&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;find&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;query&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;!&lt;/span&gt;= &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;-1&lt;/span&gt;
                                 &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;or&lt;/span&gt; &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;email&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;[&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'to'&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;find&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;query&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;!&lt;/span&gt;= &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;-1&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;]&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;
    &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; HttpResponse&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;json, mimetype = &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'application/json'&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Don't you just love list comprehensions.&amp;nbsp;:) The above filters the lists based on the query string that was sent(with a HTTP get).&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Then we just change the index.html to handle the JSON request. I changed the base.html template to support JavaScript as follows:&lt;/p&gt;&lt;div dir="ltr" style="text-align: left; "&gt;&lt;pre class="source-python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: normal; overflow-x: auto; overflow-y: auto; "&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;!&lt;/span&gt;DOCTYPE HTML PUBLIC &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;-//W3C//DTD HTML 4.0 Transitional//EN&amp;quot;&lt;/span&gt;
            &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;http://www.w3.org/TR/REC-html40/loose.dtd&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; autoescape on &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;html&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;head&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;link rel=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;style.css&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/head&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;head&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;meta http-equiv=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt; content=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/html; charset=utf-8&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;title&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block title &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;My amazing &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;site&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/title&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block css &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;link rel=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt; href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/css/site.css&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block javascript &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/js/jquery.js&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/head&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;body&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;h1&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;Submental Mutterings&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/h1&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;div &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;sitenav&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block sitenav &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;h4&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;our website&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/h4&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter01.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter02.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;humor&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter03.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter04.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter05.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter06.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter07.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter08.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;asdf&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/div&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;div &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;sidebar&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block sidebar &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;h4&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;Other Mutters&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/h4&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter01.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;13&lt;/span&gt; September &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter02.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;24&lt;/span&gt; September &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter03.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;04&lt;/span&gt; October &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter04.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;19&lt;/span&gt; October &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter05.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;27&lt;/span&gt; October &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter06.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;31&lt;/span&gt; October &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter07.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;08&lt;/span&gt; November &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;a href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;mutter08.html&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;13&lt;/span&gt; November &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/a&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/div&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;div &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block content &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;h3&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;&lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;27&lt;/span&gt; October &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;2001&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/h3&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
I sit here &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;in&lt;/span&gt; a lone island of light, tapping away, trying to stay awake.  &lt;span class="me1" style="color: black; "&gt;I&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'m the only one who isn'&lt;/span&gt;t trying to grab some sleep as we speed east.  &lt;span class="me1" style="color: black; "&gt;Three&lt;/span&gt; hours knocked out of the night without even trying, thanks to the &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;time&lt;/span&gt; zones we have to cross&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt; everyone&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'s hoping to spend as much of the four hours we'&lt;/span&gt;ll be aloft as possible asleep.  &lt;span class="me1" style="color: black; "&gt;Except&lt;/span&gt; me.  &lt;span class="me1" style="color: black; "&gt;I&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'m doing my damndest to keep myself alert so that when I get home, I'&lt;/span&gt;ll have been awake all night, just like my wife back &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;in&lt;/span&gt; Cleveland.  &lt;span class="me1" style="color: black; "&gt;So&lt;/span&gt; we can go to sleep together, be together &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;for&lt;/span&gt; the first &lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;time&lt;/span&gt; &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;in&lt;/span&gt; a week.
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
It helps that my body thinks it&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'s only 2:14am, despite the fact that it'&lt;/span&gt;s &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;5&lt;/span&gt;:14am where we&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'re headed, where it'&lt;/span&gt;s home.  &lt;span class="me1" style="color: black; "&gt;I&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'ve been staying up late all week anyway.  Lying alone in my hotel room bed is like standing in a deserted concert hall, hollow and unused despite my presence.  There isn'&lt;/span&gt;t enough of me to fill the space available.  &lt;span class="me1" style="color: black; "&gt;The&lt;/span&gt; surface of the mattress &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;is&lt;/span&gt; too flat because I&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'m the only one deforming it.  I kept lying there in my lone valley, trying to distract my hindbrain with late-night Comedy Central, where strangely enough they'&lt;/span&gt;&lt;span class="kw3" style="color: rgb(220, 20, 60); "&gt;re&lt;/span&gt; showing &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;cite&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;Saturday Night Live&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/cite&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt; reruns every night of the week.
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
But now the week &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;is&lt;/span&gt; over, &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;and&lt;/span&gt; I&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'m slipping eastward at 600 miles an hour and six miles aloft, arrowing through the sky in a small pool of light.  Power bleeds slowly out of my laptop battery, music pours through the headphones into my ears, and the thin air rushes past the skin of the plane.  I keep glancing out the window as though something will be there.
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
Soon I will see my wife again, will be home.  Through the exhaustion I can feel happiness, deep and solid.
&amp;lt;/p&amp;gt;
    {% endblock&amp;nbsp;%}
&amp;lt;/div&amp;gt;
&amp;nbsp;
&amp;nbsp;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
{% endautoescape&amp;nbsp;%}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Notice that I have a javascript block and a css block.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Then we install the django autocomplete feature as follows:&lt;/p&gt;&lt;div dir="ltr" style="text-align: left; "&gt;&lt;pre class="source-python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: normal; overflow-x: auto; overflow-y: auto; "&gt;&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; extends &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;patientmgmt/base.html&amp;quot;&lt;/span&gt; &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block title &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;PM Index&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block javascript &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/js/jquery.js&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/js/jquery.js&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/javascript'&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'/js/jquery.bgiframe.min.js'&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/javascript'&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'/js/jquery.ajaxQueue.js'&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/javascript'&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'/js/thickbox-compressed.js'&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/javascript'&lt;/span&gt; src=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'/js/plugins/jquery.autocomplete.js'&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;link rel=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt; href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/js/plugins/jquery.autocomplete.css&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;link rel=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt; href=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;/js/jsthickbox.css&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;script &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;'text/javascript'&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
$&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;ready&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;function&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
&amp;nbsp;
	$&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;#month&amp;quot;&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;autocomplete&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;json/months&amp;quot;&lt;/span&gt;, &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
		minChars: &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;0&lt;/span&gt;,
		&lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;max&lt;/span&gt;: &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;12&lt;/span&gt;,
		autoFill: true,
		mustMatch: true,
		matchContains: false,
		scrollHeight: &lt;span class="nu0" style="color: rgb(255, 69, 0); "&gt;240&lt;/span&gt;,
	&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
	function formatEmail&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;mail&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
        &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; mail.&lt;span class="me1" style="color: black; "&gt;name&lt;/span&gt; + &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot; &amp;amp;lt;&amp;quot;&lt;/span&gt; + mail.&lt;span class="me1" style="color: black; "&gt;to&lt;/span&gt; + &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;amp;gt&amp;quot;&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
	$&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;#email&amp;quot;&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;.&lt;span class="me1" style="color: black; "&gt;autocomplete&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;json/emails&amp;quot;&lt;/span&gt;, &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
        dataType: &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;json&amp;quot;&lt;/span&gt;,
        parse: function&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;data&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
            &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; $.&lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;map&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;data, function&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;row&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
                &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
                    data: row,
                    value: row.&lt;span class="me1" style="color: black; "&gt;name&lt;/span&gt;,
                    result: row.&lt;span class="me1" style="color: black; "&gt;name&lt;/span&gt; + &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot; &amp;lt;&amp;quot;&lt;/span&gt; + row.&lt;span class="me1" style="color: black; "&gt;to&lt;/span&gt; + &lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;
                &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
            &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
        &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;,
        formatItem: function&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;item&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt; &lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;
            &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;return&lt;/span&gt; formatEmail&lt;span class="br0" style="color: black; "&gt;(&lt;/span&gt;item&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
        &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
    &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
 &lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;)&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/script&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; block content &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;Here &lt;span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; "&gt;is&lt;/span&gt; some content
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;input &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;month&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;input &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;type&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="kw2" style="color: rgb(0, 128, 0); "&gt;id&lt;/span&gt;=&lt;span class="st0" style="color: rgb(72, 61, 139); "&gt;&amp;quot;email&amp;quot;&lt;/span&gt; /&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;lt;&lt;/span&gt;/p&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;&amp;gt;&lt;/span&gt;
&lt;span class="br0" style="color: black; "&gt;{&lt;/span&gt;&lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt; endblock &lt;span class="sy0" style="color: rgb(102, 204, 102); "&gt;%&lt;/span&gt;&lt;span class="br0" style="color: black; "&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;The above works. There might be better ways to combine Django and JQuery. In fact, you can almost count on it. I was able to get the above working fairly quickly and it is certainly one way to combine a JavaScript library with Django site.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Please feel free to comment on this and let me know where I can improve.&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/tRzepjuYJFc" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/RickHigh/entry/django_and_jquery_integrating_django</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/talipozturk/entry/hazelcast_meetings_in_new_york</guid>
    <title>Hazelcast Meetings in New York</title>
    <dc:creator>Talip Ozturk</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/f-iVDjAePxk/hazelcast_meetings_in_new_york</link>
        <pubDate>Tue, 3 Nov 2009 12:55:05 -0500</pubDate>
    <category>Java</category>
            <description>It is very likely that it will be so cold in New York but I am sure the discussions in Hazelcast meetings will help! 
&lt;P&gt;
If you or your friends in your company are interested in hearing more about Hazelcast, let me know (talip at hazelcast dot com). I will be in town from November 9th to 17th. 
&lt;p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/f-iVDjAePxk" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/talipozturk/entry/hazelcast_meetings_in_new_york</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/alexRuiz/entry/fest_assert_1_2_fluent</guid>
    <title>FEST-Assert 1.2: Fluent Interface for Assertions</title>
    <dc:creator>Alex Ruiz</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/2JxeoME5pYE/fest_assert_1_2_fluent</link>
        <pubDate>Tue, 3 Nov 2009 07:55:36 -0500</pubDate>
    <category>Java</category>
    <category>dsl</category>
    <category>fest</category>
    <category>junit</category>
    <category>open-source</category>
    <category>testing</category>
    <category>testng</category>
            <description>We are proud to announce that &lt;a href="http://fest.googlecode.com/files/fest-assert-1.2.zip"&gt;FEST-Assert 1.2&lt;/a&gt; is out!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://fest.easytesting.org/assert" target="_blank"&gt;FEST-Assert&lt;/a&gt; is an "assertThat" library that provides a &lt;a href="http://www.infoq.com/articles/internal-dsls-java" target="_blank"&gt;fluent interface&lt;/a&gt; for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier.
&lt;/p&gt;
&lt;p&gt;
Example:
&lt;pre class="prettyprint"&gt;
int removed = employees.removeFired();
assertThat(removed).isZero();
 
List&amp;lt;Employee&amp;gt; newEmployees = employees.hired(TODAY);
assertThat(newEmployees).hasSize(6)
                        .contains(frodo, sam);
 
String[] newHires = employees.newHiresNames();
assertThat(newHires).containsOnly(&amp;quot;Gandalf&amp;quot;, &amp;quot;Arwen&amp;quot;, &amp;quot;Gimli&amp;quot;); 

assertThat(yoda).isInstanceOf(Jedi.class)
                .isEqualTo(foundJedi)
                .isNotEqualTo(foundSith);&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Complete blog post can be found &lt;a href="http://alexruiz.developerblogs.com/?p=695"&gt;here&lt;/a&gt;.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/2JxeoME5pYE" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/alexRuiz/entry/fest_assert_1_2_fluent</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/RickHigh/entry/refactored_googlewiki_to_markdown_to</guid>
    <title>Refactored GoogleWiki to Markdown to support MediaWiki</title>
    <dc:creator>Rick Hightower</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/vP-k-2cWwbQ/refactored_googlewiki_to_markdown_to</link>
        <pubDate>Tue, 3 Nov 2009 01:36:19 -0500</pubDate>
    <category>technology</category>
            <description>&lt;p&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; font-style: italic; "&gt;Refactored GoogleWiki to Markdown to support MediaWiki...&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "&gt;&lt;a name="Introduction" href="http://code.google.com/p/courseconstructor/wiki/RefactoredGoogleWikiToMarkDownToSupportMediaWiki"&gt;&lt;p style="max-width: 65em; "&gt;This code adds the ability to convert from Markdown text (the subset I am interested in) into Google Wiki format and now supports media wiki format.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;FYI: &amp;quot;Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).&amp;quot; See markdown and python-markdown for more details.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;This python script coverts markdown text into Google Wiki text or media wiki format.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;Using eval and polymorphism to easily support multiple Wiki's inputs.&lt;/p&gt;&lt;p&gt;JRoller exceptions out when I paste this in here so here is the original link.&lt;/p&gt;&lt;p&gt;http://code.google.com/p/courseconstructor/wiki/RefactoredGoogleWikiToMarkDownToSupportMediaWiki&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/a&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/vP-k-2cWwbQ" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/RickHigh/entry/refactored_googlewiki_to_markdown_to</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/tedgoddard/entry/what_s_new_in_jsf</guid>
    <title>What's new in JSF 2.0?</title>
    <dc:creator>Ted Goddard</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/9ZsRO7N7ngk/what_s_new_in_jsf</link>
        <pubDate>Mon, 2 Nov 2009 14:40:28 -0500</pubDate>
    <category>Java</category>
    <category>ajax</category>
    <category>icefaces</category>
    <category>javaserverfaces</category>
    <category>jsf</category>
    <category>jsf2.0</category>
            <description>&lt;br&gt;
&lt;p&gt;&lt;a href="http://www.java.net/blogs/kito75/"&gt;Kito Mann&lt;/a&gt; and &lt;a href="http://jroller.com/page/tedgoddard"&gt;I&lt;/a&gt; will be giving a 
&lt;a href="http://www.icefaces.org/main/resources/gotowebinar.iface?webinar=352868537"&gt;webinar this Wednesday, Nov 4 on JavaServer Faces 2.0&lt;/a&gt;.  &lt;a href="http://webmc.icefaces.org/"&gt;WebMC&lt;/a&gt; has been ported to &lt;a href="http://javaserverfaces.dev.java.net/"&gt;JSF 2.0&lt;/a&gt;, so I'll be using a few lessons from that easy porting exercise to explain some of the differences between JSF 1.2 and JSF 2.0.  To prepare for the webinar, please download the &lt;a href="http://www.icefaces.org/main/downloads/os-downloads.iface"&gt;ICEfaces 2.0 Alpha&lt;/a&gt; and JSF 2.0 and have your questions and comments ready.
&lt;/p&gt;
&lt;p&gt;
Now that JSF 2.0 is ready, when do you plan on using it in production?  As a start, we should really deploy some of the ICEfaces 2.0 demos on ICEfaces.org.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/9ZsRO7N7ngk" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/tedgoddard/entry/what_s_new_in_jsf</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/serkanguler/entry/have_you_tried_spring_roo</guid>
    <title>Have you tried Spring Roo?</title>
    <dc:creator>Serkan Guler</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/GUT-4W-JT-s/have_you_tried_spring_roo</link>
        <pubDate>Mon, 2 Nov 2009 07:01:00 -0500</pubDate>
    <category>Spring</category>
    <category>java</category>
    <category>roo</category>
    <category>spring</category>
            <description>&lt;p&gt;&lt;a href="http://serkanguler.info/2009/11/02/have-you-tried-spring-roo/"&gt;http://serkanguler.info/2009/11/02/have-you-tried-spring-roo/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/GUT-4W-JT-s" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/serkanguler/entry/have_you_tried_spring_roo</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/cagataycivici/entry/dynamic_images_with_jsf</guid>
    <title>Dynamic Images with JSF</title>
    <dc:creator>Cagatay Civici</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/oGhA6jC05Eg/dynamic_images_with_jsf</link>
        <pubDate>Mon, 2 Nov 2009 04:34:35 -0500</pubDate>
    <category>Java</category>
            <description>&lt;p&gt;&lt;a href="http://cagataycivici.wordpress.com/2009/11/02/dynamic-images-with-jsf/"&gt;http://cagataycivici.wordpress.com/2009/11/02/dynamic-images-with-jsf/&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/oGhA6jC05Eg" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/cagataycivici/entry/dynamic_images_with_jsf</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/dmdevito/entry/gwt_and_jetpack_are_going</guid>
    <title>GWT and Jetpack are going to shake up the web-based (RIA) desktop application landscape</title>
    <dc:creator>Dominique De Vito</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/EpsRGt5lAN4/gwt_and_jetpack_are_going</link>
        <pubDate>Mon, 2 Nov 2009 01:31:09 -0500</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;
&lt;a href="https://jetpack.mozillalabs.com/"&gt;Jetpack&lt;/a&gt;
is a Mozilla project to leverage W3C technologies (HTML/CSS/AJAX),
instead of XUL,
to build 
much more easily
Firefox add-ons.
Indeed,
the
&lt;a href="https://jetpack.mozillalabs.com/principles.html"&gt;Guiding Principles for Jetpack&lt;/a&gt;
tell Jetpack should be web-based:
&lt;br/&gt;
&lt;table style="" align="right"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align="center"&gt;
&lt;a href="http://www.jroller.com/dmdevito/resource/mozilla-jetpack.png"&gt;
&lt;img src="http://www.jroller.com/dmdevito/resource/mozilla-jetpack.png"&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
""
&lt;br/&gt;
* &lt;i&gt;&lt;a href="https://developer.mozilla.org/En/HTML"&gt;HTML&lt;/a&gt;, 
&lt;a href="https://developer.mozilla.org/En/Javascript"&gt;Javascript&lt;/a&gt;, and 
&lt;a href="https://developer.mozilla.org/En/CSS"&gt;CSS&lt;/a&gt; will be the only tools required&lt;/i&gt;
&lt;br/&gt;
* &lt;i&gt;Have the full power of the open Web: 
&lt;a href="https://developer.mozilla.org/En/AJAX"&gt;AJAX&lt;/a&gt; &amp;amp; multimedia capabilities including &amp;lt;canvas&amp;gt;, 
&lt;a href="https://developer.mozilla.org/En/HTML/Element/Audio"&gt;&amp;lt;audio&amp;gt;&lt;/a&gt; and 
&lt;a href="https://developer.mozilla.org/En/HTML/Element/Video"&gt;&amp;lt;video&amp;gt;&lt;/a&gt;&lt;/i&gt;
&lt;br/&gt;
* &lt;i&gt;Streamed &amp;amp; accessible via a URL, just like the rest of the Web&lt;/i&gt;
&lt;br/&gt;
* &lt;i&gt;Debugged in the browser &lt;em&gt;without restarting&lt;/em&gt; using common Web development tools like 
&lt;a href="http://www.getfirebug.com"&gt;Firebug&lt;/a&gt;
&lt;/i&gt;
&lt;br/&gt;
""
&lt;br/&gt;
Jetpack should be also extensible: "&lt;i&gt;Architecture will allow for the easy inclusion 
of reviewed &amp;amp; versioned third-party toolkits (e.g. jQuery, Dojo, etc.) 
and API libraries (e.g. Twitter, Delicious, Google Maps, etc.)&lt;/i&gt;".
&lt;/p&gt;


&lt;p&gt;
That's funny because I wrote in July 2006, a post
&lt;a href="http://www.jroller.com/dmdevito/entry/revisiting_xhtml_as_a_base"&gt;Revisiting XHTML as a base (?) for XUL-like programming&lt;/a&gt; 
that could be summarized like the following:&lt;br&gt;
""&lt;br/&gt;
&lt;i&gt;(1) XHTML is better than what you may think about,&lt;br&gt;
(2) Sure, XHTML could be used on Java client side (and follows some uses you may be 
not aware of),&lt;br&gt;
(3) XHTML could work, in fact, quite similar technologies are working and popular, but not standard,&lt;br&gt;
(4) I think XHTML is not really about regular web page creation, but more about XML-based GUIs: that's why XHTML has not really taken off, new rich client W3C activities may be another good chance for XHTML. I hope it will.&lt;br&gt;
Conclusion: (a) XML-based GUI technology is scattered into different ways/tools, XHTML may be a good choice for gathering effort and to promote such technology, (b) XHTML may simplify Java client development as XHTML programming model is common (similar to HTML) and because XHTML Java support and use are growing.
&lt;/i&gt;
&lt;br/&gt;
""
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;What are the relationships with GWT ?&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
GWT has popularized 
the idea
of 
building web sites and downloading them on the client-side,
into one single chunk (that may be split into different files),
 so that a browser 
 is interacting with the server-side through GWT-RPC calls on http.
So, GWT provides 2 interesting features:
&lt;br/&gt;
* web applications are packaged into a single chunk to be downloaded once on the client-side.
&lt;br/&gt;
* business service customers and providers are clearly separated 
(the former are on the client-side, with the GUI part, downloaded once,
and the latter, the providers, are on the server-side).
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Idea No 1: why not using GWT to develop Jetpack extension ?&lt;/u&gt; 
&lt;/p&gt;

&lt;p&gt;
Extension builders may consume GWT productions:
&lt;br/&gt;
* GWT outputs on the client-side 
leverage technologies (HTML/CSS/AJAX),
and Jetpack too.
&lt;br/&gt;
* GWT client-side is packaged into a single chunk (downloaded once),
Jetpack needs
to be packaged similarly.
&lt;/p&gt;

&lt;p&gt;
So, they fit quite well.
&lt;/p&gt;

&lt;p&gt;
Let's face the different cases
for developing a Jetpack extension:
&lt;br/&gt;
(a) online extension: 
this is the ideal case, as the GWT client-side output 
may be
quite almost ready 
to be packaged as a Jetpack extension.
&lt;br/&gt;
(b) offline extension: it depends
on the browser's services the extension uses or not. 
&lt;br/&gt;
- if the extension does not plan to use any service (e.g.
an extension created to modify web pages), then this case looks like just as hard as (a).
&lt;br/&gt;
- if the extension plans to use browser's services, then
to program this extension with GWT,
&lt;a href="http://en.wikipedia.org/wiki/Mock_object"&gt;mock objects&lt;/a&gt; 
implementing these services 
should be available in Java
to program the extension with Java
(GWT does already 
that,  providing 
a 
&lt;a href="http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/DOM.html"&gt;DOM class&lt;/a&gt; 
for manipulating DOM 
with Java programming).
Then, during the compilation phase,
those mock objects would be replaced
with JS objects giving access of the browser's real services.
&lt;br/&gt;
(c) online/offline extension: 
&lt;br/&gt;
- if no synchronization is involved,
this case is (a) + (b).
&lt;br/&gt;
- if synchronization is needed,
technologies like Gears could help here,
taking benefit from GWT architecture,
more precisely, 
the clear separation
between
business service customers and providers.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Idea No 2: an application view is needed within HTML&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
As said before, a GWT application
is available as a single chunk downloaded once on the client-side.
But there is 
no
HTML element to tell to the browser that, such a single chunk,
while running into the browser,
could be recorded/cached as packaged into a Jetpack add-on.
Such an HTML element could be useful.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;With Jetpack, GWT appears as a dual technology and the race is open between web applications and browser extensions&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
Before Jetpack, 
development 
options
were
web applications and 
Java-based applications
(respectively,
lightweight 
and
heavyweight 
clients).
With Jetpack,
a third option appears:
heavyweight 
clients,
not Java-based,
but browser-based.
&lt;/p&gt;


&lt;p&gt;
&lt;u&gt;With Jetpack, Mozilla provides an Adobe AIR competitor &lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Apollo_%28Adobe%29"&gt;Adobe AIR&lt;/a&gt;
aims 
to 
build Rich Internet applications (RIA)
using 
&lt;a href="http://en.wikipedia.org/wiki/Adobe_Flash"&gt;Flash&lt;/a&gt;, 
&lt;a href="http://en.wikipedia.org/wiki/Adobe_Flex"&gt;Flex&lt;/a&gt;, 
HTML, or Ajax, that can be deployed as a desktop application.
With Jetpack,
Mozilla provides to Firefox similar desktop application support.
Add GWT, and then,
developers get a development toolkit, that fits with Jetpack.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;Conclusion !?&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
GWT and Jetpack are cross-frontier technologies (GWT compiles Java into JS,
and Jetpack enables to leverage W3C technologies to create Firefox add-ons).
They are great technologies.
It would be even greater if, as expected, 
those technologies are used conjointly.
&lt;/p&gt;

&lt;p&gt;
So, it's very worthwhile to keep an eye
on both technologies
within the next months
(GWT 2.0 development is on-going with M1 recently released,
and 
Jetpack - last version being 0.4 - is 
&lt;a href="http://news.cnet.com/8301-30685_3-10378604-264.html"&gt;planned&lt;/a&gt;
to be released with Firefox 4 at the end of 2010).
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/EpsRGt5lAN4" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/dmdevito/entry/gwt_and_jetpack_are_going</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work1</guid>
    <title>JRoller really doesn't work with Safari</title>
    <dc:creator>Bob Foster</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/2zI_xHN3hl8/jroller_really_doesn_t_work1</link>
        <pubDate>Sun, 1 Nov 2009 22:09:12 -0500</pubDate>
    <category>Java</category>
            <description>Three times now it has thrown away my post and refreshed the screen to nothing. I ignored the little alert that said it might not work - because I get the same alert with Google Chrome and it does work - but it's sadly true. Is JRoller basically obsolete?&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/2zI_xHN3hl8" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work1</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work1</guid>
    <title>JRoller really doesn't work with Safari</title>
    <dc:creator>Bob Foster</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/2zI_xHN3hl8/jroller_really_doesn_t_work1</link>
        <pubDate>Sun, 1 Nov 2009 22:09:12 -0500</pubDate>
    <category>Java</category>
            <description>Three times now it has thrown away my post and refreshed the screen to nothing. I ignored the little alert that said it might not work - because I get the same alert with Google Chrome and it does work - but it's sadly true. Is JRoller basically obsolete?&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/2zI_xHN3hl8" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work1</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work</guid>
    <title>JRoller really doesn't work with Safari</title>
    <dc:creator>Bob Foster</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/AbFbJAuCJbY/jroller_really_doesn_t_work</link>
        <pubDate>Sun, 1 Nov 2009 22:08:52 -0500</pubDate>
    <category>Java</category>
            <description>Three times now it has thrown away my post and refreshed the screen to nothing. I ignored the little alert that said it might not work - because I get the same alert with Google Chrome and it does work - but it's sadly true. Is JRoller basically obsolete?&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/AbFbJAuCJbY" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/bobfoster/entry/jroller_really_doesn_t_work</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/robertburrelldonkin/entry/jcp_at_the_crossroads</guid>
    <title>JCP: At The Crossroads</title>
    <dc:creator>robert burrell donkin</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/9iS-VOFi3nQ/jcp_at_the_crossroads</link>
        <pubDate>Sun, 1 Nov 2009 01:54:21 -0500</pubDate>
    <category>Java</category>
            <description>&lt;blockquote cite='http://www.jroller.com/scolebourne/entry/jsrs_submitted_over_time'&gt;
&lt;img src="http://tinyurl.com/ycc7opj" /&gt;
&lt;/blockquote&gt;
&lt;p&gt;
As drawn and &lt;a href='http://www.jroller.com/scolebourne/entry/jsrs_submitted_over_time'&gt;analysed&lt;/a&gt; by &lt;a href='http://www.linkedin.com/pub/stephen-colebourne/7/711/187' rel='tag'&gt;Stephen Colebourne&lt;/a&gt;. It's clear now that the &lt;abbr title='Java Community Process'&gt;&lt;a href='http://www.jcp.org' rel='tag'&gt;JCP&lt;/a&gt;&lt;/abbr&gt; must evolve or die. Be interesting to see how &lt;a href='http://www.oracle.com'&gt;Oracle&lt;/a&gt; resolves this issue... 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/9iS-VOFi3nQ" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/robertburrelldonkin/entry/jcp_at_the_crossroads</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/IllegalArgumentException/entry/headless_image_manipulation_in_java</guid>
    <title>Headless image manipulation in Java</title>
    <dc:creator>Carter Page</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/woIH_HzBlFw/headless_image_manipulation_in_java</link>
        <pubDate>Sun, 1 Nov 2009 01:03:35 -0500</pubDate>
    <category>Java</category>
    <category>crop</category>
    <category>headless</category>
    <category>headlessexception</category>
    <category>image</category>
    <category>java</category>
    <category>resize</category>
    <category>swing</category>
            <description>&lt;p&gt;Java image manipulation generally revolves around libraries that exist for GUI applications.  As such, if you are writing a server application on your desktop, and deploy it to a headless (no monitor) server, you may be unpleasantly surprised to encounter HeadlessException.&lt;/p&gt;

&lt;p&gt;In general, there are two simple rules to keep in mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set Java option java.awt.headless to true (ie, -Djava.awt.headless=true)&lt;/li&gt;
&lt;li&gt;Use a JPanel instead of a JFrame.  You get much of the same functionality, without the VM complaining about the display.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, this stuff is always more fun with code.  So I'll provide a sample for resizing an image, and another sample for cropping an image.  Both are safe to run on headless servers.&lt;/p&gt;

&lt;p&gt;The image objects used are ImageIcon, which are very simple to work with.  For instance, you can construct the object with a image file name, or even a raw byte array for maximum flexibility.
&lt;/p&gt;

&lt;h3&gt;Resize an Image&lt;/h3&gt;

&lt;p&gt;This resizes an image to an arbitrary size&lt;/p&gt;

&lt;pre&gt;
public static ImageIcon resizeImage(ImageIcon imageIcon,
                                    int width, int height)
{
    ImageIcon resizedImageIcon;
    resizedImageIcon = new ImageIcon(imageIcon.getImage()
        .getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH));
    return resizedImageIcon;
}
&lt;/pre&gt;

&lt;h3&gt;Fit an Image&lt;/h3&gt;

&lt;p&gt;
Most times an arbitrary resize isn't very practical since it skews your image without ratio calculations beforehand.  Here I've created a method that packages those ratio calculations into the method.  My standard use case is to fit an image of any size within a "frame" that contains an image (such as a div of set size on a webapp).  This example resizes an ImageIcon object.  You give it a frame with a maximum width and height, and it will shrink or maximize the image to fit within that frame.
&lt;/p&gt;

&lt;pre&gt;
public static ImageIcon resizeImageToFit(ImageIcon imageIcon,
                                         int maxWidth, int maxHeight)
{
    ImageIcon resizedImageIcon;
    float iconRatio = (float)imageIcon.getIconHeight()
        / (float)imageIcon.getIconWidth();
    float fitToRatio = (float)maxHeight / (float)maxWidth;
    if (iconRatio &gt; fitToRatio)
        resizedImageIcon = new ImageIcon(imageIcon.getImage()
            .getScaledInstance(-1, maxHeight,
                java.awt.Image.SCALE_SMOOTH));
    else
        resizedImageIcon = new ImageIcon(imageIcon.getImage()
            .getScaledInstance(maxWidth, -1,
                java.awt.Image.SCALE_SMOOTH));
    return resizedImageIcon;
}
&lt;/pre&gt;

&lt;h3&gt;Crop an Image&lt;/h3&gt;

&lt;p&gt;Self explanatory.&lt;/p&gt;

&lt;pre&gt;
public static ImageIcon cropImage(ImageIcon icon, int top, int left,
                                  int width, int height)
{
    JPanel jpanel = new JPanel();
    return new ImageIcon(jpanel.createImage(
        new FilteredImageSource(icon.getImage().getSource(),
            new CropImageFilter(left, top, width, height))));
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/woIH_HzBlFw" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/IllegalArgumentException/entry/headless_image_manipulation_in_java</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/dmdevito/entry/element_of_conception_name_important</guid>
    <title>Element of conception: name important external resources (or cross-frontier resources)</title>
    <dc:creator>Dominique De Vito</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/FQ5Hn-mFzes/element_of_conception_name_important</link>
        <pubDate>Sat, 31 Oct 2009 12:38:26 -0400</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;
Recently, I found into server logs
that the Java EE server had closed itself
a leaking connection.
Unfortunately, no name was associated 
with that announcement,
that is, 
no connection name
was provided.
So, I had no simple way to go up to the source of this leak.
&lt;/p&gt;

&lt;p&gt;
&lt;u&gt;One should be able to name a JDBC connection (and transactions too)&lt;/u&gt;
&lt;/p&gt;

&lt;p&gt;
It's very unfortunate not being able to name a JDBC connection.
&lt;/p&gt;

&lt;p&gt;
Well, the getConnection() methods of the 
&lt;a href="http://java.sun.com/javase/6/docs/api/javax/sql/DataSource.html"&gt;DataSource&lt;/a&gt; 
class
have no 'name' argument:
&lt;pre&gt;
public interface DataSource extends CommonDataSource, Wrapper {

  /**
   * Attempts to establish a connection with the data source that
   * this DataSource object represents.
   */
  Connection getConnection() throws SQLException;
      
  /**
   * Attempts to establish a connection with the data source that
   * this DataSource object represents.
   */
  Connection getConnection(String username, String password) 
    throws SQLException;
}
&lt;/pre&gt;
Futhermore, the 
&lt;a href="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html"&gt;Connection&lt;/a&gt; 
class
has no setName() method.
&lt;/p&gt;

&lt;p&gt;
It smells like an anti-pattern.
&lt;/p&gt;

&lt;p&gt;
It would be worthwhile, for example,
if a Java EE server 
was naming
used connections 
according to some annotation's value,
or, by default, using the name of the called EJB business method
using this connection.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/FQ5Hn-mFzes" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/dmdevito/entry/element_of_conception_name_important</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/Sandymountster/entry/notes_on_brion_bibber_s</guid>
    <title>Notes on Brion Vibber's recent Wikipedia Talk</title>
    <dc:creator>Michael Levin</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/FW1II7qQaaw/notes_on_brion_bibber_s</link>
        <pubDate>Sat, 31 Oct 2009 04:47:17 -0400</pubDate>
    <category>Java</category>
    <category>brion</category>
    <category>codetown</category>
    <category>java</category>
    <category>lamp</category>
    <category>levin</category>
    <category>orlandojug</category>
    <category>swampcast</category>
    <category>vibber</category>
    <category>wikimedia</category>
    <category>wikipedia</category>
            <description>&lt;p&gt;&lt;p&gt;Please join this developing discussion on CodeTown for details about Brion's recent talk: &lt;a HREF="http://www.codetown.us/group/orlandojug/forum/topics/brion-vibber-wikipedia-cto"&gt;http://www.codetown.us/group/orlandojug/forum/topics/brion-vibber-wikipedia-cto&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;

	&lt;p&gt;&lt;p&gt;&lt;p&gt;&lt;/p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/FW1II7qQaaw" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/Sandymountster/entry/notes_on_brion_bibber_s</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/tedgoddard/entry/icefaces_2_0_alpha_now</guid>
    <title>ICEfaces 2.0 Alpha now available</title>
    <dc:creator>Ted Goddard</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/O0AB3k0kE2w/icefaces_2_0_alpha_now</link>
        <pubDate>Fri, 30 Oct 2009 19:41:41 -0400</pubDate>
    <category>Java</category>
    <category>ajax</category>
    <category>ajaxpush</category>
    <category>icefaces</category>
    <category>jsf</category>
    <category>jsf2.0</category>
    <category>servlet3.0</category>
            <description>&lt;br&gt;
&lt;p&gt;
&lt;a href="http://www.icefaces.org/"&gt;ICEfaces 2.0&lt;/a&gt; is now &lt;a href="http://www.icefaces.org/main/downloads/os-downloads.iface"&gt;available for download&lt;/a&gt;.  To get started, you can download either the source bundle (containing all necessary libraries, but only 10MB) or the binary (containing pre-built demo applications that you can deploy on Tomcat 6).&lt;/p&gt;
&lt;p&gt;ICEfaces 2.0 provides two main components: "core" and "compat".  The ICEfaces core provides Direct-to-DOM rendering functionality and Ajax Push for &lt;a href="http://javaserverfaces.dev.java.net/"&gt;JSF 2.0&lt;/a&gt;.  For some applications, the core is all you need (see the new "auction" demo made purely with the standard JSF components and no ajax-specific markup; also, no faces-config.xml, all beans are injected via annotations).  Push features can be added with two lines of code via &lt;code&gt;org.icefaces.application.PushRenderer&lt;/code&gt; (this is just a repackaging of the familiar SessionRenderer API).&lt;/p&gt;
&lt;p&gt;Of course, most applications also need a rich set of components.  We will be building a second-generation set of components (as &lt;a href="http://blog.icefaces.org/blojsom/blog/default/2009/10/30/ICEfaces-2-0-Alpha-1-is-out/"&gt;Ken mentions&lt;/a&gt;), but at the moment we thought you would enjoy continuing to use the familiar ICEfaces components (such as, when porting your existing applications to JSF 2.0).  This is provided by the "compat"
libraries in ICEfaces 2.0.  To see this at work, try out the "auctionMonitor" and "component-showcase" demos.  The venerable auctionMonitor demo (from JavaOne 2005) only required a few hours of work to port to JSF 2.0 via the compat library.  To build:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unzip the source bundle
&lt;li&gt;Invoke &lt;code&gt;ant world&lt;/code&gt; in the icefaces directory (&lt;code&gt;ant all&lt;/code&gt; builds only the core)
&lt;li&gt;Deploy the .war files from samples/ and compat/samples/
&lt;/ul&gt;
&lt;p&gt;You may also be interested in deploying ICEfaces 2.0 to a Servlet 3.0 application server (such as &lt;a href="http://glassfish.dev.java.net"&gt;GlassFish v3&lt;/a&gt;).  Servlet 3.0 is automatically detected, and gives you the scalability benefits of the new standard NIO-based asynchronous request processing.&lt;/p&gt;
&lt;p&gt;(Remember, this is an alpha release, so you are bound to encounter a bug here and there; but we hope you have fun trying it out.  Are there things missing from the compat APIs?  Was your application easy to port? Let us know what you would like to see in the next alpha (or beta) release.)&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/O0AB3k0kE2w" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/tedgoddard/entry/icefaces_2_0_alpha_now</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/evans/entry/escaping_html_entities_in_python</guid>
    <title>Escaping HTML Entities in Python</title>
    <dc:creator>evans</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/RxUP0A6zJVo/escaping_html_entities_in_python</link>
        <pubDate>Fri, 30 Oct 2009 17:35:18 -0400</pubDate>
    <category>Java</category>
            <description>&lt;!-- Begin BidVertiser code --&gt;
&lt;SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=273003&amp;bid=665782" type="text/javascript"&gt;&lt;/SCRIPT&gt;
&lt;noscript&gt;&lt;a href="http://www.bidvertiser.com"&gt;make money&lt;/a&gt;&lt;/noscript&gt;
&lt;!-- End BidVertiser code --&gt; 
&lt;p /&gt;One of the cool things about working with Python is how easy it is to accomplish most tasks without having to roll your own utility module or program. I was working again on a slightly more advanced tool for one of my affiliate programmes last night, and needed to escape some HTML entities in my XML document before they were parsed by my XSLT program. I couldn't get it to do what I wanted because they were not properly escaped. 
&lt;p /&gt;
Unless I escaped the HTML Entities, the XML would not validate. To solve this problem, I had to resort to Python's escape() functions which are available both in &lt;a target="_blank" href="http://docs.python.org/library/cgi.html#cgi.escape"&gt;CGI&lt;/a&gt; module or the &lt;a target="_blank" href="http://docs.python.org/library/xml.sax.utils.html"&gt;Saxutils&lt;/a&gt; module. 

Here's an example of how to use them.
&lt;style type="text/css"&gt;
 
pre{background-color: #00ff00}
 
&lt;/style&gt;
&lt;P&gt;&lt;/P&gt; 
&lt;pre&gt;
&gt;&gt;&gt; import cgi
&gt;&gt;&gt; cgi.escape('&lt;&amp;&gt;')
&lt;!--'&amp;lt;&amp;amp;&amp;gt;'--&gt;
&gt;&gt;&gt;
&lt;/pre&gt;

&lt;p /&gt;
&lt;pre&gt;
&gt;&gt;&gt; from xml.sax import saxutils
&gt;&gt;&gt; saxutils.escape("&amp;")

&gt;&gt;&gt;
&lt;/pre&gt;
Depending on which one you use, they both do the same thing - making it easy to escape HTMLs. In fact, it also helps with URL encoding in instances where the '&amp;' is confusing your application.&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/RxUP0A6zJVo" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/evans/entry/escaping_html_entities_in_python</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/jeanlazarou/entry/sweb_and_styles_part_3</guid>
    <title>Sweb and styles (part 3)</title>
    <dc:creator>Jean Lazarou</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/q3YSWkiHxOE/sweb_and_styles_part_3</link>
        <pubDate>Fri, 30 Oct 2009 17:08:01 -0400</pubDate>
    <category>Ruby</category>
    <category>jruby</category>
    <category>rspec</category>
    <category>swiby</category>
            <description>&lt;p&gt;Following &lt;a href="http://jroller.com/jeanlazarou/entry/sweb_and_styles_part_2"&gt;part 2&lt;/a&gt;, part 3 presents the implementation of the &lt;span class="caps"&gt;GUI&lt;/span&gt; part of the application.&lt;/p&gt;
&lt;p&gt;The implementation uses the &lt;em&gt;Sweb&lt;/em&gt; approach from Swiby. Sweb presents GUIs in a browser-like container. Swiby scripts loaded by Sweb run in the context of the container, they do not create it. Sweb is loading initially and creates the expected context.&lt;/p&gt;
&lt;p&gt;The implementation of the &lt;span class="caps"&gt;GUI&lt;/span&gt; may look a bit odd because it uses the &lt;code&gt;Game&lt;/code&gt; class implemented in &lt;a href="http://jroller.com/jeanlazarou/entry/sweb_and_styles_part_2"&gt;part 2&lt;/a&gt;. The &lt;code&gt;Game&lt;/code&gt; implementation was pretty simple.&lt;/p&gt;

&lt;h2&gt;Create the visual part&lt;/h2&gt;
&lt;p&gt;Let&amp;#8217;s start by looking at the way the code builds the &lt;span class="caps"&gt;GUI&lt;/span&gt; layout, that looks like:&lt;/p&gt;
&lt;center&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/no_controller.png' /&gt;&lt;/center&gt;
&lt;p&gt;(Code explanation comes after.)&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="ident"&gt;title&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Hidden Number Game&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt; &lt;span class="ident"&gt;width&lt;/span&gt; &lt;span class="number"&gt;640&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt; &lt;span class="ident"&gt;height&lt;/span&gt; &lt;span class="number"&gt;380&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt; 
&lt;b&gt;06&lt;/b&gt; &lt;span class="ident"&gt;panel&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;content&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:layout&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:flow&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt; 
&lt;b&gt;08&lt;/b&gt;   &lt;span class="ident"&gt;use_styles&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;hidden_styles.rb&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;   
&lt;b&gt;10&lt;/b&gt;   &lt;span class="ident"&gt;form&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;     &lt;span class="ident"&gt;section&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;       &lt;span class="ident"&gt;input&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Your Guess&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:guess&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt; 
&lt;b&gt;15&lt;/b&gt;       &lt;span class="ident"&gt;num_pad&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="number"&gt;7&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;8&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;9&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;                 &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="number"&gt;4&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;5&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;6&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;                 &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;3&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;                 &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="number"&gt;0&lt;/span&gt;      &lt;span class="punct"&gt;]&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;                         
&lt;b&gt;20&lt;/b&gt;       &lt;span class="ident"&gt;grid&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:columns&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;3&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;         &lt;span class="ident"&gt;num_pad&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;key&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;           &lt;span class="ident"&gt;button&lt;/span&gt; &lt;span class="ident"&gt;key&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_s&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;key&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_s&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_sym&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:style_class&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:numeric_pad&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;         &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt; 
&lt;b&gt;25&lt;/b&gt;         &lt;span class="ident"&gt;column&lt;/span&gt; &lt;span class="symbol"&gt;:span&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;           &lt;span class="ident"&gt;button&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Clear&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:clear&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:style_class&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:numeric_pad&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt;       &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;       
&lt;b&gt;29&lt;/b&gt;       &lt;span class="ident"&gt;command&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Propose&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:submit&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;       
&lt;b&gt;31&lt;/b&gt;     &lt;span class="ident"&gt;section&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Control&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt;       &lt;span class="ident"&gt;combo&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Range&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="punct"&gt;[],&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;
&lt;b&gt;33&lt;/b&gt;       &lt;span class="ident"&gt;button&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Start&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:start&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt;       &lt;span class="ident"&gt;button&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Restart&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:restart&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt;       &lt;span class="ident"&gt;button&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Exit&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:exit_application&lt;/span&gt;
&lt;b&gt;36&lt;/b&gt; 
&lt;b&gt;37&lt;/b&gt;     &lt;span class="ident"&gt;next_row&lt;/span&gt;
&lt;b&gt;38&lt;/b&gt;       &lt;span class="ident"&gt;label&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:message&lt;/span&gt;
&lt;b&gt;39&lt;/b&gt;       &lt;span class="ident"&gt;progress&lt;/span&gt; &lt;span class="symbol"&gt;:horizontal&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:tries_left&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:value&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;
&lt;b&gt;40&lt;/b&gt;       
&lt;b&gt;41&lt;/b&gt;   &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;42&lt;/b&gt; 
&lt;b&gt;43&lt;/b&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;44&lt;/b&gt; 
&lt;b&gt;45&lt;/b&gt; &lt;span class="global"&gt;$context&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Line 1 sets the title to appear in the title bar. Lines 3 and 4 force the initial window size.&lt;/p&gt;
&lt;p&gt;The code between lines 6 and 43 defines the content displayed inside the Sweb container. It creates a top panel, a form, assigns th panel to the &lt;code&gt;panel&lt;/code&gt; variable and sets the layout of the Sweb container to flow layout. The layout is responsible for placing the components. The flow layout is known to Java/Swing developers, it places every component from left to right, each one next to the other depending on their desired size.&lt;/p&gt;
&lt;p&gt;Line 8 sets the styles to use to setup the fonts and colors, provided by a file named &lt;code&gt;hidden_styles.rb&lt;/code&gt; (see &lt;a href="http://jroller.com/jeanlazarou/entry/sweb_and_styles_part_1"&gt;part 1&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The code assigns a name to all the components see code like: &lt;code&gt;:name =&amp;gt; :guess&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Each section starts a new parent container. Each section contains all the following components, they are children of the section container. The &lt;code&gt;next_row&lt;/code&gt; directive (line 37) forces to place (layout) the following components on a next row, Swiby creates a new section implicitly.&lt;/p&gt;
&lt;p&gt;The code defines a form. Therefore, even if both &lt;code&gt;button&lt;/code&gt; and &lt;code&gt;command&lt;/code&gt; create button components, Swiby places the command buttons at the bottom of their container (section) where they appear.&lt;/p&gt;
&lt;p&gt;Line 21 creates all the buttons with the digits, laid out like a numeric pad. The Ruby code format (lines 15-18) tries to make more visible what part of the final form it declares.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;column&lt;/code&gt; layout directive (line 25) is available because the surrounding container is a grid (line 20 starts a container with a grid layout &amp;#8211; every component is taking place in a cell and all cells have the same size). The &lt;code&gt;span&lt;/code&gt; attribute, like in &lt;em&gt;&lt;span class="caps"&gt;HTML&lt;/span&gt;&lt;/em&gt;, says that next components consumes two-columns width.&lt;/p&gt;

&lt;p&gt;Line 45 asks Sweb to display the container and somehow to start the sweb-application.&lt;/p&gt;
&lt;p&gt;To make it run we need to require some files.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/layout/grid&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/layout/stacked&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;03&lt;/b&gt; 
&lt;b&gt;04&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/mvc/text&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/mvc/combo&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/mvc/button&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/mvc/label&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;swiby/mvc/progress_bar&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt; 
&lt;b&gt;10&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Running the script would result in displaying the window without any behavior (clicking the buttons or playing with the combo-box has no effect).&lt;/p&gt;
&lt;h2&gt;Give life to the window&lt;/h2&gt;
&lt;p&gt;As the &lt;em&gt;require&lt;/em&gt; statements show, we use the &lt;em&gt;(Swiby) &lt;span class="caps"&gt;MVC&lt;/span&gt;&lt;/em&gt; version of the components. We need to plug a controller that is going to give life to the view/form.&lt;/p&gt;

&lt;p&gt;We start by implementing the behavior of the exit button.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;PlayerController&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;   
&lt;b&gt;03&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;exit_application&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     &lt;span class="ident"&gt;exit&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;   
&lt;b&gt;07&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The exit button name is &lt;code&gt;exit_application&lt;/code&gt;, if the controller implements a method with the same name, Swiby calls the method when the user clicks the button.&lt;/p&gt;
&lt;p&gt;Now, we need to link the controller to the view, stored in the &lt;code&gt;panel&lt;/code&gt; variable.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="constant"&gt;ViewDefinition&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bind_controller&lt;/span&gt; &lt;span class="ident"&gt;panel&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="constant"&gt;PlayerController&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can use &lt;em&gt;(Swiby) &lt;span class="caps"&gt;MVC&lt;/span&gt;&lt;/em&gt; in different ways. Here, Sweb is creating the form and we must make the binding explicitly between the view and the controller.&lt;/p&gt;

&lt;p&gt;With the controller binding in place, the &lt;em&gt;exit&lt;/em&gt; button is working.&lt;/p&gt;
&lt;center&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/exit_button_only.png' /&gt;&lt;/center&gt;
&lt;p&gt;Only the exit button is enabled. As we now plugged the controller, Swiby checks for every button if a handler method does exist. Swiby only enables the ones having a &lt;em&gt;handler&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s now go through implementing more functionality.&lt;/p&gt;
&lt;h3&gt;Step 1: the startup message&lt;/h3&gt;
&lt;p&gt;At startup the &lt;span class="caps"&gt;GUI&lt;/span&gt; should tell the player that the game is not started. We are going to use the label component named message .&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     &lt;span class="attribute"&gt;@message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Game not started&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;03&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As the field name is &lt;code&gt;message&lt;/code&gt;, we just need to provide a getter and Swiby is going to use it.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:message&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And the message appears.&lt;/p&gt;
&lt;center&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/startup_message.png' /&gt;&lt;/center&gt;
&lt;h3&gt;Step 2: plugging the game object&lt;/h3&gt;
&lt;p&gt;In the &lt;code&gt;initialize&lt;/code&gt; method we create a new instance of the &lt;code&gt;Game&lt;/code&gt; class, ready to start the play.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Step 3: starting the game&lt;/h3&gt;
&lt;div class='pub-sidebar'&gt;
&lt;h2&gt;Some tips, some tricks&lt;/h2&gt;
&lt;h3&gt;interface?&lt;/h3&gt;
&lt;p&gt;The controller does not derive from any class, we could derive from the &lt;code&gt;TextPlayer&lt;/code&gt; defined in the previous part. The benefit would have been that we could delay the writing of the callbacks and forgetting one of them would produce the output to the console. But the two classes are more like implementing the same interface than being of the same kind&amp;#8230; See my entry: &lt;a href="http://jroller.com/jeanlazarou/entry/oo_technique_vs_concept"&gt;OO as a technique, OO as a concept&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;naming convention&lt;/h3&gt;

&lt;p&gt;The naming convention presented, used by Swiby to find handlers in the controller, is not static. Swiby uses by default a name provider available through a property named &lt;code&gt;Swiby.default_method_naming_provider&lt;/code&gt;, it defaults to an instance of the &lt;code&gt;Swiby::MethodNamingProvider&lt;/code&gt; class. Change the property to plug a custom provider.&lt;/p&gt;
&lt;p&gt;If you want to provide a custom version, don&amp;#8217;t forget that Swiby uses the &lt;em&gt;open-class&lt;/em&gt; character of Ruby to extend it.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To enable the &lt;em&gt;start&lt;/em&gt; button a handler named &lt;code&gt;start&lt;/code&gt; is enough but, when the game is running, it should be disabled. Therefore, we also add a &lt;code&gt;may_start?&lt;/code&gt; method that Swiby uses to enable/disable the button.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="attribute"&gt;@message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt; 
&lt;b&gt;05&lt;/b&gt;     &lt;span class="attribute"&gt;@entry&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="attribute"&gt;@started&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt; 
&lt;b&gt;09&lt;/b&gt;     &lt;span class="constant"&gt;Thread&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;       
&lt;b&gt;11&lt;/b&gt;       &lt;span class="keyword"&gt;begin&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;         &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;       &lt;span class="keyword"&gt;rescue&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;e&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;         &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Error in thread =&amp;gt; &lt;span class="expr"&gt;#{e}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;         &lt;span class="ident"&gt;trace&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;e&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;backtrace&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;         &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;trace&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="escape"&gt;\n&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt; 
&lt;b&gt;19&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;     
&lt;b&gt;21&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;   
&lt;b&gt;23&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;may_start?&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;     &lt;span class="keyword"&gt;not&lt;/span&gt; &lt;span class="attribute"&gt;@started&lt;/span&gt;
&lt;b&gt;25&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Line 3 clears the message attribute to clear the message the player sees. Line 5 empties the &lt;code&gt;entry&lt;/code&gt; attribute used to store the data the player enters. Line 6 sets the &lt;em&gt;started&lt;/em&gt; flag used at line 24 to enable/disable the start button. The &lt;code&gt;tries_left&lt;/code&gt; attributes stores the number of guesses made so far.&lt;/p&gt;

&lt;p&gt;Previous part showed the game object implementation, it ran in a simple console. The game was an endless loop querying the player for actions. Reusing the same implementation here requires to launch the game in its own thread (line 9) and pass the controller as a player. The game object starts its endless loop at line 12.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;initialize&lt;/code&gt; method we initialize the &lt;code&gt;started&lt;/code&gt; flag to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;     &lt;span class="attribute"&gt;@started&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The player controller must provide the &lt;code&gt;propose&lt;/code&gt; method.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;propose&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="attribute"&gt;@command&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;sleep&lt;/span&gt; &lt;span class="number"&gt;0.1&lt;/span&gt; &lt;span class="keyword"&gt;until&lt;/span&gt; &lt;span class="attribute"&gt;@command&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     
&lt;b&gt;07&lt;/b&gt;     &lt;span class="attribute"&gt;@command&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;     
&lt;b&gt;09&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So, the game object runs on a different thread, when it needs input from the player it calls the &lt;code&gt;propose&lt;/code&gt; method. The two threads (the &lt;span class="caps"&gt;GUI&lt;/span&gt; thread and the game) share the &lt;code&gt;command&lt;/code&gt; attribute. Sleeping in the &lt;code&gt;propose&lt;/code&gt; method prevents the game thread from waiting in an active loop.&lt;/p&gt;

&lt;h3&gt;Step 4: get game compliant&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;Game&lt;/code&gt; class also expects other methods from the player.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;higher&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;03&lt;/b&gt;     &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;lt;html&amp;gt;Guess &lt;span class="expr"&gt;#{number_of_guesses}&lt;/span&gt; with value &lt;span class="expr"&gt;#{@guess}&lt;/span&gt; was too &amp;lt;b&amp;gt;low&amp;lt;/b&amp;gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;lower&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;lt;html&amp;gt;Guess &lt;span class="expr"&gt;#{number_of_guesses}&lt;/span&gt; with value &lt;span class="expr"&gt;#{@guess}&lt;/span&gt; was too &amp;lt;b&amp;gt;high&amp;lt;/b&amp;gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;win&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;     &lt;span class="attribute"&gt;@started&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;     &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;lt;html&amp;gt;You win!&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;lose&lt;/span&gt; &lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;     &lt;span class="attribute"&gt;@started&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;     &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;lt;html&amp;gt;You lose, the hidden number was: &lt;span class="expr"&gt;#{hidden_number}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;All the methods create a &lt;span class="caps"&gt;HTML&lt;/span&gt; string used by the underlying &lt;code&gt;JLabel&lt;/code&gt; class to format the display.&lt;/p&gt;
&lt;h3&gt;Step 5: roughly and quickly&lt;/h3&gt;
&lt;p&gt;Let&amp;#8217;s have a quick look at the remainder of the controller implementation.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;guess&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     &lt;span class="attribute"&gt;@entry&lt;/span&gt;
&lt;b&gt;03&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   
&lt;b&gt;05&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;guess=&lt;/span&gt; &lt;span class="ident"&gt;value&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="attribute"&gt;@entry&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;value&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;   
&lt;b&gt;09&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;tries_left&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;   
&lt;b&gt;13&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;formated_tries_left&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;     
&lt;b&gt;15&lt;/b&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="keyword"&gt;not&lt;/span&gt; &lt;span class="attribute"&gt;@started&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;       &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;     &lt;span class="keyword"&gt;elsif&lt;/span&gt; &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;       &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;last try&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;     &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;      &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="expr"&gt;#{@tries_left}&lt;/span&gt; tries left&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt; 
&lt;b&gt;23&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;     
&lt;b&gt;25&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;clear&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;     &lt;span class="attribute"&gt;@entry&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;   
&lt;b&gt;29&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;may_clear?&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;     &lt;span class="attribute"&gt;@started&lt;/span&gt;
&lt;b&gt;31&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt;         
&lt;b&gt;33&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;submit&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt;     &lt;span class="attribute"&gt;@command&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="attribute"&gt;@entry&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_i&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt;     &lt;span class="attribute"&gt;@guess&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="attribute"&gt;@entry&lt;/span&gt;
&lt;b&gt;36&lt;/b&gt;     &lt;span class="attribute"&gt;@entry&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;38&lt;/b&gt;   
&lt;b&gt;39&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;may_submit?&lt;/span&gt;
&lt;b&gt;40&lt;/b&gt;     &lt;span class="keyword"&gt;not&lt;/span&gt; &lt;span class="ident"&gt;may_start?&lt;/span&gt;
&lt;b&gt;41&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;42&lt;/b&gt;   
&lt;b&gt;43&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;restart&lt;/span&gt;
&lt;b&gt;44&lt;/b&gt;     &lt;span class="attribute"&gt;@message&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;45&lt;/b&gt;     &lt;span class="attribute"&gt;@command&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="symbol"&gt;:restart&lt;/span&gt;
&lt;b&gt;46&lt;/b&gt;     &lt;span class="attribute"&gt;@tries_left&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;
&lt;b&gt;47&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;48&lt;/b&gt;   
&lt;b&gt;49&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;may_restart?&lt;/span&gt;
&lt;b&gt;50&lt;/b&gt;     &lt;span class="keyword"&gt;not&lt;/span&gt; &lt;span class="ident"&gt;may_start?&lt;/span&gt;
&lt;b&gt;51&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;52&lt;/b&gt;   
&lt;b&gt;53&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;list_of_number_of_digits&lt;/span&gt;
&lt;b&gt;54&lt;/b&gt;     
&lt;b&gt;55&lt;/b&gt;     &lt;span class="attribute"&gt;@list_provided&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;
&lt;b&gt;56&lt;/b&gt;     
&lt;b&gt;57&lt;/b&gt;     &lt;span class="punct"&gt;[(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;20&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;30&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;50&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;20&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;80&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;90&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;100&lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;500&lt;/span&gt;&lt;span class="punct"&gt;)]&lt;/span&gt;
&lt;b&gt;58&lt;/b&gt;     
&lt;b&gt;59&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;60&lt;/b&gt;   
&lt;b&gt;61&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;list_of_number_of_digits_changed?&lt;/span&gt;
&lt;b&gt;62&lt;/b&gt;     &lt;span class="keyword"&gt;not&lt;/span&gt; &lt;span class="attribute"&gt;@list_provided&lt;/span&gt;
&lt;b&gt;63&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;64&lt;/b&gt;   
&lt;b&gt;65&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;number_of_digits&lt;/span&gt;
&lt;b&gt;66&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;number_of_digits&lt;/span&gt;
&lt;b&gt;67&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;68&lt;/b&gt;   
&lt;b&gt;69&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;number_of_digits=&lt;/span&gt; &lt;span class="ident"&gt;x&lt;/span&gt;
&lt;b&gt;70&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;digits_range&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;x&lt;/span&gt;
&lt;b&gt;71&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;72&lt;/b&gt;   &lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Lines 1-7 connect the &lt;code&gt;guess&lt;/code&gt; attribute to the input field (with the same name), using &lt;code&gt;att_accessor&lt;/code&gt; also works.&lt;/p&gt;
&lt;p&gt;Lines 9-23 connect the number of tries the player still has with the progress bar. The progress bar displays the text provided by &lt;code&gt;formated_tries_left&lt;/code&gt; only if such a method is present (convention is the field name prefixed by &lt;i&gt;formated_&lt;/i&gt;).&lt;/p&gt;

&lt;p&gt;Lines 25-51 implement the handlers for the &lt;em&gt;clear&lt;/em&gt;, &lt;em&gt;propose&lt;/em&gt; (named &lt;tt&gt;submit&lt;/tt&gt;) and &lt;em&gt;restart&lt;/em&gt; buttons.&lt;/p&gt;
&lt;p&gt;Lines 53-71 connect the controller to the combobox that the player uses to choose from several type of hidden numbers. Swiby makes a difference between the value of the combobox and the available values to choose from. The (selected) value follows the attribute getter/setter paradigm. For the data, that appear in the list, Swiby tries to find a method starting with &lt;i&gt;list_of_&lt;/i&gt; followed by the component&amp;#8217;s name (line 53). It also checks if the list content changes using the method &lt;code&gt;list_of_number_of_digits_changed?&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The code uses the &lt;code&gt;list_provided&lt;/code&gt; attribute to ensure that the combobox gets filled only once.&lt;/p&gt;
&lt;h3&gt;Step 6: message, the last touch&lt;/h3&gt;
&lt;p&gt;At this point, running the game would not work as expected, because the methods &lt;code&gt;lower&lt;/code&gt; and &lt;code&gt;higher&lt;/code&gt;, called by the game object, change the message but Swiby is not aware of the changes. Swiby provides a way to help in such a case, the &lt;code&gt;bindable&lt;/code&gt; directive declares attributes of the controller that Swiby should check for changes.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="ident"&gt;bindable&lt;/span&gt; &lt;span class="symbol"&gt;:message&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Step 7: the numeric pad&lt;/h3&gt;
&lt;p&gt;To implement the handlers for the numeric pad we use Ruby&amp;#8217;s facility for dynamically defining methods in a class.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="number"&gt;10&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;times&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;i&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="ident"&gt;name&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;i&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_s&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;define_method&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_sym&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;       &lt;span class="attribute"&gt;@entry&lt;/span&gt; &lt;span class="punct"&gt;+=&lt;/span&gt; &lt;span class="ident"&gt;name&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;     
&lt;b&gt;09&lt;/b&gt;     &lt;span class="ident"&gt;define_method&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;may_&lt;span class="expr"&gt;#{name}&lt;/span&gt;?&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;.&lt;/span&gt;&lt;span class="ident"&gt;to_sym&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;       &lt;span class="attribute"&gt;@started&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;     &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;     
&lt;b&gt;13&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Line 5 defines the getter for each numeric button and line 9 defines the enable/disable method.&lt;/p&gt;
&lt;h2&gt;Style reload at runtime&lt;/h2&gt;

&lt;p&gt;Using the reload button from the Sweb container has no effect because it does not know what reload does mean for the current window. We must provide it.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_ui.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="global"&gt;$context&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;reload_hook&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;   
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;s&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;load_styles&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;hidden_styles.rb&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="global"&gt;$context&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;apply_styles&lt;/span&gt; &lt;span class="ident"&gt;s&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   
&lt;b&gt;06&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Line 3 loads the styles file and line 4 applies the styles.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;Swiby &lt;span class="caps"&gt;MVC&lt;/span&gt;&lt;/em&gt; does not pretend to follow some universal definition of the &lt;span class="caps"&gt;MVC&lt;/span&gt; pattern, if any. It tries to make easy to separate the view and the controller code. The basic idea is not to make it possible to reuse a view with different controllers or a controller with different views. It gives some framework to make &lt;span class="caps"&gt;GUI&lt;/span&gt; development easier, maybe simpler and make the code more testable.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/q3YSWkiHxOE" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/jeanlazarou/entry/sweb_and_styles_part_3</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/jeanlazarou/entry/sweb_and_styles_part_2</guid>
    <title>Sweb and styles (part 2)</title>
    <dc:creator>Jean Lazarou</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/imvg_daIFcM/sweb_and_styles_part_2</link>
        <pubDate>Fri, 30 Oct 2009 17:07:48 -0400</pubDate>
    <category>Ruby</category>
    <category>jruby</category>
    <category>rspec</category>
    <category>swiby</category>
            <description>&lt;p&gt;&lt;a href="http://jroller.com/jeanlazarou/entry/sweb_and_styles_part_1"&gt;Part 1&lt;/a&gt; presented how to setup styles for a simple application, here we are going to present the implementation of the application. The application is a hidden number game. We split the implementation presentation in two parts to make them shorter.&lt;/p&gt;
&lt;p&gt;Implementing such a game is rather simple as long as we don&amp;#8217;t have to think about a graphical interface (&lt;span class="caps"&gt;GUI&lt;/span&gt;). This part starts by an implementation without &lt;span class="caps"&gt;GUI&lt;/span&gt;. Next &lt;a href="http://jroller.com/jeanlazarou/entry/sweb_and_styles_part_3"&gt;part&lt;/a&gt; presents the &lt;span class="caps"&gt;GUI&lt;/span&gt; version based on the non-&lt;span class="caps"&gt;GUI&lt;/span&gt; version leading to a simpler work.&lt;/p&gt;

&lt;h2&gt;Introducing the game&lt;/h2&gt;
&lt;p&gt;The game is very basic.When it starts a random number is drawn, then the player makes a guess. If the guess equals the drawn number, the player wins, otherwise the player can make another guess. When the guess is wrong the player receives information about the hidden number: lower or higher than the last guess.&lt;/p&gt;
&lt;h2&gt;The game implementation&lt;/h2&gt;
&lt;p&gt;The game lives as a &lt;code&gt;Game&lt;/code&gt; object. Once the game starts it enters an endless loop, when the player finds the number or consumes the maximum guesses the game ends.&lt;/p&gt;
&lt;p&gt;Next sections present the specifications for the &lt;code&gt;Game&lt;/code&gt; class.&lt;/p&gt;

&lt;p&gt;Writing specifications is a test/development approach known as &lt;em&gt;behavior-driven development&lt;/em&gt;. &lt;a href="http://rspec.info/"&gt;rspec&lt;/a&gt; is a framework providing &lt;em&gt;behavior-driven development&lt;/em&gt; for Ruby and used here.&lt;/p&gt;
&lt;h3&gt;Step 1: stopping the game&lt;/h3&gt;
&lt;p&gt;The player should be able to stop the game at any moment.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt; &lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   
&lt;b&gt;05&lt;/b&gt;   &lt;span class="ident"&gt;before&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;  
&lt;b&gt;06&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;   
&lt;b&gt;09&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should allow user to stop the game&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;stopping_player&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above description requires creating a game object (line 6) before applying every specification.&lt;/p&gt;

&lt;p&gt;The specification starts the game (line 10) passing a mock player created by the &lt;code&gt;stopping_player&lt;/code&gt; helper method.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;stopping_player&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:stop&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:bye&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     
&lt;b&gt;08&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The mock object first expects to receive a &lt;code&gt;propose&lt;/code&gt; message that would return &lt;em&gt;stop&lt;/em&gt; (line 5), then expects to receive the &lt;code&gt;bye&lt;/code&gt; message (line 6) with a number of guesses equal to zero as argument.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Game&lt;/code&gt; class, hereafter, implements a basic endless loop (starting at line 11) and processes only the &lt;em&gt;stop&lt;/em&gt; command (line 16). The game instance sends a &lt;code&gt;propose&lt;/code&gt; message to the player to get some proposal at line 13. When the player stops the game, the game sends a &lt;code&gt;bye&lt;/code&gt; message (line 17).&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   
&lt;b&gt;05&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;   
&lt;b&gt;09&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;   
&lt;b&gt;11&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;       
&lt;b&gt;13&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;       
&lt;b&gt;15&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;       
&lt;b&gt;20&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;         
&lt;b&gt;22&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;     
&lt;b&gt;24&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;25&lt;/b&gt;   
&lt;b&gt;26&lt;/b&gt;   
&lt;b&gt;27&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here is the result of the run&lt;/p&gt;
&lt;pre class='console'&gt;
$&gt;spec  hidden_number_spec.rb
.

Finished in 0.039 seconds

1 example, 0 failures
&lt;/pre&gt;
&lt;h3&gt;Step 2: drawing a number&lt;/h3&gt;
&lt;p&gt;When the game starts it should draw a number with a desired number of digits or in a specific range.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should draw a number with the given number of digits&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;number_of_digits&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;stopping_player&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     
&lt;b&gt;07&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="number"&gt;9&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should draw a number within the given range&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;     
&lt;b&gt;14&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;digits_range&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;78&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;80&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;     
&lt;b&gt;16&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;stopping_player&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;     
&lt;b&gt;18&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="number"&gt;78&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="number"&gt;80&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;     
&lt;b&gt;21&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The first specification describes the behavior for a hidden number with one digit and the second for a hidden number ranging from 78 to 80.&lt;/p&gt;
&lt;p&gt;Changing the implementation of the &lt;code&gt;Game&lt;/code&gt; class to conform to the above specification requires adding more attributes:&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:hidden_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;/span&gt;
&lt;b&gt;06&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:digits_range&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   
&lt;b&gt;08&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;   
&lt;b&gt;14&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;       
&lt;b&gt;16&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;       
&lt;b&gt;18&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;       
&lt;b&gt;23&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;         
&lt;b&gt;25&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;     
&lt;b&gt;27&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;   
&lt;b&gt;29&lt;/b&gt;   
&lt;b&gt;30&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Call a &lt;code&gt;draw_a_number&lt;/code&gt; method at the beginning of the loop&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:hidden_number&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   
&lt;b&gt;06&lt;/b&gt;   &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:digits_range&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   
&lt;b&gt;08&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;   
&lt;b&gt;14&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;span class="ident"&gt;draw_a_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt; 
&lt;b&gt;16&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;       
&lt;b&gt;18&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;       
&lt;b&gt;20&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;       
&lt;b&gt;25&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;         
&lt;b&gt;27&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;     
&lt;b&gt;29&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;   
&lt;b&gt;31&lt;/b&gt;   
&lt;b&gt;32&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The draw method is using the standard random generator method. It also resets the guesses so far to zero.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:hidden_number&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   
&lt;b&gt;06&lt;/b&gt;   &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:digits_range&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   
&lt;b&gt;08&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;   
&lt;b&gt;14&lt;/b&gt;     &lt;span class="ident"&gt;draw_a_number&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt; 
&lt;b&gt;16&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;       
&lt;b&gt;18&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;       
&lt;b&gt;20&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;       
&lt;b&gt;25&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;         
&lt;b&gt;27&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;     
&lt;b&gt;29&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;   
&lt;b&gt;31&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;draw_a_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;/span&gt;
&lt;b&gt;33&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;      &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;last&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;36&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;      &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;10&lt;/span&gt; &lt;span class="punct"&gt;**&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;38&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;/span&gt;
&lt;b&gt;39&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;40&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;    &lt;/span&gt;
&lt;b&gt;41&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;42&lt;/b&gt;   
&lt;b&gt;43&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Of course, because of the random nature of the &lt;code&gt;draw_a_number&lt;/code&gt; method, the above specification is not very reliable. For that reason, we used a one digit hidden number and, for the range specification, we limited the range of the values to 78, 79 and 80.&lt;/p&gt;

&lt;p&gt;To make the use of the &lt;code&gt;Game&lt;/code&gt; class easier, we can set a default value for the number of digits (2 digits) in the &lt;code&gt;initialize&lt;/code&gt; method.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And here is the result of the run&lt;/p&gt;
&lt;pre class='console'&gt;
$&gt;spec  hidden_number_spec.rb
...

Finished in 0.04 seconds

3 examples, 0 failures
&lt;/pre&gt;
&lt;h3&gt;Step 3: making guesses&lt;/h3&gt;
&lt;p&gt;After drawing a number, the game needs input from the player. It asks input to the player object. If the value equals the hidden number, the game ends by sending a &lt;code&gt;win&lt;/code&gt; message to the user. If the value does not match, the game sends the &lt;code&gt;lower&lt;/code&gt; or &lt;code&gt;higher&lt;/code&gt; message to the player. If the player fails to find the number after 10 guesses (a constant named &lt;code&gt;MAX_GUESSES&lt;/code&gt; ), the game ends by sending a &lt;code&gt;lose&lt;/code&gt; message to the user passing the hidden number.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should end if the proposal matches the hidden number&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;winning_player&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     
&lt;b&gt;07&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt; 
&lt;b&gt;09&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should end if the proposal matches the hidden number and give the right amount of guesses&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;     
&lt;b&gt;11&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;     
&lt;b&gt;13&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;winning_after_3_guesses_player&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;     
&lt;b&gt;15&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;   
&lt;b&gt;17&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should send lower if proposal is too high&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;     
&lt;b&gt;19&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;     
&lt;b&gt;21&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;one_guess_player&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;20&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;     
&lt;b&gt;23&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;   
&lt;b&gt;25&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should send higher if proposal is too low&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;     
&lt;b&gt;27&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;     
&lt;b&gt;29&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;one_guess_player&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;5&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;     
&lt;b&gt;31&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt; 
&lt;b&gt;33&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should end if the player consumes maximum guesses&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt;     
&lt;b&gt;35&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;36&lt;/b&gt;     
&lt;b&gt;37&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;losing_player&lt;/span&gt;
&lt;b&gt;38&lt;/b&gt;     
&lt;b&gt;39&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To make them pass, the test code needs to force the hidden number, otherwise the hidden number is a random value (lines 3, 11, 19, 27 and 35). An easy way to force the hidden number is to replace the &lt;code&gt;draw_a_number&lt;/code&gt; method, for the current &lt;code&gt;Game&lt;/code&gt; instance only, which checks the &lt;code&gt;forced_hidden&lt;/code&gt; attribute. Doing so prevents from breaking the previous specifications. Next code is added to the &lt;code&gt;before&lt;/code&gt; part.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;     &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;@game.forced_hidden=&lt;/span&gt; &lt;span class="ident"&gt;number&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;       &lt;span class="attribute"&gt;@forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;number&lt;/span&gt; 
&lt;b&gt;03&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;@game.draw_a_number&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     
&lt;b&gt;07&lt;/b&gt;       &lt;span class="keyword"&gt;super&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;         
&lt;b&gt;09&lt;/b&gt;       &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="attribute"&gt;@forced_hidden&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@forced_hidden&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;         
&lt;b&gt;11&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Four more helper methods create the mock players.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;winning_player&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;11&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:win&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     
&lt;b&gt;08&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;         
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   
&lt;b&gt;12&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;winning_after_3_guesses_player&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;     
&lt;b&gt;14&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;     
&lt;b&gt;16&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:higher&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;exactly&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;2&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;times&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:win&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;3&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;     
&lt;b&gt;20&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;21&lt;/b&gt;         
&lt;b&gt;22&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;   
&lt;b&gt;24&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;one_guess_player&lt;/span&gt; &lt;span class="ident"&gt;guess&lt;/span&gt;
&lt;b&gt;25&lt;/b&gt;     
&lt;b&gt;26&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt;     
&lt;b&gt;28&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;guess&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;29&lt;/b&gt;     
&lt;b&gt;30&lt;/b&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;guess&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;31&lt;/b&gt;       &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:lower&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt;     &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;33&lt;/b&gt;       &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:higher&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt;     
&lt;b&gt;36&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:bye&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt;     
&lt;b&gt;38&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;39&lt;/b&gt;     
&lt;b&gt;40&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;41&lt;/b&gt;   
&lt;b&gt;42&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;losing_player&lt;/span&gt;
&lt;b&gt;43&lt;/b&gt;     
&lt;b&gt;44&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;45&lt;/b&gt;     
&lt;b&gt;46&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;47&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:higher&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;exactly&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;9&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;times&lt;/span&gt;
&lt;b&gt;48&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:lose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;11&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;49&lt;/b&gt;     
&lt;b&gt;50&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;51&lt;/b&gt;     
&lt;b&gt;52&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The mock for the winner is rather simple, it expects to receive the &lt;code&gt;propose&lt;/code&gt; message that returns the right number (line 5) and then it receives the &lt;code&gt;win&lt;/code&gt; message with the number of guesses (1 here) at line 6.&lt;/p&gt;

&lt;p&gt;The mock, for a user that finds the number after some guesses, expects to receive the &lt;code&gt;propose&lt;/code&gt; message that returns two invalid numbers then the right one (line 16). It must expect to receive the informative messages (&lt;code&gt;higher&lt;/code&gt; at line 17) and the &lt;code&gt;win&lt;/code&gt; message with the count of guesses equals to 3.&lt;/p&gt;
&lt;p&gt;The mock for the player making one guess expects to receive the &lt;code&gt;propose&lt;/code&gt; message twice, the first time it returns the value the specification wants, the second time it returns &lt;em&gt;stop&lt;/em&gt; (line 28). It expects to receive the &lt;code&gt;lower&lt;/code&gt; or &lt;code&gt;higher&lt;/code&gt; message and then the &lt;code&gt;bye&lt;/code&gt; message with 1 guess as argument.&lt;/p&gt;

&lt;p&gt;Finally, the mock for the losing player expects to receive 10 times the &lt;code&gt;propose&lt;/code&gt; message returning always 1 (too low compared to the forced hidden number, 11) at line 46. It also expects to receive 9 times the &lt;code&gt;higher&lt;/code&gt; message (line 47), only nine times because at next guess the player loses as expressed at line 48. The &lt;code&gt;lose&lt;/code&gt; message receives two arguments: the hidden number and the number of guesses.&lt;/p&gt;
&lt;p&gt;And now implement the behavior in the endless loop, another branch in the case statement.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:hidden_number&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   
&lt;b&gt;06&lt;/b&gt;   &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:digits_range&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;   
&lt;b&gt;08&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;   
&lt;b&gt;13&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;   
&lt;b&gt;15&lt;/b&gt;     &lt;span class="ident"&gt;draw_a_number&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt; 
&lt;b&gt;17&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;       
&lt;b&gt;19&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;       
&lt;b&gt;21&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;23&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;25&lt;/b&gt; 
&lt;b&gt;26&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;        &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="constant"&gt;Integer&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;        &lt;/span&gt;
&lt;b&gt;28&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;+=&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;29&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;/span&gt;
&lt;b&gt;30&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;31&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;/span&gt;
&lt;b&gt;32&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;win&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;33&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;/span&gt;
&lt;b&gt;34&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;span class="keyword"&gt;return&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;/span&gt;
&lt;b&gt;36&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;/span&gt;
&lt;b&gt;38&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;39&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;/span&gt;
&lt;b&gt;40&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;lose&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;41&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;/span&gt;
&lt;b&gt;42&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;span class="keyword"&gt;return&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;43&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;/span&gt;
&lt;b&gt;44&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;span class="keyword"&gt;else&lt;/span&gt;  &lt;/span&gt;
&lt;b&gt;45&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;higher&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;46&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;              &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;lower&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;/span&gt;
&lt;b&gt;47&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;            &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;48&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;/span&gt;
&lt;b&gt;49&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;50&lt;/b&gt;       
&lt;b&gt;51&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;52&lt;/b&gt;         
&lt;b&gt;53&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;54&lt;/b&gt;     
&lt;b&gt;55&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;56&lt;/b&gt;   
&lt;b&gt;57&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;draw_a_number&lt;/span&gt;
&lt;b&gt;58&lt;/b&gt;     
&lt;b&gt;59&lt;/b&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;
&lt;b&gt;60&lt;/b&gt;       &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;last&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt;
&lt;b&gt;61&lt;/b&gt;     &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;62&lt;/b&gt;       &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;10&lt;/span&gt; &lt;span class="punct"&gt;**&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;63&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;64&lt;/b&gt;   
&lt;b&gt;65&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;66&lt;/b&gt;     
&lt;b&gt;67&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;68&lt;/b&gt;   
&lt;b&gt;69&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Line 38 checks if the player didn&amp;#8217;t consume the maximum of guesses, the constant is initialized as&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;10&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Is it fine?&lt;/p&gt;
&lt;pre class='console'&gt;
$&gt;spec  hidden_number_spec.rb
........

Finished in 0.045 seconds

8 examples, 0 failures
&lt;/pre&gt;
&lt;h3&gt;Step 4: restarting the game&lt;/h3&gt;
&lt;p&gt;Say the player does not feel comfortable with the current number, he/she should be able to restart the game.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;should restart the game on player's demand&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;forced_hidden&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="attribute"&gt;@game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;restart_and_win_player&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     
&lt;b&gt;07&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The helper method creating the mock, follows. It sets the expectation to receiving &lt;code&gt;propose&lt;/code&gt; and return a wrong number, next a restart directive and ends by finding the number (line 5) but the number of guesses sent with the &lt;code&gt;win&lt;/code&gt; message (line 7) must be 1, not 2.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number_spec.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;restart_and_win_player&lt;/span&gt;

&lt;b&gt;02&lt;/b&gt;     
&lt;b&gt;03&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Player&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:propose&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:restart&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;11&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:higher&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:win&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;with&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;     
&lt;b&gt;09&lt;/b&gt;     &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;10&lt;/b&gt;         
&lt;b&gt;11&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A new branch in the case statement handles the &lt;em&gt;restart&lt;/em&gt; directive.&lt;/p&gt;

&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Game&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt; 
&lt;b&gt;03&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_guesses&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;   &lt;span class="ident"&gt;attr_reader&lt;/span&gt; &lt;span class="symbol"&gt;:hidden_number&lt;/span&gt;
&lt;b&gt;05&lt;/b&gt;   
&lt;b&gt;06&lt;/b&gt;   &lt;span class="ident"&gt;attr_accessor&lt;/span&gt; &lt;span class="symbol"&gt;:number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:digits_range&lt;/span&gt;
&lt;b&gt;07&lt;/b&gt; 
&lt;b&gt;08&lt;/b&gt;   &lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;10&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;   
&lt;b&gt;10&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;initialize&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;12&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;
&lt;b&gt;13&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;   
&lt;b&gt;15&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;start&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;   
&lt;b&gt;17&lt;/b&gt;     &lt;span class="ident"&gt;draw_a_number&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt; 
&lt;b&gt;19&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt;       
&lt;b&gt;21&lt;/b&gt;       &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;propose&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;       
&lt;b&gt;23&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;25&lt;/b&gt;           &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;bye&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt; 
&lt;b&gt;28&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="constant"&gt;Integer&lt;/span&gt;
&lt;b&gt;29&lt;/b&gt;         
&lt;b&gt;30&lt;/b&gt;           &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;+=&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;
&lt;b&gt;31&lt;/b&gt;           
&lt;b&gt;32&lt;/b&gt;           &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;
&lt;b&gt;33&lt;/b&gt;             
&lt;b&gt;34&lt;/b&gt;             &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;win&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt;             
&lt;b&gt;36&lt;/b&gt;             &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt;             
&lt;b&gt;38&lt;/b&gt;           &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;39&lt;/b&gt;             
&lt;b&gt;40&lt;/b&gt;             &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="constant"&gt;MAX_GUESSES&lt;/span&gt;
&lt;b&gt;41&lt;/b&gt;               
&lt;b&gt;42&lt;/b&gt;               &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;lose&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt;
&lt;b&gt;43&lt;/b&gt;               
&lt;b&gt;44&lt;/b&gt;               &lt;span class="keyword"&gt;return&lt;/span&gt;
&lt;b&gt;45&lt;/b&gt;               
&lt;b&gt;46&lt;/b&gt;             &lt;span class="keyword"&gt;else&lt;/span&gt;  
&lt;b&gt;47&lt;/b&gt;               &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;higher&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt;
&lt;b&gt;48&lt;/b&gt;               &lt;span class="ident"&gt;player&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;lower&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;proposal&lt;/span&gt; &lt;span class="punct"&gt;&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; 
&lt;b&gt;49&lt;/b&gt;             &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;50&lt;/b&gt;           
&lt;b&gt;51&lt;/b&gt;           &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;52&lt;/b&gt; 
&lt;b&gt;53&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;        &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:restart&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;54&lt;/b&gt; &lt;span style='background-color: OrangeRed;'&gt;          &lt;span class="ident"&gt;draw_a_number&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;55&lt;/b&gt;       
&lt;b&gt;56&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;57&lt;/b&gt;         
&lt;b&gt;58&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;59&lt;/b&gt;     
&lt;b&gt;60&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;61&lt;/b&gt;   
&lt;b&gt;62&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;draw_a_number&lt;/span&gt;
&lt;b&gt;63&lt;/b&gt;     
&lt;b&gt;64&lt;/b&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;
&lt;b&gt;65&lt;/b&gt;       &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;last&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="attribute"&gt;@digits_range&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt;
&lt;b&gt;66&lt;/b&gt;     &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;67&lt;/b&gt;       &lt;span class="attribute"&gt;@hidden_number&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;10&lt;/span&gt; &lt;span class="punct"&gt;**&lt;/span&gt; &lt;span class="attribute"&gt;@number_of_digits&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;b&gt;68&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;69&lt;/b&gt;   
&lt;b&gt;70&lt;/b&gt;     &lt;span class="attribute"&gt;@number_of_guesses&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;
&lt;b&gt;71&lt;/b&gt;     
&lt;b&gt;72&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;73&lt;/b&gt;   
&lt;b&gt;74&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;pre class='console'&gt;
$&gt;spec  hidden_number_spec.rb
.........

Finished in 0.044 seconds

9 examples, 0 failures
&lt;/pre&gt;
&lt;p&gt;Now the &lt;code&gt;Game&lt;/code&gt; class is ready.&lt;/p&gt;
&lt;h3&gt;Step 5: user interaction&lt;/h3&gt;

&lt;p&gt;Making the game usable with a terminal interface is simple with the presented &lt;code&gt;Game&lt;/code&gt; class.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;TextPlayer&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;   
&lt;b&gt;03&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;propose&lt;/span&gt;
&lt;b&gt;04&lt;/b&gt;     
&lt;b&gt;05&lt;/b&gt;     &lt;span class="ident"&gt;loop&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
&lt;b&gt;06&lt;/b&gt;       
&lt;b&gt;07&lt;/b&gt;       &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Enter a guess or 'exit'&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;08&lt;/b&gt;       &lt;span class="ident"&gt;print&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Your guess: &lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;09&lt;/b&gt;       
&lt;b&gt;10&lt;/b&gt;       &lt;span class="ident"&gt;input&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;gets&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;chomp&lt;/span&gt;
&lt;b&gt;11&lt;/b&gt;       
&lt;b&gt;12&lt;/b&gt;       &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;input&lt;/span&gt; 
&lt;b&gt;13&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="regex"&gt;^[&lt;span class="escape"&gt;\d&lt;/span&gt;]*$&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
&lt;b&gt;14&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt; &lt;span class="ident"&gt;input&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_i&lt;/span&gt;
&lt;b&gt;15&lt;/b&gt;         &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;exit&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;b&gt;16&lt;/b&gt;           &lt;span class="keyword"&gt;return&lt;/span&gt; &lt;span class="symbol"&gt;:stop&lt;/span&gt;
&lt;b&gt;17&lt;/b&gt;         &lt;span class="keyword"&gt;else&lt;/span&gt;
&lt;b&gt;18&lt;/b&gt;           &lt;span class="ident"&gt;unknown&lt;/span&gt; &lt;span class="ident"&gt;input&lt;/span&gt;
&lt;b&gt;19&lt;/b&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;20&lt;/b&gt; 
&lt;b&gt;21&lt;/b&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;22&lt;/b&gt;   
&lt;b&gt;23&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;24&lt;/b&gt;   
&lt;b&gt;25&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;higher&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;26&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Higher&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;27&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;28&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;lower&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;29&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Lower&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;30&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;31&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;bye&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;32&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Bye&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;33&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;34&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;win&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;35&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;You win&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;36&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;37&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;lose&lt;/span&gt; &lt;span class="ident"&gt;hidden_number&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;number_of_guesses&lt;/span&gt;
&lt;b&gt;38&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;You lose, the hidden number was: &lt;span class="expr"&gt;#{hidden_number}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;39&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;40&lt;/b&gt; 
&lt;b&gt;41&lt;/b&gt;   &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;unknown&lt;/span&gt; &lt;span class="ident"&gt;command&lt;/span&gt;
&lt;b&gt;42&lt;/b&gt;     &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Unknown command: &lt;span class="expr"&gt;#{command}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;b&gt;43&lt;/b&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;b&gt;44&lt;/b&gt;   
&lt;b&gt;45&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;propose&lt;/code&gt; method is the longer method but very easy. It prints a prompt and waits for the user input. Depending on the type of the input value it returns:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;an integer (line 13)&lt;/li&gt;

	&lt;li&gt;the &lt;em&gt;stop&lt;/em&gt; directive (line 15), actually the user asks to exit the application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The method loops asking for user input as long as the user does not type any of the above options, providing an error message (line 18).&lt;/p&gt;
&lt;p&gt;To play the game, run the &lt;code&gt;hidden_number.rb&lt;/code&gt; script, but it needs a last thing: start the game.&lt;/p&gt;
&lt;div class='file_name'&gt;&lt;img src='http://www.jroller.com/jeanlazarou/resource/ruby_icon.jpg'&gt; src/hidden_number.rb&lt;/div&gt;&lt;div class='ruby_source'&gt;&lt;pre&gt;&lt;b&gt;01&lt;/b&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="global"&gt;$0&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="constant"&gt;__FILE__&lt;/span&gt;
&lt;b&gt;02&lt;/b&gt;   &lt;span class="constant"&gt;Game&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="constant"&gt;TextPlayer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;
&lt;b&gt;03&lt;/b&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here is an example of a game:&lt;/p&gt;

&lt;pre&gt;
$&amp;gt;ruby  hidden_number.rb
Enter a guess or 'exit'
Your guess: 10
Higher
Enter a guess or 'exit'
Your guess: 60
Lower
Enter a guess or 'exit'
Your guess: 40
Lower
Enter a guess or 'exit'
Your guess: exit
Bye
&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The code presented is the final version after all refactorings, not presented here. The application started as an experimental development, as it covered some interesting features of Swiby, rather simple, it appeared that writing about it would be a good thing. Some of the experimental ideas should be covered in another article.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t think that writing such specs is feasible, or done, on big projects, from that point of view this example is not realistic.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/imvg_daIFcM" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/jeanlazarou/entry/sweb_and_styles_part_2</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/neugens/entry/first_openjdk_commit</guid>
    <title>First OpenJDK commit!</title>
    <dc:creator>Mario Torre</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/kqPTY5kazlU/first_openjdk_commit</link>
        <pubDate>Fri, 30 Oct 2009 14:57:41 -0400</pubDate>
    <category>Java</category>
            <description>&lt;p&gt;Finally &lt;a href='https://bugs.openjdk.java.net/show_bug.cgi?id=100068'&gt;my bug was accepted&lt;/a&gt; and &lt;a href='http://mail.openjdk.java.net/pipermail/2d-dev/2009-October/001054.html'&gt;I got the OK&lt;/a&gt; &lt;a href='http://mail.openjdk.java.net/pipermail/2d-dev/2009-October/001087.html'&gt;to push&lt;/a&gt;.&lt;/p&gt;

	&lt;p&gt;Formally, it&amp;#8216;s not the first patch I produce that goes into the &lt;span class="caps"&gt;JDK&lt;/span&gt; repository, but all the other patches, that were a result of the work on the &lt;a href='http://openjdk.java.net/projects/caciocavallo/'&gt;Caciocavallo project&lt;/a&gt;, were always so heavily modified by Roman for inclusion in the OpenJDK forest and always committed by Roman that I never counted those as real contributions from my side.&lt;/p&gt;

	&lt;p&gt;So this is the first patch, and the first commit, all done by myself, and I&amp;#8216;m quite happy because of this!&lt;/p&gt;

	&lt;p&gt;I would like to say a big thanks to Roman, Andrew John Hughes, Jennifer Godinez, Phil Race, Gustavo Galimberti, Tim Bell and Jim Graham and everybody else at Sun (and outside Sun, especially Mark Wielaard and the Classpath people, because I know all I know thanks to them!) for the help and the reviews and all the great suggestions.&lt;/p&gt;

	&lt;p&gt;I wish I could share this joy with someone of you in particular (that I know is reading this blog post now), but I cannot, but in the end I&amp;#8216;ll drink some Port wine tonight to celebrate, and enjoy and be happy, and anybody around the city is of course welcome to join, no reason to call, just show up :)&lt;/p&gt;

	&lt;p&gt;Btw, I feel excited like a child!! &lt;a href='http://hg.openjdk.java.net/jdk7/2d/jdk/rev/634221297c37'&gt;I really committed to the java2d repository&lt;/a&gt;?? Wowowow :)&lt;/p&gt;

	&lt;p&gt;&lt;center&gt;&lt;br /&gt;
&lt;a href='http://www.limasoftware.net/neugens/downloads/classpath/first-commit-openjdk.png'&gt;&lt;br /&gt;
&lt;img src='http://www.limasoftware.net/neugens/downloads/classpath/first-commit-openjdk.png' width='300'/&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/center&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/kqPTY5kazlU" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/neugens/entry/first_openjdk_commit</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/RickHigh/entry/python_script_to_convert_markdown</guid>
    <title>Python script to convert markdown text into Google WIKI format</title>
    <dc:creator>Rick Hightower</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/-IFAtbnqbl4/python_script_to_convert_markdown</link>
        <pubDate>Fri, 30 Oct 2009 11:44:07 -0400</pubDate>
    <category>technology</category>
            <description>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "&gt;&lt;p style="max-width: 65em; "&gt;This code adds the ability to convert from Markdown text (the subset I am interested in) into Google Wiki format.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;FYI: &amp;quot;Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).&amp;quot; See&amp;nbsp;&lt;a href="http://daringfireball.net/projects/markdown/" rel="nofollow"&gt;markdown&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.freewisdom.org/projects/python-markdown/" rel="nofollow"&gt;python-markdown&lt;/a&gt;&amp;nbsp;for more details.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;This python script coverts markdown text into Google Wiki text.&lt;/p&gt;&lt;pre class="prettyprint" style="font-size: 12px; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); "&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; xml&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;etree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;cElementTree &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;ElementTree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; tostring&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; cStringIO &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;StringIO&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; xml&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;dom&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;minidom &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; parseString&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; paraHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; para &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; parseString&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tostring&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)).&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;childNodes&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;0&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;]&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;for&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; node &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; para&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;childNodes&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;if&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeName &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;strong&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;*{0}*&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;firstChild&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeValue&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;elif&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeName &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;em&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;_{0}_&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;firstChild&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeValue&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;elif&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeName &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;code&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;`{0}`&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;firstChild&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeValue&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;else&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;{0}&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;node&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;nodeValue&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; unorderedListHanlder&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;for&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;():&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot; * &amp;nbsp;{0} \n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; orderedListHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;for&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;():&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot; # &amp;nbsp;{0} \n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; preHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; code &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()[&lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;0&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;]&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;{{{&lt;br /&gt;%s&lt;br /&gt;}}}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;%&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; code&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; headerHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; level&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;write&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;((&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;=&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;*&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; level&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; element&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;=&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;*&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; level&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;handlers &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;{&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;pre&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; preHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;p&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; paraHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;ul&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; unorderedListHanlder&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;ol&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; orderedListHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;}&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; convert_to_wiki&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; output &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;StringIO&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;fenced_code&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;])&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;&amp;lt;div&amp;gt;\n{0}\n&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;html&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; root &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;ElementTree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;().&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;parse&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;StringIO&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;html&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;for&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; root&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;():&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;if&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;0&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;]&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;h&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;try&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; level &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;int&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;1&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;])&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;except&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;continue&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; headerHandler&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; level&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;elif&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; handlers&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; handlers&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;](&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;else&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;Unknown tag {0}&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;return&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; output&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getvalue&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;p style="max-width: 65em; "&gt;To exercise this, I wrote a unit test (not a very good unit test btw) as follows:&lt;/p&gt;&lt;pre class="prettyprint" style="font-size: 12px; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); "&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; unittest&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; util&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;markup_util &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; convert_to_wiki&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;class&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;MarkupTestCase&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;unittest&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;TestCase&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; setUp&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;markup_text &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;# H1&lt;br /&gt;## H2&lt;br /&gt;### H3&lt;br /&gt;# Header 1&lt;br /&gt;## Header 2&lt;br /&gt;### Hi how are you&lt;br /&gt;----------&lt;br /&gt;1. Hi&lt;br /&gt;2. How&lt;br /&gt;3. Are&lt;br /&gt;4. You&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;-----------&lt;br /&gt;- this&lt;br /&gt;- is&lt;br /&gt;- anohter&lt;br /&gt;- list&lt;br /&gt;----------&lt;br /&gt;This is some text. &lt;br /&gt;&lt;br /&gt;This is some more text.&lt;br /&gt;&lt;br /&gt;I am a paragraph with special sauce *emphasis* and **strong asdfasdf** `printf (void)`.&lt;br /&gt;&lt;br /&gt;~~~~{.python}&lt;br /&gt;def foo():&lt;br /&gt;&amp;nbsp; &amp;nbsp; pass&lt;br /&gt;~~~~&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; testMarkup&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;markup_text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;fenced_code&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;])&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; html&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;&amp;lt;h1&amp;gt;&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;H1&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;&amp;lt;ol&amp;gt;&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(4, html.count(&amp;quot;&amp;lt;li&amp;gt;&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;&amp;lt;/ol&amp;gt;&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;&amp;lt;code&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(1, html.count(&amp;quot;&amp;lt;/code&amp;gt;&amp;quot;))&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; testConvertToWiki&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;WIKI \n&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; convert_to_wiki&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;markup_text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;def&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; ztestMarkupToDOM&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;):&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; cStringIO &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;StringIO&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; markdown&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;self&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;markup_text&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;,&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;[&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;fenced_code&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;])&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;&amp;lt;div&amp;gt;\n{0}\n&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;format&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;html&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;#&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; html &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;#&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myfile &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;StringIO&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;html&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;from&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; xml&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;etree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;ElementTree&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;import&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;ElementTree&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tree &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="typ" style="color: rgb(102, 0, 102); "&gt;ElementTree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; tree&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;parse&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;myfile&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;`root`&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;for&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;in&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; root&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;():&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;if&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tag &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;pre&amp;quot;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; child &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; child&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;getchildren&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()[&lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;0&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;]&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;tag &amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;`child.tag`&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;text &amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;`child.text`&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;print&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;attrib &amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;+&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;`child.attrib`&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;#http://docs.python.org/library/xml.etree.elementtree.html&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;if&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; __name__ &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;==&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;'__main__'&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; unittest&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;.&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;main&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;p style="max-width: 65em; "&gt;I tried posting the whole thing here and ummm... Jroller exceptioned out.&lt;/p&gt;&lt;p&gt;The rest of this entry can be read here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://code.google.com/p/courseconstructor/wiki/MarkdownToGoogleWiki"&gt;http://code.google.com/p/courseconstructor/wiki/MarkdownToGoogleWiki&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/-IFAtbnqbl4" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/RickHigh/entry/python_script_to_convert_markdown</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/sebastianKuebeck/entry/why_you_should_never_talk</guid>
    <title>Why You Should Never Talk to the Police</title>
    <dc:creator>Sebastian Kübeck</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/qe0PWa2o1qo/why_you_should_never_talk</link>
        <pubDate>Fri, 30 Oct 2009 08:11:54 -0400</pubDate>
    <category>Security</category>
            <description>&lt;p&gt;
This is fascinating as it is frightening: The two guys tell you why you can make your case only worse when you talk to the police as they will trick you into more trouble once you are making an attempt to open your mouth.
The end result will be that the only people talking to the cops will be innocent people or "lightweight" crooks and those will be the only ones who are most likely to be punished whereas the "heavy weights" will defend themselves effectively and go free. I personally don't like where this is heading...
&lt;/p&gt;
&lt;p&gt;
&lt;object width="425" height="349"&gt;&lt;param name="movie" value="http://www.youtube.com/v/i8z7NC5sgik&amp;rel=0&amp;border=1&amp;color1=0x6699&amp;color2=0x54abd6&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/i8z7NC5sgik&amp;rel=0&amp;border=1&amp;color1=0x6699&amp;color2=0x54abd6&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="349"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;object width="425" height="349"&gt;&lt;param name="movie" value="http://www.youtube.com/v/08fZQWjDVKE&amp;rel=0&amp;border=1&amp;color1=0x6699&amp;color2=0x54abd6&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/08fZQWjDVKE&amp;rel=0&amp;border=1&amp;color1=0x6699&amp;color2=0x54abd6&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="349"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
One note to the police in Italy and other countries: The claim that the police is worse everywhere else in the world compared to the US is simply a lie. It's used to excuse police practices in the states. If you don't believe me, read the &lt;a href="http://thereport.amnesty.org/en/regions/americas/usa"&gt;Amnesty International Report on the US&lt;/a&gt;:
&lt;blockquote&gt;
There were reports of ill-treatment by police and prison officers on the US mainland, often involving cruel use of restraints, or electro-shock weapons.&lt;br/&gt;
In October, former police officer John Burge was arrested and charged with perjury in a civil case in which he had denied knowledge of the abuse and torture of suspects. John Burge had been in charge of the Area 2 police station in Chicago where scores of black suspects had allegedly been tortured in the 1970s and 1980s. Although indisputable evidence of torture came to light through a subsequent inquiry, no officer had been prosecuted and John Burge was the first person to be charged indirectly in connection with the abuse. 
&lt;/blockquote&gt;
That said, that doesn't excuse what the police does in Italy and other countries.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/qe0PWa2o1qo" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/sebastianKuebeck/entry/why_you_should_never_talk</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/serkanguler/entry/fix_gateway_time_synchronization_accuracy</guid>
    <title>Fix gateway: Time synchronization/accuracy problem</title>
    <dc:creator>Serkan Guler</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/GwAEqXhttpw/fix_gateway_time_synchronization_accuracy</link>
        <pubDate>Fri, 30 Oct 2009 07:50:29 -0400</pubDate>
    <category>Java</category>
    <category>java</category>
    <category>quickfix</category>
            <description>&lt;p&gt;&lt;a href="http://serkanguler.info/2009/10/30/fix-gateway-time-synchronizationaccuracy-problem/"&gt;http://serkanguler.info/2009/10/30/fix-gateway-time-synchronizationaccuracy-problem/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/GwAEqXhttpw" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/serkanguler/entry/fix_gateway_time_synchronization_accuracy</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/HazemBlog/entry/jsf_ri_2_0_1</guid>
    <title>JSF RI 2.0.1 StackOverflowError problem and solution</title>
    <dc:creator>Hazem Ahmed Saleh</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/K88zsgFlQ50/jsf_ri_2_0_1</link>
        <pubDate>Fri, 30 Oct 2009 06:06:51 -0400</pubDate>
    <category>Java</category>
    <category>2.0</category>
    <category>jsf</category>
    <category>stackoverflowerror</category>
            <description>&lt;br&gt;I found the following error when I configured a JSF 2.0 application from scratch (JSF RI 2.0.1-b01):&lt;br&gt;
&lt;pre&gt;
java.lang.StackOverflowError
	javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
	javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
	javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
	javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
	javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
...
&lt;/pre&gt;
&lt;br&gt;
The JSF 2.0 seems to enter in an infinite loop ...&lt;br&gt;
&lt;br&gt;
After digging in the problem, I found this problem happened because the faces-config tag version in the (faces-config.xml) file was not "2.0" (A silly mistake done by me and can be done by others).&lt;br&gt;
&lt;br&gt;
So please always make sure that your JSF 2.0 faces-config is:&lt;br&gt;

&lt;pre&gt;
&amp;lt;faces-config xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
              version="2.0"&amp;gt;

...
&amp;lt;/faces-config&amp;gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/K88zsgFlQ50" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/HazemBlog/entry/jsf_ri_2_0_1</feedburner:origLink></item>
    <item>
    <guid isPermaLink="false">http://www.jroller.com/dmdevito/entry/about_similarities_or_constants_in</guid>
    <title>About similarities or constants in software and hardware businesses </title>
    <dc:creator>Dominique De Vito</dc:creator>
    <link>http://feeds.dzone.com/~r/jroller/frontpage/~3/wIX-iSTnVr4/about_similarities_or_constants_in</link>
        <pubDate>Fri, 30 Oct 2009 03:22:28 -0400</pubDate>
    <category>Developer</category>
            <description>&lt;p&gt;
Having read
&lt;a href="http://www.informit.com/store/product.aspx?isbn=0201633612"&gt;Design Patterns:
Elements of Reusable Object-Oriented Software&lt;/a&gt;
few years ago,
I was keen to read
the interview
&lt;a href="http://www.informit.com/articles/article.aspx?p=1404056"&gt;Design
Patterns 15 Years Later: An Interview with Erich Gamma, Richard Helm, and Ralph Johnson&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Ralph Johnson has risen
an interesting point:
"&lt;i&gt;Writing one-line programs is not usually what we mean by design. 
	Software has improved a lot over the years, and a lot of systems 
	that used to require careful design can now be built by reusing other software. 
	But there are a lot of systems that we can't build that way, and 
	writing 100K lines of new code isn't that much easier now than it was 15 years ago. 
	It will does a lot more, but costs the same.&lt;/i&gt;"
&lt;/p&gt;

&lt;p&gt;
That's a funny point because
costs look like (always)
the same,
more or less,
over time,
both for software and hardware.
And over time, what one get
does a lot more, more and more.
&lt;/p&gt;

&lt;p&gt;
Coincidence or not,
sometimes
software (business) micmics hardware (one), or may be,
it's the opposite.
Or it could be just some business constants.
&lt;/p&gt;
 
 &lt;p&gt;
It reminds 
me that
&lt;a href="http://en.wikipedia.org/wiki/Fred_Brooks"&gt;Fred Brooks&lt;/a&gt;
wrote
in
&lt;a href="http://en.wikipedia.org/wiki/The_Mythical_Man-Month"&gt;The Mythical Man-Month: Essays on Software Engineering&lt;/a&gt;
that an average programmer
writes
about 15 000 lines of code in a year.
It looks like another constant, too, because
he wrote  he noticed this ratio of lines
whatever programming language is used.
So, his advice was
to prefer (more and more) 
high-level languages.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/jroller/frontpage/~4/wIX-iSTnVr4" height="1" width="1"/&gt;</description>          <feedburner:origLink>http://www.jroller.com/dmdevito/entry/about_similarities_or_constants_in</feedburner:origLink></item>
  </channel>
</rss>
