<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-1319685701804027745</id><updated>2026-10-11T23:39:27.427+01:00</updated><category term="mini-article"/><category term="teh codez"/><category term="stack overflow"/><category term="java"/><category term="rambling"/><category term="unit testing"/><category term="off topic"/><category term="oracle"/><category term="quickie"/><category term="rant"/><category term="bash"/><category term="c#"/><category term="devops"/><category term="junit"/><category term="sql"/><category term="Making Distributed Teams Work series"/><category term="Meme Deconstruction"/><category term="article"/><category term="cfssl"/><category term="client-side certificate"/><category term="crl"/><category term="distributed teams"/><category term="html"/><category term="ikvm"/><category term="ikvm.net"/><category term="integration tests"/><category term="mysql"/><category term="nginx"/><category term="ops"/><category term="random"/><category term="spark"/><category term="ssl"/><category term="word"/><category term=".net"/><category term="2 days of pain"/><category term="Apache POI"/><category term="CV"/><category term="Continuous Integration"/><category term="Dependency Injection"/><category term="Excel"/><category term="IO"/><category term="Meta programming"/><category term="OPL"/><category term="OpenOffice"/><category term="announcement"/><category term="apache fop"/><category term="board games"/><category term="cheat sheet"/><category term="convert"/><category term="cool"/><category term="dataframe"/><category term="dependency management"/><category term="deployment"/><category term="development"/><category term="digital estate"/><category term="documentation"/><category term="easymock"/><category term="feign"/><category term="freemarker"/><category term="from dot-plan"/><category term="get/set"/><category term="git"/><category term="github"/><category term="guice"/><category term="hudson"/><category term="jdbc"/><category term="jdbi"/><category term="jdc"/><category term="magic-procedures"/><category term="mock"/><category term="multiple instances"/><category term="mutator"/><category term="near shore"/><category term="not as long as I wanted"/><category term="office"/><category term="otn"/><category term="pda"/><category term="pmd"/><category term="psion"/><category term="quality street"/><category term="retrospective"/><category term="rtf"/><category term="screenshot"/><category term="scrum"/><category term="sed"/><category term="slacking off while looking like you are working"/><category term="store procedures"/><category term="user defined functions"/><category term="zombies"/><title type='text'>i haz teh codez</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-3138550303074134604</id><published>2026-02-13T06:45:00.001+00:00</published><updated>2026-02-13T06:45:11.309+00:00</updated><title type='text'> AI Thoughts </title><content type='html'>&lt;p&gt;From roughly December 2025, I’ve move to AI-first development, starting with just the AI chat in IntelliJ before moving to the Kiro CLI. The move to Kira was to trial working on multiple items at the same time. For example, fixing multiple renovate issues while also working on a feature. This quickly hit resources issues as running multiple Gradle builds as once was too much for the 16G LDD. The next bottleneck was me and being able to validate the work completed.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I suspect that knowing when to use AI and when to write code will be an important factor in Software Development going forward. AI (appropriately guarded) does small to medium sized features very well. However, it can spiral with very small features (such as one-liners). For example, I had a change which required adding an additional step to a boolean check. AI rewrote the service, pulling in more data that required and completely change the contract the method being called (thus leading to a large change footprint).&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My role as a developer will change drastically over the next few years. Development is no longer the primary activity. I’m a code reviewer and manual tester, which is a shame as that is not the parts of the work that I’m excited by.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My current recommendations:&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Read and understand the work required before asking AI to do it. If the work is simple, consider just doing it.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Be clear about your expectations for testing and static analysis.&amp;nbsp;&lt;/li&gt;&lt;li&gt;AI lies, so read what it is doing and engage your brain.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Consider how you deploy and test. AI enables you to kick off a bunch of agents all working on different features. If these all deploy to a single shared environment, then waiting for the right feature to be deployed for exploratory testing becomes a bottleneck.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/3138550303074134604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/3138550303074134604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3138550303074134604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3138550303074134604'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2026/02/ai-thoughts.html' title=' AI Thoughts '/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-8753531722635301979</id><published>2025-09-29T06:47:00.007+01:00</published><updated>2026-02-13T06:49:03.509+00:00</updated><title type='text'>YouTube: Hello World on the CardPuter</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/Y5StN6Stjcg&quot; width=&quot;320&quot; youtube-src-id=&quot;Y5StN6Stjcg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/8753531722635301979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/8753531722635301979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8753531722635301979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8753531722635301979'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2025/09/youtube-hello-world-on-cardputer.html' title='YouTube: Hello World on the CardPuter'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Y5StN6Stjcg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-2312989871955052211</id><published>2025-05-24T06:49:00.002+01:00</published><updated>2026-02-13T06:51:45.600+00:00</updated><title type='text'>YouTube: ClockworkPI Pico Calc Code-A-Long: A Times Table Table</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/9unk9Zg1j38&quot; width=&quot;320&quot; youtube-src-id=&quot;9unk9Zg1j38&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/2312989871955052211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/2312989871955052211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/2312989871955052211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/2312989871955052211'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2025/05/clockworkpi-pico-calc-code-long-times.html' title='YouTube: ClockworkPI Pico Calc Code-A-Long: A Times Table Table'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/9unk9Zg1j38/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-5499932731975003613</id><published>2025-05-18T06:50:00.001+01:00</published><updated>2026-02-13T06:51:29.091+00:00</updated><title type='text'>YouTube: ClockworkPI Pico Calc Code-A-Long: Hello World &amp; Times Tables</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/qvejC6RxQgc&quot; width=&quot;320&quot; youtube-src-id=&quot;qvejC6RxQgc&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/5499932731975003613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/5499932731975003613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5499932731975003613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5499932731975003613'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2025/05/youtube-clockworkpi-pico-calc-code-long.html' title='YouTube: ClockworkPI Pico Calc Code-A-Long: Hello World &amp; Times Tables'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/qvejC6RxQgc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-8944618689921384785</id><published>2023-04-17T17:56:00.006+01:00</published><updated>2023-04-17T17:56:54.442+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OPL"/><category scheme="http://www.blogger.com/atom/ns#" term="pda"/><category scheme="http://www.blogger.com/atom/ns#" term="psion"/><title type='text'>PDA Adventures</title><content type='html'>In the dim and distance past I owned a &lt;a href=&quot;https://en.wikipedia.org/wiki/Psion_Revo&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Psion Revo&lt;/a&gt;. My first Real Mobile Experience was on it, using a Nokia phone, the IR Port and Opera. Alas my Revo is hidden away in the attic and I suspect the battery leaked. So I picked up a dirt cheap &lt;a href=&quot;https://en.wikipedia.org/wiki/Psion_Series_5&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Psion Series 5&lt;/a&gt;&amp;nbsp;(the normal, not mx. I&#39;m not made of money) to play with.&lt;div&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2JZfzRfE-YiIZZM5KaaoKyvBKVDrgCAvetHQ_2Btc2sEcVbNQlZNAKDpYuXQp3Wm8u52WCiKvUgdG38Q-1f8BRN_dEbg2ko4R5QFWulldPTdCyH4H9hq6AnHZKxL3P5eHQSmMVG6lWwNyZThj59JmSnERJSvDOCR8jMy2oOYuj-zpS6Q-C-HFRsI/s1028/FsPe1EwXwBoq435.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Psion Series 5 - A laptop like device about the size of a couple of phones stacked on top of each other. With a stuffed elephant in the background. .&quot; border=&quot;0&quot; data-original-height=&quot;789&quot; data-original-width=&quot;1028&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2JZfzRfE-YiIZZM5KaaoKyvBKVDrgCAvetHQ_2Btc2sEcVbNQlZNAKDpYuXQp3Wm8u52WCiKvUgdG38Q-1f8BRN_dEbg2ko4R5QFWulldPTdCyH4H9hq6AnHZKxL3P5eHQSmMVG6lWwNyZThj59JmSnERJSvDOCR8jMy2oOYuj-zpS6Q-C-HFRsI/w320-h246/FsPe1EwXwBoq435.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;My Psion Series 5&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;Playing about with &lt;a href=&quot;https://en.wikipedia.org/wiki/Open_Programming_Language&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;OPL&lt;/a&gt;, the built in Basic based programming language,&amp;nbsp;has become how I waste time. I decided the best way to pick it up would be to to work my way through some of the Advent of Code. So starting with 2015, I&#39;ve been slowly bashing out &lt;a href=&quot;https://github.com/mlk/aoc/tree/main/PSION/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;solutions&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you attempt to do the same, here are some links I&#39;ve found useful:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://mcaleely.com/freeware/sishelp/epoc.html&quot;&gt;instexe.exe&lt;/a&gt; - This is required to install sis files on the Psion directly. Without it you need a 32bit Windows computer and a health amount of swearing.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://web.archive.org/web/20141011212633/http://neuon.com/downloads/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;neuon.com - downloads&lt;/a&gt; - Games and other random bits.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://psionseries5mx.blogspot.com/2016/01/psion-series-5mx-downloads.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;psionseries5mx - downloads&lt;/a&gt; - Games, lots of games and other random bits.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://palmtop.cosi.com.pl/wp-content/uploads/2013/07/Programming-Psion-Computers.pdf&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Programming Psion Computers&lt;/a&gt; - PDF of a programming book. I&#39;ve got the physical copy, it came with the Psion.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&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;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/8944618689921384785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/8944618689921384785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8944618689921384785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8944618689921384785'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2023/04/pda-adventures.html' title='PDA Adventures'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2JZfzRfE-YiIZZM5KaaoKyvBKVDrgCAvetHQ_2Btc2sEcVbNQlZNAKDpYuXQp3Wm8u52WCiKvUgdG38Q-1f8BRN_dEbg2ko4R5QFWulldPTdCyH4H9hq6AnHZKxL3P5eHQSmMVG6lWwNyZThj59JmSnERJSvDOCR8jMy2oOYuj-zpS6Q-C-HFRsI/s72-w320-h246-c/FsPe1EwXwBoq435.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-3602738446010203110</id><published>2021-01-21T09:08:00.002+00:00</published><updated>2021-01-21T09:08:16.272+00:00</updated><title type='text'>Quicky: HTML reports in Spotbugs</title><content type='html'>&lt;p&gt;&amp;nbsp;Really just a note for me:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: white; color: #080808; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;spotbugsTest &lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    &lt;/span&gt;reports &lt;span style=&quot;font-weight: bold;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;        &lt;/span&gt;xml.enabled = &lt;span style=&quot;color: #0033b3;&quot;&gt;false&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0033b3;&quot;&gt;        &lt;/span&gt;html.enabled = &lt;span style=&quot;color: #0033b3;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0033b3;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/3602738446010203110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/3602738446010203110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3602738446010203110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3602738446010203110'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2021/01/quicky-html-reports-in-spotbugs.html' title='Quicky: HTML reports in Spotbugs'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-4959016696149636853</id><published>2018-09-06T09:40:00.001+01:00</published><updated>2018-09-06T09:40:30.971+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="devops"/><category scheme="http://www.blogger.com/atom/ns#" term="quickie"/><title type='text'>Quickie: Checking a remote branch exists in Bash</title><content type='html'>&lt;div&gt;
This bash script will check that a branch exists on the first remote returned.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;if git branch -r --contains $(git remote | head -1)/branch-to-check &amp;amp;&amp;gt; /dev/null ; then&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; echo &quot;Branch Exists&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; echo &quot;Branch does not exist&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/4959016696149636853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/4959016696149636853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4959016696149636853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4959016696149636853'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2018/09/quickie-checking-remote-branch-exists.html' title='Quickie: Checking a remote branch exists in Bash'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-4946099293565036086</id><published>2017-03-10T09:45:00.003+00:00</published><updated>2017-03-10T09:45:29.029+00:00</updated><title type='text'>Stuff to watch from QCon London</title><content type='html'>&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Fantastic #QConLondon. When they finally come out, these are the talks to watch:&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://qconlondon.com/london-2017/presentation/how-backdoor-invulnerable-code&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;How to Backdoor Invulnerable Code&lt;/strong&gt;&lt;/a&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;by&amp;nbsp;&lt;/strong&gt;&lt;a href=&quot;http://twitter.com/FuzzyNop&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Josh Schwartz&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Be terrified as Josh just blows past your shiny security.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://qconlondon.com/london-2017/presentation/building-consensual-software&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Consensual Software: Prioritizing Trust &amp;amp; Safety&lt;/strong&gt;&lt;/a&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;by&amp;nbsp;&lt;/strong&gt;&lt;a href=&quot;http://twitter.com/tsunamino&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Danielle Leong&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Be terrified as Danielle explains just how big of a dick trolls on the internet actually are, and how imaginative they get in order to harass.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://qconlondon.com/london-2017/presentation/shaving-my-head-made-me-better-programmer&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Shaving My Head Made Me A Better Programmer&lt;/strong&gt;&lt;/a&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;by&amp;nbsp;&lt;/strong&gt;&lt;a href=&quot;http://twitter.com/alexqin&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Alex Qin&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
I only went to this to heckle bold people. Total lack of bold people, very disappointing. Otherwise a fantastic talk on the issues experienced by minorities.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://qconlondon.com/london-2017/presentation/creating-space-to-be-awesome&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Creating Space To Be Awesome&lt;/strong&gt;&lt;/a&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;by&amp;nbsp;&lt;/strong&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;http://twitter.com/Geek_Manager&quot; rel=&quot;nofollow noopener&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;Meri Williams&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Hints and tips for creating great places to work.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/4946099293565036086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/4946099293565036086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4946099293565036086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4946099293565036086'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2017/03/stuff-to-watch-from-qcon-london.html' title='Stuff to watch from QCon London'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-7236643879128912824</id><published>2016-11-17T21:18:00.002+00:00</published><updated>2017-03-10T09:48:18.069+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Meme Deconstruction"/><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="off topic"/><category scheme="http://www.blogger.com/atom/ns#" term="rambling"/><category scheme="http://www.blogger.com/atom/ns#" term="random"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><title type='text'>Meme Deconstruction: Has Trump won the popular vote</title><content type='html'>&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I&#39;ve seen a large number of people posting on &lt;a href=&quot;https://twitter.com/&quot;&gt;Twitter&lt;/a&gt; and &lt;a href=&quot;https://www.quora.com/&quot;&gt;Quora&lt;/a&gt;&amp;nbsp;that Donald Trump has won the popular vote and not Hilary Clinton and the only reason it is not reported on &lt;a href=&quot;https://en.wikipedia.org/wiki/United_States_presidential_election,_2016&quot;&gt;Wikipedia&lt;/a&gt; or Mainstream Media is liberal bias and/or general liberal upset.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;In this post I intend on evaluating a few of these claims. Drill down to where the data comes from and work out if it has any validity. This article does not argue for or against Donald Trump winning the popular vote. Left, Right or Centralist - It is vital that we can have honest, truthful conversations about what happened.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;This post will not evaluate other content on each of these web pages, just any claim that Donald Trump has won the popular vote.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;https://70news.wordpress.com/2016/11/12/final-election-2016-numbers-trump-won-both-popular-62-9-m-62-7-m-and-electoral-college-vote-306-232-hey-change-org-scrap-your-loony-petition-now/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;70News:&amp;nbsp;STILL PENDING! FINAL ELECTION 2016 NUMBERS: TRUMP WON BOTH POPULAR ( 62.9 M -62.2 M ) AND ELECTORAL COLLEGE VOTES ( 306-232)…HEY CHANGE.ORG, SCRAP YOUR LOONY PETITION NOW!&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The source given from this &lt;a href=&quot;https://twitter.com/Koxinga8/status/797399664853032960&quot; rel=&quot;nofollow&quot;&gt;a Twee&lt;/a&gt;t by&amp;nbsp;&lt;a href=&quot;https://twitter.com/Koxinga8&quot; rel=&quot;nofollow&quot;&gt;@Koxinga8&lt;/a&gt;. This Tweet has no backing source and Koxinga8 offers no bonafides as an election official. Put simply this tweet appears to have been made up.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;http://hottrendingnews.info/final-2016-election-numbers/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;HotTreadingNews:&amp;nbsp;Final 2016 Election Numbers&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This uses the &quot;70News&quot; as its source, which I have just show to be unreliable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;http://www.rumormillnews.com/cgi-bin/forum.cgi?read=61989&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;RumorMillNews.com:&amp;nbsp;FINAL ELECTION 2016 NUMBERS: TRUMP WON BOTH POPULAR ( 62.9 M -62.2 M ) AND ELECTORAL COLLEGE VOTES ( 306-232)&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This uses the &quot;70News&quot; as its source, which I have just show to be unreliable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;a href=&quot;http://www.breakdradio.com/breaking-final-election-2016-numbers/&quot; rel=&quot;nofollow&quot;&gt;Breaking Radio: Breaking final election 2016 Numbers&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This uses the following two as sources, but neither actually support its position. The latter actually supports that Hillary Clinton won the popular vote.&lt;br /&gt;&lt;i&gt;&lt;a href=&quot;http://truthfeed.com/its-confirmed-michigan-goes-red/34799/&quot; rel=&quot;nofollow&quot;&gt;Truthfeed: Its Confirmed Michigan Goes Red&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This does not quote its sources, however the details do match &lt;a href=&quot;http://www.nytimes.com/elections/results/michigan&quot;&gt;New York Times&lt;/a&gt;&amp;nbsp;(NYTimes has been updated since, but Michigan is still red). It how does not claim that Donald Trump has won the popular vote nation wide, just in that he has in Michigan (which appears to be correct).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;http://www.thegatewaypundit.com/2016/11/trumps-landslide-by-the-numbers-he-crushed-hillary/&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;i&gt;&lt;a href=&quot;http://www.thegatewaypundit.com/2016/11/trumps-landslide-by-the-numbers-he-crushed-hillary/&quot; rel=&quot;nofollow&quot;&gt;The Gateway Pundit: Trump Landslide by the Numbers Her Crushed Hillary&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This article does not claim that Trump won the popular vote but that without two states -&amp;nbsp;California (the largest US state representing 12.18% of the population of America) and New York (the fourth largest US state, representing&amp;nbsp;&lt;span style=&quot;text-align: center;&quot;&gt;6.16% of the population of America) that Donald Trump would of won. If you ignore 18% of the population then yes the results would be different.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;http://www.teapartycrusaders.com/final-election-2016-numbers-trump-won-both-popular-and-electoral-college-votes/&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: xx-small;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: center;&quot;&gt;Tea Party Crusaders&lt;span style=&quot;font-size: xx-small;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: center;&quot;&gt;Final Election 2016 Numbers&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href=&quot;http://conservativespirit.com/breaking-final-election-2016-numbers&quot;&gt;Conservativespirit Breaking Final Election 2016 Numbers&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;These two appear to be syndicated as they are almost identical.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Offers no source for its numbers, one of the screenshots even has Hillary in the lead. It appears to be referencing in passing The Gateway Pundit which as mentioned above does not claim Trump won.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;http://www.malaysiaoutlook.com/donald-trump-actually-won-big-in-ec-popular-and-county-votes-to-win-the-white-house/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Malaysiaoutlook: Donald Trump Actually Won Big&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Does not provide a link to the source, but mentions ETF News. I can not find the article which backs up this claim. The numbers however match that of 70News, which I have shown to be unreliable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;None of the sources above show that Donald Trump has won the popular vote. At the moment the majority of the Mainstream Media (including&amp;nbsp;&lt;a href=&quot;http://www.foxnews.com/politics/elections/2016/presidential-election-headquarters&quot;&gt;Fox News&lt;/a&gt;) is putting Hillary in lead for the popular vote but it is important to remember that the only source of absolute truth is the &lt;a href=&quot;http://www.fec.gov/pubrec/electionresults.shtml&quot;&gt;FEC&lt;/a&gt;. &lt;b&gt;Who have not yet released the results.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/7236643879128912824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/7236643879128912824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/7236643879128912824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/7236643879128912824'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/11/meme-deconstruction-has-trump-won.html' title='Meme Deconstruction: Has Trump won the popular vote'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-939128997422358331</id><published>2016-11-13T09:07:00.004+00:00</published><updated>2016-11-13T09:10:24.478+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cfssl"/><category scheme="http://www.blogger.com/atom/ns#" term="client-side certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="crl"/><category scheme="http://www.blogger.com/atom/ns#" term="devops"/><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="ops"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl"/><title type='text'>SSL Certificate Revocation List (CRL) with CloudFlare&#39;s PKI toolkit and nginx</title><content type='html'>This post will quickly go over the gotchas I have encountered when making the &lt;a href=&quot;https://en.wikipedia.org/wiki/Revocation_list&quot;&gt;CRL&lt;/a&gt; returned by the &lt;a href=&quot;https://cfssl.org/&quot;&gt;cfssl&lt;/a&gt; tool work with &lt;a href=&quot;https://www.nginx.com/&quot;&gt;nginx&lt;/a&gt;. This post makes the assumption that you already know a bit about nginx, SSL&amp;nbsp;and cfssl. It also assumes that you have already have nginx serving content over &lt;a href=&quot;http://nginx.org/en/docs/http/configuring_https_servers.html&quot;&gt;https&lt;/a&gt;&amp;nbsp;and nginx is asking for a &lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_verify_client&quot;&gt;client-side certificate&lt;/a&gt;.&amp;nbsp;This post also assumes that you can create the &lt;a href=&quot;https://github.com/jason-riddle/generating-certs/wiki/Generating-a-Root-CA,-Server,-and-Client-Certs-using-CFSSL&quot;&gt;client-side certificate with cfssl&lt;/a&gt;. Each of these steps are well documented else where so will not be repeated here.&lt;br /&gt;
&lt;br /&gt;
After we have client-side certificates, we should make nginx reject any that we revoke. Nginx supports this via a CRL list supplied in the &lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_crl&quot;&gt;ssl_crl parameter&lt;/a&gt;, while cfssl supplies a tool to generate a CRL file:&amp;nbsp;&lt;a href=&quot;https://github.com/cloudflare/cfssl/tree/master/cli/gencrl&quot;&gt;cfssl gencrl&lt;/a&gt;.&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cfssl gencrl \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; list-of-serial-numbers-to-revoke.txt \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; my-certificate.pem&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;my-certificate-&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;private-key.pem \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;gt; my-&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;certificate&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.crl&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Alas the created document can not be used directly with nginxes&amp;nbsp;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_crl&quot;&gt;ssl_crl&lt;/a&gt;. We have to do the following two steps first:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The created document must be wrapped in&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-----BEGIN X509 CRL-----&lt;/span&gt; &lt;br /&gt;and&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-----END X509 CRL-----&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;The CRL file used by nginx has to include the complete certificate chain of CRLs. If you are using your own CA then create the CRL in the same way as before and concatenate them together.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Finally the last gotcha is that the&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;list-of-serial-numbers-to-revoke.txt&lt;/span&gt;&amp;nbsp;used by cfssl is a list of number in decimal not hex. Most tools end up outputting the serial number in hex, I recommend using this&amp;nbsp;&lt;a href=&quot;http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html&quot;&gt;online converter&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you want to test a CRL without firing up nginx then you can use Open SSL:&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;openssl crl -in ~/Projects/starling/client-auth-proxy/conf/ca.crl -text&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once you have done this the CRL &lt;i&gt;should&lt;/i&gt; work. If you get nginx crashing on startup with:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016/11/13 08:59:53 [emerg] 1#1: X509_LOOKUP_load_file(&quot;/etc/ssl/ca/private/ca.crl&quot;) failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nginx: [emerg] X509_LOOKUP_load_file(&quot;/etc/ssl/ca/private/ca.crl&quot;) failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then you have missed out step one, and the CRL file does not have each CRL wrapped in the BEGIN/END.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If nginx starts then, but when you hit a page you get and error message like:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016/11/13 09:01:14 [info] 17#17: *5 client SSL certificate verify error: (3:unable to get certificate CRL) while reading client request headers, client: 192.168.99.1, server: , request: &quot;GET / HTTP/1.1&quot;, host: &quot;192.168.99.100&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;192.168.99.1 - - [13/Nov/2016:09:01:14 +0000] &quot;GET / HTTP/1.1&quot; 400 633 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Then you missed out step two and don&#39;t have the CRLs for each of the certificates in the chain.&lt;/div&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/939128997422358331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/939128997422358331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/939128997422358331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/939128997422358331'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/11/ssl-certificate-revocation-list-crl_13.html' title='SSL Certificate Revocation List (CRL) with CloudFlare&#39;s PKI toolkit and nginx'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-4912114487492506075</id><published>2016-11-13T09:07:00.003+00:00</published><updated>2016-11-13T09:09:09.673+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cfssl"/><category scheme="http://www.blogger.com/atom/ns#" term="client-side certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="crl"/><category scheme="http://www.blogger.com/atom/ns#" term="devops"/><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="ops"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl"/><title type='text'>SSL Certificate Revocation List (CRL) with CloudFlare&#39;s PKI toolkit and nginx</title><content type='html'>This post will quickly go over the gotchas I have encountered when making the &lt;a href=&quot;https://en.wikipedia.org/wiki/Revocation_list&quot;&gt;CRL&lt;/a&gt; returned by the &lt;a href=&quot;https://cfssl.org/&quot;&gt;cfssl&lt;/a&gt; tool work with &lt;a href=&quot;https://www.nginx.com/&quot;&gt;nginx&lt;/a&gt;. This post makes the assumption that you already know a bit about nginx, SSL&amp;nbsp;and cfssl. It also assumes that you have already have nginx serving content over &lt;a href=&quot;http://nginx.org/en/docs/http/configuring_https_servers.html&quot;&gt;https&lt;/a&gt;&amp;nbsp;and nginx is asking for a &lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_verify_client&quot;&gt;client-side certificate&lt;/a&gt;.&amp;nbsp;This post also assumes that you can create the &lt;a href=&quot;https://github.com/jason-riddle/generating-certs/wiki/Generating-a-Root-CA,-Server,-and-Client-Certs-using-CFSSL&quot;&gt;client-side certificate with cfssl&lt;/a&gt;. Each of these steps are well documented else where so will not be repeated here.&lt;br /&gt;
&lt;br /&gt;
After we have client-side certificates, we should make nginx reject any that we revoke. Nginx supports this via a CRL list supplied in the &lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_crl&quot;&gt;ssl_crl parameter&lt;/a&gt;, while cfssl supplies a tool to generate a CRL file:&amp;nbsp;&lt;a href=&quot;https://github.com/cloudflare/cfssl/tree/master/cli/gencrl&quot;&gt;cfssl gencrl&lt;/a&gt;.&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cfssl gencrl \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; list-of-serial-numbers-to-revoke.txt \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; my-certificate.pem&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;my-certificate-&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;private-key.pem \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;gt; my-&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;certificate&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.crl&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Alas the created document can not be used directly with nginxes&amp;nbsp;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_crl&quot;&gt;ssl_crl&lt;/a&gt;. We have to do the following two steps first:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The created document must be wrapped in&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-----BEGIN X509 CRL-----&lt;/span&gt; &lt;br /&gt;and&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-----END X509 CRL-----&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;The CRL file used by nginx has to include the complete certificate chain of CRLs. If you are using your own CA then create the CRL in the same way as before and concatenate them together.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Finally the last gotcha is that the&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;list-of-serial-numbers-to-revoke.txt&lt;/span&gt;&amp;nbsp;used by cfssl is a list of number in decimal not hex. Most tools end up outputting the serial number in hex, I recommend using this&amp;nbsp;&lt;a href=&quot;http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html&quot;&gt;online converter&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you want to test a CRL without firing up nginx then you can use Open SSL:&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;openssl crl -in ~/Projects/starling/client-auth-proxy/conf/ca.crl -text&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once you have done this the CRL &lt;i&gt;should&lt;/i&gt; work. If you get nginx crashing on startup with:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2016/11/13 08:59:53 [emerg] 1#1: X509_LOOKUP_load_file(&quot;/etc/ssl/ca/private/ca.crl&quot;) failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;nginx: [emerg] X509_LOOKUP_load_file(&quot;/etc/ssl/ca/private/ca.crl&quot;) failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then you have missed out step one, and the CRL file does not have each CRL wrapped in the BEGIN/END.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If nginx starts then, but when you hit a page you get and error message like:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2016/11/13 09:01:14 [info] 17#17: *5 client SSL certificate verify error: (3:unable to get certificate CRL) while reading client request headers, client: 192.168.99.1, server: , request: &quot;GET / HTTP/1.1&quot;, host: &quot;192.168.99.100&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;



