<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>2015-06 on Funky Si's Blog (Dev)</title><link>https://blog-dev.funkysi1701.com/2015/06/</link><description>Recent content in 2015-06 on Funky Si's Blog (Dev)</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>funkysi1701@gmail.com (Simon Foster)</managingEditor><webMaster>funkysi1701@gmail.com (Simon Foster)</webMaster><lastBuildDate>Fri, 26 Jun 2015 20:00:45 +0000</lastBuildDate><atom:link href="https://blog-dev.funkysi1701.com/2015/06/index.xml" rel="self" type="application/rss+xml"/><item><title>Sudoku Challenge</title><link>https://blog-dev.funkysi1701.com/posts/2015/sudoku-challenge/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Fri, 26 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/sudoku-challenge/</guid><category term="Dojo">Dojo</category><category term="C-Sharp">C-Sharp</category><category term="LeedsSharp">LeedsSharp</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2015/06/2000px-Sudoku-by-L2G-20050714.svg_.png"/><description>&lt;p&gt;Last night I went to a Code Dojo at Leeds Sharp (the coding user group I have started going to). A Code Dojo is a programming challenge that people work on usually in pairs.&lt;/p&gt;
&lt;p&gt;The challenge that we worked on was to code a solution to the puzzle game Sudoku. The code we worked with can be found on github.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Partially completed Sudoku puzzle grid" src="https://blog-dev.funkysi1701.com/images/2015/06/2000px-Sudoku-by-L2G-20050714.svg_.png" loading="lazy"
width="2000" height="2000"
/&gt;
&lt;/p&gt;
&lt;p&gt;I don’t know much about Sudoku but the game goes like this. You start with a 9×9 grid, and the idea is to fill in all the missing numbers.&lt;/p&gt;
&lt;p&gt;Each Row can only use each digit 1 to 9 once, each column can only use each digit 1 to 9 once and each subgrid (3×3) can only use each digit once.&lt;/p&gt;
&lt;p&gt;I worked with Richard one of the Leeds Sharp organisers, we started by trying to loop through each empty cell and insert values in a brute force attack, but this approach didn’t get us very far (literally as the application crashed!)&lt;/p&gt;
&lt;p&gt;The approach that we needed to use was to loop through calculating possible values.&lt;/p&gt;
&lt;p&gt;It was only when I sat down at this dojo did I realise how much I still have to learn, but while talking with Richard about different approaches and different coding structures I started to learn.&lt;/p&gt;</description></item><item><title>Fathers Day</title><link>https://blog-dev.funkysi1701.com/posts/2015/fathers-day/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Sun, 21 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/fathers-day/</guid><category term="Father">Father</category><category term="BASIC">BASIC</category><category term="1980s">1980s</category><category term="Lynx">Lynx</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2015/06/PRODPIC-2926.jpg"/><description>&lt;p&gt;In the UK today is Fathers Day. Happy Fathers Day Dad!&lt;/p&gt;
&lt;p&gt;I thought I might talk about how he encouraged my interest in technology, especially as in about 8 weeks I will become a parent and will have someone to encourage and inspire.&lt;/p&gt;
&lt;p&gt;I am going to sound really old but when I was born there was no internet, no mobile phones and computers more often appeared in sci-fi than in your home.&lt;/p&gt;
&lt;p&gt;The first computer I remember us owning was a Lynx. A quick google reveals there were a number of different models, I have no idea what we had but here is what I found.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Camputers Lynx home computer" src="https://blog-dev.funkysi1701.com/images/2015/06/PRODPIC-2926.jpg" loading="lazy"
width="500" height="308"
/&gt;
&lt;/p&gt;
&lt;p&gt;In March 1983 the Lynx 48K was released, in September this was upgraded to 96K. In December 1983 a new Lynx was released with 128K. To put these numbers in perspective on my desktop is an image file that is 123K! The CPU in this computer was rated at between 4 and 6Mhz. (Modern PCs have CPUs around the 1.5Ghz or 1500Mhz)&lt;/p&gt;
&lt;p&gt;The Lynx we had, didn’t have a disk drive or a mouse. Programs were loaded from audio tapes (Audio tape was a form of data storage that came before CDs where data was stored on magnetic tape, most often used for music) The tapes we had would often get stuck and data wouldn’t load. The answer to this was to fast-forward/rewind the tape or hit the tape on your leg. For some reason this is a memory I still have of my dad hitting a tape on his leg to get a game or something else to load on the lynx. We also had a joystick for playing some of the games. I believe we also had an early thermal printer.&lt;/p&gt;
&lt;p&gt;My memory of the Lynx is in black and white. The reason for this is that the Lynx was connected to an old black and white TV, it was a special treat when we connected the main colour TV to the Lynx.&lt;/p&gt;
&lt;p&gt;We had a wide range of games for the Lynx, I can remember Jet Set Willy, and Diggerman. But there were also programs which my father had created. The Lynx had a form of BASIC where you can write you own programs and my father spent many hours writing programs for me and my sister. (We actually never realized this at the time)&lt;/p&gt;
&lt;p&gt;With that as my introduction to computers is it any wonder that I do what I do now? Now what should I do for my child to encourage them in a similar way?&lt;/p&gt;
&lt;p&gt;As a family we never owned a games console. Not sure if this was a financial or moral choice but it is something I will have to think about. I want my child to be knowledgeable about computers and able to compete in the competitive job market, but I also want them to know about science and nature and to enjoy their childhood. Lots of technology choices to make over the next few years.&lt;/p&gt;</description></item><item><title>50th Blog Post</title><link>https://blog-dev.funkysi1701.com/posts/2015/50th-blog-post/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Wed, 17 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/50th-blog-post/</guid><category term="Blog">Blog</category><category term="50">50</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2015/06/top-50-2012.jpg"/><description>&lt;p&gt;WOW! I have reached the milestone of 50 blog posts.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Top 50" src="https://blog-dev.funkysi1701.com/images/2015/06/top-50-2012.jpg" loading="lazy"
width="1500" height="1125"
/&gt;
&lt;/p&gt;
&lt;p&gt;I have tried to blog at least every week and I have learnt a lot. I have talked about my work, technology, things I have learnt, things I want to do and many more things. It is too soon to tell if my blog is going to be a success, but I think I am starting to find my ‘blog’ voice and I intend to keep on blogging.&lt;/p&gt;
&lt;p&gt;To celebrate here are some of my highlights.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/user-groups-and-f/" target="_blank" rel="noopener noreferrer"&gt;User Groups and F#&lt;/a&gt;
By far my most popular blog post. I talk about my first visit to the Leeds Sharp group and an introduction to the F# language.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/monitoring-screens/" target="_blank" rel="noopener noreferrer"&gt;Monitoring Screens&lt;/a&gt;
I talk about creating a big screen of vital monitoring information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/ten-forward-episode-135-anti-firbob-is-back-or-simons-desert-island-trek/" target="_blank" rel="noopener noreferrer"&gt;Ten Forward Episode #135&lt;/a&gt;
– Simon’s Desert Island Trek My appearance on the Ten Forward Podcast&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/building-something-with-a-raspberry-pi/" target="_blank" rel="noopener noreferrer"&gt;Building something with a Raspberry Pi&lt;/a&gt;
I blog about getting a Raspberry Pi to play around with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/javascript-progress/" target="_blank" rel="noopener noreferrer"&gt;Javascript progress&lt;/a&gt;
About learning javascript&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/the-raspberry-pi-adventure-starts/" target="_blank" rel="noopener noreferrer"&gt;The Raspberry Pi Adventure Starts&lt;/a&gt;
I get a Raspberry Pi and start building something with it&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/weakest-database-design/" target="_blank" rel="noopener noreferrer"&gt;Weakest Database Design&lt;/a&gt;
I talk about database design&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/trying-windows-10/" target="_blank" rel="noopener noreferrer"&gt;Trying Windows 10&lt;/a&gt;
I talk about my experience with the latest windows operating system&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.funkysi1701.com/posts/2015/laziness/" target="_blank" rel="noopener noreferrer"&gt;Laziness&lt;/a&gt;
I talk about the extreme ways IT Professionals go to be more lazy&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Requirement Gathering</title><link>https://blog-dev.funkysi1701.com/posts/2015/requirement-gathering/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Tue, 16 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/requirement-gathering/</guid><category term="Database">Database</category><category term="Requirements">Requirements</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2015/06/Requirements-Gathering-User-Experience-UX-Project-Cartoon.jpg"/><description>&lt;p&gt;&lt;strong&gt;Why is it so hard to find out exactly what is needed when designing changes to a system?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Cartoon illustrating requirements gathering problems in software projects" src="https://blog-dev.funkysi1701.com/images/2015/06/Requirements-Gathering-User-Experience-UX-Project-Cartoon.jpg" loading="lazy"
width="728" height="543"
/&gt;
&lt;/p&gt;
&lt;p&gt;When adding functionality to databases I always like to dive in and start adding extra columns and new tables. But at some point you need to find out what is needed.&lt;/p&gt;
&lt;p&gt;The process of gathering requirements that I have followed goes something like this.&lt;/p&gt;
&lt;p&gt;My boss tells me that we need a system to solve x problem. This is the broad overview of what is needed.&lt;/p&gt;
&lt;p&gt;Next I need to find out specifically how the system is being used and what things need adding. Discussing the specifics with my boss often results in a high level of confusion. I always try to speak with the users that will be using this system on a daily basis. If I create something that isn’t liked people will avoid using it and it won’t solve the original problem so I always think it is very important to speak to the day to day user.&lt;/p&gt;
&lt;p&gt;After I have an idea of what is needed, I build something. Once I have something that sort of works, I will try and demonstrate this to the user to gather feedback. This feedback is invaluable as it will often reveal if I am going in the right direction and reveal missing requirements that need to be incorporated in the finished solution.&lt;/p&gt;
&lt;p&gt;I will often repeat the last stage a few times especially if there is a big change needed, once I am happy I will demonstrate to my boss before deploying the solution.&lt;/p&gt;
&lt;p&gt;After deployment there is often a period of fixing issues and gathering feedback before I can consider the project finished.&lt;/p&gt;
&lt;p&gt;This whole process is very time consuming as there is a period of changes being tweaked back and forth following feedback. A better way is to gather a detailed specification of what is needed and work towards delivering that.&lt;/p&gt;</description></item><item><title>Runaway SQL Log growth</title><link>https://blog-dev.funkysi1701.com/posts/2015/runaway-sql-log-growth/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Fri, 12 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/runaway-sql-log-growth/</guid><category term="ITAdmin">ITAdmin</category><category term="Backups">Backups</category><category term="SQL">SQL</category><description>&lt;p&gt;Today is my day off, but I wake up and have a quick look at &lt;a href="https://www.funkysi1701.com/posts/2014/i-love-nagios/" target="_blank" rel="noopener noreferrer"&gt;nagios&lt;/a&gt;
to see if there is anything I need to worry about. Yes there is, SQL Server has run out of disk space on its data disk.&lt;/p&gt;
&lt;p&gt;I race downstairs and VPN onto the server to find out what has happened. One of my monitoring databases has had runaway log growth and is over 80Gb is size.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;BACKUP LOG [DBName] &lt;span style="color:#66d9ef"&gt;WITH&lt;/span&gt; TRUNCATE_ONLY
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DBCC SHRINKFILE(&lt;span style="color:#e6db74"&gt;&amp;#39;DBName_Log&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Free disk space is back to normal, all users will be unaware of the problem and everything is fine again. I create a daily job that runs the above code, that way it should stay a manageable size.&lt;/p&gt;
&lt;p&gt;Next I need to find out why it happened and to prevent it happening again in the future (Next time I have a day off I want to lie in!)&lt;/p&gt;
&lt;p&gt;I check the SQL logs and notice&lt;/p&gt;
&lt;p&gt;BACKUP LOG WITH TRUNCATE_ONLY or WITH NO_LOG is deprecated. The simple recovery model should be used to automatically truncate the transaction log.&lt;/p&gt;
&lt;p&gt;Then I remember what I have done to cause this issue. I have a separate disk for my backup files and earlier in the week I noticed this disk was filling up, a large amount of space was taken up by transactional backup files. I thought I don’t need to backup the transactions for this non critical database, I will just do a full backup at the start of everyday.&lt;/p&gt;
&lt;p&gt;However what I forgot is that a transactional backup keeps the log file under control, once this backup was stopped the log file grew uncontrollably. The answer, change the database from FULL mode to SIMPLE.
&lt;img class="img-fluid" alt="image002" src="https://blog-dev.funkysi1701.com/images/2015/image002-300x270.png" loading="lazy"
width="300" height="270"
/&gt;
&lt;/p&gt;
&lt;p&gt;This is my understanding of how backups work in FULL mode. A full backup is done at the start of the day which resets the log file, then changes in the database are stored in the log file, this is backed up into a transactional backup and the log file gets reset. If you have regular transactional backups throughout the day the log file doesn’t grow too much, however with no transactional backups your log file contains an entire days worth of changes and so for a monitoring database this could be quite large.&lt;/p&gt;
&lt;p&gt;In SIMPLE mode you can’t do transactional backups and the log doesn’t grow uncontrollably. This shouldn’t be used for production databases as if there is a problem you could loose data.&lt;/p&gt;</description></item><item><title>Don’t Live with Broken Windows</title><link>https://blog-dev.funkysi1701.com/posts/2015/pragmatic-programmer-broken-windows/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Mon, 08 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/pragmatic-programmer-broken-windows/</guid><category term="Windows">Windows</category><category term="Books">Books</category><category term="Tips">Tips</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2015/06/tpp.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Building with a broken window illustrating broken windows theory" src="https://blog-dev.funkysi1701.com/images/2015/06/1-ucIHdOcnByPsF5eX0j_mhg.jpeg" loading="lazy"
width="2000" height="1360"
/&gt;
&lt;/p&gt;
&lt;p&gt;Last night I started reading &lt;a href="https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master-ebook/dp/B003GCTQAE/ref=mt_kindle?_encoding=UTF8&amp;amp;me=" target="_blank" rel="noopener noreferrer"&gt;The Pragmatic Programmer by Andrew Hunt and David Thomas&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;One practical tip that immediately jumped out at me as useful in my quest to be a better programmer: &lt;strong&gt;Don’t live with broken windows&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Cover of The Pragmatic Programmer book" src="https://blog-dev.funkysi1701.com/images/2015/06/tpp.jpg" loading="lazy"
width="2200" height="2800"
/&gt;
&lt;/p&gt;
&lt;p&gt;The theory goes like this: an abandoned building with a single broken window attracts additional broken windows, graffiti, litter, and a sense that no one cares about this building. However this can be avoided if the authorities repair the window straight away.&lt;/p&gt;
&lt;p&gt;You can apply this theory to other walks of life, too, like keeping your kitchen clean. After you’ve spent hours cleaning your kitchen to make it spotless, you make an effort to keep it clean. But if your kitchen is piled high with dirty pans, leaving out an extra mug or dirty bowl isn’t going to feel like it makes any difference.&lt;/p&gt;
&lt;p&gt;The software engineering implications of this theory are that if you take care to keep your code tidy, it will stay that way. If you know something is broken but never make time to fix it, other bugs and issues will creep into it, until it’s a mess that no one dares touch.&lt;/p&gt;
&lt;p&gt;We have a website that is starting to get a bit buggy. It’s not broken, but it’s been a while since anyone has given it any love. Bits of its functionality are starting to get flaky.&lt;/p&gt;
&lt;p&gt;Being the only programmer in my place of work, I seldom have time to think about this website — let alone sit down and maintain it.&lt;/p&gt;
&lt;p&gt;But the number of related support calls have been gradually increasing — more windows are breaking — and I’m spending more and more time patching its bugs to keep people happy.&lt;/p&gt;
&lt;p&gt;Know that I’m aware of the broken windows principle, I know exactly what to do: sit down with this website for a couple of days and find out what exactly is causing these issues.&lt;/p&gt;
&lt;p&gt;Then I’ll rebuild the flaky bits, replace the proverbial cracked glass, and wash down a few walls while I’m at it.&lt;/p&gt;</description></item><item><title>I’m a developer now</title><link>https://blog-dev.funkysi1701.com/posts/2015/im-a-developer-now/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Wed, 03 Jun 2015 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2015/im-a-developer-now/</guid><category term="Self-Belief">Self-Belief</category><description>&lt;p&gt;For a while now I have been at the door of describing myself as a developer, but I think I have finally gone through that door.&lt;/p&gt;
&lt;p&gt;It is all a state of mind, its not about having x amount of knowledge, its just about saying “Yeah, I’m a developer now.”&lt;/p&gt;
&lt;p&gt;One thing that pushed me through that door, was an application form for something in which I ticked the software developer box instead of the IT Manager box.&lt;/p&gt;
&lt;p&gt;The other thing is some of the tasks I worked on recently. One of our databases has a Web Service running that supplies a website with some figures, and we found out recently that this needed changing due to a change on this website. Our contractor quoted us to do this work, I think it was 8 hours. My boss said why don’t you have a go at doing it instead and save us money.&lt;/p&gt;
&lt;p&gt;So I had a go, thinking this will take me a couple of days at least, as I will have to figure out how the code works and end up not understanding it. But no I had the changes done in less time than the contractor had quoted us. Go Me! I will say that these changes have yet to be fully tested, so I still might end up spending more time on this.&lt;/p&gt;</description></item></channel></rss>