<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4019909</atom:id><lastBuildDate>Tue, 02 Jun 2026 07:10:11 +0000</lastBuildDate><category>code</category><category>agile</category><category>personal</category><category>rant</category><category>productivity</category><category>scrum</category><category>maven</category><category>facebook</category><category>groovy</category><category>java</category><category>spring</category><category>football</category><category>netbeans</category><category>work</category><category>flurdy</category><category>jetty</category><category>linux</category><category>play</category><category>sport</category><category>ubuntu</category><category>book</category><category>geek</category><category>hibernate</category><category>jpa</category><category>method</category><category>review</category><category>apache</category><category>architecture</category><category>blog</category><category>books</category><category>docker</category><category>firefox</category><category>flickr</category><category>git</category><category>google</category><category>heroku</category><category>hosting</category><category>jobb</category><category>kanban</category><category>lean</category><category>management</category><category>mozilla</category><category>pairprogramming</category><category>productiviy</category><category>project</category><category>social</category><category>t-shirt</category><category>twitter</category><category>video</category><category>virtualization</category><category>web2.0</category><category>wishlist</category><category>youtube</category><category>3g</category><category>advice</category><category>algeria</category><category>amazon</category><category>android mobile apps recommendation</category><category>annotation</category><category>api</category><category>avatar</category><category>baby</category><category>bash</category><category>bodypart</category><category>car</category><category>chain</category><category>champions league</category><category>chrome</category><category>client</category><category>communication</category><category>contracting</category><category>database</category><category>deadline</category><category>del.icio.us</category><category>dell</category><category>development</category><category>docs</category><category>dogma</category><category>ec2</category><category>eclipse</category><category>email</category><category>employment</category><category>encryption</category><category>england</category><category>enterprise</category><category>error</category><category>eworldnr</category><category>fantasy</category><category>firewall</category><category>games</category><category>grails</category><category>happiness</category><category>helpdesk</category><category>holiday</category><category>howto</category><category>hsqldb</category><category>ide</category><category>im</category><category>infoq</category><category>injustice</category><category>intellig</category><category>intellij</category><category>irc</category><category>isp</category><category>itunes iphone apple mp3 audacity</category><category>ivy</category><category>javazone</category><category>jira</category><category>jrebel</category><category>jsp</category><category>learning</category><category>legacy</category><category>license</category><category>location</category><category>mail</category><category>manchester</category><category>mercurial</category><category>mobile</category><category>music</category><category>mvc</category><category>mysql</category><category>netcom</category><category>networking</category><category>noncode</category><category>norway</category><category>office</category><category>open-plan</category><category>open-source</category><category>oracle</category><category>oslo</category><category>pc</category><category>picasa</category><category>playframework</category><category>postfix</category><category>presentation</category><category>protest</category><category>proxy</category><category>reading</category><category>retention</category><category>rewrite</category><category>rust</category><category>s3</category><category>salary gadgets work</category><category>scala</category><category>scam</category><category>scm</category><category>screen</category><category>script</category><category>security</category><category>shop</category><category>simpson</category><category>slashdot</category><category>sleep</category><category>snake</category><category>snow</category><category>socrates</category><category>sopa</category><category>spam</category><category>spotify</category><category>spreadshirt</category><category>sql</category><category>sqlmaven</category><category>stavern</category><category>sun</category><category>systems</category><category>telenor</category><category>thunderbird</category><category>tietoenator</category><category>tips</category><category>tools</category><category>tutorial</category><category>ubunu</category><category>united</category><category>upto</category><category>username</category><category>vietnam</category><category>war</category><category>wave</category><category>web services</category><category>windows db2 database code</category><category>world cup</category><category>write</category><category>x10</category><category>xml</category><category>xp</category><title>Ivar&#39;s rambling</title><description>The ramblings of Ivar Abrahamsen at flurdy.com.&#xa;Contain ideas, ranting at innocents, blinkered sporting opinions, tech bable, and probably not enough to be interesting.</description><link>http://flurdy.blogspot.com/search/label/code</link><managingEditor>noreply@blogger.com (flurdy)</managingEditor><generator>Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-865281261995702905</guid><pubDate>Sat, 15 Apr 2017 00:12:00 +0000</pubDate><atom:updated>2017-04-28T14:50:55.325+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">rust</category><title>Rusting, a quick dabble with the Rust language</title><description>&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I have spent a few spare moments in the last week looking at &lt;a href=&quot;https://en.wikipedia.org/wiki/Rust_(programming_language)&quot;&gt;Rust&lt;/a&gt;, a relative new language.&lt;br /&gt;&lt;br /&gt;With the kids on Easter break and naturally requiring frequent attention, and a few brief actual paid client work, I have not had as long uninterrupted time &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;focused&lt;/span&gt; on Rust as I would have liked. But I have managed to knock together some basic code.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Rustic Pizza&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I created &lt;a href=&quot;http://github.com/flurdy/rustic-pizza&quot;&gt;github.com/flurdy/rustic-pizza&lt;/a&gt; as my playground with rust and various web frameworks. It is very basic code and I expect I will be quite embarrassed by it in just a few months but it is a start. Rustic pizza &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;will eventually contain&lt;/span&gt; several very basic web applications each in a different Rust web frameworks, all for ordering pizza. The pizzeria is a concept that I have created many times over in Java and Scala as an example for piece of framework or similar, some of which I have documented on my &lt;a href=&quot;http://flurdy.com/&quot;&gt;flurdy.com&lt;/a&gt; website.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Experience so far&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;So far I have found Rust interesting.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;It perhaps use a bit too much of lazy abbreviated names for its keywords, primitives and core methods than I feel is reasonable, but that is me being pedantic. The ownership transfers, lifetimes and everything by reference is a bit of headfuck, but I think I got the hang of it. Rust does also have some of the monadic traits I am comfortable with from the Scala world, though its &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;F&lt;/span&gt;utures seems to be somewhat in its infancy at the moment.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Install Rust&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Rust can be installed &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;in&lt;/span&gt; numerous ways, including via Brew for both Rust and &lt;a href=&quot;http://doc.crates.io/&quot;&gt;Cargo&lt;/a&gt;, its build tool. But I recommend using &lt;a href=&quot;https://rustup.rs/&quot;&gt;Rustup&lt;/a&gt;, &lt;a href=&quot;https://rustup.rs/&quot;&gt;rustup.rs&lt;/a&gt;. Rustup lets you toggle between release and nightly version of Rust, and some frameworks require nightly builds.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Learning Rust&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The main &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust website&lt;/a&gt;, &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;rust-lang.org&lt;/a&gt;, is a good place to start to learn about Rust. Especially the &quot;&lt;a href=&quot;https://doc.rust-lang.org/book/README.html&quot;&gt;Rust book&lt;/a&gt;&quot;, &lt;a href=&quot;https://doc.rust-lang.org/book/README.html&quot;&gt;https://doc.rust-lang.org/book/README.html&lt;/a&gt;, is a great source to learn about basic Rust concepts. Further reading at &lt;a href=&quot;http://rustbyexample.com/index.html&quot;&gt;rustbyexample.com/index.html&lt;/a&gt; and &lt;a href=&quot;https://aturon.github.io/&quot;&gt;aturon.github.io&lt;/a&gt; was very useful. As well as various blogs on Rust such as &lt;a href=&quot;https://hoverbear.org/2017/03/03/setting-up-a-rust-devenv/&quot;&gt;hoverbear.org&lt;/a&gt; and &lt;a href=&quot;http://hermanradtke.com/tags/rustlang.html&quot;&gt;hermanradtke.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once you start coding I also recommend the standard library documentation, &lt;a href=&quot;https://doc.rust-lang.org/std/&quot;&gt;doc.rust-lang.org/std/,&lt;/a&gt; to find out what methods are available, e.g. does option have map, and what is getOrElse called in rust (unwrap) etc.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Web frameworks&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;As I most of the time create web services or full webapps an important part of my interest is which web frameworks are available. Fortunately the Rust community also recognise the importance of this, so &lt;a href=&quot;http://www.arewewebyet.org/&quot;&gt;www.arewewebyet.org&lt;/a&gt; and &lt;a href=&quot;https://github.com/flosse/rust-web-framework-comparison&quot;&gt;github.com/flosse/rust-web-framework-comparison&lt;/a&gt; are great information on which frameworks and libraries are available with Rust.&lt;br /&gt;&lt;br /&gt;This lead me to take a look at the newest kid on the block &lt;a href=&quot;https://rocket.rs/&quot;&gt;Rocket&lt;/a&gt;, &lt;a href=&quot;https://rocket.rs/&quot;&gt;rocket.rs&lt;/a&gt;. So far Rocket have worked very well for me. &lt;br /&gt;&lt;br /&gt;For my Rustic Pizza I plan to also take a look at &lt;a href=&quot;http://ironframework.io/&quot;&gt;Iron&lt;/a&gt;,  &lt;a href=&quot;http://ironframework.io/&quot;&gt;http://ironframework.io&lt;/a&gt;, as it is the most popular Rust web framework on github. Though it has not been updated as much lately compared to Rocket.&lt;br /&gt;&lt;br /&gt;Hopefully if time allows I may get to look more in depth into &lt;a href=&quot;http://nickel.rs/&quot;&gt;Nickel&lt;/a&gt;, &lt;a href=&quot;https://github.com/conduit-rust/conduit&quot;&gt;Conduit&lt;/a&gt; and &lt;a href=&quot;https://github.com/Ogeon/rustful&quot;&gt;Rustful&lt;/a&gt; as well.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Keep rusting?&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Whether I will keep using Rust time will tell. Core Rust concepts such as ownership, references, memory management etc are not aspects I care to manually control and think about too much as I hope a compiler and garbage collector optimises and ha&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ndles&lt;/span&gt; those for me. But I will keep at it so maybe Rust will accompany if not replace Scala as the main hammer in my toolbox some day.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://flurdy.blogspot.com/2017/04/rusting-quick-dabble-with-rust-language.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-2193862347768587529</guid><pubDate>Tue, 22 Nov 2016 14:35:00 +0000</pubDate><atom:updated>2016-11-22T15:35:07.007+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><title>ROC theorem: Readable, Optimised and Correct code. Pick two.</title><description>&lt;h4&gt;
ROC theorem&lt;/h4&gt;
&lt;br /&gt;
With database you have the well known &lt;a href=&quot;https://en.wikipedia.org/wiki/CAP_theorem&quot;&gt;CAP theorem&lt;/a&gt;. Consistency, Availability and Partition Tolerance. You can only have two. Databases have to make compromises between these pillars. You can not fully have all three.&lt;br /&gt;
&lt;br /&gt;
With code you also have to decide on compromises between readable code, optimised code and correct code (ROC). And you can not have all three.&lt;br /&gt;
&lt;br /&gt;
This often creates arguments between people on soap boxes from the various camps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Correct code&lt;/h3&gt;
&lt;br /&gt;
Correct code, clever, terse, generic code that avoids handling a lot of edge cases. Often functional code that can be very elegant with little to no theoretic side effects. And easily composed as part of other code.&lt;br /&gt;
&lt;br /&gt;
Correct code can be readable and fast, but also sometimes horrible to understand and very costly to train, write and maintain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Optimised code&lt;/h3&gt;
&lt;br /&gt;
Optimised code, fast and scalable. No unnecessary cruft and takes short cuts to achieve the end results so performant from day one.&lt;br /&gt;
&lt;br /&gt;
Scalable code, code you optimise to support horizontal scalable solutions, with little state and restartable.&lt;br /&gt;
&lt;br /&gt;
May discourage typed system e.g. a message based Actor system, multiple layers of caching, or overuse of parallelised futures to avoid bottlenecks.&lt;br /&gt;
&lt;br /&gt;
Optimised code can be &quot;correct&quot; code but often full of unclear and undocumented short cuts and frustratingly slow/buggy to develop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Readable code&lt;/h3&gt;
&lt;br /&gt;
Readable code, simple to read and quick to understand, by people of different levels of skill. Easy to spot bugs and is maintainable by anyone. It is pragmatic in its approach and quick to develop. Can be terse if it is the most readable but often more verbose.&lt;br /&gt;
&lt;br /&gt;
Readable can be &quot;correct&quot; as flow is easier to understand, but often not particularly performant and can be at more at risk of bugs due to more exposed code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Not mutually exclusive&lt;/h3&gt;
&lt;br /&gt;
You can have all 3 pillars for some smaller sets of code. But not for whole code bases and at a cost for how much.&lt;br /&gt;
&lt;br /&gt;
This is more about the priority and focus of the code you write.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Will others work on the code base, today, next week, next year? Then readable is important.&lt;/li&gt;
&lt;li&gt;Is multiple people working on the same part of the code base? From different teams? With varied experience, or even just different locations? Then readable is important.&lt;/li&gt;
&lt;li&gt;Is the solution used by millions? Does big O make any difference? Then consider optimised code. Note: very, very few companies/products actually need this.&lt;/li&gt;
&lt;li&gt;Is a bottleneck been proven in production? Then optimised code is valid. But not necessarily across the code base.&lt;/li&gt;
&lt;li&gt;Is the product business critical? With heavy integration dependants? Then correct code may be a priority.&lt;/li&gt;
&lt;li&gt;Is the team highly skilled? Not that large, and low churn? Then correct code is an option.&lt;/li&gt;
&lt;li&gt;Do you pair program 100%, from day 1 of onboarding? Then correct code is an option.&lt;/li&gt;
&lt;/ul&gt;
With unlimited time to implement and continuously heavy training, and therefore a lot money, you may achieve higher levels of 2 of them or even all 3. But that is not realistic. Pick your priorities. These are not mutually exclusive but they are at a cost of each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
All the ROCs&lt;/h3&gt;
&lt;br /&gt;
You may detect my preferences. I prefer very simple and readable code, that is functional, and scalable. In that order.&lt;br /&gt;
&lt;br /&gt;
I like that anyone can pick up and work on a task for most parts of a code base. I subscribe to the idea of frequent pair rotation across tasks and systems to make sure multiple people is aware of and had an input into any part of an architecture. That leads towards readable code so the overhead of swapping is low.&lt;br /&gt;
&lt;br /&gt;
That a new member of our team or from another team in 6 months time can easily contribute to &quot;our&quot; code base for a small pull request without learning &quot;our take&quot; on &lt;a href=&quot;https://en.wikipedia.org/wiki/Category_theory&quot;&gt;category theory&lt;/a&gt; is valuable.&lt;br /&gt;
&lt;br /&gt;
I prefer functional programming, with proper type checking, using functors and monads for composition. I like terse code that I can trust, but it must still be readable and maintainable by others than the original author(s).&lt;br /&gt;
&lt;br /&gt;
So some overuse of higher kinded types, free monads, etc adds too much cruft for me, and risky recruitment demands. (At the moment, I am prone to evolve and may have completely changed my mind by the time you read this...)&lt;br /&gt;
&lt;br /&gt;
Horizontally scalable, concurrent code is in the back of my mind of most of solutions. No state, using futures, REST principles etc are core to all my code.&lt;br /&gt;
&lt;br /&gt;
But I detest premature optimisation. Only occasionally in my career have I had to modify any code to support some optimised flow. I do not work for Facebook/Twitter/Google (yet) but I have worked for financial, telcos, and games companies with enormous traffic, and still this was rarely a problem at code level.&lt;br /&gt;
&lt;br /&gt;
I often spot potential optimisations and consciously say no, not yet, if it is not also the most readable and correct alternative. I even avoid parallelisation of futures if there is not yet any obvious need especially if it makes the code less readable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Readable, Optimised and Correct code. ROC. Pick two. Or just rank them.&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://flurdy.blogspot.com/2016/11/roc-theorem-readable-optimised-correct-code.html</link><author>noreply@blogger.com (flurdy)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-8079555436496522170</guid><pubDate>Tue, 25 Nov 2014 13:59:00 +0000</pubDate><atom:updated>2014-11-30T20:08:21.595+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">productivity</category><category domain="http://www.blogger.com/atom/ns#">rewrite</category><title>Evolve or wither slowly</title><description>&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;3 years ago (wow that went fast!) I wrote a blog post called &lt;a href=&quot;http://blog.flurdy.com/2011/11/do-not-rewrite.html&quot;&gt;Do not rewrite&lt;/a&gt;. The main points in it was to never rewrite whole applications. Never. Instead gradually rewrite one feature at the time whilst still delivering new business value.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I also wrote a more recent post about &lt;a href=&quot;http://blog.flurdy.com/2014/02/paper-cuts-and-broken-windows.html&quot;&gt;Paper cuts and broken windows&lt;/a&gt;. Which emphasises the importance of fixing problems straight away and not let them fester.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I want to extend these posts to include you should rewrite all the time, even when not immediately necessary.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Recap&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Extracting the main points in the previous blogs why big rewrites are bad and continual rewrites are good, and to also sum the obvious why no writes at all are very bad.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Big rewrite disadvantages&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Cost&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;No business feature - no value&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Risk&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Big deployments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Forgotten features&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Likely to never finish&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Not fully replacing old system&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Support yet another system&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Continual rewrite benefits&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Reduced risk&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Smaller delta&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Quicker feedback&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Modularising&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Faster - less bottlenecks&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Leaner&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Remove features and bloat&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Actually finishing&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;No rewrite disadvantages&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Death by thousand paper cuts&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Even the smallest change becomes slow and painful&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Broken windows&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;People do not care if they introduce bugs or break other things&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Staff exodus&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Few wants to work with painful systems&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Less obvious benefits&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;There are other perhaps unexpected but important benefits not raised in the previous post.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Business domain knowledge&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Every time a refactor or minor rewrite takes place the knowledge of that part is refreshed and stay current in the company. If a system is not touched for a long while the knowledge of it may be forgotten especially if staff involved has moved on.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If a critical bug or urgent feature needs to be added to that system then the turn around is exponentially different between a recently updated system and one forgotten.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Technical knowledge&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This is also true for the technical part of a system, the how, not just the what and why it does something. An old COBOL or complicated legacy custom build Java application will take a long time to work out compared to a contemporary tech stack application. &amp;nbsp;You might even have to hire new staff or expensive contractors to fix it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;With up to date knowledge it will be a lot less risk that they might not do it properly.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Quick turnaround&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If a new feature needs to be added then to any system then getting people ramped up and delivering it will be much quicker if it is on a contemporary and well known tech stack. If a new system needs to be integrated with existing systems then the API integration will be smoother and a lot quicker.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Technical migration&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If a mass migration of a technology stack is needed, perhaps migrating from in house data warehouse to a public cloud based provider, or moving from monolithic to horizontally auto scaled instances, then having most systems on a contemporary and probably quite similar technology stack will speed any urgent migrations. This will avoid/reduce the need to for many deep cave explorations of old customised mystery legacy applications.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Staff retention&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A very important reason to rewrite applications and features and in general keep technology up to date is staff retention. (Obviously a million other reasons exists for staff churn as well).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you avoid death by a thousand paper cuts and broken windows staff will not mind working on the products. A negative culture will be less likely.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you migrate to newer technologies and let people frequently learn new stuff they will be much more interested in the work and less likely to want to move elsewhere. (refer to my blog post &lt;a href=&quot;http://blog.flurdy.com/2014/05/peak-interest-learn-share-curve.html&quot;&gt;Peak interest - the learning and sharing curve&lt;/a&gt;).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Recruitment&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If word spreads that you keep an up to date and interesting technology stack then hiring new members of staff will be a lot easier, and you will hopefully attract more qualified candidates. On boarding will also be quick and people will be up to speed quicker with newer well known technology.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Lean technology - lean organisation&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If the applications are continually refactored and evolved (as long as it is not done in a hacky ninja rock star development fashion) the architectures will become modularised, scalable and leaner in general.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Not necessarily a &lt;a href=&quot;http://yobriefca.se/blog/2013/04/28/micro-service-architecture/&quot;&gt;micro service architecture&lt;/a&gt; but a lean architecture that are more likely to be adaptable for the future.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hopefully a lean architecture and highly skilled retained staff will also lead to / need a lean organisation so the business is more likely to succeed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Rewrite when not needed&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I would also suggest people and organisations refactor and rewrite when they do not see the obvious reasons for it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I do not entirely mean rewriting applications on a whim when there is no features to be added or bugs to be fixed, after all I do emphasise the need for delivering business value along with all rewrites.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;But I do think even when the obvious pain is not there that you should try to refactor and update applications. For example if the application is just one or two version behind the latest but still seems fine then still update it. It will be less painful than when it next time is 3-4 version behind with a bigger delta of change.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Rewrite encapsulation&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;One type of no business value rewrite I would suggest is a good idea is to encapsulate legacy systems API as soon as you come across it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Even if you are not changing a legacy system but merely reading data from for example, then adding a contemporary facade to it straight away will be of value in the future when you do need to update it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Experiment and rewrite experiments&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Another important staff retention technique on top generally keep up to date with technology is to let them experiment with new technology.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I would avoid core systems, especially customer facing systems, but internal tools is prime candidates for field testing technology.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This will also lead to discovering technology that you can use in other applications if proven useful that otherwise would have been missed or delayed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Naturally these experimental applications should also not be abandonware and be rewritten as often as other systems. Though they will probably always be good candidates for next set of technology experimentations.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Rewrite exploration and euthanasia&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Certain system never comes involved in new features so will not be included in a normal rewrite. These will consciously have to be found and rewritten without business value. Though probably just as a contemporary facade initially.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Leaving these as abandonware is not a good idea. Either kill them or update them.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Summary&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The main points was already covered in my previous blogs, but I hope people see the value of rewriting frequently to especially keep staff, organisational architecture and company in general up to date for whatever happens in the future.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A utopian&amp;nbsp;expectation&amp;nbsp;of all applications being up to date is too much to hope for. At the other end where companies that rarely and/or minimally update their applications, they are doomed to fail. The grey scale&amp;nbsp;in between decide&amp;nbsp;whether companies will wither and eventually die or survive.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://flurdy.blogspot.com/2014/11/evolve-or-wither-slowly.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-7446925040853131735</guid><pubDate>Fri, 21 Nov 2014 14:09:00 +0000</pubDate><atom:updated>2014-12-21T03:50:42.428+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">docker</category><category domain="http://www.blogger.com/atom/ns#">ivy</category><category domain="http://www.blogger.com/atom/ns#">maven</category><category domain="http://www.blogger.com/atom/ns#">virtualization</category><title>Don&#39;t download the internet. Share Maven and Ivy repositories with Docker containers </title><description>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;https://duckduckgo.com/?q=downloading+the+internet+maven+!gi&quot;&gt;Downloading the internet&lt;/a&gt;. A term commonly used when building&amp;nbsp;&lt;a href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt;&amp;nbsp;projects. It is due to downloading your applications dependencies and their transitive dependencies. With a normal application those dependencies can add up to quite a few jars and a lot of megabytes to download. Especially on a &#39;clean&#39; machine without cached dependencies in your local repository.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Running a new container in&amp;nbsp;&lt;a href=&quot;http://docker.com/&quot;&gt;Docker&lt;/a&gt;&amp;nbsp;sometimes feels the same as every&amp;nbsp;&lt;a href=&quot;https://docs.docker.com/terms/image/&quot;&gt;image layer&lt;/a&gt;&amp;nbsp;it is built on top of also has to be downloaded. Eventually these are also cached in the Docker cache.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If you then have a Maven based application in Docker you have the perfect storm of bandwidth hogging. Especially as your Docker image&#39;s Maven configuration will by default not reuse any cached dependencies and instead always download everything from Maven Central. And for each new build or launch it will re-download the internet as it knows of no local cached dependencies.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Work around, not solution&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;My work around is to mount my local host repositories for Maven, and for its derivative&amp;nbsp;&lt;a href=&quot;http://ant.apache.org/ivy/&quot;&gt;Ivy&lt;/a&gt;, as data volumes for the Docker container. This then avoids re-downloading the internet on every further build and launch and will also reuse dependencies I most likely have already downloaded on the host.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It is not the best solution as your images should ideally not be influenced by what you have on your host machine, but it saves a lot of time, and a lot of grief.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Vagrant&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;When I run my docker containers inside a&amp;nbsp;&lt;a href=&quot;http://vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;&amp;nbsp;instance I first mount my host repositories by adding these 2 lines to the&amp;nbsp;&lt;i&gt;Vagrantfile:&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;config.vm.synced_folder &quot;/Users/myusername/.m2&quot;, &quot;/home/vagrant/.m2&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;config.vm.synced_folder &quot;/Users/myusername/.ivy2&quot;, &quot;/home/vagrant/.ivy2&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Boot2docker&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Since Docker 1.3 the OSX &lt;i&gt;/Users&lt;/i&gt; path has been by default shared with the boot2docker VM on the same path. So to share the maven repositories you need to link the /Users path to your docker user home folder.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;boot2docker ssh;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&amp;nbsp; &amp;nbsp;ln -s /Users/mysername/.m2 /home/docker/.m2;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;ln -s /Users/mysername/.ivy2 /home/docker/.ivy2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Data volume container&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For easy sharing these folders between many docker containers I mount them as a data volume container and naming it ‘&lt;i&gt;maven&lt;/i&gt;’.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;docker run -d -P --name maven \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;-v ~/.m2:/root/.m2:rw \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;-v ~/.ivy2:/root/.ivy2:rw ubuntu&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I am basing it on the basic&amp;nbsp;&lt;a href=&quot;http://ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;&amp;nbsp;image, and it will stop immediately as no process is running. That is fine, the mounted volumes will still work.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Alternatively instead of mounting the host folders you can have a persistent container with these folders exposed as&amp;nbsp;&lt;a href=&quot;https://docs.docker.com/reference/builder/#volume&quot;&gt;VOLUME&lt;/a&gt;&amp;nbsp;in the Dockerfile so it is shared in a similar manner.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Launch container&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;docker run -d --volumes-from maven \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;yourapplicationimage&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Obviously you probably have other options on your docker launch, but the important bit here is the ‘--volumes-from maven’ which maps all the volumes from the data volume container called maven into this container.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now in theory all containers with Maven and Ivy based build tools such as&amp;nbsp;&lt;a href=&quot;http://www.scala-sbt.org/&quot;&gt;SBT&lt;/a&gt;&amp;nbsp;should first look at the mounted Maven and Ivy repositories for their dependencies.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Build problem&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Unfortunately if you build new images frequently you will have the same problem still as the above solution is only for running containers not building. During the build stage Docker does not allow you mount any volumes. This is so it is reproducible anywhere.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In your&amp;nbsp;&lt;i&gt;Dockerfile&lt;/i&gt;&amp;nbsp;you can ADD or COPY whole repositories into your image, but that will make it very bloated with a lot of irrelevant dependencies unless you somehow construct and maintain a perfect repository. (Ps. don’t do this).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Maven repository manager&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;One solution that makes sense in general is to add you companies&amp;nbsp;&lt;a href=&quot;http://maven.apache.org/repository-management.html&quot;&gt;Maven repository manager&lt;/a&gt;’s public&amp;nbsp;&lt;i&gt;Maven Central&amp;nbsp;&lt;/i&gt;mirror to the image. That way at least you will only download the intranet, not the internet.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For a Maven build add a&amp;nbsp;&lt;i&gt;settings.xml&lt;/i&gt;&amp;nbsp;file to your image folder with at least these settings if using&amp;nbsp;&lt;a href=&quot;http://www.sonatype.com/nexus&quot;&gt;Nexus&lt;/a&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;mirrors&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mirror&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Nexus&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/id&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Nexus Public Mirror&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/name&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;http://nexusmachine/nexus/content/groups/public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/url&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mirrorOf&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;central&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/mirrorOf&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/mirror&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/mirrors&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Then add this to your&amp;nbsp;&lt;i&gt;Dockerfile&lt;/i&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;ADD settings.xml /root/.m2/settings.xml&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Note this will be overwritten if you later during the run stage mount&amp;nbsp;&lt;i&gt;.m2&lt;/i&gt;&amp;nbsp;folder on top of it, but for most that is fine as the&amp;nbsp;&lt;i&gt;.m2&lt;/i&gt;&amp;nbsp;folder usually contain a relevant&amp;nbsp;&lt;i&gt;settings.xml&amp;nbsp;&lt;/i&gt;file anyway.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For a&amp;nbsp;&lt;a href=&quot;http://www.scala-sbt.org/&quot;&gt;SBT&lt;/a&gt;&amp;nbsp;build add this repositories file to your image folder with this content:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[repositories]&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;local&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;maven-local&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;company-repo: http://nexusmachine/nexus/content/groups/public&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;scala-tools-releases&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;maven-centra&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;l&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Then add this to your Dockerfile:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;ADD repositories /root/.sbt/repositories&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Repository manager container&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A further solution is to run a repository manager as another container and have all Maven/SBT builds refer to it instead. This avoids the involvement of the host computer yet saves any network traffic as everything is localhost.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Pull down something like&amp;nbsp;&lt;a href=&quot;https://registry.hub.docker.com/u/mattgruter/artifactory/&quot;&gt;https://registry.hub.docker.com/u/mattgruter/artifactory/&lt;/a&gt;&amp;nbsp;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; docker pull mattgruter/artifactory&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Configure then run and name it:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; docker run -d --name artifactory \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mattgruter/artifactory&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Modify the above settings.xml and repositories to refer to you locally linked artifactory name as url instead, e.g this one liner:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;company-ivy-repo: http://artifactory/artifactory/repo/,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;company-repo: http://artifactory/artifactory/repo/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;(The example above added it as an Ivy repository which&amp;nbsp;&lt;a href=&quot;http://www.jfrog.com/artifactory/&quot;&gt;Artifactory&lt;/a&gt;&amp;nbsp;supports).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Hopefully these tips will avoid downloading the internet too often and save a few grey hairs.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://flurdy.blogspot.com/2014/11/dont-download-internet-share-maven-ivy-docker.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-1700063921262893661</guid><pubDate>Thu, 13 Nov 2014 10:59:00 +0000</pubDate><atom:updated>2014-11-13T10:59:16.488+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">docker</category><category domain="http://www.blogger.com/atom/ns#">dogma</category><category domain="http://www.blogger.com/atom/ns#">virtualization</category><title>Dockerise it all - containerised addiction</title><description>&lt;div dir=&quot;ltr&quot; id=&quot;docs-internal-guid-7e48af83-a8bd-18be-a724-9782e0db324b&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15;&quot;&gt;&lt;b&gt;TL;DR: CDD - Container Driven Development&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; id=&quot;docs-internal-guid-7e48af83-a8bd-18be-a724-9782e0db324b&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15;&quot;&gt;(CDL - Container Driven Life)&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Occasionally you come across new interesting technology that is easy to use, and suddenly a veil is unveiled and you become aware of so many opportunities and potential. Maybe it was the same the first time you discovered programming, or OO or FP programming, message queues or NoSQL databases, or distributed source control, or moving from IDE only to proper reproducible build tools (Ant, Maven, Gradle, SBT etc). With certain tools it becomes your favourite hammer that you carry everywhere searching for nails to hit it with.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://www.docker.com/&quot;&gt;Docker&lt;/a&gt; is such a revelation, at least for me. And I am hammering a wide variety of nails with it. And with the hammer-nail pattern/anti-pattern some of those nails really didn’t need hammering but it was fun.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker history&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Docker was only revealed in March 2013 by &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 17.25px;&quot;&gt;&lt;a href=&quot;http://twitter.com/solomonstre&quot;&gt;Solomon Hykes&lt;/a&gt; and other&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15;&quot;&gt;people at &lt;/span&gt;&lt;a href=&quot;https://www.dotcloud.com/&quot; style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15;&quot;&gt;dotCloud&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15;&quot;&gt;&amp;nbsp;. It got a lot of publicity in the hacker news section of the world as people could see the possibly potential in this new tangent of virtualisation. It baked and matured through 2013 as people occasionally showed examples of applying it to their workflows, but still it was too rough for most to use.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;But during 2014 especially since the summer the &amp;nbsp;publicity and widespread use of Docker has exploded. Downloads from Docker’s registry hub of ready made images has &lt;a href=&quot;http://thenewstack.io/managing-growth-and-fostering-an-ecosystem-in-the-open-docker-reports-on-engagement-and-performance-metrics/&quot;&gt;exponentially rocketed sine the summer of 2014 by 1387%&lt;/a&gt;! Now the majority of people I talk to or follow on twitter mention Docker and show examples of how they use it. Conferences and tech news are flooded with new ways to use Docker. And projects that extend or are based on Docker are multiplying all the time.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;As someone who has always been interested in virtualisation, automation, reproducibility, build tools and provisioning, introducing containers like Docker has been a welcomed evolution and a revelation. Being already heavily invested in the use of &lt;a href=&quot;http://vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt; for development and systems the migration to/ &lt;a href=&quot;https://docs.vagrantup.com/v2/docker/index.html&quot;&gt;combination with&lt;/a&gt; Docker has been smooth.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 1. Exploration&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;First steps are usually to try the easy hello-world-ish examples. Downloading an Ubuntu image and launching bash inside a Docker container. Basically exploring Docker and its commands, which is what I cover in my &lt;a href=&quot;http://flurdy.com/docs/docker/docker_osx_ubuntu.html&quot;&gt;how to install, basic use patterns and many handy tips with Docker&lt;/a&gt; howto.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 2. Imagination&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;My howto document also takes you into step 2 which is more about creating your own basic images. Creating a simple Apache or Nginx container with a simple volumised website. Creating images ready with a Java SDK or node.js etc. I have made some simple Dockerfiles of these type of images available at &lt;a href=&quot;http://github.com/flurdy/Dockerfiles&quot;&gt;github.com/flurdy/Dockerfiles&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Then you usually also wrap a simple application of your own in an image and running it on other computers. You start to understand how and where Docker can be used.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 3. Diversity&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Once you got one application inside a container you start to experiment with other applications. Might take a look at other types of applications and more likely support applications such as databases inside a container.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;You might start to link containers to each other such as an application to a database container and some of the &lt;a href=&quot;http://flurdy.com/docs/docker/docker_osx_ubuntu.html#handydocker&quot;&gt;other handy Docker tips in my howto&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 4. Proliferation&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Now you have tried a mixture of applications with Docker you might spread the use to even more core applications and more. You start to link multiple containerised applications to each other. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Replacing third party integration and old legacy applications with a container image, wiring up and switching between different versions of an application via container linking, etc.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;As you start to basically recreate environments using Docker containers you might start to facilitate promotion between staging environments only using container images. And eventually production is containerised.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;You are probably already sharing and discovering images at work and on the internet. Using the public &lt;a href=&quot;http://registry.hub.docker.com/&quot;&gt;Docker registry hub&lt;/a&gt; and/or internally with tools such as &lt;a href=&quot;http://quay.io/&quot;&gt;Quay.io&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 5. Eccentricity&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;When comfortable with writing Dockerfiles and fully aware of the Docker way of layers and process then you start to experiment with more unconventional Docker images. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;You might create Android SDK in an image, ready made SSH tunnels to apps or databases in another. You add tools such as a local maven repository manager, local DNS servers, mail servers, etc. into containers. &amp;nbsp;You realise desktop applications can actually be containerised. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Eventually tools to facilitate easier and more manageable Docker life such as &lt;a href=&quot;http://fig.sh/&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline;&quot;&gt;Fig&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;, &lt;a href=&quot;http://panamax.io/&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline;&quot;&gt;Panamax&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;, &lt;a href=&quot;http://shipyard-project.com/&quot;&gt;Shipyard&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/%E2%80%9D%3C/span&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://github.com/progrium/dokku&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline;&quot;&gt;Dokku&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;, etc. are maybe among your toolset.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline;&quot;&gt;Docker addiction step 6. Ubiquitous&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;By now all your core applications are run/runnable inside a container. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;They link to databases, message queues, 3rd party adapters, and other smaller applications that are all also inside containers.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Your testing environments, staging environments, production environment, development environment and REPL are all running inside containers. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;When you create a new application or touch an old legacy application your first step is to write a Dockerfile and containerise the application. You design applications and processes from the ground up to be containerised. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;This is what I call CDD - Container Driven Development.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline;&quot;&gt;Possibly by now you are convinced everything belongs inside a container, so a better name is perhaps CDL- Container Driven Life.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://flurdy.blogspot.com/2014/11/dockerise-it-all-containerised-addiction.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-6183025665759370368</guid><pubDate>Fri, 08 Nov 2013 16:46:00 +0000</pubDate><atom:updated>2013-11-09T21:31:12.372+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">productivity</category><title>Pair with people you like and code reviews with people you don&#39;t like</title><description>Pair with people you like and code reviews with people you don&#39;t like (misquoted from someone way smarter than me).&lt;br /&gt;
&lt;br /&gt;
That sums it up very well for how I feel about both practices.&lt;br /&gt;
&lt;br /&gt;
With large teams, especially if distributed or partially outsourced, code reviews can ensure code quality and are quite essential. It will allow you to share some knowledge and instill best practices. It will be a reminder for people that their code will be viewed by others so don’t take shortcuts.&lt;br /&gt;
&lt;br /&gt;
However code review can also be a total bottleneck if over-bureaucratic. It will add an overhead for all work. If there are some high and mighty gate keepers that will stop you from pushing your code frequently then you have a complete velocity block. If your code is shit then fair enough, but if it is merely nit picking or just disagreements between styles then it is very costly. If however if any compulsory reviewer is not in your office, country, time zone or just very busy then that adds a large delay in the feedback loop.&lt;br /&gt;
&lt;br /&gt;
Another issue with code reviews is that quite a few reviews are of low quality due to lack of context. They do not necessarily know all the discussions, history of why a piece of code works this way, project code style, etc. Especially if they are of the tainted ivory tower architect affliction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In smaller, agile and especially collocated teams code reviews will flag issue unnecessarily late in the process. Just pair from the start instead to ensure no short cuts or dodgy code slips through, and automatically spread the knowledge. If you do not trust two of your developers combined then you do have a serious problem.&lt;br /&gt;
&lt;br /&gt;
You can though in addition have small and short swarming/tripling/quadrupling sessions in front of 1 computer to look at especially important issues when they are worked on, not afterwards.&lt;br /&gt;
&lt;br /&gt;
If you do neither code reviews nor pairing then you are in trouble.&lt;br /&gt;
&lt;br /&gt;
Expanded from my own Hacker News comment &lt;a href=&quot;https://news.ycombinator.com/item?id=6693064&quot;&gt;https://news.ycombinator.com/item?id=6693064&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://flurdy.blogspot.com/2013/11/code-review-with-people-you-dont-like.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-712283526571068431</guid><pubDate>Sat, 31 Aug 2013 12:00:00 +0000</pubDate><atom:updated>2013-09-01T12:49:44.385+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">productivity</category><title>One button - The aim - Nearly there</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;An aim for a development team (and company) is to achieve one button deploys of your applications to all environment. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;By achieving that it involves several solutions which in total results several direct and indirect benefits for the company. Benefits such as:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Quicker releases of new features&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Frequent releases of new features&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Quick and painless rollback of unwanted releases&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Reliable release process&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Confidence in testing in different environments&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Reduced risk in deployments&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Predictable roadmaps with more stable velocities&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Less context switching for ops and developers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Developer time focused on delivering features instead of on processes&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;I joined as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Lead_programmer&quot;&gt;Tech Lead&lt;/a&gt; at my current company last year. Since then my team, or more appropriately our fantastic&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt; Ops/Devops, Tools as well as other teams, have &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;in a year made great strides towards One button deploys. We are more or less there and the company is rewarded more and more with the benefits mentioned above. We have &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;achieved this by doing the following since last year:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Move to &lt;a href=&quot;http://git-scm.org/&quot;&gt;Git&lt;/a&gt; and internally hosted repository server&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;a href=&quot;http://subversion.apache.org/&quot;&gt;Subversion&lt;/a&gt; was once great but no longer. Whilst we used &lt;a href=&quot;http://viget.com/extend/effectively-using-git-with-subversion&quot;&gt;git-svn&lt;/a&gt; for a while, we eventually fully moved all applications’ source code to Git. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;With the addition of first &lt;a href=&quot;https://www.atlassian.com/software/stash/overview&quot;&gt;Stash&lt;/a&gt; then &lt;a href=&quot;http://gitlab.org/&quot;&gt;GitLab&lt;/a&gt; we removed a lot of bottlenecks, restrictions and frustrations. Code could be easily referenced without having to check out. Collaboration via &lt;a href=&quot;https://help.github.com/articles/using-pull-requests&quot;&gt;Pull requests&lt;/a&gt; for code bases you may not be comfortable with. &lt;a href=&quot;https://en.wikipedia.org/wiki/Code_review&quot;&gt;Code review&lt;/a&gt; when needed. &lt;a href=&quot;https://help.github.com/articles/fork-a-repo&quot;&gt;Forking&lt;/a&gt; and creating new projects became instant. Project discovery and general code share became very very easy.  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;External configuration and one binary&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The main applications in my team used to use &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://maven.apache.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;Maven&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;a href=&quot;https://maven.apache.org/guides/introduction/introduction-to-profiles.html&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;profiles&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt; to build separate binaries for each environment. This was because the configuration was baked in via Maven &lt;/span&gt;&lt;a href=&quot;https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;filters&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;This is not great for QA sign off as you basically have different binaries. It also slows down deployment as you have to rebuild the binary all the time. It definitely makes it difficult to rollback releases or investigate older releases as you have to rebuild an older version from scratch. And it makes it very fragile as each machine might build it differently (different &lt;a href=&quot;https://en.wikipedia.org/wiki/Java_Development_Kit&quot;&gt;JDK&lt;/a&gt;, broken&lt;a href=&quot;https://maven.apache.org/guides/introduction/introduction-to-repositories.html&quot;&gt; local Maven repositories&lt;/a&gt;, etc)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Moving to external configuration meant we had one binary that gets promoted through all environment. The one binary gets upload to the repository manager (initially &lt;a href=&quot;http://www.sonatype.org/nexus/&quot;&gt;Nexus&lt;/a&gt; then later &lt;a href=&quot;http://www.jfrog.com/home/v_artifactory_opensource_overview&quot;&gt;Artifactory&lt;/a&gt;). This binary is then downloaded as part of every deploy job. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Changing configuration is a configuration change and no change to the binary. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Configuration in source control and rolled out with Puppet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;With external configuration we enhanced reliability by adding these configurations into source control. This also meant configuration change became very easy. Push changes for the environment to Git and it was then automatically sync and rollout via &lt;a href=&quot;http://puppetlabs.com/&quot;&gt;Puppet&lt;/a&gt;. This removed a very annoying and typo prone bottleneck.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Production configuration changes are not activated automatically but are rolled out via a single command.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Process automation, Teamcityfy everything...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;We aimed to automate as many processes as possible. Our &lt;a href=&quot;http://www.martinfowler.com/articles/continuousIntegration.html&quot;&gt;continuous integration&lt;/a&gt; server, &lt;a href=&quot;https://www.jetbrains.com/teamcity/&quot;&gt;TeamCity&lt;/a&gt;, have a number of automated builds and a whole range of manual jobs. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Testing and building a binary automatically on every check in. Automatic deployment to development servers on successful builds. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button jobs to deploy that binary to other environments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to tag a release&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to push release binaries to environments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to create bugfix branch&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to rebuild databases&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to migrate database schemas&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to restart servers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to test 3rd party APIs and environments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to run acceptance tests&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to smoke test environments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;one button to trigger load tests (&lt;/span&gt;&lt;a href=&quot;http://gatling-tool.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;Gatling&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;We did use &lt;a href=&quot;http://www.fabfile.org/&quot;&gt;Fabric&lt;/a&gt; directly for deploy tasks but Fabric is now triggered from within TeamCity jobs. &lt;a href=&quot;https://github.com/etsy/deployinator&quot;&gt;Deployinator&lt;/a&gt; was nice but we phased it out in preference for all deploys in TeamCity for every environment.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Test separation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;There was already an extensive &lt;a href=&quot;http://junit.org/&quot;&gt;JUnit&lt;/a&gt; suite of tests in the applications my team was responsible for. However they were a mix of &lt;a href=&quot;https://en.wikipedia.org/wiki/Integration_testing&quot;&gt;integration tests&lt;/a&gt; masquerading as &lt;a href=&quot;https://en.wikipedia.org/wiki/Unit_testing&quot;&gt;unit tests&lt;/a&gt; which slowed down development and feedback loops.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;We relabeled unit test that required frameworks (&lt;a href=&quot;http://www.springsource.org/&quot;&gt;Spring&lt;/a&gt;, &lt;a href=&quot;http://www.hibernate.org/&quot;&gt;Hibernate&lt;/a&gt;, etc) or databases as integration tests instead. That reduced our feedback loop time. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;We added separate verification builds for just integration test. We separated and migrated 3rd party test to 3rd party libraries. We added stand alone acceptance and smoke tests using &lt;a href=&quot;https://github.com/cucumber/cucumber-jvm&quot;&gt;Cucumber&lt;/a&gt;, &lt;a href=&quot;https://github.com/etorreborre/specs2&quot;&gt;Specs2&lt;/a&gt; and &lt;a href=&quot;http://www.seleniumhq.org/&quot;&gt;Selenium&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Test data&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;We wrote command line and web applications with &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt; and &lt;a href=&quot;http://spray.io/&quot;&gt;Spray&lt;/a&gt; that quickly create test data and tools that review test data. This sped up development testing and proper QA testing. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;&lt;b&gt;3rd party mock applications&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Mocking out 3rd party systems or even some internal systems entirely by creating test harness applications in integration environments that pretend to be those systems have speeded up our QA process a lot.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Removed restrictions&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Restricting who can commit, run certain jobs or see certain data might sound like a sensible option, but in reality it slows down collaboration. We decided we just trust the majority more than we distrust a minority.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;A great benefit was that we opened up all Git repositories to everyone. Anyone can commit, although people less involved in a project prefer to use Pull requests. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Team City jobs can be run by anyone. There is an audit trail, but there has never been an issue of anyone ran a job they should not have. It is a great help if people are in meetings or similar that anyone can push code out to the next environment for example.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Production data for some applications due to &lt;a href=&quot;https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard&quot;&gt;PCI&lt;/a&gt; and &lt;a href=&quot;https://www.gov.uk/government/organisations/disclosure-and-barring-service&quot;&gt;CRB&lt;/a&gt; restrictions, production credentials and some production jobs for our critical applications are still restricted but we try to minimise this as well.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Feature toggles&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Whilst it is a good practice to keep these toggles to a minimum, adding &lt;a href=&quot;http://martinfowler.com/bliki/FeatureToggle.html&quot;&gt;feature toggles&lt;/a&gt; that can be overridden via external configuration has been a good change. We can now quickly disable broken new features. We can &lt;a href=&quot;http://www.informit.com/articles/article.aspx?p=1833567&amp;amp;seqNum=2&quot;&gt;dark release&lt;/a&gt; features or we can &lt;a href=&quot;http://www.infoq.com/news/2013/03/canary-release-improve-quality&quot;&gt;canary release&lt;/a&gt; features, then via Git &amp;amp; Puppet enable the feature and it becomes available for all.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Content migration tools&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Instead of applying content directly and manually as SQL scripts, or scp/ftp/rsync we started writing tools in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.playframework.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;Play!&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt; to help create data sets of new content, then promote those through environment, cross checking which environment the data is in. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Adding scripts that interact with 3rd party portals was also helpful.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;This avoid typos, avoids forgetting to run a script in an environment. And greatly speeds up data migration.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;Database migration&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Many of our applications use &lt;a href=&quot;https://en.wikipedia.org/wiki/NoSQL&quot;&gt;NoSQL&lt;/a&gt; solutions such as &lt;/span&gt;&lt;a href=&quot;https://cassandra.apache.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Cassandra&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; and &lt;/span&gt;&lt;a href=&quot;http://redis.io/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Redis&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; as some of our flows have to handle millions of interactions, but the core data are still mostly in &lt;/span&gt;&lt;a href=&quot;http://www.postgresql.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;PostgreSQL&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Whilst we use &lt;a href=&quot;http://flywaydb.org/&quot;&gt;Flyway&lt;/a&gt; and &lt;a href=&quot;https://github.com/tackley/dbdeploy&quot;&gt;DBDeploy&lt;/a&gt; to migrate those database schemas and stub data to some environments, we do not use it all the way to production. This is one area we need to improve.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Environment creation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 15px; line-height: 1.15;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;One element that is important and which our Ops team is just starting to roll out is an internal &lt;a href=&quot;https://en.wikipedia.org/wiki/Platform_as_a_service&quot;&gt;PAAS&lt;/a&gt;/&lt;a href=&quot;https://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29&quot;&gt;IAAS&lt;/a&gt; solution. One button to create a new VM environment or one button to create a database, &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS&lt;/a&gt; SQS queue etc. Further enhancements, such as one button to clone an existing VM or database will be nice.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;color: black; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;No button&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Obviously there were other enhancements that is not really related to &quot;One button&quot;, such as phasing out old legacy &lt;a href=&quot;http://www.oracle.com/technetwork/java/index.html&quot;&gt;Java&lt;/a&gt; applications with newer &lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt; applications by applying &lt;a href=&quot;http://martinfowler.com/bliki/StranglerApplication.html&quot;&gt;Strangler Application pattern&lt;/a&gt;, replacing &lt;a href=&quot;http://quartz-scheduler.org/&quot;&gt;Quartz&lt;/a&gt; based batch jobs with &lt;a href=&quot;http://akka.io/&quot;&gt;Akka&lt;/a&gt; and &lt;a href=&quot;https://camel.apache.org/index.html&quot;&gt;Camel&lt;/a&gt;, measuring new features effect with &lt;a href=&quot;https://en.wikipedia.org/wiki/A/B_testing&quot;&gt;AB testing&lt;/a&gt;, monitor applications metrics with &lt;a href=&quot;http://graphite.wikidot.com/&quot;&gt;Graphite&lt;/a&gt;, log analysis via &lt;a href=&quot;http://logstash.net/&quot;&gt;Logstash&lt;/a&gt;, etc.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Company profitability&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;All these combined has made certain part of our development and release process so easy and quick. I am sure we have covertly increased the profitability of our company as we now can release quicker, more frequently, with less broken releases or bugs in general.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;Future&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;We still have a lot of work to do. As mentioned we are not quite there with DB migration and Environment creation. We are experimenting with using &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.vagrantup.com/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;Vagrant&lt;/a&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt; locally and promoting to environments, &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://zookeeper.apache.org/&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;ZooKeeper&lt;/a&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt; for better configuration change without downtime, etc. Eventually we may &lt;/span&gt;&lt;span style=&quot;font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;achieve&lt;/span&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt; most of the ideas behind &lt;/span&gt;&lt;span style=&quot;font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Continuous_delivery&quot;&gt;Continuous&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Continuous_delivery&quot;&gt; Delivery&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://flurdy.blogspot.com/2013/08/one-button-aim-nearly-there.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-8878855087806403497</guid><pubDate>Wed, 30 Jan 2013 18:08:00 +0000</pubDate><atom:updated>2013-01-30T18:10:28.707+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">git</category><category domain="http://www.blogger.com/atom/ns#">heroku</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">play</category><title>Heroku commands &amp; tips</title><description>&lt;br /&gt;
I wrote a quick &lt;a href=&quot;http://flurdy.com/docs/heroku/tips.html&quot;&gt;howto of Heroku commands and tips&lt;/a&gt; I use all the time.&lt;br /&gt;
&lt;br /&gt;
It covers creating instances, configurations, common add-ons such as databases &amp;amp; email, deployment strategies and more.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the document I tend to have multiple applications per project, so I always append &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;--remote staging &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;for example, resulting in this long deploy command:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;git push staging master &amp;amp;&amp;amp; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;heroku logs -t --remote staging; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;heroku open --remote staging &amp;amp;&amp;amp; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;heroku logs -t --remote staging&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;For the eagle eyed you will have noticed the &quot;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&quot; which means as the log tailing never really finishes, when you notice the app is up and running you have to manually end it with control+c to proceed with opening up a browser.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Obviously these commands ties nicely into my use of &lt;a href=&quot;http://www.playframework.com/&quot;&gt;Play&lt;/a&gt; on &lt;a href=&quot;http://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt; and the &lt;a href=&quot;http://flurdy.com/docs/herokuplay/play2.html&quot;&gt;howtos I wrote on integrating both&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
They are perhaps obvious commands and basic but I hope they are of use to some people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://flurdy.blogspot.com/2013/01/heroku-commands-tips.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-6030687003925407990</guid><pubDate>Wed, 23 May 2012 01:09:00 +0000</pubDate><atom:updated>2012-06-06T12:27:27.444+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">email</category><category domain="http://www.blogger.com/atom/ns#">heroku</category><category domain="http://www.blogger.com/atom/ns#">play</category><category domain="http://www.blogger.com/atom/ns#">playframework</category><category domain="http://www.blogger.com/atom/ns#">scala</category><title>Send email via SendGrid on Heroku using Play! 2.0 with Scala</title><description>If you have a &lt;a href=&quot;http://www.playframework.org/&quot;&gt;Play! framework 2.0&lt;/a&gt; application that you want to send email from, here are a few tips.&lt;br /&gt;
&lt;br /&gt;
These tips assumes you deploy to &lt;a href=&quot;http://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt;, but other platforms should work&amp;nbsp;similarly. The examples here are using &lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt;, but Java should work along similar lines. Finally the specifics are for the &lt;a href=&quot;http://sendgrid.com/&quot;&gt;SendGrid&lt;/a&gt; &lt;a href=&quot;https://addons.heroku.com/sendgrid&quot;&gt;add-on&lt;/a&gt; for Heroku, but other mail server providers should be fine.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First add the free option of the SendGrid add-on to your Heroku app by typing in:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;heroku addons:add sendgrid:starter&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Then configure your Play! app to use the &lt;a href=&quot;https://github.com/typesafehub/play-plugins/tree/master/mailer&quot;&gt;mail plugin&lt;/a&gt; provided by &lt;a href=&quot;http://typesafe.com/&quot;&gt;Typesafe&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
Add to your dependencies in the &lt;i&gt;project/Build.scala&lt;/i&gt;&amp;nbsp;file: (all on one line)&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&quot;com.typesafe&quot; %% &quot;play-plugins-mailer&quot; % &quot;&lt;i&gt;2.0.2&lt;/i&gt;&quot;&lt;/code&gt;&lt;/blockquote&gt;
Then create and add these to a&amp;nbsp;&lt;i&gt;conf/play.plugins&lt;/i&gt; file:&amp;nbsp;(all on one line)&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;1500:com.typesafe.plugin.CommonsMailerPlugin&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Next configure the mail server settings. You can either add these directly to your &lt;i&gt;conf/application.conf&lt;/i&gt;&amp;nbsp;file, but I prefer to share my &lt;a href=&quot;https://github.com/flurdy&quot;&gt;projects&#39; source code&lt;/a&gt;, so my production settings are set via &lt;a href=&quot;https://devcenter.heroku.com/articles/config-vars&quot;&gt;environment variables&lt;/a&gt;&amp;nbsp;so that my username/password are not&amp;nbsp;publicly&amp;nbsp;available.&lt;br /&gt;
&lt;br /&gt;
However for the plugin to run &lt;i&gt;smpt.host &lt;/i&gt;&amp;nbsp;must be present. Open &lt;i&gt;conf/application.conf&lt;/i&gt;&amp;nbsp;and add:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;smtp.host=mock&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
On Heroku I append the settings to the Heroku&#39;s propriatory &lt;a href=&quot;https://devcenter.heroku.com/articles/procfile&quot;&gt;&lt;i&gt;Procfile&lt;/i&gt;&lt;/a&gt; file. I append these settings to the &lt;i&gt;Procfile&amp;nbsp;&lt;/i&gt;to use SendGrid&#39;s servers:&amp;nbsp;(all on one line)&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;-Dsmtp.host=smtp.sendgrid.net -Dsmtp.port=587 -Dsmtp.ssl=yes&amp;nbsp;-Dsmtp.user=$SENDGRID_USERNAME -Dsmtp.password=$SENDGRID_PASSWORD&lt;/code&gt;&lt;/blockquote&gt;
You may already have other settings in the &lt;i&gt;Procfile,&lt;/i&gt;&amp;nbsp;e.g. database URL, so be aware of the &lt;a href=&quot;http://stackoverflow.com/questions/10676667/play-2-0-scala-heroku-instance-isnt-seeing-every-variable-in-the-procfile/10746180#10746180&quot;&gt;255 char limit&lt;/a&gt;, and use a custom properties file instead.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;web: target/start -Dhttp.port=${PORT}&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;-Dconfig.resource=heroku-prod.conf&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The SendGrid add-on should create the environment&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;SENDGRID_USERNAME&lt;/span&gt; and &lt;span style=&quot;font-family: monospace;&quot;&gt;SENDGRID_PASSWORD&lt;/span&gt;&amp;nbsp;variables for you.&lt;br /&gt;
You can verify this with:

&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;heroku config&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Finally we then create our actual application code to send email:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;package notifiers&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;import com.typesafe.plugin._&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;import play.api.Play.current&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;import play.api.Play&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;import play.Logger&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;object EmailNotifier {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; def sendMail&lt;/span&gt;&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; val mail = use[MailerPlugin].email&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; mail.setSubject(&quot;Mail test&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; mail.addRecipient(&quot;Joe Smith &amp;nbsp;&amp;lt;joe@example.com&amp;gt;&quot;,&quot;sue@example.com&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; mail.addFrom(&quot;Jon Doe &amp;lt;joe@example.com&amp;gt;&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; mail.send( &quot;Test email&quot; )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; def sendTestMail {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;if(Play.current.mode == Mode.Prod){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Play.current.configuration.getString(&quot;smtp.host&quot;) match {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case None =&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;Logger.debug(&quot;Email mock&quot;)&lt;/span&gt;&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Some(&quot;mock&quot;) =&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;Logger.debug(&quot;Email mock&quot;)&lt;/span&gt;&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case _ =&amp;gt; sendMail(participant)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Logger.debug(&quot;Email mock&quot;)}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
(In case of this posts cant parse tags replace &lt;i&gt;&amp;amp;lt;&lt;/i&gt;&amp;nbsp;&lt;i&gt;&amp;nbsp;&lt;/i&gt;and&lt;i&gt;&amp;nbsp;&amp;amp;gt;&lt;/i&gt;&amp;nbsp;with&lt;i&gt; &lt;/i&gt;less than and greater than tags&lt;i&gt;;&lt;/i&gt;)&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should be all that is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Play! 1.x did have a handy mock email interface for development and testing. I will try and find a suitable replacement for 2.0 and update this post when I do.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Play! 2.0:&amp;nbsp;&lt;a href=&quot;http://www.playframework.org/&quot;&gt;http://www.playframework.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Play! 2.0 docs:&amp;nbsp;&lt;a href=&quot;https://github.com/playframework/Play20/wiki&quot;&gt;https://github.com/playframework/Play20/wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Heroku and SendGrid:&amp;nbsp;&lt;a href=&quot;https://devcenter.heroku.com/articles/sendgrid&quot;&gt;https://devcenter.heroku.com/articles/sendgrid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Mail plugin for Play! 2.0:&amp;nbsp;&lt;a href=&quot;https://github.com/typesafehub/play-plugins/tree/master/mailer&quot;&gt;https://github.com/typesafehub/play-plugins/tree/master/mailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Heroku environment variables:&amp;nbsp;&lt;a href=&quot;https://devcenter.heroku.com/articles/config-vars&quot;&gt;https://devcenter.heroku.com/articles/config-vars&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://flurdy.blogspot.com/2012/05/send-email-via-sendgrid-on-heroku-using.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total><georss:featurename>Alton, Hampshire County GU34, UK</georss:featurename><georss:point>51.152970524556935 -0.98499298095703125</georss:point><georss:box>48.647481024556932 -6.0387039809570311 53.658460024556938 4.0687180190429686</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-4654603325080049217</guid><pubDate>Sun, 22 Apr 2012 15:18:00 +0000</pubDate><atom:updated>2012-04-22T16:22:51.844+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">bash</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">play</category><title>Play! 1 &amp; 2 command tip</title><description>&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you love the &lt;a href=&quot;http://www.playframework.org/&quot;&gt;Play! Framework&lt;/a&gt;, you might be like me and have both version 1.x and 2.x installed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;Version 1.x, in my case 1.2.4, is a well&amp;nbsp;established&amp;nbsp;feature rich stable version.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Version 2.x, in my case 2.0, is a new radically different version, that is still in its&amp;nbsp;infancy&amp;nbsp;but released.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You might have both installed as you have older projects using 1.x and new in development projects using 2.x, or similar.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;With both version the norm is to install them and expose the main executable as &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;play&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So how do you differentiate between which version to use for which project?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;OK, it is no rocket science but here is a quick tip on how I do it:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;I have Play! 1.x installed in&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; /usr/local/lib/play-&lt;i&gt;1.2.4&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I have Play! 2.x installed in&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; /usr/local/lib/play-&lt;i&gt;2.0&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You &lt;/span&gt;&lt;i style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;can&lt;/i&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; add either play folders to the your &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;PATH&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, e.g. in&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; /etc/environment:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;PATH=&quot;blahblabh:/usr/local/lib/play-&lt;i&gt;2.0&lt;/i&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;But I simple add them to my &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;.bash_aliases &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;file:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;alias play1=&quot;/usr/local/lib/play1/play&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;alias play2=&quot;/usr/local/lib/play2/play&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;On top of that I symlink this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$:&amp;nbsp;cd /usr/local/lib;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$:&amp;nbsp;sudo ln -s play-&lt;i&gt;1.2.4&lt;/i&gt; play1;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;$:&amp;nbsp;sudo ln -s play-&lt;i&gt;2.0&lt;/i&gt; play2&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;With this setup I have to make a&amp;nbsp;conscious&amp;nbsp;decision whether to run Play! 1 or 2, and can switch between the two very easily.&lt;/span&gt;&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$: play1 help;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$: play2 help&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://flurdy.blogspot.com/2012/04/play-1-2-command-tip.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-8601425684312589007</guid><pubDate>Wed, 22 Feb 2012 12:34:00 +0000</pubDate><atom:updated>2012-02-22T12:49:12.821+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">git</category><title>Clone local git repository to remote server?</title><description>If you have a local repository that you want to clone/copy to a remote server here is how I do it. &lt;br /&gt;&lt;br /&gt;Perhaps you have been scaffolding, testing and initial silver bullet development and have realised the project is mature enough to share with others. Or you just want it backed up remotely. &lt;br /&gt;&lt;br /&gt;Simple &lt;code&gt;git clone &lt;i&gt;local&lt;/i&gt; &lt;i&gt;remote&lt;/i&gt;&lt;/code&gt; do not work. Destination path for git clone is always local.&lt;br /&gt;&lt;br /&gt;What you need to do is on the remote server create a bare git repository:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;remoteserver$ mkdir -p &lt;i&gt;/var/local/repos/myproject&lt;/i&gt;;&lt;br /&gt;remoteserver$ cd &lt;i&gt;/var/local/repos/myproject&lt;/i&gt;;&lt;br /&gt;remoteserver$ git init --bare;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then add this remote to your local git repository:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;localmachine$ git remote add &lt;i&gt;origin&lt;/i&gt; \&lt;br /&gt;ssh://&lt;i&gt;remoteserver.example.com/var/local/repos/myproject&lt;/i&gt;;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now every time you want to push to your remote server, you do a normal push:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;localmachine$ git push &lt;i&gt;origin&lt;/i&gt; master;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Although I would seriously consider using something &lt;a href=&quot;http://github.com&quot;&gt;github&lt;/a&gt; or &lt;a href=&quot;http://gitorious.com/local_install/&quot;&gt;gitorious&lt;/a&gt; instead of your own server.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://flurdy.blogspot.com/2012/02/clone-local-git-repository-to-remote.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-4666548794367765876</guid><pubDate>Mon, 13 Feb 2012 00:55:00 +0000</pubDate><atom:updated>2012-02-13T01:23:17.495+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">agile</category><category domain="http://www.blogger.com/atom/ns#">architecture</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">productiviy</category><title>Continuous Deployment via Stack Overflow</title><description>I do have an interest in &lt;a href=&quot;http://radar.oreilly.com/2009/03/continuous-deployment-5-eas.html&quot;&gt;Continuous Deployment&lt;/a&gt;/&lt;a href=&quot;http://continuousdelivery.com&quot;&gt;Continuous Delivery&lt;/a&gt;. Continuous Deployment goes beyond &lt;a href=&quot;http://en.wikipedia.org/wiki/Continuous_integration&quot;&gt;Continuous Integration&lt;/a&gt; and automatically deploys builds to production all the time, not once in awhile. It goes well with agile thinking. &lt;br /&gt;&lt;br /&gt;With frequent deployments the delta that can go wrong is very small, the feedback is very quick and the knowledge is fresh and active with the developers so fix turnarounds are immediate. By relying heavily on automated integration testing and DevOps that provide automated deployment the result is quick and painless.&lt;br /&gt;&lt;br /&gt;This week &lt;a href=&quot;http://stackoverflow.com/questions/9214884/how-do-you-continuously-deploy-a-large-system-consisting-of-several-applications/9215354#9215354&quot;&gt;I answered&lt;/a&gt; a difficult question on &lt;a href=&quot;http://stackoverflow.com&quot;&gt;Stack Overflow&lt;/a&gt;. The question by Emwee was for advice on  &lt;a href=&quot;http://stackoverflow.com/questions/9214884/how-do-you-continuously-deploy-a-large-system-consisting-of-several-applications&quot;&gt;how to use Continuous Deployment with  multitude of inter-dependant systems&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;It is a tricky question and I did not have an exact answer.  &lt;a href=&quot;http://stackoverflow.com/questions/9214884/how-do-you-continuously-deploy-a-large-system-consisting-of-several-applications/9215354#9215354&quot;&gt;My answer&lt;/a&gt; was more along the line of how to facilitate an easier deployment by making the dependency and coupling looser and roll-outs smoother.&lt;br /&gt;&lt;br /&gt;I referred to &lt;a href=&quot;http://en.wikipedia.org/wiki/Duck_typing&quot;&gt;Duck Typing&lt;/a&gt;, &lt;a href=&quot;http://martinfowler.com/bliki/FeatureToggle.html&quot;&gt;Feature toggles&lt;/a&gt;, evolution scripts, &lt;a href=&quot;http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/&quot;&gt;version tables&lt;/a&gt;, symlink stage &amp; deploy, and referenced a &lt;a href=&quot;http://news.ycombinator.com/item?id=411282&quot;&gt;Hacker News discussion on how Amazon deploys their systems&lt;/a&gt;, a &lt;a href=&quot;http://vimeo.com/28795465&quot;&gt;video on how Netflix builds releases in the cloud&lt;/a&gt; and &lt;a href=&quot;http://timothyfitz.wordpress.com/2009/02/10/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day/&quot;&gt;how at IMVU they deploy 50 times a day&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I also referred to &lt;a href=&quot;http://www.amazon.com/gp/product/0321601912/ref=as_li_ss_tl?ie=UTF8&amp;tag=flurdy-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321601912&quot;&gt;Humble and Farley&#39;s book on Continuous Delivery&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;There was another reply as well by EricMinick referring to &lt;a href=&quot;http://stackoverflow.com/questions/9105459/best-practice-for-continuous-integration-and-deployment/9117914#9117914&quot;&gt;his previous answer&lt;/a&gt; to a &lt;a href=&quot;http://stackoverflow.com/questions/9105459/best-practice-for-continuous-integration-and-deployment&quot;&gt;similar question&lt;/a&gt;. Eric does in detail describe scenarios of using promotion builds into different isolated test environments and suggest solutions that his company &lt;a href=&quot;htttp://urbancode.com&quot;&gt;UrbanCode&lt;/a&gt; provides in relation with Jenkins.&lt;br /&gt;&lt;br /&gt;In the end Continuous Deployment is a great evolution. But with large enterprises you need to keep your tongue straight. But it is worth the investment.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;</description><link>http://flurdy.blogspot.com/2012/02/continuous-deployment-answer-on-stack.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-7334711237265722459</guid><pubDate>Tue, 17 Jan 2012 16:14:00 +0000</pubDate><atom:updated>2012-01-17T20:02:38.059+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">apache</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">protest</category><category domain="http://www.blogger.com/atom/ns#">sopa</category><title>SOPA protest page and 503 redirect</title><description>Tomorrow, 18t January 2012, many websites &lt;a href=&quot;http://sopastrike.com/&quot;&gt;will protest&lt;/a&gt; against the US &lt;a href=&quot;http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act&quot;&gt;SOPA&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/PROTECT_IP_Act&quot;&gt;PIPA&lt;/a&gt; acts. For example &lt;a href=&quot;http://en.wikipedia.org/wiki&quot;&gt;Wikipedia&lt;/a&gt; will &lt;a href=&quot;http://wikimediafoundation.org/wiki/English_Wikipedia_anti-SOPA_blackout&quot;&gt;go blank in protest&lt;/a&gt; for 24 hours.&lt;br /&gt;&lt;br /&gt;For those intending to blackout their own websites (or in the future intend to do something similar, e.g. a more practical &quot;web site temporarily down message&quot; while doing an upgrade etc, here are a few tips:&lt;br /&gt;&lt;br /&gt;First of all Google recommend you do not simple just change your website front page to a blank page or similar. As this can have repercussions on your SEO, ie your search ranking. Read more about it in &lt;a href=&quot;https://plus.google.com/115984868678744352358/posts/Gas8vjZ5fmB&quot;&gt;this post on Google+ by a Googler&lt;/a&gt;. They recommend a 503 error response instead. Which indicates the site is temporarily down.&lt;br /&gt;&lt;br /&gt;So a simple change of index.html is not recommended. Nor is a simple redirect in the html&#39;s meta header, nor a plain http 302 redirect. All this can affect your ranking.&lt;br /&gt;&lt;br /&gt;I recommend (if using &lt;a href=&quot;http://httpd.apache.org&quot;&gt;Apache 2&lt;/a&gt;) to use &lt;a href=&quot;http://httpd.apache.org/docs/current/mod/mod_rewrite.html&quot;&gt;mod_rewrite&lt;/a&gt; in this manner:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;RewriteEngine on&lt;br /&gt;RewriteCond %{ENV:REDIRECT_STATUS} !=503&lt;br /&gt;Alias /stop-sopa &lt;i&gt;/var/www/stop-sopa&lt;/i&gt;&lt;br /&gt;ErrorDocument 503 /stop-sopa/index.html&lt;br /&gt;RewriteRule !^s/stop-sopa$ /stop-sopa [L,R=503]&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This uses &lt;b&gt;Alias&lt;/b&gt; to another folder so that the same message can be used for several virtual hosts. It uses a custom &lt;b&gt;ErrorDocument&lt;/b&gt; to display a human readable blackout page. And it uses &lt;b&gt;RewriteRule&lt;/b&gt; to redirect all requests to the &lt;b&gt;stop-sopa&lt;/b&gt; page (except for request for &lt;b&gt;/stop-sopa&lt;/b&gt; so that you don&#39;t get an infinite loop).&lt;br /&gt;&lt;br /&gt;If you are looking for a page to use as the blackout page, there is a nice &lt;a href=&quot;https://github.com/zachstronaut/stop-sopa&quot;&gt;github project page for just that&lt;/a&gt;. An example can be &lt;a href=&quot;http://www.zachstronaut.com/lab/text-shadow-box/stop-sopa.html&quot;&gt;viewed here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;</description><link>http://flurdy.blogspot.com/2012/01/sopa-protest-page-and-503-redirect.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-1962401108445920377</guid><pubDate>Wed, 11 Jan 2012 17:35:00 +0000</pubDate><atom:updated>2012-01-11T18:10:15.006+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">intellij</category><category domain="http://www.blogger.com/atom/ns#">play</category><title>Play! 2.0 in IntelliJ IDEA</title><description>Play! Framework 1.x supported creating an IntelliJ IDEA project by the command: &lt;code&gt;play idealize&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;However while Play! Framework 2.0 is in beta that command does not work**.&lt;br /&gt;&lt;br /&gt;So how do you get your Play! 2.0 project to open in IntelliJ IDEA? There are few different work arounds. Especially regarding integrating &lt;b&gt;sbt&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;However I have a quick way. For this to work you need both Play! 2.0 and Play! 1.2.x installed.&lt;br /&gt;&lt;br /&gt;Create Play! 2.0 project: &lt;br /&gt;&lt;code&gt;&lt;i&gt;/usr/local/lib/play-2.0-beta&lt;/i&gt;/play new helloworld&lt;/code&gt;&lt;br /&gt;(I am assuming it was a Java project that you chose)&lt;br /&gt;&lt;br /&gt;Rename project folder:&lt;br /&gt;&lt;code&gt;mv helloworld helloworld2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Create Play! 1.x project: &lt;br /&gt;&lt;code&gt;&lt;i&gt;/usr/local/lib/play-1.2.4&lt;/i&gt;/play new helloworld&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Create IntelliJ project: &lt;br /&gt;&lt;code&gt;cd helloworld; &lt;br /&gt;&lt;i&gt;/usr/local/lib/play-1.2.4&lt;/i&gt;/play idealize&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Move IntelliJ files to Play! 2.0 project: &lt;br /&gt;&lt;code&gt;cd ..; &lt;br /&gt;mv helloworld/helloworld.i* helloworld2/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Remove 1.x project and rename 2.0 folder: &lt;br /&gt;&lt;code&gt;rm -rf helloworld; &lt;br /&gt;mv helloworld2 helloworld&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now you can open IntelliJ and then go to file/open project, then find and open helloworld/helloworld.ipr.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There will be some issues such as libraries etc but this a good start. For further tips try &lt;a href=&quot;http://jetbrains.dzone.com/articles/configuring-intellij-idea&quot;&gt;these suggestions&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;** As of 11th of January 2012 it is not present in Play! 2.0. I fully expect Play! to create an &lt;i&gt;idealize&lt;/i&gt;, &lt;i&gt;eclipsify&lt;/i&gt;, &lt;i&gt;netbeansify&lt;/i&gt; etc as soon as 2.0 is stable.</description><link>http://flurdy.blogspot.com/2012/01/play-20-in-intellij-idea.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-4975075462179067859</guid><pubDate>Wed, 16 Nov 2011 12:16:00 +0000</pubDate><atom:updated>2011-11-23T18:52:48.027+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">agile</category><category domain="http://www.blogger.com/atom/ns#">architecture</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">legacy</category><category domain="http://www.blogger.com/atom/ns#">systems</category><title>Do not rewrite</title><description>&lt;b&gt;Just don’t do it&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Instead evolve&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Many (99.99%) of developers continually insist that whichever application they work on needs a rewrite. As in scratch everything, redesign the architecture and technology choices and rewrite every component because the current choice and state is not ideal. I used to feel and say this as well.&lt;br /&gt;&lt;br /&gt;Any code I have written (and even worse if written by others) which I need to update/maintain will look bad after only 6 months. After 2 years it smells of bad architecture design and logic. After 5 years the code base feels like a mess, totally unmaintainable. &lt;br /&gt;&lt;br /&gt;This is slightly because technology has moved on, and my skills or rather preferences have evolved.  But it is mostly due to that over time any application has been updated due to bug fixes and new features, and the maintainance might have been handed over to other people several times, with different skill level or understanding of the architecture. This bloats the code structure and exceeds what the original and probably quite tidy structure was intended for.&lt;br /&gt;&lt;br /&gt;Any further maintenance is more and more costly as it takes longer and/or more people to make any changes to the application. And any innovation is muffled as inspiration is dampened. &lt;br /&gt;&lt;br /&gt;Many companies makes a good living when other companies outsources the costly maintenance of these systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I used to feel the need to rewrite in every new assignment but not anymore. My advice now is: &lt;b&gt;Please do not rewrite&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why are rewrites a bad idea?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;No value&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you undertake a rewrite of your core application it will be very costly for your business, with no initial return on investment. Take 6 -12 months of pure losses and in the end the customer (internal or external) has not received any extra value. Most likely they will have less features as scope was reduced, but rarely any new features. Future performance gains and maintainability is a plus but not of value there and then. So it is a huge hit on fragile budgets or even liquidity of smaller companies, with little to no benefit.&lt;br /&gt;&lt;br /&gt;This is the main reason not to rewrite, the business side gains nothing from it, it is a pure expense. Any reasonable business person would not approve it. And any future relationship will quite likely be very damaged.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Never finishing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another risk is that the rewrite takes too long and either never really finishes or is cancelled. Making it an expensive task with no value now nor in the future.&lt;br /&gt;&lt;br /&gt;Also rewrites that span a long time usually suffers from that the decisions made at the beginning start to look outdated and wrong before it is even in production and before any future value is gained.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Evolve&lt;/h3&gt;&lt;br /&gt;However I do not mean you should not evolve your application. Do not keep status quo either. If it is an important core application, you should evolve it, but not perform a total rewrite.&lt;br /&gt;&lt;br /&gt;Instead do it in smaller steps while adding value and features for the customer. This way your product is cleaner and up to date, but the business side does not take a huge hit. This is also much more predictable and less volatile. Which make is less likely the project will be cancelled or worse for smaller companies which could go bankrupt.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do you go about evolving and not rewriting? This very much depends on your type of application. &lt;br /&gt;&lt;br /&gt;(If it is a tiny application, go ahead rewrite it. Just make sure the dependant systems are aware of this).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Refactor&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;On a minor level, continual process of refactoring, with larger refactoring a frequent acceptable task. This should slow down code rot, postponing the need for larger changes a while.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Modularisation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Eventually your application will need a drastic change. If by chance your original design was quite modular or less coupled with other systems you made evolving smoother. If not, try to modularise your current design.&lt;br /&gt;&lt;br /&gt;By being modular you can still perform rewrites, but on much smaller scale, taking one module at the time. So that it is not a 12 months loss, but perhaps 1 month loss. While normal work on other modules can still continue. Much less likely to kill your project/company.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Parallel systems&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Instead of a hard one day switch over from the old system to the new system, instead run two systems in parallel for awhile, the old legacy system and the new clean system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Skinny interface adapter layer&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If modularised or not, a cleaner way to evolve and replace sections of your application is to introduce an adapter layer for your interface, and keeping it skinny.&lt;br /&gt;&lt;br /&gt;This interface adapter only relays between your system/application and other systems. When other systems only talk via the adapter you are free to change your system without affecting external systems. &lt;br /&gt;&lt;br /&gt;More importantly you can now split your system into two systems and relay certain calls to the new system instead of the old, without external systems are aware nor affected by this.&lt;br /&gt;&lt;br /&gt;The adapter layer is not always possible, or people are resistant to introduce yet another layer/system, but it really makes your much more adaptable in changing your own architecture, you can move elements to a new system and roll back without external costs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;No logic in adapter layer&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Do not ever put any logic in interface adapter. Otherwise you end up with yet another system to maintain. Unfortunately this happens quite often when bad planning and management leads to shortcuts which adds logic in the adapter layer. And then you have just multiplied your maintenance costs. And believe me that logic is then rarely temporary.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ESB&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Do not interpret this adapter layer requirement as a reason for introducing an &lt;a href=&quot;http://en.wikipedia.org/wiki/Enterprise_service_bus&quot;&gt;ESB&lt;/a&gt;. ESB tend to just camouflage the spaghetti integration code, and often introduce above mention unwanted logic. However if you already have an ESB in place it can perform the adapter layer requirement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Legacy system becomes adapter layer&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another method implementing the adapter layer is to use the existing system to relay calls to the new system instead of handling them themselves. Internally in the existing legacy system you have to do this anyway on each element migrated to the new system, so you can also allow external system to do this. &lt;br /&gt;&lt;br /&gt;It is however cleaner to have a separate adapter layer. This will be easier to maintain as probably designed on newer technology and platforms. And allows you switch off the legacy system when you can. But also makes so less likely for people to just decide to use the legacy system instead.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Topic / feature&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;An even better rewrite strategy/evolution than per module is per topic / feature. This is an even smaller grained change and less risky. As part of more agile strategies you can move one feature at the time to the new clean system. &lt;br /&gt;&lt;br /&gt;With an adapter layer this switching is smooth, but not restricted to an adapter layer. Without the adapter you just have more administration of changing every dependant system for each feature moved.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://martinfowler.com/bliki/FeatureToggle.html&quot;&gt;Feature toggles&lt;/a&gt; might be part of this strategy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;New feature -&gt; new system&lt;br /&gt;Update feature -&gt; new system&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Every new feature request is naturally going to be implemented on the new system. But a good method of choosing which existing features to move is choosing a feature which there is a requirement to modify. Then not touch it on the old system but instead rewrite and update it on the new system. This is then a good carrot/stick way to ensure the migration is performed. And ensures that the company receive some value for each rewrite.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Do not update old(legacy) system/application&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another very important rule is not to update the old legacy system at all when each feature/module is migrated off it.  It is so tempting to make a shortcut and update both system as perhaps you have not introduced an adapter layer or instructed enough external systems to use the new system. This will kill your migration/rewrite.&lt;br /&gt;&lt;br /&gt;For this step the leadership of your team needs to be firm about and insist on. Do not end up maintaining two systems (or 3 with the adapter layer).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ensure legacy system delegates&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The legacy system will undoubtedly internally refer to the rewritten and migrate module or feature. You need to ensure the legacy system now delegates internally to the new system. This is the only update you should do on the old system. Otherwise again you will need to maintain two systems, and run the risk of the legacy system and the new system executes slightly differently for the same task, leading to people insisting on using the legacy system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Kill the legacy system&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You need to plan and ensure the old system is eventually switched off. Otherwise you will still need to keep people and skills on how to maintain that system. It may be tempting and erroneously to leave some elements behind that should be on the new architecture.&lt;br /&gt;&lt;br /&gt;There may be some elements not needed on new system or unrelated that is left on the old system.  But probably better to even move these to another new system than keep the old system lying around and increasing the cost of maintaining that small element as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Kill the adapter layer?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once you killed the legacy system, do you want to keep the adapter layer? Keep in mind you might want to move on from the new system when it starts to rot as well. However it may be tidier and less complicated to kill the adapter layer as well. I would kill it and if needed in the future reintroduce it instead.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Do not stop half way&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If for some reason the migration to a new system is stopped, either due to reprioritisation, lack of progress etc, then you are stuck with maintaining not 1 but 3 systems. Many companies end up burned by this and is mostly down to not strong enough leadership/management.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So my point is to rewrite small topics/features then modules, but never the whole application. This way value is introduced along the way without a budgetary black hole.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Many, but some from former colleague &lt;a href=&quot;http://www.f12.no&quot;&gt;Anders Sveen&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;</description><link>http://flurdy.blogspot.com/2011/11/do-not-rewrite.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-2449186793446020974</guid><pubDate>Tue, 30 Aug 2011 09:59:00 +0000</pubDate><atom:updated>2011-08-30T17:42:47.776+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">java</category><title>Null is okay</title><description>Most of the bugs that you find or are reported to you in java applications are &lt;a href=”http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html”&gt;NullPointerExceptions&lt;/a&gt; &lt;sup&gt;&lt;a href=”http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception”&gt;[1]&lt;/a&gt;&lt;/sup&gt;. NPE are rife in the beginning of a product’s life cycle, and they never go away.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The consequences are bug fixing which checks if:&lt;ul&gt;&lt;li&gt;input is null&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if interface calls return null&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if method calls return null&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if properties and collections are null&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;So this original pizza ordering method: &lt;br /&gt;&lt;code&gt;public void orderPizza(PizzaOrder pizzaOrder){&lt;br /&gt;&amp;nbsp;&amp;nbsp;for( Pizza pizza : pizzaOrder.getPizzas()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;kitchen.makePizza(pizza);&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Morphs into this:&lt;br /&gt;&lt;code&gt;public void orderPizza(PizzaOrder pizzaOrder){&lt;br /&gt;&amp;nbsp;&amp;nbsp;if( pizzaOrder != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( pizzaOrder.getPizzas() != null ||&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Collection.isEmpty(pizzaOrder.getPizzas())) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( kitchen != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for( Pizza pizza : pizzaOrder.getPizzas()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( pizza != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;kitchen.makePizza(pizza);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw PizzeriaTechnicalException(“No pizza!!!”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw PizzeriaTechnicalException(“No kitchen!!!”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw PizzeriaTechnicalException(“No pizzas in order!!!”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw PizzeriaTechnicalException(“No pizza order!!!”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;(Or alternativly many “assert pizzaOrder != null” that are useless in production)&lt;br /&gt;&lt;br /&gt;Madness, and very messy. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Blinkered coding standard&lt;/b&gt;:&lt;br /&gt;This happens when code ownership is not clear, when desire for clean code is not existant, when fixing bugs with blinkers on.&lt;br /&gt;When developers are time constrained or scared of changing code.&lt;br /&gt;When development is outsourced but authority and knowledge is not, so refactoring is avoided or not part of SLA.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Why are we so afraid of NullPointerExceptions? &lt;br /&gt;What is wrong with null?&lt;/h3&gt;&lt;br /&gt;Null is okay. Null is exactly that. Don&#39;t avoid it like the plague, but try to not pass the problem to others. Tidy up your gateway interfaces, trust internally null does not happen. If it does then don&#39;t hide the problem.&lt;br /&gt;&lt;br /&gt;Do not check for null inside you application. Check for null on your edges: &lt;br /&gt;&lt;br /&gt;Validate user interface inputs. “Users” are always causing trouble, but we can not live without customers. Validate the essentials, but remember duck walking, don’t scare your customers with perfection validation. &lt;br /&gt;&lt;br /&gt;Validate external 3rd party api interfaces. Probably validate internal api interfaces. Remember duck walking. If an internal system quite close to your application erroneously passes null values, fix that system instead. It is a gray zone however so some null pointer validation is fine. Just don’t complicate your system because of the laziness of another within your team/company.&lt;br /&gt;&lt;br /&gt;Do not validate calls between your applications layers. Trust the edges has validated the data. Use unit tests to ensure integrity. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Dealing with NPE/Null?&lt;/h3&gt;&lt;br /&gt;If you encounter a Null or anything resembling empty when not possible etc: throw a NullPointerException. Don’t sugar coat and masquerade it as something else. An NPE is an NPE! It says what it is on the tin! It is easily understood by all developers, and easily traced. Obviously don’t show that to the end user, but don’t catch it too far down your stack.&lt;br /&gt;&lt;br /&gt;If you get bug report about an NPE. Fix the edge validation, factory generation or inside the api call. Do not add a “== null“ condition inside your application. &lt;br /&gt;&lt;br /&gt;It is easier to avoid internal NPE by not passing external DTO and domain objects through your own application. If you act on it, it should be your applications objects, not an external one. This avoids complicated null pointer validation.&lt;br /&gt;&lt;br /&gt;“Clean Code” book suggest “specific case object” for method calls that may previously return null. I am not a big fan, but it may solve internal api NPEs. I definitely support the pattern of returning empty collections in find* calls instead of null when nothing was found.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How would I deal with Null in the Pizza Order scenario?&lt;br /&gt;&lt;br /&gt;PizzaOrder object should be validated beforehand in the interface layer. It is not the responsibility of this method.&lt;br /&gt;&lt;br /&gt;Same layer before this method should call a factory method that sets pizzas collection to an empty collection if no pizzas.&lt;br /&gt;&lt;br /&gt;Kitchen is always injected or constructed externally to this method and not its responsibility. &lt;br /&gt;&lt;br /&gt;Factories in mapping/creating the PizzaOrder before this method call should also ensure no Pizza objects are Null.&lt;br /&gt;&lt;br /&gt;The one possible valid check is if there are any pizzas in the order. The &lt;code&gt;Collection.isEmpty(pizzaOrder.getPizzas())&lt;/code&gt; But it is not a null pointer check, as previous interfaces/factories will ensure a collection object exists. However the interface or application before this method call should probably have validated the actual order, to ensure an order contains pizzas!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So Null is okay and NullPointerException can be your friend.&lt;br /&gt;</description><link>http://flurdy.blogspot.com/2011/08/null-is-okay.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-2071201673987971223</guid><pubDate>Wed, 26 Jan 2011 09:48:00 +0000</pubDate><atom:updated>2011-01-26T12:15:15.046+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">hibernate</category><category domain="http://www.blogger.com/atom/ns#">hsqldb</category><category domain="http://www.blogger.com/atom/ns#">jetty</category><category domain="http://www.blogger.com/atom/ns#">maven</category><category domain="http://www.blogger.com/atom/ns#">sql</category><category domain="http://www.blogger.com/atom/ns#">sqlmaven</category><title>Create, populate and reset a dynamic database (HSQLDB,Hibernate,SQLMaven,DbUnit)</title><description>Thought I&#39;d jot down how I create, populate and reset databases for development and testing. I use this method in my &lt;a href=&quot;http://www.java.com/en/&quot;&gt;Java&lt;/a&gt; based pet projects such as &lt;a href=&quot;http://code.flurdy.com/grid/snaps/&quot;&gt;Snaps&lt;/a&gt; &lt;sup&gt;&lt;a href=&quot;http://grid.flurdy.com/snaps&quot;&gt;[app]&lt;/a&gt;&lt;a href=&quot;https://github.com/flurdy/snaps&quot;&gt;[code]&lt;/a&gt;&lt;/sup&gt; and &lt;a href=&quot;http://wishlist.sourceforge.net/&quot;&gt;Wishlist&lt;/a&gt; &lt;sup&gt;&lt;a href=&quot;http://grid.flurdy.com/wishlist&quot;&gt;[app]&lt;/a&gt;&lt;a href=&quot;http://wishlist.hg.sourceforge.net/hgweb/wishlist/&quot;&gt;[code]&lt;/a&gt;&lt;/sup&gt;. I also include this setup as default in my &lt;a href=&quot;https://github.com/flurdy/WebAppTemplate&quot;&gt;project template&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My projects are &lt;a href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; based, using &lt;a href=&quot;http://www.eclipse.org/jetty/&quot;&gt;Jetty&lt;/a&gt; as java container through its &lt;a href=&quot;http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin&quot;&gt;maven plugin&lt;/a&gt;. In addition I also use &lt;a href=&quot;http://www.zeroturnaround.com/jrebel/&quot;&gt;JRebel&lt;/a&gt;, &lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA&lt;/a&gt; and &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;, a setup I described in &lt;a href=&quot;http://flurdy.com/docs/intellij/&quot;&gt;this howto: Ubuntu + IntelliJ + Maven + Jetty + JRebel&lt;/a&gt;, but none of these are required.&lt;br /&gt;&lt;br /&gt;This setup is enables a fluid, &lt;a href=&quot;http://brettporter.wordpress.com/2006/01/11/developing-with-jetty-where-have-you-been-all-my-life/&quot;&gt;very dynamic and quick development&lt;/a&gt; process. In addition I then use the in memory database &lt;a href=&quot;http://hsqldb.org/&quot;&gt;HSQLDB&lt;/a&gt; for quick and standalone database interaction.&lt;br /&gt;&lt;br /&gt;Using &lt;a href=&quot;http://en.wikipedia.org/wiki/Java_Persistence_API&quot;&gt;JPA&lt;/a&gt;/&lt;a href=&quot;http://www.hibernate.org/&quot;&gt;Hibernate&lt;/a&gt; with hsqldb, my tables can be created automatically when I start Jetty. However in developement and testing I prefer to have some default data pre populated. &lt;br /&gt;&lt;br /&gt;This is where &lt;a href=&quot;http://www.dbunit.org/&quot;&gt;DbUnit&lt;/a&gt; comes in to play. With DBunit&#39;s &lt;a href=&quot;http://mojo.codehaus.org/dbunit-maven-plugin/&quot;&gt;maven plugin&lt;/a&gt; I can export my current data and populate future databases with the same data. As it is all easy to read XML I can edit manually the basic stub data as well. &lt;br /&gt;&lt;br /&gt;However DbUnit can not create the database as it is run before jetty:run action, so I use the &lt;a href=&quot;http://mojo.codehaus.org/sql-maven-plugin/&quot;&gt;SQL-Maven&lt;/a&gt; plugin for this purpose. Again SQL Maven needs to know what tables to create, so I use the &lt;a href=&quot;http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/&quot;&gt;Maven Hibernate3 Plugin&lt;/a&gt; to export a schema from the JPA annotations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This combination allows me to: &lt;ol&gt;&lt;br /&gt;&lt;li&gt;Check out my project anywhere&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create and populate the database with stub data with one command.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run the application via jetty&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Test the application straight away&lt;/li&gt;&lt;br /&gt;&lt;li&gt;or develop dynamically with instant feedback&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;How to set up Hibernate, SQLMaven and DbUnit plugins&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Prerequisites/assumptions&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Java&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Maven&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Jetty (can be &lt;a href=&quot;http://tomcat.apache.org&quot;&gt;tomcat&lt;/a&gt; &lt;a href=&quot;http://mojo.codehaus.org/tomcat-maven-plugin/&quot;&gt;maven plugin&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;JPA annotations&lt;/li&gt;&lt;br /&gt;&lt;li&gt;HSQLDB (using file based hsqldb persistance to survive restarts)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;JPA annotations -&gt; Schema: Hibernate&lt;/h4&gt;&lt;br /&gt;To export the JPA annotations into a database schema we include the Maven Hibernate3 Plugin in your pom.xml. This is quite a long plugin section as it defines a few dependencies which otherwise may be overriden by the plugin and lead to problems &lt;a href=&quot;http://blog.flurdy.com/2010/07/orghibernatemappingexception-could-not.html&quot;&gt;like this mapping exception&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;profile&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;id&amp;gt;hbm-export&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate3-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;executions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;execution&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;phase&amp;gt;process-classes&amp;lt;/phase&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;goals&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;goal&amp;gt;hbm2ddl&amp;lt;/goal&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/goals&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/execution&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;components&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;component&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;hbm2ddl&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;implementation&amp;gt;jpaconfiguration&amp;lt;/implementation&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/component&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/components&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;componentProperties&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;persistenceunit&amp;gt;${project.artifactId}&amp;lt;/persistenceunit&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;outputfilename&amp;gt;schema.ddl&amp;lt;/outputfilename&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;drop&amp;gt;false&amp;lt;/drop&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;create&amp;gt;true&amp;lt;/create&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;export&amp;gt;false&amp;lt;/export&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;format&amp;gt;true&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/componentProperties&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;hsqldb&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hsqldb&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hsqldb.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-entitymanager&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-annotations&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependencies&amp;gt;                        &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;/profile&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To run the schema creation action on its own:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -DskipTests&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    -P hbm-export compile hibernate3:hbm2ddl;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note: We need to compile the JPA classes so that the plugin can extract annotation information from them.&lt;br /&gt;&lt;br /&gt;Note2: that Hibernate/Red Hat have a bad track record of including &lt;a href=&quot;http://stackoverflow.com/questions/1230249/how-can-i-use-maven-to-get-the-latest-hibernate-release&quot;&gt;their plugins and releases properly in maven central repository&lt;/a&gt;, so you might either want to adjust your dependeinces and repositories accordingly. Or you can use &lt;a href=&quot;http://code.flurdy.com/nexus/&quot;&gt;my proxy repository&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;repositories&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;repository&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;id&amp;gt;code-flurdy-repo&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;code@flurdy repository&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;http://code.flurdy.com/nexus/content/groups/noncentral&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/repository&amp;gt;&lt;br /&gt;&amp;lt;/repositories&amp;gt;&lt;br /&gt;&amp;lt;pluginRepositories&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;pluginRepository&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;id&amp;gt;code-flurdy-repo&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;code@flurdy repository&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;http://code.flurdy.com/nexus/content/groups/noncentral&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;&amp;lt;/pluginRepositories&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Please if your project is popular do not use my repo as it will explode my &lt;a href=&quot;http://aws.amazon.com&quot;&gt;ec2/S3&lt;/a&gt; data bandwidth usage!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Schema -&gt; Database: SQLMaven&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;To create your database from this schema with SQL-Maven, add this to you pom.xml&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;profile&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;id&amp;gt;sqlmaven&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;sql-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;1.3&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;hsqldb&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hsqldb&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hsqldb.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;driver&amp;gt;${db.driverClassName}&amp;lt;/driver&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;${db.url}&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;username&amp;gt;${db.username}&amp;lt;/username&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;password&amp;gt;${db.password}&amp;lt;/password&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;autocommit&amp;gt;true&amp;lt;/autocommit&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;srcFiles&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;srcFile&amp;gt;target/hibernate3/sql/schema.ddl&amp;lt;/srcFile&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/srcFiles&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;/profile&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To run the database creation action on its own:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -DskipTests -P sqlmaven sql:execute;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Database population: DbUnit&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;To populate your database via DbUnit, add this to you pom.xml&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;profile&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;id&amp;gt;dbunit&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;dbunit-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;1.0-beta-3&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;hsqldb&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hsqldb&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hsqldb.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dataTypeFactoryName&amp;gt;org.dbunit.ext.hsqldb.HsqldbDataTypeFactory&amp;lt;/dataTypeFactoryName&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;jdbc:hsqldb:file:${project.basedir}/target/db/build;shutdown=true&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;driver&amp;gt;org.hsqldb.jdbcDriver&amp;lt;/driver&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;username&amp;gt;sa&amp;lt;/username&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;password&amp;gt;&amp;lt;/password&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;type&amp;gt;CLEAN_INSERT&amp;lt;/type&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;src&amp;gt;src/test/data/stub.xml&amp;lt;/src&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;/profile&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;First you need data to export. I suggest you run jetty:run action and add/use the application to create data in the database. Eg.: Register a user, create default domain objects, or whatever your application uses.&lt;br /&gt;&lt;br /&gt;You then stop the application and export the data created:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -DskipTests -P dbunit dbunit:export;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;These are by default exported to target/dbunit/export.xml.&lt;br /&gt;&lt;br /&gt;These are a good base data. You may try and adjust and extend this file if you like, but be aware that you might brake it, so prehaps try unadjusted initially.&lt;br /&gt;&lt;br /&gt;Copy the export file to test/data so that it can be part of your source control etc. You may have noticed I already included the test/data as a src element in the plugin.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cp target/dbunit/export.xml test/data/stub.xml;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Run the database population action (remember to have a new clean database):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -DskipTests -P dbunit dbunit:operation;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example configuration of all these plugins can be found in this project&#39;s &lt;a href=&quot;https://github.com/flurdy/WebAppTemplate/blob/master/pom.xml&quot;&gt;pom.xml&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Combined&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Above are the basic steps. These I then aggregate into a couple of common one liners:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Create database&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -o -DskipTests&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    -P hbm-export,sqlmaven&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    compile hibernate3:hbm2ddl sql:execute;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;b&gt;Create and populate database&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -o -DskipTests&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    -P hbm-export,sqlmaven,dbunit&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    compile hibernate3:hbm2ddl&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    sql:execute dbunit:operation;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;b&gt;Reset database&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rm -rf target/db;&lt;br/&gt;&lt;br /&gt;mvn -o -DskipTests&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    -P hbm-export,sqlmaven,dbunit&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    compile hibernate3:hbm2ddl&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    sql:execute dbunit:operation;&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;b&gt;Clean, rebuild database and run jetty&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mvn -o -DskipTests&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    -P hbm-export,sqlmaven,dbunit&amp;nbsp;\&lt;br/&gt;&lt;br /&gt;    clean compile hibernate3:hbm2ddl&amp;nbsp;\&lt;br/&gt;&lt;br /&gt; sql:execute dbunit:operation jetty:run;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As you can see these one liners can be quite long so I again wrap these into bash scripts that I put in a &lt;a href=&quot;https://github.com/flurdy/WebAppTemplate/tree/master/bin&quot;&gt;bin folder&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can extend this further to include these plugins as enabled by default and the maven goals as part of your other goals: E.g. include hbm:export and sqlmaven as part of install or test command or dbunit:operation with the jetty:run command, so that they are totally automatic. However I prefer a bit more control of when my data is reset etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;With these plugins I can in one command create and populate my database, so that my app is up and running with data very quickly. Hope this is of use to others.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;</description><link>http://flurdy.blogspot.com/2011/01/create-populate-and-reset-dynamic.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-7750252787558044293</guid><pubDate>Thu, 06 Jan 2011 19:01:00 +0000</pubDate><atom:updated>2011-01-07T18:35:35.961+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">chrome</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">google</category><category domain="http://www.blogger.com/atom/ns#">infoq</category><category domain="http://www.blogger.com/atom/ns#">script</category><title>InfoQ Presentation Video Enlarger</title><description>I like &lt;a href=&quot;http://www.infoq.com&quot;&gt;Infoq&lt;/a&gt;, and especially their presentations.&lt;br /&gt;&lt;br /&gt;These presentation page has 3 elements: &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Top left: One small video showing the person presenting&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Top right: One  small window describing the presentation and presenters&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Bottom: One large window showing the actual presentation slide&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;This layout works very well, and basically shows you what you need.&lt;br /&gt;&lt;br /&gt;But...&lt;br /&gt;&lt;br /&gt;The window is a bit small (320x240), especially on larger resolutions screens. Especially when the presenter also shows some code, which is usually shown in the video window.&lt;br /&gt;&lt;br /&gt;So I wrote a little &lt;a href=&quot;http://www.chromium.org/developers/design-documents/user-scripts&quot;&gt;user script&lt;/a&gt; which enlarges this video window (480x320).&lt;br /&gt;This script is only for the &lt;a href=&quot;http://www.google.com/chrome&quot;&gt;Google Chrome browser&lt;/a&gt;. A similar &lt;a href=&quot;http://www.mozilla.com&quot;&gt;Firefox&lt;/a&gt; based &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/748/&quot;&gt;GreaseMonkey script&lt;/a&gt; should be easy to convert.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;To install click on my&lt;br/&gt; &lt;a href=&quot;http://www.ivar.co.uk/cargo/infoq-enlarge-presentation.chrome.user.js&quot;&gt;InfoQ Presentation Video Enlarger user script&lt;/a&gt; available at &lt;br/&gt;&lt;a href=&quot;http://www.ivar.co.uk/cargo/infoq-enlarge-presentation.chrome.user.js&quot;&gt;www.ivar.co.uk/cargo/infoq-enlarge-presentation.chrome.user.js&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;You can download and look at the js in a text editor first.It really is a very small and easy to understand script.&lt;br /&gt;&lt;br /&gt;Anyone can contribute changes if desired.</description><link>http://flurdy.blogspot.com/2011/01/infoq-presentation-video-enlarger.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-5425043300411990787</guid><pubDate>Tue, 19 Oct 2010 17:23:00 +0000</pubDate><atom:updated>2010-10-19T18:38:39.609+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">api</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">flickr</category><category domain="http://www.blogger.com/atom/ns#">picasa</category><category domain="http://www.blogger.com/atom/ns#">spring</category><category domain="http://www.blogger.com/atom/ns#">xml</category><title>Accessing Picasa&#39;s atom feed API from Spring&#39;s REST and XPath templates</title><description>Been swearing at my screen and Google&#39;s choice of atom based API for their &lt;a href=&quot;http://picasaweb.google.com&quot;&gt;Picasa web albums&lt;/a&gt;. &lt;a href=&quot;http://www.flickr.com/&quot;&gt;Flickr&#39;s&lt;/a&gt; &lt;a href=&quot;http://www.flickr.com/services/api/&quot;&gt;REST API&lt;/a&gt; took 10 seconds to work out. Picasa: days...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My problem:&lt;br /&gt; &lt;br /&gt;Trying to parse album ids from &lt;a href=&quot;http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListAlbum&quot;&gt;Picasa&#39;s API&lt;/a&gt;: &lt;a href=&quot;http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListAlbum&quot;&gt;code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListAlbum&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Source picasaResponse = restTemplate.getForObject( albumsURL, Source.class, parameters );&lt;br/&gt;&lt;br /&gt;Jaxp13XPathTemplate xpathTemplate = new Jaxp13XPathTemplate();&lt;br/&gt;&lt;br /&gt;Collection albumIds = xpathTemplate.evaluate(&quot;//entry&quot;,&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;picasaResponse, new NodeMapper(){&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Object mapNode(Node node, int i) throws DOMException {&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Element album = (Element) node;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&quot;IN NODE ALBUM&quot;);&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;&lt;br /&gt;}&lt;br/&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This never worked. It should have I thought. Trying different combinations of &quot;/entry&quot;, &quot;/feed/entry&quot;, &quot;//atom:entry&quot;, &quot;/atom:feed/atom:entry&quot;, swapping with Jaxen, etc made no impact.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then after some googlebashing and soulsearching I solved the problem.&lt;br /&gt;&lt;br /&gt;The Xpath template needs a namespace to resolve the atom xml. So adding this solved the problem:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Source picasaResponse = restTemplate.getForObject( albumsURL, Source.class, parameters );&lt;br/&gt;&lt;br /&gt;Jaxp13XPathTemplate xpathTemplate = new Jaxp13XPathTemplate();&lt;br/&gt;&lt;br /&gt;Properties namespaces = new Properties();&lt;br/&gt;&lt;br /&gt;namespaces.setProperty(&quot;atom&quot;,&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;http://www.w3.org/2005/Atom&quot;);&lt;br/&gt;&lt;br /&gt;xpathTemplate.setNamespaces(namespaces);&lt;br/&gt;&lt;br /&gt;Collection albumIds = xpathTemplate.evaluate(&quot;//atom:entry&quot;,&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;picasaResponse, new NodeMapper(){&lt;br/&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Object mapNode(Node node, int i) throws DOMException {&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Element album = (Element) node;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&quot;IN NODE ALBUM&quot;);&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ps. code simplified and not using bean injection etc for clarity.&lt;/i&gt;</description><link>http://flurdy.blogspot.com/2010/10/accessing-picasas-atom-feed-api-from.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-6762134039677608507</guid><pubDate>Fri, 15 Oct 2010 08:25:00 +0000</pubDate><atom:updated>2010-10-15T09:47:17.237+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">communication</category><category domain="http://www.blogger.com/atom/ns#">enterprise</category><category domain="http://www.blogger.com/atom/ns#">im</category><category domain="http://www.blogger.com/atom/ns#">irc</category><category domain="http://www.blogger.com/atom/ns#">wave</category><title>Why IRC is essential for distributed teams</title><description>Realising more every day that IRC is essential for distributed teams.&lt;br /&gt;&lt;br /&gt;IMs (&lt;a href=&quot;http://messenger.msn.com&quot;&gt;MSN&lt;/a&gt;,  &lt;a href=&quot;http://talk.google.com&quot;&gt;Google Talk&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Microsoft_Lync_Server&quot;&gt;Communicator&lt;/a&gt;, etc), &lt;a href=&quot;http://www.skype.com&quot;&gt;Skype&lt;/a&gt; &amp; &lt;a href=&quot;http://office.microsoft.com/en-us/live-meeting/&quot;&gt;Live Meeting&lt;/a&gt; works well but is too sheltered, it is invitational only and time constrained.&lt;br /&gt;&lt;br /&gt;Email is recorded, too formal, noisy and too asynchronous/slow.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.yammer.com&quot;&gt;Yammer&lt;/a&gt; or &lt;a href=&quot;http://www.twitter.com&quot;&gt;Twitter&lt;/a&gt; is nice for distributing comments and discussions, but is too slow for actual problem solving.&lt;br /&gt;&lt;br /&gt;To keep teams up to date or solve problems together; a group chat is essential. &lt;br /&gt;&lt;br /&gt;For culture build and low barrier of interaction of an informal and not archived discussions; a group chat is essential. &lt;br /&gt;&lt;br /&gt;For &lt;a href=&quot;http://www.c2.com/cgi/wiki?RubberDucking&quot;&gt;rubber duck&lt;/a&gt; statements or help in minor but blocking issues that would be less likely to ask people directly; a group chat is helpful. &lt;br /&gt;&lt;br /&gt;For less direct interruptions than IMs or phone; a group chat message which people can respond to when suitable will improve productivity. &lt;br /&gt;&lt;br /&gt;Even for non distributed teams, IRC is an important productivity and culture tool. &lt;a href=&quot;http://agiletracksoftware.com/blog.html?id=7&quot;&gt;Continuous inconsiderate interruptions&lt;/a&gt; will kill productivity, while quick but asynchronous discussions smooth over the time requirements of the person asking and the person responding.&lt;br /&gt;&lt;br /&gt;Unfortunately IRC is just too ugly, too much unix/hacker impression, too old; for an enterprise / self important company to consider.&lt;br /&gt;&lt;br /&gt;Alternatives like the now discontinued &lt;a href=&quot;http://wave.google.com&quot;&gt;Google Wave&lt;/a&gt;, &lt;a href=&quot;http://37signals.com&quot;&gt;37signals&#39;s&lt;/a&gt; &lt;a href=&quot;http://campfirenow.com&quot;&gt;CampFire&lt;/a&gt; and others exist, but an internal IRC server does solve all these issues.</description><link>http://flurdy.blogspot.com/2010/10/why-irc-is-essential-for-distributed.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-4903119390460729875</guid><pubDate>Tue, 07 Sep 2010 12:48:00 +0000</pubDate><atom:updated>2010-09-07T14:01:36.683+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">book</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">groovy</category><category domain="http://www.blogger.com/atom/ns#">review</category><title>Review of Groovy for Domain-Specific Languages</title><description>I recently read the &lt;a href=&quot;https://www.packtpub.com/groovy-for-domain-specific-languages-dsl/book&quot;&gt;Groovy for Domain-Specific-Languages&lt;/a&gt; book by Fergal Dearle. The book essentially covers what &lt;a href=&quot;http://groovy.codehaus.org&quot;&gt;Groovy&lt;/a&gt; is, what &lt;a href=&quot;http://en.wikipedia.org/wiki/Domain-specific_language&quot;&gt;DSL&lt;/a&gt; is and how to apply Groovy to incorporate a DSL for your applications.&lt;br /&gt;&lt;br /&gt;After reading the book I have to agree that if you intend to create a DSL, which we basically do unintentionally all the time, then Groovy can fulfil these requirements with ease and simplicity.&lt;br /&gt;&lt;br /&gt;The book is a easy to read book with clear text, syntax and examples without being too thick and not seem a like a javadoc of information overload. It is rather quick to read through due to the nice flow. The layout do make it a nice reference for myself in the future as it is laid out clearly and contains a large variety of working examples. &lt;br /&gt;&lt;br /&gt;The book starts of with first explaining the concepts of what DSL is, what it means in terms of computer science history and how we already use them. &lt;br /&gt;&lt;br /&gt;It then goes on to explain in clear but complete detail what Groovy is and does. Actually these chapters are a good introduction to Groovy book in themselves. &lt;br /&gt;&lt;br /&gt;Dearle then procedes to explain the main technologies built on top or as part of Groovy such as the web framework: Grails, the Groovy Ant builder scripting tool: Gant, Groovy &amp; Grails ORM database mapper: Gorm, BDD frameworks and similar technologies. This it does in enough detail so that you have a good idea what they do and can experiment with yourself afterwards.&lt;br /&gt;&lt;br /&gt;The last half of the book Dearle then brings Groovy and the related technologies back into the DSL fold and explains why and how Groovy is excellent for DSL writing. E.g: Groovy’s dynamic nature, closures, or the multitude of “Builders” which basically are DSLs outright. &lt;br /&gt;&lt;br /&gt;These chapters of the book has a large set of basically Cook Book examples of Groovy DSL writing, builders and finishes with how to integrate Groovy with Spring, XML, Ant and existing Java applications.&lt;br /&gt;&lt;br /&gt;I was already aware of Groovy’s suitability as a DSL language, but I am now even more convinced of its power, ease and fit as a or rather the DSL. If you would like to have a peak at the book there is a &lt;a href=&quot;https://www.packtpub.com/sites/default/files/6903-chapter-7-building-a-builder.pdf&quot;&gt;free chapter&lt;/a&gt;, or why not buy the book? ( &lt;a href=&quot;http://www.amazon.co.uk/gp/product/184719690X?ie=UTF8&amp;tag=ivarssite-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=184719690X&quot;&gt;amazon.co.uk&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/gp/product/184719690X?ie=UTF8&amp;tag=flurdy-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=184719690X&quot;&gt;amazon.com&lt;/a&gt;, &lt;a href=&quot;https://www.packtpub.com/groovy-for-domain-specific-languages-dsl/book&quot;&gt;Packt&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;(Note: this book was also &lt;a href=&quot;http://books.slashdot.org/story/10/07/08/152236/Groovy-For-Domain-Specific-Languages?art_pos=3&quot;&gt;reviewed on slashdot&lt;/a&gt; this summer)</description><link>http://flurdy.blogspot.com/2010/09/review-of-groovy-for-domain-specific.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-7559410409556540379</guid><pubDate>Fri, 23 Jul 2010 13:06:00 +0000</pubDate><atom:updated>2010-07-23T14:52:42.956+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">mvc</category><category domain="http://www.blogger.com/atom/ns#">spring</category><title>Spring MVC ExceptionHandler needs to be in same class</title><description>Had a frustrating evening (&lt;a href=&quot;http://code.flurdy.com/grid/snaps&quot;&gt;pet project&lt;/a&gt;) trying to get &lt;a href=&quot;http://www.springsource.org&quot;&gt;Spring&lt;/a&gt; 3.0 MVC&#39;s annotation based  &lt;a href=&quot;http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/bind/annotation/ExceptionHandler.html&quot;&gt;exception handler&lt;/a&gt; to work.&lt;br /&gt;&lt;br /&gt;All the examples seemed straight forwards:&lt;br /&gt;&lt;br /&gt;Just annotate a method in a controller:&lt;br /&gt;&lt;code&gt;import org.springframe...ExceptionHandler;&lt;br /&gt;import org.springframe...ModelAndView;&lt;br /&gt;import org.springframe...Controller;&lt;br /&gt;....&lt;br /&gt;@Controller&lt;br /&gt;public class MyController {&lt;br /&gt;....&lt;br /&gt;@ExceptionHandler(SomeException.class)&lt;br /&gt;public ModelAndView myExceptionHandler(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SomeException exception){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;i&gt;blah&lt;/i&gt;&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;But it just would never catch my exceptions. Very frustrating.&lt;br /&gt;&lt;br /&gt;But in the end a google search to the end of the world where someone mentioned in the comments that the exceptionhandler method &lt;b&gt;have to be&lt;/b&gt; be in the &lt;b&gt;same class&lt;/b&gt; as the method throwing the exception.&lt;br /&gt;&lt;br /&gt;Very odd restriction compared to Spring&#39;s usual very agile and generic annotation.&lt;br /&gt;&lt;br /&gt;So I added my handlers to my abstract controller class that all my controllers extend and problem solved, with some hair still intact.</description><link>http://flurdy.blogspot.com/2010/07/spring-mvc-exceptionhandler-needs-to-be.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-6428540463726441830</guid><pubDate>Tue, 20 Jul 2010 22:11:00 +0000</pubDate><atom:updated>2010-07-21T09:21:48.381+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">error</category><category domain="http://www.blogger.com/atom/ns#">hibernate</category><category domain="http://www.blogger.com/atom/ns#">jpa</category><category domain="http://www.blogger.com/atom/ns#">maven</category><title>org.hibernate.MappingException: Could not determine type for Set / List</title><description>I was simplifying the &lt;a href=&quot; http://github.com/flurdy/snaps/blob/master/src/main/java/com/flurdy/grid/snaps/domain/SecurityDetail.java&quot;&gt;domain model&lt;/a&gt; of a &lt;a href=&quot;http://github.com/flurdy/snaps&quot;&gt;pet project&lt;/a&gt; by removing an unneccesarry entity by using JPA 2.0&#39;s &lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence/ElementCollection&quot;&gt;ElementCollection annotation&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;public class SecurityDetail {&lt;br /&gt;&lt;br /&gt;public enum AuthorityRole{&lt;br /&gt;&amp;nbsp;&amp;nbsp;ROLE_ADMIN,&lt;br /&gt;&amp;nbsp;&amp;nbsp;ROLE_SUPER,&lt;br /&gt;&amp;nbsp;&amp;nbsp;ROLE_USER&lt;br /&gt;}&lt;br /&gt;....&lt;br /&gt;@ElementCollection&lt;br /&gt;@CollectionTable(&lt;br /&gt;&amp;nbsp;&amp;nbsp;name=&quot;Authority&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;joinColumns=@JoinColumn(name=&quot;username&quot;)&lt;br /&gt;)&lt;br /&gt;private Set&lt;String&gt; authorities;&lt;br /&gt;....&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However I was getting this error message: &lt;br /&gt;&lt;code&gt;org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: SecurityDetail, for columns: [org.hibernate.mapping.Column(authorities)]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Digging around (googling) I ended up on this blog entry: &lt;a href=&quot;http://blog.m1key.me/2010/06/orghibernatemappingexception-could-not.html&quot;&gt;blog.m1key.me/2010/06/orghibernatemappingexception-could-not.html&lt;/a&gt;, which main solution is to make sure you have a newer hibernate, version 3.5.3 or later.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I use maven, with the hibernate3-maven-plugin, sql-maven-plugin and dbunit-maven-plugin to create the schema, database and to populate data. So I bumped the org.hibernate:hibernate-entitymanager dependency from 3.5.0 to 3.5.3-Final. (and fixed &lt;a href=&quot;http://code.flurdy.com/nexus&quot;&gt;my own nexus repository&lt;/a&gt; to pull JBoss&#39;s latest jars.)&lt;br /&gt;&lt;br /&gt;However it did not fix the problem. But by reading the comments of the blog entry above I also realised that my hibernate3-maven-plugin may be using older dependencies. So I explicitly added the recent verions of org.hibernate:hibernate-core dependency to both the plugin and the app, as well as org.hibernate:hibernate-entitymanager to the plugin as well:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;properties&amp;gt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;hibernate.version&amp;gt;3.5.3-Final&amp;lt;/hibernate.version&amp;gt&lt;br /&gt;&amp;lt;/properties&amp;gt&lt;br /&gt;....&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-entitymanager&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;....&lt;br /&gt;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate3-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;executions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;execution&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;phase&amp;gt;process-classes&amp;lt;/phase&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;goals&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;goal&amp;gt;hbm2ddl&amp;lt;/goal&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/goals&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/execution&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;components&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;component&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;hbm2ddl&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;implementation&amp;gt;jpaconfiguration&amp;lt;/implementation&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/component&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/components&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;componentProperties&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;persistenceunit&amp;gt;${project.artifactId}&amp;lt;/persistenceunit&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;outputfilename&amp;gt;schema.ddl&amp;lt;/outputfilename&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;drop&amp;gt;false&amp;lt;/drop&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;create&amp;gt;true&amp;lt;/create&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;export&amp;gt;false&amp;lt;/export&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;format&amp;gt;true&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/componentProperties&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;hsqldb&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hsqldb&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hsqldb.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-entitymanager&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;hibernate-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cglib&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;cglib&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;commons-logging&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;commons-logging&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependencies&amp;gt;                        &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;lt;/plugins&amp;gt&lt;/code&gt;</description><link>http://flurdy.blogspot.com/2010/07/orghibernatemappingexception-could-not.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-3613710093579129592</guid><pubDate>Fri, 16 Jul 2010 10:58:00 +0000</pubDate><atom:updated>2010-09-07T13:48:43.673+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">book</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">groovy</category><title>Groovy for DSL</title><description>Started reading through &lt;a href=&quot;https://www.packtpub.com/groovy-for-domain-specific-languages-dsl/book&quot;&gt;Groovy for Domain Specific Languages&lt;/a&gt;, a new book by Fergal Dearle. As I interested in how to apply &lt;a href=&quot;http://groovy.codehaus.org&quot;&gt;Groovy&lt;/a&gt; in more enterprise applications I would have normally liked to read this book, however I was also asked to write a review of the book, so Id better read it! How to keep DSLs easy to read while easy to create and maintain with Groovy will be something I hope this book covers.&lt;br /&gt;&lt;br /&gt;The book was also &lt;a href=&quot;http://books.slashdot.org/story/10/07/08/152236/Groovy-For-Domain-Specific-Languages?art_pos=3&quot;&gt;reviewed on slashdot&lt;/a&gt; recently.&lt;br /&gt;&lt;br /&gt;You can read the &lt;a href=&quot;https://www.packtpub.com/sites/default/files/6903-chapter-7-building-a-builder.pdf&quot;&gt;free chapter&lt;/a&gt; or buy the book yourself at e.g. &lt;a href=&quot;http://www.amazon.co.uk/gp/product/184719690X?ie=UTF8&amp;tag=ivarssite-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=184719690X&quot;&gt;amazon.co.uk&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/gp/product/184719690X?ie=UTF8&amp;tag=flurdy-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=184719690X&quot;&gt;amazon.com&lt;/a&gt; or &lt;a href=&quot;https://www.packtpub.com/groovy-for-domain-specific-languages-dsl/book&quot;&gt;Packt&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Any comments of others interested in Groovy, especially in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Domain-specific_language&quot;&gt;DSL&lt;/a&gt; area are very welcome?</description><link>http://flurdy.blogspot.com/2010/07/groovy-for-dsl.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4019909.post-7889270122972316781</guid><pubDate>Fri, 02 Jul 2010 08:53:00 +0000</pubDate><atom:updated>2010-07-02T13:02:55.028+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">maven</category><category domain="http://www.blogger.com/atom/ns#">war</category><title>Skinny WAR Assembly in maven</title><description>If you want to create a &lt;i&gt;&quot;Skinny WAR&quot;&lt;/i&gt; so that you can package it as part of an EAR or as in my case as part of an assembly later, then you can do this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  &amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;maven-war-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;2.1-beta-1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &amp;lt;packagingExcludes&amp;gt;WEB-INF/lib/*.jar&amp;lt;/packagingExcludes&amp;gt;      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &amp;lt;archive&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     &amp;lt;manifest&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       &amp;lt;addClasspath&amp;gt;true&amp;lt;/addClasspath&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       &amp;lt;classpathPrefix&amp;gt;lib/&amp;lt;/classpathPrefix&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     &amp;lt;/manifest&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &amp;lt;/archive&amp;gt;      &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;br /&gt;  &amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you then later in another pom.xml want to include this war and the excluded libraries:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;groupId&amp;gt;${project.groupId}&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;&lt;i&gt;you war module name&lt;/i&gt;&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;${project.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;type&amp;gt;war&amp;lt;/type&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt; &lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;groupId&amp;gt;${project.groupId}&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;&lt;i&gt;you war module name&lt;/i&gt;&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;${project.version}&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/code&gt;</description><link>http://flurdy.blogspot.com/2010/07/skinny-war-assembly-in-maven.html</link><author>noreply@blogger.com (flurdy)</author><thr:total>0</thr:total></item></channel></rss>