&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot; style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;192.168.99.1 - - [13/Nov/2016:09:01:14 +0000] &quot;GET / HTTP/1.1&quot; 400 633 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Then you missed out step two and don&#39;t have the CRLs for each of the certificates in the chain.&lt;/div&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/4912114487492506075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/4912114487492506075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4912114487492506075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/4912114487492506075'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/11/ssl-certificate-revocation-list-crl.html' title='SSL Certificate Revocation List (CRL) with CloudFlare&#39;s PKI toolkit and nginx'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-6476383481503568452</id><published>2016-10-27T11:04:00.000+01:00</published><updated>2016-10-27T11:04:53.249+01:00</updated><title type='text'>Posts Worth Reading: Compressed Content, Amazon S3, and CloudFront</title><content type='html'>&lt;div style=&quot;background-color: white; border: 0px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.2em; margin: 0px; padding: 0px; text-rendering: optimizeLegibility; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.cameronstokes.com/2011/07/20/compressed-content-amazon-s3-and-cloudfront/&quot;&gt;&lt;span style=&quot;border-color: initial; border-image: initial; border-style: initial; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; transition: color 0.3s;&quot;&gt;Cameron Stokes&#39;s Blog&lt;/span&gt;: Compressed Content, Amazon S3, and CloudFront&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
Cameron describes how to pre-compress files stored and served on S3. Given S3 charges per GB, pre-compressing content seams an sensible step to add to your process.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/6476383481503568452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/6476383481503568452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/6476383481503568452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/6476383481503568452'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/10/posts-worth-reading-compressed-content.html' title='Posts Worth Reading: Compressed Content, Amazon S3, and CloudFront'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-8470535720207424914</id><published>2016-03-24T18:49:00.000+00:00</published><updated>2016-03-24T18:49:50.452+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="announcement"/><category scheme="http://www.blogger.com/atom/ns#" term="Dependency Injection"/><category scheme="http://www.blogger.com/atom/ns#" term="feign"/><category scheme="http://www.blogger.com/atom/ns#" term="github"/><category scheme="http://www.blogger.com/atom/ns#" term="guice"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbi"/><category scheme="http://www.blogger.com/atom/ns#" term="Meta programming"/><title type='text'>Meta-programming and Guice</title><content type='html'>&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #232629; font-family: Georgia, serif; font-size: 18px; font-stretch: inherit; line-height: 32px; margin-bottom: 32px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
I really like the meta-programming style of&amp;nbsp;&lt;a href=&quot;https://jdbi.org/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;JDBI&amp;nbsp;&lt;/a&gt;and&amp;nbsp;&lt;a href=&quot;https://github.com/Netflix/feign&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Feign&lt;/a&gt;. They allow developers to focus on what is important rather than the boilerplate code. However I find that once you introduce&amp;nbsp;Dependency Injection with them the boilerplate begins to creep back in.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #232629; font-family: Georgia, serif; font-size: 18px; font-stretch: inherit; line-height: 32px; margin-bottom: 32px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Which is why I&#39;ve written&amp;nbsp;&lt;a href=&quot;https://github.com/mlk/jdbi-guice&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;jdbi-guice&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://github.com/mlk/feign-guice&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;feign-guice&lt;/a&gt;. These two libraries&amp;nbsp;allows developers to to simply point Guice at the package(s) containing the&amp;nbsp;&lt;a href=&quot;http://jdbi.org/sql_object_overview/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;JDBI SQL Objects&lt;/a&gt;&amp;nbsp;or Feign resources and Guice will have each classes in the package&amp;nbsp;bound to a JDBI or Feign provided object.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #232629; font-family: Georgia, serif; font-size: 18px; font-stretch: inherit; line-height: 32px; margin-bottom: 32px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Like all good libraries, they are on&amp;nbsp;&lt;a href=&quot;http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.mlk%22&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #8c68cb; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Maven Central&lt;/a&gt;&amp;nbsp;so give &#39;em a go and let me know if you find them useful or if I&#39;ve missed some vital feature.&lt;/div&gt;
&lt;div&gt;
(Also posted on &lt;a href=&quot;https://www.linkedin.com/pulse/meta-programming-guice-michael-lloyd-lee&quot;&gt;Linked In&lt;/a&gt;)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/8470535720207424914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/8470535720207424914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8470535720207424914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8470535720207424914'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/03/meta-programming-and-guice.html' title='Meta-programming and Guice'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-325486191848121077</id><published>2016-02-11T14:50:00.003+00:00</published><updated>2016-02-11T14:59:03.125+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dataframe"/><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="spark"/><title type='text'>Spark DataFrame: Programmatically filtering column names</title><content type='html'>In this we have a dataframe where we wish to extract a number of columns from it, but do not know the names of the columns ahead of time. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; color: #222426; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;case class Document(colA : String,
                    colB : String,
                    colC : String,
                    colD : String,
                    colE : String,
                    colF0 : String,
                    colF1 : String,
                    colF2 : String )

