<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;D0ACQXg4eip7ImA9WxNVFUw.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325</id><updated>2009-10-26T00:09:20.632Z</updated><title>Programming for People</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/ProgrammingForPeople" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;D0ACQXg_eip7ImA9WxNVFUw.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-6365774897052331817</id><published>2009-10-25T23:49:00.003Z</published><updated>2009-10-26T00:09:20.642Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-26T00:09:20.642Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>Style sheets for IDEs</title><content type="html">As programmers, code layout is very important to us.&lt;br /&gt;&lt;br /&gt;If code is presented in a way we are familiar with, we can skim-read entire passages of code in very little time and find our way to the significant details very quickly. With well presented code, you can often see the general flow of the code without even having to read the fine details.&lt;br /&gt;&lt;br /&gt;Conversely, if the code we read is layed out poorly, it can be a real struggle to read through, and can take a very long time to get even a basic understanding of the code.&lt;br /&gt;&lt;br /&gt;Unfortunately, "well presented" is a very personal, subjective description of code.&lt;br /&gt;&lt;br /&gt;Indent with 3 spaces or 4? Tabs or spaces? Braces on the same line as other code? Alignment of variable names? Prefix? Hungarian?&lt;br /&gt;&lt;br /&gt;There are hundreds more examples.  If you surveyed every programmer you knew, I'm sure you wouldn't find any two who agreed on every point of code layout.&lt;br /&gt;&lt;br /&gt;The trouble is, there is no right answer - there are valid reasons for all the choices.&lt;br /&gt;&lt;br /&gt;What we need, is a way of separating out the code from its layout - syle from substance.&lt;br /&gt;&lt;br /&gt;When we have IDEs which can present any piece of code in your style, we'll have made a great leap in the speed of code comprehension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-6365774897052331817?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/6365774897052331817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=6365774897052331817" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6365774897052331817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6365774897052331817?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/10/style-sheets-for-ides.html" title="Style sheets for IDEs" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEMFQHk6fyp7ImA9WxJbEks.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-5475496416359192429</id><published>2009-07-22T12:06:00.005+01:00</published><updated>2009-07-22T12:33:31.717+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-22T12:33:31.717+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Misc" /><title>What do I want from a mobile phone?</title><content type="html">&lt;ul&gt;&lt;li&gt;I want good audio quality!&lt;/li&gt;&lt;li&gt;I want long battery life - specifically I want to be able to turn the screen on and off in order to save the battery - even during a phone call!&lt;/li&gt;&lt;li&gt;I want to be able to turn the phone off and the alarm clock to still work (I don't want to leave a "live" mobile phone on my bedside table at night every night).&lt;/li&gt;&lt;li&gt;I want the phone to charge via USB - then I don't have to carry my charger around with me everywhere.&lt;/li&gt;&lt;li&gt;I want the interface to be as customizable as possible - if I don't have a data plan, 100 internet shortcuts are useless to me!&lt;/li&gt;&lt;li&gt;I want the phone to vibrate for a phone call or text message - but not when navigating menus!&lt;/li&gt;&lt;li&gt;I want tactile feedback from the buttons on the phone - I often "touch-type" with my mobile, but if some buttons don't have the same "click" as other buttons it will throw me off.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-5475496416359192429?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/5475496416359192429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=5475496416359192429" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5475496416359192429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5475496416359192429?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/07/what-do-i-want-from-mobile-phone.html" title="What do I want from a mobile phone?" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D08ASHo5fip7ImA9WxJXEko.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-1617082923134074271</id><published>2009-06-05T22:00:00.004+01:00</published><updated>2009-06-06T09:10:49.426+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-06T09:10:49.426+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Customizations" /><title>Open File Security Warning Removal</title><content type="html">Fed up with having to deal with the security warning every time you download a file from the internet?  Supress the warning dialog with the instructions found in the first link on &lt;a href="http://www.google.co.uk/search?q=I+see+a+ton+of+ways+that+are+supposed+to+disable+this+but+none+seem+to+work.++Is+there+a+way+to+truly+disable+it&amp;amp;sourceid=navclient-ff&amp;amp;ie=UTF-8&amp;amp;rlz=1B3GGGL_enUS321US321"&gt;this page.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go to Run -&gt; gpedit.msc&lt;br /&gt;User Configuration -&gt; Administrative Templates -&gt; Windows Components -&gt; Attachment Manager -&gt; Inclusion List for moderate risk file types.&lt;br /&gt;Enable it and in the box specify the extensions such .exe, .jpg, .com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-1617082923134074271?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/1617082923134074271/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=1617082923134074271" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1617082923134074271?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1617082923134074271?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/06/open-file-secuirty-warning-removal.html" title="Open File Security Warning Removal" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DE4HRn4_fyp7ImA9WxJXEU0.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-3924447844663281211</id><published>2009-06-04T10:09:00.005+01:00</published><updated>2009-06-04T10:15:37.047+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-04T10:15:37.047+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>TreeViewScroll</title><content type="html">The .net TreeView doesn't expose a scroll event.  Make your own by overriding DefWndProc.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;   public class TreeViewScroll : TreeView&lt;br /&gt;  {&lt;br /&gt;     private const int WM_VSCROLL = 0x115;&lt;br /&gt;     private IntPtr SB_ENDSCROLL = new IntPtr(8);&lt;br /&gt;&lt;br /&gt;     public event MethodInvoker Scroll;&lt;br /&gt;&lt;br /&gt;     protected void OnScroll()&lt;br /&gt;     {&lt;br /&gt;        if (Scroll != null)&lt;br /&gt;           Scroll();&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     protected override void DefWndProc(ref Message m)&lt;br /&gt;     {&lt;br /&gt;        if (m.Msg == WM_VSCROLL)&lt;br /&gt;        {&lt;br /&gt;           if (m.WParam != SB_ENDSCROLL)&lt;br /&gt;              OnScroll();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        base.DefWndProc(ref m);&lt;br /&gt;     }&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The code above is sufficient for my needs, but if you need more details about the scroll (direction, where you scrolled to, etc) you need to interrogate the message further.&lt;br /&gt;&lt;br /&gt;This link should tell you what the message contains:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb787577(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb787577(VS.85).aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This link can tell you the scrollbar values:&lt;br /&gt;&lt;a href="http://www.pinvoke.net/default.aspx/Enums/ScrollBarCommands.html"&gt;http://www.pinvoke.net/default.aspx/Enums/ScrollBarCommands.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-3924447844663281211?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/3924447844663281211/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=3924447844663281211" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3924447844663281211?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3924447844663281211?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/06/treeviewscroll.html" title="TreeViewScroll" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkMEQXk5eCp7ImA9WxJQFU0.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-397555912877463938</id><published>2009-05-28T12:00:00.000+01:00</published><updated>2009-05-28T12:00:00.720+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-28T12:00:00.720+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>Stuck in a rut</title><content type="html">Don't get stuck in a rut!  Don't miss the wood for the trees!&lt;br /&gt;&lt;br /&gt;The other day, I was working out some long, convoluted workaround for dealing with the fact that vector iterators can become invalid if the vector resizes.&lt;br /&gt;&lt;br /&gt;Then someone reminded me that you can access elements of a vector by index.  D'oh!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-397555912877463938?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/397555912877463938/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=397555912877463938" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/397555912877463938?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/397555912877463938?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/05/stuck-in-rut.html" title="Stuck in a rut" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;CEcDQHo9eyp7ImA9WxJQFEs.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-5945109451540683646</id><published>2009-05-27T22:40:00.002+01:00</published><updated>2009-05-27T23:07:51.463+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-27T23:07:51.463+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Anecdote" /><title>If in doubt, wiggle</title><content type="html">A few years ago, part of my job involved making large print runs in Microsoft Word - in the region of 500 to several thousand pages per job.  While doing this I discovered an unusual quirk.&lt;br /&gt;&lt;br /&gt;In the status bar a little animated icon appears alongside a counter that tells you how far through your print job you are.  Quite frequently with the large print jobs, I noticed that the counter would freeze on quite a low number.  The printer would catch up to the counter and then nothing would happen for a little while.&lt;br /&gt;&lt;br /&gt;But if you wanted, you could "remind" Word to carry on printing, by &lt;span style="font-weight: bold;"&gt;wiggling the moue&lt;/span&gt; over the status icon!  While the mouse was moving, the status icon's counter was counting upwards - as soon as you stopped moving, the counter stopped counting.&lt;br /&gt;&lt;br /&gt;An obvious explanation might be that the counter only repainted when mouse moved over it; but I experimented - the printer didn't print pages unless the status counter was incrementing.  Whenever the counter froze, the printer stopped, and as soon as I moved the mouse over the icon, printing resumed.&lt;br /&gt;&lt;br /&gt;How odd.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-5945109451540683646?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/5945109451540683646/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=5945109451540683646" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5945109451540683646?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5945109451540683646?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/05/if-in-doubt-wiggle.html" title="If in doubt, wiggle" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0MGQHYzeyp7ImA9WxVVFUQ.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-1067373913119647445</id><published>2009-03-08T23:14:00.006Z</published><updated>2009-03-09T10:43:41.883Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-09T10:43:41.883Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Zipping in C#</title><content type="html">After spending hours digging around, trying to find the .net solution to zipping folders using c#, the easiest solution seems to be to use the command line for 7zip.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;String zipper = @"c:\program files\7-zip\7z.exe";&lt;br /&gt;String args = "a -tzip " + compressPath + " " + compressFolder;&lt;br /&gt;&lt;br /&gt;Process proc = Process.Start(zipper, args);&lt;br /&gt;proc.WaitForExit();       &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;where compressPath is something like "C:\foo.zip" and compressFolder is something like "C:\foo".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update: 9th March 2009&lt;/span&gt;&lt;br /&gt;It's probably a good idea to make sure both compressPath and compressFolder are surrounded by quotes in case they contain spaces!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-1067373913119647445?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/1067373913119647445/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=1067373913119647445" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1067373913119647445?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1067373913119647445?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2009/03/zipping-in-c.html" title="Zipping in C#" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;C0AMQXc7eCp7ImA9WxRaGEs.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-4667586145434989894</id><published>2008-12-21T12:30:00.000Z</published><updated>2008-12-21T12:16:20.900Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-21T12:16:20.900Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>Terminology: Ensure</title><content type="html">What's in a name?  Well, quite a lot actually.  At best, a poorly chosen name gives little or no insight into the nature of thing it is naming, and at worst the name can be misleading and actually send you down the wrong path entirely. Conversely, well chosen names can convey the meaning, and intent for a variable, method or project.&lt;br /&gt;&lt;br /&gt;There's plenty of literature available on the topic, so I'm not going to belabour the point any more, other than to give a couple of examples of names that I try to use consistently in my projects.  I'll add other examples as and when I remember them!&lt;br /&gt;&lt;br /&gt;The first, I've already mentioned in a previous post, and that name is "Scaffold".  To me, it means "something I've put up as a temporary structure, that isn't intended to be there when the final product is released".&lt;br /&gt;&lt;br /&gt;The second name is used when I want to get a reference to something that may not have been created yet.&lt;br /&gt;&lt;br /&gt;If I was going to create a foo object, I'd probably use "CreateFoo".  But I can't use "Create" because the object might already exist.&lt;br /&gt;&lt;br /&gt;If I was going to retrieve a foo object, I might use "GetFoo".  But again, I can't use "Get" because the object might not have been created yet.&lt;br /&gt;&lt;br /&gt;So the term I use in this situation is "Ensure".  I think "EnsureFoo" conveys the meaning and is distinct from "Create" and "Get", and doesn't mislead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-4667586145434989894?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/4667586145434989894/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=4667586145434989894" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4667586145434989894?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4667586145434989894?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/10/terminology-ensure.html" title="Terminology: Ensure" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;C0YCQXw5fyp7ImA9WxRaGE0.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-3832064099818143890</id><published>2008-12-20T19:26:00.000Z</published><updated>2008-12-20T19:26:00.227Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-20T19:26:00.227Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Misc" /><title>Delete the font</title><content type="html">Originally, I could read every website that was thrown at me.&lt;br /&gt;&lt;br /&gt;Then, ClearType arrived, and I had the option of "improving" the readability on my LCD screen.  I tried ClearType and decided I prefered my text without ClearType, so turned it off.  Things were still fine.&lt;br /&gt;&lt;br /&gt;But then, sites started using fonts that seemed to rely on ClearType to be clear enough to read.  The fonts I struggled with were mainly Calibri, Segoe and Vera.&lt;br /&gt;&lt;br /&gt;(I won't bother posting screenshots, because you won't be able to see them as they appear on my monitor.)&lt;br /&gt;&lt;br /&gt;I tried to find ways to disable certain fonts on websites, replace font X for Y, make a global stylesheet change, but in the end, I found the way to make readable the sites that use those fonts, was simply to delete the fonts that I struggled to read. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-3832064099818143890?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/3832064099818143890/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=3832064099818143890" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3832064099818143890?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3832064099818143890?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/12/delete-font.html" title="Delete the font" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;C0EEQXw_fSp7ImA9WxRaFk0.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-1756294870676059412</id><published>2008-12-18T12:00:00.000Z</published><updated>2008-12-18T12:00:00.245Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-18T12:00:00.245Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Random" /><title>Ideas</title><content type="html">I wonder if there's a website where you can post your ideas for coding projects.  I had a (very) brief search, but didn't find anything so far.&lt;br /&gt;&lt;br /&gt;Various software ideas pop into my head from time to time.&lt;br /&gt;&lt;br /&gt;Here's one of them:&lt;br /&gt;&lt;br /&gt;Connecting people via a database correlating hobbies with people.&lt;br /&gt;&lt;br /&gt;By chance I found out that a colleague read some of the same books as me - we had a bit of a chat about the books and it made a nice change to talking about work.  I wondered how many other colleagues read the same books as me.  So originally the database idea was just for work.  Then I thought it could easily be expanded to allow people in local neighourhoods to find people with similar interests.  Then I thought it could easily be expanded to be a global database.&lt;br /&gt;&lt;br /&gt;The trouble would be getting people interested enough to fill in their details.  Writing the database and the interface would be easy by comparison!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-1756294870676059412?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/1756294870676059412/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=1756294870676059412" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1756294870676059412?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1756294870676059412?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/12/ideas.html" title="Ideas" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEcFR38zeCp7ImA9WxVbFUU.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-112590001257256392</id><published>2008-12-17T12:00:00.003Z</published><updated>2009-04-01T11:33:36.180+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-01T11:33:36.180+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Customizations" /><title>More Customizations</title><content type="html">Two more customizations - this time relating to the system notification area.&lt;br /&gt;&lt;br /&gt;When working on a new PC, sooner or later I end up installing &lt;a href="http://www.4t-niagara.com/tray.html"&gt;4t Tray Minimizer&lt;/a&gt;.  I like to keep a clear taskbar, so if I have several programs open at once, and I'm not actively working on something, but don't want to close it, I can right-click the minimize button and it turns into an icon in the system notification area.&lt;br /&gt;&lt;br /&gt;Secondly, when I have too many icons in the notification area, I like to decide which icons don't need to be there at all.  For the trial period, I had &lt;a href="http://www.pssoftlab.com/"&gt;PS Tray Factory&lt;/a&gt; installed, which mostly did what I expected of it, though it did seem to forget my settings from time to time (although that could have been one of the trial limitations).&lt;br /&gt;&lt;br /&gt;I'd quite like to have a go at writing my own program that manipulates the icons in the notification area.  When I have time.  One day. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-112590001257256392?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/112590001257256392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=112590001257256392" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/112590001257256392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/112590001257256392?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/12/more-customizations.html" title="More Customizations" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEcFQ3g9eip7ImA9WxRaFEk.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-6620226474650444968</id><published>2008-12-16T12:00:00.001Z</published><updated>2008-12-16T15:40:12.662Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-16T15:40:12.662Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Random" /><title>Conversation Context</title><content type="html">Why are mobile phones so distracting to the point where over 30 countries have made it illegal to drive while operating a mobile phone.  If having a conversation with someone over the phone is so distracting, why isn't it illegal to chat to a passenger in your car?&lt;br /&gt;&lt;br /&gt;In England, at least, it's legal to use a mobile phone while driving, as long as you are operating the phone "hands-free".  Personally, however, I wouldn't feel safe operating a mobile phone while driving, regardless of whether or not I could use the phone and keep both hands on the wheel.&lt;br /&gt;&lt;br /&gt;The reason is to do with context, and it doesn't just apply to using a mobile phone in a car - I have the same issue with landlines and three-way-conversations involving somebody in the room with me.&lt;br /&gt;&lt;br /&gt;The trouble is, in both examples, I'm the piggy-in-the-middle, but neither of the other "players" communicates with each other directly.&lt;br /&gt;&lt;br /&gt;In the landline example, the other players are obviously the person on the other end of the line and the person in the same room as me.  In the mobile example, one player is the person on the mobile, while the other player is the environment in which I'm driving my car.&lt;br /&gt;&lt;br /&gt;If somebody was sat in the car with me, and the lights turned green, they could see that I was concentrating and hang fire with the conversation until they could see that there was less demand for my attention.  But the person on the other end of the mobile can't see the road, and know when to pause, so will carry on talking and distracting me, without realising.&lt;br /&gt;&lt;br /&gt;I'm sure there's an analogy to programming here, but for the life of me I can't see it... :-S&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-6620226474650444968?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/6620226474650444968/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=6620226474650444968" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6620226474650444968?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6620226474650444968?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/12/conversation-context.html" title="Conversation Context" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkIERXkycSp7ImA9WxRaE0o.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-5615661966035340958</id><published>2008-12-15T10:07:00.002Z</published><updated>2008-12-15T22:01:44.799Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-15T22:01:44.799Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>Scaffold</title><content type="html">Ever find yourself commenting out lines of code, or adding dummy values, or setting up variables just to test something, then once the test has finished, going back through your code removing the comments, commenting out the dummy values and changing the variables back?  And then repeating that sequence when you find that you hadn't actually finished testing?&lt;br /&gt;&lt;br /&gt;I do.&lt;br /&gt;&lt;br /&gt;Steve McConnell calls this code "scaffolding code".&lt;br /&gt;&lt;br /&gt;I also have a tendency to forget to remove this code once I've fixed my bug or finished my test.  So I've gotten into the habit of marking the change with a comment similar to&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;// Scaffold: added dummy value&lt;br /&gt;int dummy = 3;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Sometimes my scaffold comments get lost among a sea of other code, and I forget to remove it.  So to group it together, I've started using a single scaffold file / class.  That way there's only one place to look for the scaffold code.&lt;br /&gt;&lt;br /&gt;That's still susceptible to me forgetting about the scaffold before publishing my program, so I think the next step might be to create a user defined scaffold file that can be edited and stored locally, so even if I turn on all my scaffold constructs, nobody else sees them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-5615661966035340958?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/5615661966035340958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=5615661966035340958" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5615661966035340958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5615661966035340958?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/12/scaffold.html" title="Scaffold" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CUcMSXc9cSp7ImA9WxRWEko.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-6836619194763008597</id><published>2008-10-29T01:00:00.005Z</published><updated>2008-10-29T09:38:08.969Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-29T09:38:08.969Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="My Programs" /><title>CloudLauncher update</title><content type="html">Well, after a brief hiatus, I'm back onto CloudLauncher.&lt;br /&gt;&lt;br /&gt;Just in case you don't know what it is, it's a launcher app.  Drag your files / folders / executables / shortcuts onto CloudLauncher - it creates a shortcut to your file.  Double-click the shortcut - your file opens.  Simple.&lt;br /&gt;&lt;br /&gt;So how is it any different to windows explorer?&lt;br /&gt;&lt;br /&gt;Well, the main reason I wrote cloud launcher was because windows forgets my icon positions.  In fact, this is probably the only reason to use CloudLauncher.  For now.&lt;br /&gt;&lt;br /&gt;Version 0.1 is available &lt;a href="http://www.programmingforpeople.com/programming/programs/src/CloudLauncher_2008_10_29_09_14_18.zip"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;TODO:&lt;br /&gt;&lt;br /&gt;Add option to delete shortcuts!&lt;br /&gt;Add option to line up icons.&lt;br /&gt;Add option to edit the target of the shortcut.&lt;br /&gt;Add "F2" to rename shortcuts.&lt;br /&gt;Add option to choose (or disable) the hotkey.&lt;br /&gt;&lt;br /&gt;Bug: Copy the name of the shortcut instead of the name of the target!&lt;br /&gt;Bug: Don't crash if the global hotkey is in use!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update: 29th October 2008&lt;/span&gt;&lt;br /&gt;Added libraries to the zip file so that it compiles!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-6836619194763008597?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/6836619194763008597/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=6836619194763008597" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6836619194763008597?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/6836619194763008597?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/10/cloudlauncher-update.html" title="CloudLauncher update" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CkUFQ309cCp7ImA9WxRWEk4.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-5523092333608178441</id><published>2008-10-28T21:43:00.001Z</published><updated>2008-10-28T21:43:32.368Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-28T21:43:32.368Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Minimize to the Notification Area</title><content type="html">Cloud Launcher is minimizing to the notification area, then restoring when the notification icon is double clicked.&lt;br /&gt;&lt;br /&gt;Only, for hours it wasn't.  Instead of restoring, it was appearing as a tiny "minimized" window / title bar.&lt;br /&gt;&lt;br /&gt;Turns out the "restore" / "show" order is important.&lt;br /&gt;&lt;br /&gt;This:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;WindowState = FormWindowState.Normal;&lt;br /&gt;Show();&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;doesn't work.&lt;br /&gt;&lt;br /&gt;This:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;Show();&lt;br /&gt;WindowState = FormWindowState.Normal;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-5523092333608178441?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/5523092333608178441/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=5523092333608178441" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5523092333608178441?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/5523092333608178441?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/10/minimize-to-notification-area.html" title="Minimize to the Notification Area" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D08DRH46cSp7ImA9WxRQFUk.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-2990986495944823192</id><published>2008-10-08T23:00:00.001+01:00</published><updated>2008-10-09T10:51:15.019+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-09T10:51:15.019+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Anecdote" /><title>Typos</title><content type="html">I once walked in on a friend who was chuckling to himself as he finished writing an email.  Asking him what he found funny, he told me he'd just realised that it would be very easy, when signing an email with "regards" to miss the 'g' and hit 't' instead.&lt;br /&gt;&lt;br /&gt;For some reason, my fingers refuse to type certain combinations.&lt;br /&gt;&lt;br /&gt;"tion" always comes out "tino", as in "combinatino", "productino" and "sectino"&lt;br /&gt;"updates" keeps coming out as "udpates"&lt;br /&gt;"cheers" as "cjeers"&lt;br /&gt;"installed" as "isntalled"&lt;br /&gt;and even&lt;br /&gt;"Tim" as "Time".&lt;br /&gt;&lt;br /&gt;Do you have any amusing typos?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-2990986495944823192?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/2990986495944823192/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=2990986495944823192" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/2990986495944823192?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/2990986495944823192?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/10/typos.html" title="Typos" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkQARnw7fyp7ImA9WxRQFEs.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-1407404237880000844</id><published>2008-10-06T22:19:00.002+01:00</published><updated>2008-10-08T13:19:07.207+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-08T13:19:07.207+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="My Programs" /><title>AppendDate</title><content type="html">My first code project article:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/cs/AppendDateTime.aspx"&gt;AppendDate&lt;/a&gt; appends the current date/time to a file.  I find it useful for achiving my work.&lt;br /&gt;&lt;br /&gt;How exciting :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-1407404237880000844?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/1407404237880000844/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=1407404237880000844" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1407404237880000844?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1407404237880000844?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/10/appenddate.html" title="AppendDate" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0cGQ34_fyp7ImA9WxRREU8.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-4034094195884841722</id><published>2008-09-23T00:10:00.000+01:00</published><updated>2008-09-23T00:10:22.047+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-23T00:10:22.047+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>I'll take two</title><content type="html">I'm chasing those ideals again.  The Right Thing to do is to separate out your business logic from you interface.  I read one piece of advice which stated that if you want to know if you've succeeded in separating out those responsibilities, it's the same answer to the question "is my app skinnable?"&lt;br /&gt;&lt;br /&gt;I sometimes find it difficult judging where the line should be drawn between the UI and the underlying data. So my idea (which is probably similar to the skinnable question) is to write two applications side by side, that each access the underlying business code.  If I've done the job correctly it should be obvious (or at least easier to see) where the shared data begins and the custom UI ends.&lt;br /&gt;&lt;br /&gt;Similarly, while I'm writing my next game engine, I'll try to write two (simple) games with the engine simultaneously.  This way I can (hopefully) pull all the common code from both games into the engine.  It helps me know where to draw the line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-4034094195884841722?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/4034094195884841722/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=4034094195884841722" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4034094195884841722?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4034094195884841722?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/09/ill-take-two.html" title="I'll take two" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D04DSX84fSp7ImA9WxRSGU8.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-7691323375598395283</id><published>2008-09-20T11:40:00.002+01:00</published><updated>2008-09-20T16:52:58.135+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-20T16:52:58.135+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="My Programs" /><category scheme="http://www.blogger.com/atom/ns#" term="Planning" /><title>Set in Stone</title><content type="html">Many years ago, when I didn't know better, I wrote some games, partly as a learning exercise, partly to put in my portfolio, partly for fun.  They were a Tetris clone (&lt;a href="http://www.programmingforpeople.com/programming/programs/bin/Tetratim.zip"&gt;Tetratim&lt;/a&gt;) and a breakout clone (&lt;a href="http://www.programmingforpeople.com/programming/programs/bin/Bounce.zip"&gt;Bounce&lt;/a&gt;).  But it didn't matter that they were clones because the main reason I wrote them was they gave me the experience of taking a game all the way from start to finish.&lt;br /&gt;&lt;br /&gt;Tetratim was the first complete game I ever wrote.  It has a start screen, an in-game screen, a game-over screen, and a high score table.  Apart from the high scores, all of the data was hard coded into the game-code.  (I'll come back to this point in a minute).&lt;br /&gt;&lt;br /&gt;Bounce took things a little bit further.  It has several UI screens at the front, and included sound effects.  The levels were designed in an editor that I wrote.  I'd started learning to separate out my code and my data.&lt;br /&gt;&lt;br /&gt;Even though I didn't stop programming after that, the game writing dried up.  Not through lack of enthusiasm about the projects - I had plenty of exciting ideas that I wanted to implement.  No, the reason the writing dried up was because I had become obsessed with ideals.  I didn't want to hard-code data for another game.  I didn't want to take short-cuts in my code.  I wanted to do everything the Right Way.&lt;br /&gt;&lt;br /&gt;So I spent lots and lots of time learning the correct way to do things, writing lots of little test programs, trying out new techniques and effects, and storing them all up for later.  But for several years I didn't come up with anything that was as near finished as Tetratim or Bounce.&lt;br /&gt;&lt;br /&gt;Fast-forward a few years to when I was preparing to enter the games-industry.  Suddenly I had an urgent need to have demo material - something that showed that I actually did know how to program games!  Urgency is an excellent motivator.  Within the space of a few days I threw together a &lt;a href="http://www.programmingforpeople.com/programming/programs/bin/CarV2.zip"&gt;demo&lt;/a&gt; of a 3d car driving around on a surface.&lt;br /&gt;&lt;br /&gt;A lot of the demo wasn't done the Right Way.  The worst offence (in my eyes) was that once again, I'd hard-coded my data into my program.  But it didn't matter.  It was a neatly packaged, little demo.  And that demo got me my job in the games industry.&lt;br /&gt;&lt;br /&gt;At first I spent a lot of time programming in my spare time as well as at work, but I was still chasing the ideal.  I wanted to do things the Right Way.  Again a dearth of completed projects.&lt;br /&gt;&lt;br /&gt;Which leads me to now.  I have epiphanies from time to time.  One of my most recent was "Nothing is set in stone."&lt;br /&gt;&lt;br /&gt;It doesn't matter if it isn't written perfectly first time - get something written, and you can always change it later if it isn't correct.  Make things modular, if at all possible, then if something is wrong you can "unplug" it and plug something else in in its place.&lt;br /&gt;&lt;br /&gt;Ok, so don't dive in straight away - some planning is always good, but don't agonize over the fine details to the detriment of project.  That's what I did in between my demo games and it meant I didn't get anything completed!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-7691323375598395283?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/7691323375598395283/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=7691323375598395283" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/7691323375598395283?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/7691323375598395283?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/09/set-in-stone.html" title="Set in Stone" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DEUGQ3s4fip7ImA9WxRTGEw.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-2350000074950731719</id><published>2008-09-07T20:35:00.002+01:00</published><updated>2008-09-07T20:37:02.536+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-07T20:37:02.536+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Misc" /><title>SMS to Email</title><content type="html">Found the email address to send emails to my mobile.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://basicstate.com/htm/page.htm"&gt;http://basicstate.com/htm/page.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now I can get sms alerts when I receive an email.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-2350000074950731719?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/2350000074950731719/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=2350000074950731719" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/2350000074950731719?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/2350000074950731719?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/09/sms-to-email.html" title="SMS to Email" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CUUDQn4zfCp7ImA9WxRTF0k.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-1843102326178416553</id><published>2008-09-07T12:00:00.000+01:00</published><updated>2008-09-07T00:21:13.084+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-07T00:21:13.084+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><title>The tape fell off</title><content type="html">I was getting a stream of exceptions in my output window when doing a drag-drop.  They didn't seem to be affecting my program; the exceptions were in windows code (rather than my code); they weren't stopping my program running - just appearing in my debug output window.&lt;br /&gt;&lt;br /&gt;I googled for the exception.  I couldn't find what was causing them, or how to stop them occuring.  But I did find a post explaining how to stop them appearing in my output window (right click the output window, untick "Exception Messages").&lt;br /&gt;&lt;br /&gt;Obviously it would need resolving eventually, but this worked as a stop-gap solution.&lt;br /&gt;&lt;br /&gt;Trouble is, the "solution" reminds me of an episode of the Simpsons...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Lisa&lt;/span&gt;: Hey dad, that light says check engine...&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Homer:&lt;/span&gt; Uh oh... the tape must have fallen off.... there, problem solved (engine stops)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-1843102326178416553?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/1843102326178416553/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=1843102326178416553" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1843102326178416553?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/1843102326178416553?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/08/tape-fell-off.html" title="The tape fell off" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CkUEQXs6fyp7ImA9WxRTFUs.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-734927974752194999</id><published>2008-09-04T21:30:00.001+01:00</published><updated>2008-09-04T21:30:00.517+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-04T21:30:00.517+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Misc" /><title>Chrome</title><content type="html">I tried out google chrome.&lt;br /&gt;&lt;br /&gt;It's... interesting.&lt;br /&gt;&lt;br /&gt;But I'm not going to use it for now because:&lt;br /&gt;&lt;br /&gt;* The title bar doesn't fit in with my other windows.&lt;br /&gt;* If I close the last tab, chrome "helpfully" closes too.&lt;br /&gt;* No adblock.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-734927974752194999?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/734927974752194999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=734927974752194999" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/734927974752194999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/734927974752194999?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/09/chrome.html" title="Chrome" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkMEQXo7fyp7ImA9WxdaF0k.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-8864133413895566206</id><published>2008-08-26T12:00:00.007+01:00</published><updated>2008-08-26T12:00:00.407+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-26T12:00:00.407+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Random" /><title>Voodoo</title><content type="html">I've always been a little superstitious when it comes to computers.  After all, &lt;a href="http://en.wikipedia.org/wiki/Clarke's_three_laws"&gt;"Any sufficiently advanced technology is indistinguishable from magic."&lt;/a&gt;  I remember the behaviour from when I was about 7 years old, when I first started playing games on my ZX Spectrum, and 25 minutes into the load from tape I'd be muttering "please work, please work, please work" under my breath (I was used to loads failing regularly).&lt;br /&gt;&lt;br /&gt;These days, I'm sure I do plenty of unusual things while using my computer, but I don't tend to notice them until somebody points them out to me.  The thing is, like &lt;a href="http://en.wikipedia.org/wiki/Cargo_cult"&gt;all good superstitious behaviour&lt;/a&gt;, the reason gets forgotten and only the ritual remains.&lt;br /&gt;&lt;br /&gt;Occasionally I'll remember the reason why I do things in a certain way.  Even more rarely, I'll see someone else doing something that I've seen myself do, and feel vindicated!&lt;br /&gt;&lt;br /&gt;Here are some of my superstitious actions, and reasons why (where I remember them).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Left-Right click to bring up a context menu.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The normal way to open a context menu under windows is to right-click.  I click left then right (like I'm drumming my fingers).  Reason: Some programs interpret the first click (right or left) as a "focus" click, so a single right click doesn't always pop up a context menu.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Click-Enter instead of double click.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The normal way to navigate into folders in windows explorer with the mouse, is to double-click the folders.  I use the mouse to select the folder, then press enter on the keyboard to open the folder.  Reason: Sometimes double-clicks are missed by windows (if I have a poor mouse, or my finger movements are too slow).  Also, after double-clicking for the hundredth time in the day, I start to feel the RSI kicking in...  I've seen someone else exhibiting the exact same behaviour :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Hyperlink click follow-up click.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After I left-click a hyperlink in a web page, I click in some white space on the page.  I don't know why I do this.  It may relate back to when I had a dial-up connection and I wanted to know if the page was responding.  It may just be that I don't like the link being outlined.  I really don't know about this one.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Mark as read, before delete.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Microsoft Outlook I read email in the preview pane.  If I don't navigate away from an email in my inbox, it stays marked as unread.  If I don't need to action an email I don't just delete - I press "Mark as Read" then I press delete.  Otherwise my "deleted items" folder draws attention to itself by being written in bold with a number beside it, telling me how many "new" emails I have in it.&lt;br /&gt;&lt;br /&gt;I'll post more if I think of any.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-8864133413895566206?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/8864133413895566206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=8864133413895566206" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/8864133413895566206?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/8864133413895566206?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/08/voodoo.html" title="Voodoo" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;CkQARHs6fyp7ImA9WxdaFkg.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-3148827154751686973</id><published>2008-08-25T00:00:00.005+01:00</published><updated>2008-08-25T08:45:45.517+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-25T08:45:45.517+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Anecdote" /><title>Music to my ear</title><content type="html">I first noticed it about 10 years ago.  It only happens when I'm really tired, but can't sleep, and in the almost complete stillness of night.  And it only happens very rarely, but when it does, it's amazing.&lt;br /&gt;&lt;br /&gt;I was on a caravan holiday with my parents, and late one night, while I was trying to sleep, amongst all the other night time noises, I could hear a dripping sound coming from the refrigerator.  The dripping was very regular, and sounded almost like it was a percussion instrument, setting the beat, setting the rhythm.  And then something very strange happened.  I started to hear music.  Not just a simple tune, or melody, but I could hear the whole damn orchestra.  I could hear the percussion.  I could hear brass.  I could hear strings, first playing legato, then pizzicato.  I could hear woodwind.  There were changing dynamics.  There were melodies and counter melodies.  I could hear the whole thing.&lt;br /&gt;&lt;br /&gt;I knew it wasn't on a radio or cd player somewhere because the music was in perfect time with the dripping refrigerator.  And I noticed something else about it - that I could decide where the music went.  I realised that even though I was awake, it was almost as though I was dreaming, but whatever the explanation, the music was going on in my head.  While it was happening, I remember feeling as though the music was &lt;span style="font-style:italic;"&gt;just inside&lt;/span&gt; my ear.&lt;br /&gt;&lt;br /&gt;At the time, I was a budding musician - and I was trying to come up with my own pieces.  And when I heard this music, I felt that if I could only transfer it to paper, it would be a masterpiece.  But I was also aware of the similarity between this music, and any regular dream, and knew that it would all be forgotten soon afterwards.  Sure enough, after I woke up, I couldn't remember the themes, the tunes, any of what sounded so amazing at the time.&lt;br /&gt;&lt;br /&gt;Over the years since, I've heard similar music, just inside my ear.  It normally occurs when I'm really tired, but maybe after I'd been drinking alcohol, or caffeine, and I can't get my body to switch off and go to sleep.&lt;br /&gt;&lt;br /&gt;I'd thought about looking it up on the Internet, but had no idea how to go about searching for it.  "Music in my ears" seemed a daft thing to search for, so I let it be.&lt;br /&gt;&lt;br /&gt;Just last year, I was in a bookshop, and saw a book on display called "Musicophilia - Music and the Brain"  and as I was flicking through, I came across a letter to the author from a lady who had been hearing music in her ears when there was no external source of music.  You can imagine my excitement when I realised I may have found something that could help me research what I was experiencing.  The phrase "Musical Hallucination" was mentioned, and that was all I needed to type into Google.&lt;br /&gt;&lt;br /&gt;The explanation that seems right to me is that tinnitus (ringing in your ears) is being picked up, not conciously, but subconciously by your inner ear, and your brain decides to interpret the ringing as music.&lt;br /&gt;&lt;br /&gt;I've seen stories of people hearing choirs, christmas carols, and orchestras.  There is advice on how to control the sounds and make them fade away - but to be honest, I actually enjoy the music.  I only wish I could transcribe it as fast as I hear it!&lt;br /&gt;&lt;br /&gt;I last heard the music a few weeks ago.  I once got up in the middle of the night to sit at the piano and tried to repeat what I'd heard.  I'm going to try to keep that up, and one day, who knows, I might be able to share my masterpiece with everyone else!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-3148827154751686973?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/3148827154751686973/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=3148827154751686973" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3148827154751686973?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/3148827154751686973?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/08/music-to-my-ear.html" title="Music to my ear" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEMEQXoyfSp7ImA9WxdaFU4.&quot;"><id>tag:blogger.com,1999:blog-5232592511268803325.post-4067760223046237098</id><published>2008-08-24T00:00:00.003+01:00</published><updated>2008-08-24T00:00:00.495+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-24T00:00:00.495+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Random" /><title>Depth First Coding and Spirograph</title><content type="html">Various analogies come to mind when I'm coding.  Recently, the terms "Depth First Coding" and "Spirograph" have come to mind.&lt;br /&gt;&lt;br /&gt;I'll explain.&lt;br /&gt;&lt;br /&gt;When writing software, there's so much that needs to be done.  But of all the items on the todo list, we coders prefer to work on new features than the other things like fixing bugs, dealing with security issues, general code "housekeeping" and basically doing what we know we ought to, but never quite finding the motivation for it.  I know I certainly want to get to a  stage where I can see the whole process of using my software from start to finish.&lt;br /&gt;&lt;br /&gt;I think it's good practice to get a proof of concept up and running as soon as possible.  As well as making sure you're not wasting your time with a project, you can get feedback right from the start, you can adjust your plan based on what you see, and let's face it - it's more fun - it can keep you motivated through the more mundane tasks.&lt;br /&gt;&lt;br /&gt;To me, this feels like depth first programming - get the skeleton of the app complete, from top to bottom, then go back later and fill in the breadth - the bugfixes, the tidying up, the refactoring - the meat.&lt;br /&gt;&lt;br /&gt;A breadth first approach would be to get all of the minutiae sorted - making sure each function was written as efficiently as possible, making sure the variable and function names were as descriptive as possible, commenting anything that wasn't clear, and basically trying to make each component as near to perfect as possible.&lt;br /&gt;&lt;br /&gt;My problem with this approach is summed up in the phrase "Premature Optimization."  Here we are going for perfect first time round, but at a cost.  Then, if it turns out that the routine that we just spent the last day working on is no longer needed, then that's a day that's been wasted.&lt;br /&gt;&lt;br /&gt;The way that a program grows, almost organically, reminds me of &lt;a href="http://en.wikipedia.org/wiki/Spirograph"&gt;Spirograph&lt;/a&gt;.  After the first iteration, a very basic, bare bones implementation is produced.  After several more iterations a pattern starts to appear.  After hundreds of iterations, the final picture is revealed.  The pen traces a path around the spirograph, never lingering in one area for long.&lt;br /&gt;&lt;br /&gt;This is how I see code growing organically.  On top of the initial foundation, the coder grows the program piece by piece, often moving from one area to another.  By jumping around the project, the coder doesn't get bored with the area they are working on.&lt;br /&gt;&lt;br /&gt;But it's also worth noting that no matter how many times you go around a spirograph, and no matter how many different places you choose to start from, the pen doesn't touch every part of the paper - there are always some holes.&lt;br /&gt;&lt;br /&gt;I wonder how the holes fit into my analogy...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5232592511268803325-4067760223046237098?l=programmingforpeople.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://programmingforpeople.blogspot.com/feeds/4067760223046237098/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5232592511268803325&amp;postID=4067760223046237098" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4067760223046237098?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5232592511268803325/posts/default/4067760223046237098?v=2" /><link rel="alternate" type="text/html" href="http://programmingforpeople.blogspot.com/2008/08/depth-first-coding-and-spirograph.html" title="Depth First Coding and Spirograph" /><author><name>Tim</name><uri>http://www.blogger.com/profile/03240345507294112807</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09820583818692229563" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry></feed>