val documents = Seq(
  new Document(&quot;colA&quot;, &quot;colB&quot;, &quot;colC&quot;, &quot;colD&quot;, &quot;colE&quot;, &quot;colF0&quot;, &quot;colF1&quot;, &quot;colF2&quot;),
  new Document(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;)
)

val df = sc.parallelize(documents, 2).toDF&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
From this we wish to return just the columns with a name starting with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;colF&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
First grab the column names with&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;df.columns&lt;/code&gt;, then filter down to just the column names you want&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;.filter(_.startsWith(&quot;colF&quot;))&lt;/code&gt;. This gives you an array of Strings. But the select takes&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;select(String, String*)&lt;/code&gt;. Luckily select for columns is&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;select(Column*)&lt;/code&gt;, so finally convert the Strings into Columns with&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;.map(df(_))&lt;/code&gt;, and finally turn the Array of Columns into a var arg with&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;: _*&lt;/code&gt;.&lt;/div&gt;
&lt;pre class=&quot;lang-scala prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;startsWith&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colF&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; _&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;*).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;show&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
If we also want to select a number of other columns then we have two options, the first is to simply make the&amp;nbsp;&lt;span style=&quot;background-color: #eeeeee; color: #222426; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;dejavu sans mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , monospace , sans-serif; font-size: 13px; line-height: 19.5px; white-space: pre-wrap;&quot;&gt;filter&lt;/span&gt;&amp;nbsp;more complex.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;lang-scala prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;x &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colA&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;||&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; x&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;startsWith&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colF&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;))).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; _&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;*).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;show &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
This could easily get quite ugly, confusing and bloated if you are simply after a fixed list of other columns. A much cleaner solution would be to merge in a fixed list of columns.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;post-text&quot; itemprop=&quot;text&quot; style=&quot;background-color: white; border: 0px; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; line-height: 1.3; margin: 0px 0px 5px; padding: 0px; width: 660px; word-wrap: break-word;&quot;&gt;
&lt;pre class=&quot;lang-scala prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colA&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colB&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;startsWith&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;colF&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;))).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; _&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;*).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;show&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&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;
&lt;br /&gt;
This is based on my &lt;a href=&quot;http://stackoverflow.com/a/35341524/157672&quot;&gt;Stack Overflow answer&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/325486191848121077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/325486191848121077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/325486191848121077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/325486191848121077'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/02/spark-dataframe-programmatically.html' title='Spark DataFrame: Programmatically filtering column names'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-5946133415130374047</id><published>2016-02-10T17:06:00.000+00:00</published><updated>2016-02-10T17:06:40.871+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="spark"/><category scheme="http://www.blogger.com/atom/ns#" term="user defined functions"/><title type='text'>User Defined Functions in a Spark DataFrame</title><content type='html'>First lets create an example &lt;a href=&quot;https://spark.apache.org/docs/1.5.0/api/java/org/apache/spark/sql/DataFrame.html&quot;&gt;DataFrame&lt;/a&gt;. You could use anything (Avro, JSON etc) but for this we will create it programmatically.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;import &lt;/span&gt;org.apache.spark.sql.functions._&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;case class &lt;/span&gt;Document(id: Integer, name: &lt;span style=&quot;color: #20999d;&quot;&gt;String&lt;/span&gt;)

&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;val &lt;/span&gt;documents = &lt;span style=&quot;color: #660e7a; font-style: italic;&quot;&gt;Seq&lt;/span&gt;(
  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Document(&lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;The Document&quot;&lt;/span&gt;),
  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Document(&lt;span style=&quot;color: blue;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;The Other Document&quot;&lt;/span&gt;),
  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Document(&lt;span style=&quot;color: blue;&quot;&gt;3&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;More Documents&quot;&lt;/span&gt;),
  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Document(&lt;span style=&quot;color: blue;&quot;&gt;4&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Fred The Document&quot;&lt;/span&gt;),
  &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;Document(&lt;span style=&quot;color: blue;&quot;&gt;5&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Ye Olde Document&quot;&lt;/span&gt;)
)&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;pre style=&quot;font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;val &lt;/span&gt;documentsDF = sc.parallelize(documents, &lt;span style=&quot;color: blue;&quot;&gt;4&lt;/span&gt;).toDF()&lt;/pre&gt;
&lt;/pre&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;We want to do some processing on each row, in this case filter out the offensive words in the name of each document. Like &lt;i&gt;Fred&lt;/i&gt;. First we create a User Defined Function (&lt;i&gt;udf&lt;/i&gt;) which will take a string and perform some processing on it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;val &lt;/span&gt;documentCensor = &lt;span style=&quot;font-style: italic;&quot;&gt;udf &lt;/span&gt;{(x: &lt;span style=&quot;color: #20999d;&quot;&gt;String&lt;/span&gt;) =&amp;gt; x.replaceAll(&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;Fred&quot;&lt;/span&gt;, &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;****&quot;&lt;/span&gt;)}&lt;/pre&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This user defined function in this case does a simple string replacement on the input string but it could do something more complex.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;font-family: &#39;DejaVu Sans Mono&#39;; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;documentsDF.select(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: green; font-weight: bold;&quot;&gt;$&quot;id&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;, documentCensor(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: green; font-weight: bold;&quot;&gt;$&quot;name&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;).as(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: green; font-weight: bold;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;)).show&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now we select out the columns we want (note we are using select with columns, not select with string names). For the processed rows we use the &lt;i&gt;udf&lt;/i&gt; defined before and give it a nice name with &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/5946133415130374047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/5946133415130374047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5946133415130374047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5946133415130374047'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2016/02/user-defined-functions-in-spark.html' title='User Defined Functions in a Spark DataFrame'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-5174734339581361201</id><published>2015-12-18T11:23:00.000+00:00</published><updated>2016-11-18T16:39:33.315+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Meme Deconstruction"/><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="off topic"/><category scheme="http://www.blogger.com/atom/ns#" term="quality street"/><category scheme="http://www.blogger.com/atom/ns#" term="rambling"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><title type='text'>Meme Deconstruction: Quality Street Tin Sizes</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6RTO-llzuwMR66sVwN4AXgxb5sndWTD1whmh0IE5vbLJ10djXkEbcvSgixSHggPlOV-ifripX9zKtHziqBw0Q1NE2xr4fWRaXHU29bT3P9HY1lS6OlsuOCfOXlegTDrZjNYOvsJCMcZk/s1600/12347579_10156404255540374_2844620530272772885_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;316&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6RTO-llzuwMR66sVwN4AXgxb5sndWTD1whmh0IE5vbLJ10djXkEbcvSgixSHggPlOV-ifripX9zKtHziqBw0Q1NE2xr4fWRaXHU29bT3P9HY1lS6OlsuOCfOXlegTDrZjNYOvsJCMcZk/s400/12347579_10156404255540374_2844620530272772885_n.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&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: inherit;&quot;&gt;Completely off topic for this blog, but the current meme about Quality Street has hit a nerve. Well, the people screaming &quot;wake up &lt;a href=&quot;http://rationalwiki.org/wiki/Sheeple&quot;&gt;sheeple&lt;/a&gt;!&quot; while not actually doing any research has hit a nerve.&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: inherit;&quot;&gt;The original post by&amp;nbsp;&lt;a href=&quot;https://www.facebook.com/photo.php?fbid=10156404255540374&amp;amp;set=o.152093871613996&amp;amp;type=3&amp;amp;permPage=1&quot;&gt;Charlotte Stacey Hook&lt;span style=&quot;background-color: white; font-weight: bold; line-height: 19.32px;&quot;&gt;‎&lt;/span&gt;&lt;/a&gt;&amp;nbsp;has been picked up by &lt;a href=&quot;http://www.mirror.co.uk/news/uk-news/nestl-hits-back-claims-quality-7025949&quot;&gt;news companies&lt;/a&gt;&amp;nbsp;and retweeted/shared by far too many people. In this post I plan to show why the picture does not show that we are not getting short changed and the tins are not getting smaller. I am not defending Nestle here, but rather hoping that this will&amp;nbsp;convince&amp;nbsp;a few people to do a little research before screaming sheeple!&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: inherit;&quot;&gt;With no context this indeed looks like tins are getting smaller. But no reason for the selection of tins is given. They are not the largest available in any given year as you can currently buy a much&amp;nbsp;&lt;a href=&quot;http://www.amazon.co.uk/Nestle-Quality-Street-2-9Kg/dp/B00ZRL4PTY&quot;&gt;larger 2.9kg tin&lt;/a&gt;&amp;nbsp;and a &lt;a href=&quot;http://www.amazon.co.uk/Nestl%C3%A9-Quality-Street-Tin-1-3kg/dp/B00MABAEJE/ref=sr_1_1?s=grocery&amp;amp;ie=UTF8&amp;amp;qid=1450436345&amp;amp;sr=1-1&amp;amp;keywords=quality+street+1.3kg&quot;&gt;mid sized 1.3kg tin&lt;/a&gt;. My suspicion is that either this was simply the size that Charlotte decided was correct at the time of purchase, or (if I&#39;m feeling less forgiving) that they were selected in order to tell &lt;i&gt;the story&lt;/i&gt;.&amp;nbsp;&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: inherit;&quot;&gt;By carefully selecting tins we could create an image of tins getting bigger (and then blame Nestle for obesity), remaining the same or getting smaller.&amp;nbsp;&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: inherit;&quot;&gt;So are we getting less chocolate for our money? In 1983 you could buy a &lt;a href=&quot;http://m.youtube.com/watch?v=NzltmXpJ8a4&quot;&gt;3lb (1.3kg) tub of Quality Street for £4.99&lt;/a&gt;. If we adjust the price to take into account inflation then we get a price between&lt;a href=&quot;http://www.measuringworth.com/ukcompare/relativevalue.php?use[0]=CPI&amp;amp;use[1]=NOMINALEARN&amp;amp;year_late=1983&amp;amp;typeamount=4.99&amp;amp;amount=4.99&amp;amp;year_source=1983&amp;amp;year_result=2015&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;span style=&quot;background-color: #f6f7f8;&quot;&gt;&lt;a href=&quot;http://www.measuringworth.com/ukcompare/relativevalue.php?use[0]=CPI&amp;amp;use[1]=NOMINALEARN&amp;amp;year_late=1983&amp;amp;typeamount=4.99&amp;amp;amount=4.99&amp;amp;year_source=1983&amp;amp;year_result=2015&quot; style=&quot;line-height: 16.08px;&quot;&gt;£13 and £25&lt;/a&gt;&lt;span style=&quot;line-height: 16.08px;&quot;&gt;, which the &quot;basic&quot; calculation coming to just over £15. If we head to Amazon right now we can buy a 1.3kg tin of &lt;/span&gt;&lt;a href=&quot;http://www.amazon.co.uk/Nestl%C3%A9-Quality-Street-Tin-1-3kg/dp/B00MABAEJE/ref=sr_1_1?s=grocery&amp;amp;ie=UTF8&amp;amp;qid=1450436345&amp;amp;sr=1-1&amp;amp;keywords=quality+street+1.3kg&quot; style=&quot;line-height: 16.08px;&quot;&gt;Quality Street for £15.75&lt;/a&gt;&lt;span style=&quot;line-height: 16.08px;&quot;&gt;. So the price of Quality Street has not&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 16.08px;&quot;&gt;significantly&lt;/span&gt;&lt;span style=&quot;line-height: 16.08px;&quot;&gt;&amp;nbsp;changed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f6f7f8; line-height: 16.08px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #f6f7f8; line-height: 16.08px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;One final thing to consider is that the price of cocoa has actually &lt;a href=&quot;http://www.ft.com/cms/s/0/ce8a6bec-1a8e-11e5-8201-cbdb03d71480.html?siteedition=uk&quot;&gt;gone up&lt;/a&gt;. There is some truth in the whole &quot;chocolates were bigger when I was a kid&quot; as cocoa has become more expensive either the price increases or the size gets smaller. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f6f7f8; line-height: 16.08px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To badly quote a friend of mine &quot;&lt;i&gt;memes tell you nothing about the subject matter and everything about the preconceptions of the person posting&lt;/i&gt;&quot;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/5174734339581361201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/5174734339581361201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5174734339581361201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5174734339581361201'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2015/12/meme-deconstruction-quality-street-tin.html' title='Meme Deconstruction: Quality Street Tin Sizes'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6RTO-llzuwMR66sVwN4AXgxb5sndWTD1whmh0IE5vbLJ10djXkEbcvSgixSHggPlOV-ifripX9zKtHziqBw0Q1NE2xr4fWRaXHU29bT3P9HY1lS6OlsuOCfOXlegTDrZjNYOvsJCMcZk/s72-c/12347579_10156404255540374_2844620530272772885_n.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-1271800742266290635</id><published>2015-11-19T12:07:00.000+00:00</published><updated>2015-12-22T10:32:30.196+00:00</updated><title type='text'>Stop Mocking Me!</title><content type='html'>&lt;a href=&quot;https://en.wikipedia.org/wiki/Mock_object&quot;&gt;Mocking&lt;/a&gt; (and other &lt;a href=&quot;http://martinfowler.com/articles/mocksArentStubs.html&quot;&gt;test doubles&lt;/a&gt;) are very powerful tools that every developer should know. But more important than knowing &lt;i&gt;how&lt;/i&gt; to use them is knowing &lt;i&gt;when&lt;/i&gt; to use them.&lt;br /&gt;
&lt;br /&gt;
First lets explore the different types of test doubles:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dummy&lt;/b&gt; objects are empty shells that get passed about but do nothing.&lt;br /&gt;
&lt;b&gt;Fake&lt;/b&gt; objects re-implement the functionality but in a test-friendly way, for example an in-memory database.&lt;br /&gt;
&lt;b&gt;Stub&lt;/b&gt; objects provide canned responses and optionally high level verification.&lt;br /&gt;
&lt;b&gt;Mock&lt;/b&gt; objects provide canned responses with method-level verification.&lt;br /&gt;
&lt;b&gt;Tear-down-ables&lt;/b&gt;&amp;nbsp;provide mini environments for your tests, in the &lt;a href=&quot;http://junit.org/&quot;&gt;JUnit&lt;/a&gt; world these are often &lt;a href=&quot;http://junit.org/apidocs/org/junit/Rule.html&quot;&gt;rules&lt;/a&gt; ranging from the &lt;a href=&quot;http://junit.org/apidocs/org/junit/rules/TemporaryFolder.html&quot;&gt;file system&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;https://github.com/mlk/AssortmentOfJUnitRules#hadoopdfsrule&quot;&gt;mini hadoop cluster&lt;/a&gt;&amp;nbsp;all the way up to&amp;nbsp;&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;complete systems&lt;/a&gt;. This one I find rarely talked about.&lt;br /&gt;
&lt;br /&gt;
Mocking frameworks (like &lt;a href=&quot;http://easymock.org/&quot;&gt;EasyMock&lt;/a&gt; or &lt;a href=&quot;http://mockito.org/&quot;&gt;Mockito&lt;/a&gt;) can provide dummies, stubs and mocks. &amp;nbsp;The names of all of them often get mixed up but for this article I&#39;ll use the above (which match&amp;nbsp;&lt;a href=&quot;http://martinfowler.com/&quot;&gt;Martin Fowlers&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;When to use none of them&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;an exception (to create throw the exception, sure but not for the exception itself)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;DTOs&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Fast, tested objects with very few in-app dependencies and no external dependencies, for example domain objects. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;External APIs that don&#39;t hit external resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
With the exception of Fakes and Tear-down-ables, every time you add a test double you tightly link the implementation of the system under test to the test method. What you should be attempting to do is link the result of the system under test to the test.&lt;br /&gt;
For the above three you should prefer to use the real object rather than a test double.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dummies&lt;/b&gt;&lt;br /&gt;
Are rarely used in my experience. As a general rule if nothing is going to happen to an object then pass &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;null&lt;/span&gt; or a (if easy to set up) real object.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fakes&lt;/b&gt;&lt;br /&gt;
These require more work to create and can be slower than using other test doubles, but can make tests significantly simpler to follow.&lt;br /&gt;
They test the results of an action, and not the interactions between objects. Often this is acceptable but when you require an edge case (such as throwing an exception) it is better to use a stub or mock.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Stubs&lt;/b&gt;&lt;br /&gt;
Stubs are useful when you have simple object interactions that you want to make some general verification on the value of the parameters passed about.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Mocks&lt;/b&gt;&lt;br /&gt;
Pure mocks should be avoided except when the exact interaction between two objects needs to be verified. This is rare and stubs are generally what are required.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tear-down-ables&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Tear-down-ables arguable move you from &lt;a href=&quot;https://en.wikipedia.org/wiki/Unit_testing&quot;&gt;unit testing&lt;/a&gt; to &lt;a href=&quot;https://en.wikipedia.org/wiki/Integration_testing&quot;&gt;integration testing&lt;/a&gt;, so you should be aware of the additional overhead involved. However in the right case, they can significantly simplify your test as you are using the real(ish) dependency. If you class writes a file to the file system then mocking or stubbing &lt;a href=&quot;http://docs.oracle.com/javase/7/docs/api/java/io/FileWriter.html&quot;&gt;FileWriter&lt;/a&gt; and friends offers no value, seeing a file on the file system does.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Warning signs&lt;/b&gt;&lt;br /&gt;
When working with test doubles the test will often give you a warning if you are using the wrong type of test double.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If you look at your test and you can&#39;t work out what you are testing then look at the test doubles you are using.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Are you re-writing the method in your test when using a mock or stub then that is a sign you should be moving towards either fakes or tear-down-ables.&lt;/li&gt;
&lt;li&gt;Are you setting up a large dependency tree? Maybe some of that should be stubbed out.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/1271800742266290635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/1271800742266290635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1271800742266290635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1271800742266290635'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2015/11/stop-mocking-me.html' title='Stop Mocking Me!'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-1728359092204404962</id><published>2015-10-14T10:11:00.001+01:00</published><updated>2015-10-14T16:14:20.561+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="stack overflow"/><category scheme="http://www.blogger.com/atom/ns#" term="teh codez"/><title type='text'>Options for automating Equals and Hashcode generation in Java (Number #3 BLEW MY MIND!)</title><content type='html'>&lt;ol&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
&lt;li&gt;Your IDE. I would not recommend it for most objects as they can slowly drift out of date with the actual class definition. They also look ugly and pollute your codebase with boilerplate code.&lt;/li&gt;
&lt;li style=&quot;background-color: white; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;https://commons.apache.org/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Apache Commons&lt;/a&gt;&amp;nbsp;has a bunch of stuff for making this easier, including a&amp;nbsp;&lt;a href=&quot;https://commons.apache.org/proper/commons-lang/apidocs/src-html/org/apache/commons/lang3/builder/EqualsBuilder.html#line.279&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;reflective version&lt;/a&gt;&amp;nbsp;so no risk of drifting out of date with the class definition. It is better than #1 unless you require a speedy equals/hashcode, but still too much boilerplate for my liking.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background-color: white; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;https://projectlombok.org/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Project Lombok&lt;/a&gt;&amp;nbsp;and annotation processing. Whack an&amp;nbsp;&lt;a href=&quot;https://projectlombok.org/features/EqualsAndHashCode.html&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;EqualsAndHashCode&lt;/code&gt;&lt;/a&gt;&amp;nbsp;annotation on ya class and be done with it.&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;I recommend using Project Lombok&lt;/strong&gt;. It adds a touch of magic into the build (but not much) and so requires a plugin for your IDE to behave nicely but they are a small price to pay for no boilerplate code. Lombok is an annotation processor that run at compile time so you have no runtime performance hit.&lt;/li&gt;
&lt;li style=&quot;background-color: white; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Using a different language that supports it out the box, but also targets the JVM.&amp;nbsp;&lt;a href=&quot;http://www.groovy-lang.org/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Groovy&lt;/a&gt;&amp;nbsp;uses an&amp;nbsp;&lt;a href=&quot;http://docs.groovy-lang.org/latest/html/gapi/groovy/transform/EqualsAndHashCode.html&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;annotation&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://kotlinlang.org/&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Kotlin&lt;/a&gt;&amp;nbsp;supports&amp;nbsp;&lt;a href=&quot;https://kotlinlang.org/docs/reference/data-classes.html&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;data classes&lt;/a&gt;. Unless your existing code can quickly be converted, I would avoid this.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/google/auto&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Google&#39;s Auto&lt;/a&gt;&amp;nbsp;has an&amp;nbsp;&lt;a href=&quot;https://github.com/google/auto/tree/master/value&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;AutoValue&lt;/a&gt;. Like Project Lombok this is an annotation processor, however has less magic at the expense of little more boilerplate (thanks to&amp;nbsp;&lt;a href=&quot;http://stackoverflow.com/users/869736/louis-wasserman&quot; style=&quot;background-color: transparent; border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;Louis Wasserman&lt;/a&gt;).&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;This post is a repost of my answer on &lt;/span&gt;&lt;a href=&quot;http://stackoverflow.com/questions/33104205/check-if-two-objects-are-completely-equal-in-java/33104640#33104640&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;Stack Overflow&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;



&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/1728359092204404962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/1728359092204404962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1728359092204404962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1728359092204404962'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2015/10/options-for-automating-equals-and.html' title='Options for automating Equals and Hashcode generation in Java (Number #3 BLEW MY MIND!)'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>London, UK</georss:featurename><georss:point>51.5073509 -0.12775829999998223</georss:point><georss:box>51.1912379 -0.77320529999998222 51.8234639 0.51768870000001777</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-9142570393029967494</id><published>2015-09-10T16:10:00.002+01:00</published><updated>2015-09-10T16:13:28.115+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="article"/><category scheme="http://www.blogger.com/atom/ns#" term="distributed teams"/><category scheme="http://www.blogger.com/atom/ns#" term="Making Distributed Teams Work series"/><title type='text'>Making Distributed Teams Work - Be One Team</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: &#39;Helvetica Neue&#39;; font-weight: 400; margin-bottom: 15px;&quot;&gt;
&lt;h2&gt;
Introduction&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is the second article in a series offering pointers on how to make the most out of a distributed team. The series is based on experience with growing internal teams with additional near shored developers rather than building a completely external team.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The one thing that will make or break your project is how well your team operates as a team but making distributed teams work well is hard work. This article will briefly explain some practises and tools to ensure that your team is one team, not two teams that share a backlog. You will need to invest resources into communication channels and a shared set of rules on etiquette to get the most of a distributed team.&lt;/div&gt;
&lt;h2&gt;
Faces&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
People (including developers) want to belong to a group. While a few developers definitely fall into the the antisocial sat-in-a-corner-ignoring-the-world stereotype (and many will relapse into this when working on a fun feature), the majority of developers thankfully no longer do. But creating a that close bond when your teammates are not next to you and just a set of blue characters and a funny avatar on Skype is not easy. As such to aid the team to bond they need to see each other. A lot. I’m not suggesting that you mandate that online avatars are photos. Teams should bond in ways fun, imaginative ways as well.&lt;br /&gt;When a new member joins have them visit the other team. There really is no better way to bond as team than&amp;nbsp;being co-located and working together. If you can also try to allow team members to say goodbye in person when they leave the company so the team can&amp;nbsp;mourn&amp;nbsp;the loss of a close friend together.&lt;br /&gt;By having the near shored members of the team visit during their first few weeks in the team will aid in bonding,&amp;nbsp;and&amp;nbsp;also give the local team a chance to instil the values, ideas and practices that they hold dear onto the new members of the team.&lt;br /&gt;Saying hello is not a one time deal, nor should it only ever happen during a “crises”. It is also not a one-way-street. The local members of the team should be invited to travel to the near shored members and they should take this offer up regularly.&lt;br /&gt;The daily standup is vital for the health of any team greater the two people. With a distributed team it is very tempting to just do it over a text chat. However the stand up within a distributed team is also the opportunity to see “&lt;a data-mce-href=&quot;https://plus.google.com/u/0/+MichaelLee_mlk/posts/p/pub&quot; href=&quot;https://plus.google.com/u/0/+MichaelLee_mlk/posts/p/pub&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;the weird pixelated squirrel&lt;/a&gt;” as an actual person.&lt;br /&gt;So make the stand up a real stand up, where everyone in both locations stand up together and synchronize. The ideal for this is to have video conferencing hardware/software open and easily available where the team previously held standups. Don’t force the team to trundle off to the Video Conferencing room every morning. Especially if that room is used by other teams as well. Having to go too far is a sure fire way to kill the standup. A simple, inexpensive option here is to make your build monitors multi purpose. You likely already have them close to where the team would be stood up, and if you have a multiple screens, one can run the ticket system and the other a video feed of the remote team during stand up. Make sure you make switching to and from video conference mode bullet proof and quick. Don’t kill your standup with “set up time”.&lt;br /&gt;Some meetings (like the retro, sprint planning and team catch ups)&amp;nbsp;must&amp;nbsp;involve the full team. Rather than having a small number of rooms with very fancy video conferencing solutions running full video conferencing solutions, I’d recommend making sure every meeting room has a good webcam and an agreed on video conferencing and desktop sharing solution. Never put the team into a position where they need to fight for a room or worse - use a Skype on a mobile phone.&lt;br /&gt;Have a directory of real names&amp;nbsp;to real&amp;nbsp;faces, &amp;nbsp;online avatar and online handles. While the team should see each other frequently (ideally daily during standup), members of other teams will not and need a quick and easy way to match a name or handle to a real person they can connect with.&lt;/div&gt;
&lt;h2&gt;
The desktop&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In a co-located team utilizing your desk as 2-3 person meeting place is simple. However with a team where not everyone is in the same room then you need to add technology to allow this. This means selecting a good screen sharing and voice chat (video chat is not as important for this).&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
It is vital to select a tool that the whole team (including devops and the Product Owners) are happy with.&amp;nbsp;&lt;a data-mce-href=&quot;http://www.skype.com/&quot; href=&quot;http://www.skype.com/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;Skype&lt;/a&gt;,&amp;nbsp;&lt;a data-mce-href=&quot;https://www.teamviewer.com/&quot; href=&quot;https://www.teamviewer.com/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;TeamViewer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a data-mce-href=&quot;https://hangouts.google.com/&quot; href=&quot;https://hangouts.google.com/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;Google Hangouts&lt;/a&gt;&amp;nbsp;all support these features reasonable well, however bad devop support will kill it before it starts.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
You also need to be able to quickly talk to the whole team, this means a chat program. Ideally one that will allow new users to read the chat history and ties into existing tools (CI, virtual board, etc).&amp;nbsp;&lt;a data-mce-href=&quot;https://slack.com/&quot; href=&quot;https://slack.com/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;Slack&lt;/a&gt;&amp;nbsp;is a great solution to this, but not the only one.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Finally keep the number of applications/accounts required down to a reasonable number. Using the best tool for the job may, when looked at holistically may mean &amp;nbsp;the second best for this job, but best overall. Every communications application you add to your stack means more setup when you grow and shrink the team.&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
Breaking Barriers&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
During the first few retrospectives make a point of mentioning communication and ensure that whatever barrier is found in one retrospective is fixed within the next month. Don’t let let communication issues drag on.&lt;/div&gt;
&lt;h2&gt;
Replication&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
If a physical item (such as a build monitor; or “Monday Doughnuts”) is used by location, try to make sure that it is replicated at the other. You don’t want to create a “favoured” team and kill moral. Likewise try to evenly distribute “seniority” over the two locations (even in a flat team structure you will have unofficially senior developers), without doing so you risk unintentionally turning the team with the lower seniority into code monkeys to throw work at.&lt;/div&gt;
&lt;h2&gt;
Etiquette&lt;/h2&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This smaller sized location gets to talk first.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Internet audio chat is laggy, so let people finish.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Don’t get upset when a member of the team in the other location talks over you. It is unlikely they mean to do so.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;One person from each location goes to a meeting room 5 minutes before the meeting starts and makes sure the video conferencing software works.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Always invite members of the other location into quick huddles on design features.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;When an important decision is made broadcast it on the chat solution.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Please let me know if I&#39;ve missed anything when it comes to building a single distributed team that works as a single team in the comments below.&lt;strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is part two of my series of posts on distributed teams. You can find&amp;nbsp;&lt;a data-mce-href=&quot;https://www.linkedin.com/pulse/making-distributed-teams-work-before-you-start-michael-lloyd-lee&quot; href=&quot;https://www.linkedin.com/pulse/making-distributed-teams-work-before-you-start-michael-lloyd-lee&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;part one here on Pulse&amp;nbsp;&lt;/a&gt;and the&amp;nbsp;&lt;a data-mce-href=&quot;http://ihaztehcodez.michael-lloyd-lee.me.uk/search/label/Making%20Distributed%20Teams%20Work%20series&quot; href=&quot;http://ihaztehcodez.michael-lloyd-lee.me.uk/search/label/Making%20Distributed%20Teams%20Work%20series&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;complete series posted so far&lt;/a&gt;&amp;nbsp;over on my&amp;nbsp;&lt;a data-mce-href=&quot;http://ihaztehcodez.michael-lloyd-lee.me.uk/&quot; href=&quot;http://ihaztehcodez.michael-lloyd-lee.me.uk/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot;&gt;personal blog&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Helvetica Neue&#39;; font-size: small; line-height: normal;&quot;&gt;This article was originally posted on&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://www.linkedin.com/pulse/making-distributed-teams-work-one-team-michael-lloyd-lee&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;; font-size: medium; line-height: normal;&quot;&gt;LinkedIn Pulse&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue&#39;; font-size: small; line-height: normal;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/9142570393029967494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/9142570393029967494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/9142570393029967494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/9142570393029967494'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2015/09/making-distributed-teams-work-be-one.html' title='Making Distributed Teams Work - Be One Team'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-1115105347511424912</id><published>2015-08-15T07:08:00.002+01:00</published><updated>2015-08-15T07:13:58.238+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="article"/><category scheme="http://www.blogger.com/atom/ns#" term="distributed teams"/><category scheme="http://www.blogger.com/atom/ns#" term="Making Distributed Teams Work series"/><category scheme="http://www.blogger.com/atom/ns#" term="near shore"/><title type='text'>Making Distributed Teams Work  - Before you start...</title><content type='html'>&lt;h1 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Introduction&lt;/span&gt;&lt;/h1&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;This is the first article in a series offering pointers on how to make the most out of a distributed team. The series is based on experience with growing internal teams with additional near shored developers rather than building a completely external team. It is my experience that completely external teams don’t work as well as distributed teams. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The first article (this one!) will cover things to put into place before you start to grow the team. It will briefly describe what you should put into place &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;before&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; you start to engage with external suppliers and why. Later articles will cover topics such as hiring practises and how to keep the team working as a single, unified team.&lt;/span&gt;&lt;/div&gt;
&lt;b id=&quot;docs-internal-guid-4e5d0f91-2ff9-2fca-b4f2-2eb986db466e&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h1 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Team DNA&lt;/span&gt;&lt;/h1&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Before you grow your internal team with near shored developers you should ensure that the team&#39;s DNA is in a healthy state. The near shored team will pick up the mood of the local members of the team and mirror that. If your current team is struggling then you can expect the same as you grow it.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;As such it is vital you first get your own house in order. Hopefully nothing in this section is new to you as it covers best practices. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 17.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Love the CI server&lt;/span&gt;&lt;/h2&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;At the absolute minimum you should have a CI server building the project and running any automated tests. Failures on the CI server should be handled before new functionality is developed. &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Absolutely no one&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; pushes onto a broken build and build broken for more than &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 13.333333333333332px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;X&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; minutes is reverted. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Without this in place before you start you can find your local team (who are used to “shouting out” issues) tripping over the feet of the near shored team. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 17.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Clear Branching Strategy&lt;/span&gt;&lt;/h2&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;It does not matter which strategy you use (I’ve seen toggles with virtually no branching work well &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;with the right team&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;), but the local members of your team should love it, be willing and able to evangelise it and most importantly of all quickly and clearly explain it. If you can’t do that the two teams will start to move in their own directions leading to a lost of time and effort rehashing old arguments. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 17.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Pairing&lt;/span&gt;&lt;/h2&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;This could be simply pair merging-to-master or full pair programming. This becomes more important when you onboard new developers as you want the new members of the team to follow (and extend) your ideas on quality. It also allows you to ensure that the quality of code remains consistently good. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Waiting until you onboard the new members of your team before starting pairing will make the initial pairing exercises awkward as the local members of the team will not be used to doing it and the pairing exercises will be infrequent again as the local members of the team will not be insisting on it allowing code not to the quality you would expect to sneak in.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 17.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Little A agile &lt;/span&gt;&lt;/h2&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;This is not a slam on big A agile - by all means be that too. Expect everything you set up before bringing in the near shored team members to change as you work out what works for your team. The team will start off broken and will need time and willingness to fix it, so ensure ahead of time that the local members of your team are open to new ideas.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Little A agile as a scheduled retrospect may not make sense in a very small team of a couple of co-located people, but is vital once the team grows and are no longer co-located. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h1 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Enable Work From Home&lt;/span&gt;&lt;/h1&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Some members of your team will be effectively working from home most of the time. Making this as seamless and easy a process before bringing them on board will mean that the relationship will start of a high note.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;While VPNs can allow the remote members of your team to work as if they were in the office the reality is it will be a good chunk slower. So some practises you can use in for an office based development team (like utilizing a single central development database) don’t work when you have a slow connection to that database. So either use an completely dev-local, in-memory database during development (Derby or the like) or use something like Vagrant to build up a database.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Think about how you store and access your source control. A local hosted repository works great when external access is rare, but when it is the norm your need to make sure your VPN is bullet proof or move it out of your network. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;How easy is it to set up a virgin machine? At the bare minimum ensure that the steps are well documented, ideally completely automated. Either via a virtual machine that anyone can just spin up and go with or utilizing a scripting platform to build up a computer to a known state. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h1 dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Trebuchet MS&#39;; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In Summary&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;If you have a healthy team to begin with then expanding them with near shored members with be a lot more likely to succeed. However if the local team needs some work then you have a sizable project to do before you start. While you could prioritize hiring at the external company to bring in experts to help set this up you risk building an “us-vs-them” atmosphere within the local team and for a distributed team to work the team must gell. So try to solve the problems locally by either training or bringing in a local expert. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;This article was originally posted on &lt;a href=&quot;https://www.linkedin.com/pulse/making-distributed-teams-work-before-you-start-michael-lloyd-lee&quot;&gt;LinkedIn Pulse&lt;/a&gt;. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/1115105347511424912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/1115105347511424912' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1115105347511424912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1115105347511424912'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2015/08/making-distributed-teams-work-before.html' title='Making Distributed Teams Work  - Before you start...'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total><georss:featurename>London, UK</georss:featurename><georss:point>51.5073509 -0.12775829999998223</georss:point><georss:box>51.1912379 -0.77320529999998222 51.8234639 0.51768870000001777</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-7697818337253193941</id><published>2014-07-23T14:15:00.002+01:00</published><updated>2014-07-28T22:30:53.688+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="board games"/><category scheme="http://www.blogger.com/atom/ns#" term="rambling"/><category scheme="http://www.blogger.com/atom/ns#" term="retrospective"/><category scheme="http://www.blogger.com/atom/ns#" term="scrum"/><category scheme="http://www.blogger.com/atom/ns#" term="slacking off while looking like you are working"/><title type='text'>One Night Ultimate Werewolf as a team building exercise</title><content type='html'>&lt;div class=&quot;body-text&quot;&gt;
I work with a team who are not gelling well. It is for a variety of 
reasons including an inability to calmly discuss differences in opinion.
 Two weeks ago I added a game of &lt;a href=&quot;http://boardgamegeek.com/boardgame/98778/hanabi&quot;&gt;Hanabi &lt;/a&gt;to the end of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Scrum_%28software_development%29#End_meetings_.28Sprint_Review_and_Sprint_Retrospective.29&quot;&gt;Scrum Retrospective&lt;/a&gt; to ease a few of the broken lines of communication. This 
worked very well and I would recommend it for the close of any retrospective.&lt;br /&gt;
&lt;br /&gt;
However while Hanabi is an awesome co-operative team game the rules prevent 
genuine discourse during play. This week I kicked of a game of &lt;a href=&quot;http://boardgamegeek.com/boardgame/147949/one-night-ultimate-werewolf&quot;&gt;One Night Ultimate Werewolf&lt;/a&gt; despite my concerns I was about to be in the centre 
of an almighty scream fest. I’m pleased to say instead I was treated to five amazing games of 
Werewolf. It was much easier for the team to have a calm discussion when
 you remove professional pride. But it was not perfect and some members of 
the team hung back instead of diving in to the game. I would be interested to try &lt;a href=&quot;http://boardgamegeek.com/boardgame/41114/resistance&quot;&gt;The Resistance&lt;/a&gt; where 
everyone is forced to be involved.&lt;br /&gt;
&lt;br /&gt;
I know many don’t recommend games that include a degree of paranoia 
in team building events and with good reason. If you do try adding the game to your retrospectives try stacking the deck to put two people who don’t get on to be on team wolf and break down some barriers. Even if you don&#39;t force some team members to work together you are still providing fun, relaxed environment to step back and chat. &lt;br /&gt;
&lt;br /&gt;
I would not recommend you start with this as your close-of-retro team building exercise. Start with a pure co-operative game like Hanabi, but once you feel your team can work together I highly recommend adding One Night Ultimate Werewolf - it is fun and promotes relaxed discussions which does not fall neatly into your teams existing cliques. Always include the tanner, it is a cheap laugh. &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/7697818337253193941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/7697818337253193941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/7697818337253193941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/7697818337253193941'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2014/07/one-night-ultimate-werewolf-as-team.html' title='One Night Ultimate Werewolf as a team building exercise'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-3312207950439553385</id><published>2013-11-09T09:16:00.002+00:00</published><updated>2013-11-09T09:20:29.405+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="digital estate"/><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="off topic"/><title type='text'>Death and Digital Estates</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The goal of this post is to outline different companies view on what happens to your Digital Estate on your death. This is not looking at either the legality of their positions or the transferring content between living people.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;a href=&quot;http://www.darkhorse.com/&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Dark Horse Comics&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; have no offical policy. The support staff recomend sharing your user details as part of your will.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.comixology.com/&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Comixology&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; do not allow it at this time.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.apple.com/uk/itunes/&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Apple iTunes&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; have an offical method of tranferring accounts. To make use of this you need to supply Apple with&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;A copy of the death certificate of the account holder.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;A legal document confirming the right to transfer the deceased&#39;s property.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;http://www.amazon.co.uk/&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Amazon&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; will close the account (taking the content with it) on request but the support staff suggested sharing your user details.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://www.google.co.uk/&quot;&gt;&lt;b&gt;Google&lt;/b&gt;&lt;/a&gt; support staff suggested passing on your account details.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://store.steampowered.com/&quot;&gt;&lt;b&gt;Steam&lt;/b&gt;&lt;/a&gt; do not support it at this time.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;



&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;inherit&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;More than I
would like don’t support it at all, and for those that do it is an
afterthought. Alas none support transferring individual assets.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/3312207950439553385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/3312207950439553385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3312207950439553385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/3312207950439553385'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2013/11/death-and-digital-estates.html' title='Death and Digital Estates'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-8832171758417264997</id><published>2013-10-28T15:17:00.001+00:00</published><updated>2013-10-28T15:17:39.044+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="quickie"/><title type='text'>Bash Loops and the Dreaded Space</title><content type='html'>The &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;for&lt;/span&gt; loop in Bash uses the &lt;a href=&quot;http://www.gnu.org/software/bash/manual/bashref.html#Bourne-Shell-Variables&quot;&gt;environment variable IFS&lt;/a&gt; to work out what is a different item in a for loop. By default this is all manor of white space. Sometimes (like when working with files) it is useful to change this to be just newlines. Example below.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#!/bin/bash&lt;br /&gt;SAVEIFS=$IFS&lt;br /&gt;IFS=$(echo -en &quot;\n\b&quot;)&lt;br /&gt;for i in *&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; echo $i&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;done&lt;br /&gt;IFS=$SAVEIFS&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/8832171758417264997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/8832171758417264997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8832171758417264997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/8832171758417264997'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2013/10/bash-loops-and-dreaded-space.html' title='Bash Loops and the Dreaded Space'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-5345642455450659888</id><published>2013-09-02T13:41:00.000+01:00</published><updated>2014-07-28T22:34:40.387+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CV"/><category scheme="http://www.blogger.com/atom/ns#" term="mini-article"/><category scheme="http://www.blogger.com/atom/ns#" term="rambling"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><title type='text'>Ten Point CV Rant</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-GB&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:DontVertAlignCellWithSp/&gt;
   &lt;w:DontBreakConstrainedForcedTables/&gt;
   &lt;w:DontVertAlignInTxbx/&gt;
   &lt;w:Word11KerningPairs/&gt;
   &lt;w:CachedColBalance/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;--&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;

After spending the past few months looking at awful CVs and code tests I&#39;d
like to give all the people currently looking for work a few pointers:&lt;br /&gt;
&lt;br /&gt;
1) The people reading your CV don&#39;t care at all about your hobbies. Please
leave out the fact that you &quot;play football with your dad on the
weekend&quot;. If you must include your hobbies make it a short set of tags not
a story.&lt;br /&gt;
&lt;br /&gt;
2) I really don&#39;t believe that I have to say this but: Get someone else to
read your CV. Ideally someone who speaks English (replace if required) natively
or near-natively.&lt;br /&gt;
&lt;br /&gt;
3) Don&#39;t lie on your CV! You will be caught out during the interview. &lt;br /&gt;
&lt;br /&gt;
4) Clear, short and to the point is better than rambling.&lt;br /&gt;
&lt;br /&gt;
5) Personally I think a short paragraph or two works better than a bullet
point hell.&lt;br /&gt;
&lt;br /&gt;
6) If you are asked to do a test at home then this is your opportunity to
the person reading it that you are damn good at your job. So spend the time to
do it well. &lt;br /&gt;
&lt;br /&gt;
7) Personally I only read up to page three. I like it when CVs stop at
around that point. &lt;br /&gt;
&lt;br /&gt;
8) Spell check! &lt;br /&gt;
&lt;br /&gt;
9) Format it. Does not have to be great, just better than vomited alphabetti
spaghetti.&lt;br /&gt;
&lt;br /&gt;
10) Make sure you get your skills in the right buckets. JUnit is not a
&quot;J2EE framework&quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One last thing: Recruiters: I know proof reading CVs is not really your job,
but if you get a CV that is a mess of red and green squiggles then please send
it back to the applicant.&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin-top:0cm;
 mso-para-margin-right:0cm;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0cm;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:&quot;Times New Roman&quot;;
 mso-fareast-theme-font:minor-fareast;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/5345642455450659888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/5345642455450659888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5345642455450659888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/5345642455450659888'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2013/09/ten-point-cv-rant.html' title='Ten Point CV Rant'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1319685701804027745.post-1950170527182826603</id><published>2013-07-22T11:57:00.000+01:00</published><updated>2013-10-05T13:52:09.770+01:00</updated><title type='text'>&quot;Screenshot&quot; a webpage in Java</title><content type='html'>This is an update to &quot;&lt;a href=&quot;http://ihaztehcodez.michael-lloyd-lee.me.uk/2009/11/how-to-render-html-in-java-then-save.html&quot;&gt;How to render HTML in Java then save this as an image&lt;/a&gt;&quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Headlessly; Pure Java:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
A few Java based HTML renders exist, all with different sets of drawbacks. The most common is the one&amp;nbsp;&lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/html/HTMLEditorKit.html&quot;&gt;built in&lt;/a&gt;. This is quite simple and can only render fairly basic HTML. The most interesting I know of is The &lt;a href=&quot;http://code.google.com/p/flying-saucer/&quot;&gt;Flying Saucer Project&lt;/a&gt;. This can render fairly complex XHTML but you will have to convert HTML before you can use it (&lt;a href=&quot;http://jtidy.sourceforge.net/&quot;&gt;JTidy&lt;/a&gt; may be able to help here). Taking a Swing component and creating a image is fairly simple, you just pass an &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/awt/image/BufferedImage.html&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;BufferedImage&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;s&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/awt/image/BufferedImage.html#createGraphics%28%29&quot;&gt;graphics&lt;/a&gt; object and pass it to the Swing components&amp;nbsp;&lt;a href=&quot;http://java.sun.com/javase/6/docs/api/javax/swing/JComponent.html#paint%28java.awt.Graphics%29&quot;&gt;paint&lt;/a&gt; method. Then splat that out with &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/javax/imageio/ImageIO.html&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ImageIO&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A
 big advantage to this would be that the renderer would be headless. The
 disadvantage is that it would not be a perfect rendering and it would 
lack any plugin support.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Headlessly; External Application:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/ariya/phantomjs/&quot;&gt;PhantomJS&lt;/a&gt; (a headless webkit browser) can &lt;a href=&quot;https://github.com/ariya/phantomjs/wiki/Screen-Capture&quot;&gt;take screen shots &lt;/a&gt;in an automated manor. It will require using &lt;a href=&quot;http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html&quot;&gt;ProcessBuilder&lt;/a&gt; to fire it off with the correct parameters; but that is quite simple. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;String phantomjsHome = &quot;c:\\tools\\phantomjs-1.9.1-windows\\&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;String phantomjsRasterizeScript = phantomjsHome + &quot;examples\\rasterize.js&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;String url = &quot;http://google.com&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;String file = &quot;c:\\code\\google.png&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ProcessBuilder pb = new ProcessBuilder(phantomjsHome + &quot;phantomjs&quot;, phantomjsRasterizeScript, url, file);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ProcessBuilder.Redirect error = pb.redirectError();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ProcessBuilder.Redirect out = pb.redirectOutput();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ProcessBuilder.Redirect in = pb.redirectInput();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Process process = pb.start();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;process.waitFor();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Like using a Java in-memory browser, it is headless and as it is WebKit based it should be very close to Safari. Alas it does not support plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;With a head&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
The simplest solution would be to make use of &lt;a href=&quot;http://docs.seleniumhq.org/&quot;&gt;Selenium&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;code&gt;&lt;span class=&quot;typ&quot;&gt;WebDriver&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; driver &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;FirefoxDriver&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
driver&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;http://www.google.com/&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; scrFile &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;TakesScreenshot&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;driver&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;getScreenshotAs&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;OutputType&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;FILE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&amp;nbsp;It will require a head (even if it is virtual) but will give a perfect rendering for a given browser (as it will use said browser). &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The Cloud&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Plenty of cloud based solutions also exist if hosting a service locally is an issue.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://grabz.it/&quot;&gt;Grabz It&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://url2png.com/&quot;&gt;Url2Png&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.thumbalizr.com/&quot;&gt;thumbalizr&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webshotspro.com/&quot;&gt;webshotspro&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://browsershots.org/&quot;&gt;browsershots&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://immediatenet.com/thumbnail.html&quot;&gt;immediatenet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.shrinktheweb.com/&quot;&gt;shrinktheweb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://browshot.com/api/documentation#simple&quot;&gt;Browser Shot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://snapito.com/paid-api.jsp&quot;&gt;Snapito&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://wimg.ca/&quot;&gt;wIMG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/feeds/1950170527182826603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1319685701804027745/1950170527182826603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1950170527182826603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1319685701804027745/posts/default/1950170527182826603'/><link rel='alternate' type='text/html' href='http://ihaztehcodez.michael-lloyd-lee.me.uk/2013/07/screenshot-webpage-in-java.html' title='&quot;Screenshot&quot; a webpage in Java'/><author><name>Michael Lee</name><uri>http://www.blogger.com/profile/04267783111219770327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>