<?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>2016 on Funky Si's Blog (Dev)</title><link>https://blog-dev.funkysi1701.com/2016/</link><description>Recent content in 2016 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>Thu, 24 Nov 2016 20:00:45 +0000</lastBuildDate><atom:link href="https://blog-dev.funkysi1701.com/2016/index.xml" rel="self" type="application/rss+xml"/><item><title>What should be in Source Control?</title><link>https://blog-dev.funkysi1701.com/posts/2016/what-should-be-in-source-control/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 24 Nov 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/what-should-be-in-source-control/</guid><category term="Git">Git</category><category term="SourceCode">SourceCode</category><category term="SourceControl">SourceControl</category><category term="C-Sharp">C-Sharp</category><description>&lt;p&gt;I am currently working on source code that is over 5Gb in size. This is mostly due to a poorly thought out folder structure, there are code files, images and Excel files all jumbled together. I think a clear distinction should be made between source code and data.&lt;/p&gt;
&lt;h2 id="source-code"&gt;Source Code&lt;a class="anchor ms-1" href="#source-code" aria-label="Permalink: Source Code"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I will define source code as anything that is written in order to compile and run the project. If it is a webpage it will be all the HTML, CSS and Javascript or any file used to produce these. I would also include any configuration files and files used to build/deploy the website or project. Anything that is compiled from your source files can safely be ignored.&lt;/p&gt;
&lt;h2 id="data"&gt;Data&lt;a class="anchor ms-1" href="#data" aria-label="Permalink: Data"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I would define data as anything that is added to the project during its life. So if you have an upload option, anything that is uploaded I would describe as data. The site should still function without (or very little) data.&lt;/p&gt;
&lt;h2 id="images"&gt;Images&lt;a class="anchor ms-1" href="#images" aria-label="Permalink: Images"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Images can fit into both groups. Any icons or images attached to the functionality of the project I would class as source code. However anything that is uploaded should be classed as Data.&lt;/p&gt;
&lt;h2 id="databases"&gt;Databases&lt;a class="anchor ms-1" href="#databases" aria-label="Permalink: Databases"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The database should also be classed as both. The data, anything that is inside a database table should normally be classed as data. Stored Procedures, Functions and Views are all Source Code and would benefit from version control.&lt;/p&gt;
&lt;h2 id="source-control--backup"&gt;Source Control != Backup&lt;a class="anchor ms-1" href="#source-control--backup" aria-label="Permalink: Source Control != Backup"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Source control is not an excuse not to backup things. Don’t just commit files to source control so you know you can restore them if you need to. Files in general in source control are there so you can see how they changed over time as the code base changed. Files in you backup are a snapshot of what the application was at a point in time and will include ALL the data.&lt;/p&gt;
&lt;p&gt;One last point before I end. If you are hosting on a Cloud Computing platform like Azure it gives you an easy way to distinguish between Data and Code.&lt;/p&gt;
&lt;p&gt;Anything in your&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Web App = Code&lt;/li&gt;
&lt;li&gt;Blob Storage = Data&lt;/li&gt;
&lt;li&gt;SQL = Data/Code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each project is unique and there will always be exceptions to these suggestions but I think this is a good goal to have. What do you think?&lt;/p&gt;</description></item><item><title>Getting control of a codebase</title><link>https://blog-dev.funkysi1701.com/posts/2016/getting-control-of-a-codebase/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 17 Nov 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/getting-control-of-a-codebase/</guid><category term="JavaScript">JavaScript</category><category term="AzureDevOps">AzureDevOps</category><category term="SQL">SQL</category><category term="VisualStudio">VisualStudio</category><category term="C-Sharp">C-Sharp</category><description>&lt;p&gt;So recently I started working on a new codebase. I will be honest when I first saw it, it was a mess. Here are a few of the things I did to try and regain control.&lt;/p&gt;
&lt;p&gt;I was given access to the source code on Visual Studio Team Services. However this consisted of a single commit 3 months ago. When I looked at what was running on the production server it was clear that changes were being made live with no regard for source control.&lt;/p&gt;
&lt;p&gt;The first thing I did was commit everything that was running live into source control.&lt;/p&gt;
&lt;p&gt;Next I created a SQL Server Data Tools (SSDT) project to keep track of all the database objects. Previously there was a folder with some stored procedures in it, but these did not match with what was currently running.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="SQL Server 2012 Management Studio Splash Screen" src="https://blog-dev.funkysi1701.com/images/2016/sql-server-2012-management-studio-splash-screen.png" loading="lazy"
width="529" height="360"
/&gt;
&lt;/p&gt;
&lt;p&gt;I now had in source control the current state of the website and the database, so I knew I could get things back to this state if I made some bad changes.&lt;/p&gt;
&lt;p&gt;Lets start by looking at the website code I had. There was no solution file, the only way to look at the website was to setup my local IIS to run what was in the website folder. I could then use Visual Studio to &amp;ldquo;open&amp;rdquo; my local IIS website and attach to process to debug it.&lt;/p&gt;
&lt;p&gt;Next I Looked at Default.aspx to see how the website worked. The majority of the website code was stored in the database stored procedures. After the tag there was a &amp;lt;% %&amp;gt; which contained a Response.Write(RunSP.RunStoredProcedure(Parameter1, Parameter2, &amp;hellip;) command, which executed a stored procedure and the results of the stored procedure was the html code including any javascript that the webpage needed to display. I will be honest I have never seen any code like it. My guess is that the developer was secretly a DBA and wanted to make any web page changes by just changing how the stored procedures work.&lt;/p&gt;
&lt;p&gt;This meant that the website is not going to do anything without a backup of the database running, and meant my SSDT project was going to be vital. However the database was in a bad state, it consisted of a fair few broken objects and SSDT would not build.&lt;/p&gt;
&lt;p&gt;Using find I went through each of the broken database objects to find where in the code they were being used. Luckily most were referenced in commented out code, so I just removed all the broken database objects. The database could now be built. However there was a dependency on the users table of another database. (This was the developers solution to sharing logins between websites) As I was using SSDT I added a database dependency, problem solved for now.&lt;/p&gt;
&lt;p&gt;Next I tried publishing my database. SQL CMD encountered a parsing error. The reason for this was my SPs contained javascript eg $(document), SQL CMD uses $(DatabaseName) as variables for different database so it was getting itself confused.&lt;/p&gt;
&lt;p&gt;My solution was to use Find and Replace to replace all the $ with &amp;rsquo; + CHAR(36) + '&lt;/p&gt;
&lt;p&gt;So I now have a SSDT project that builds and publishes but still no website project.&lt;/p&gt;
&lt;p&gt;To get the website running from Visual Studio I started off creating a .Net 4 website project and added Entity Framework 5 and MVC 3 via nuget. I then copied all the website code into the new project, and with a bit of work I got it to build. Most of the work was relating to namespaces and referencing the correct one and moving the EF model from AppCode to a custom named folder. A bit of trial and error later I had a version of the website that could be run from Visual Studio.&lt;/p&gt;
&lt;p&gt;I have not deployed my new version of the website as it needs further testing. No automated testing or even a smoke test checklist currently exist.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Visual Studio Team Services build pipeline for source code commits" src="https://blog-dev.funkysi1701.com/images/2016/Visual-Studio-Team-Services.png" loading="lazy"
width="960" height="434"
/&gt;
&lt;/p&gt;
&lt;p&gt;As my source code is hosted on Visual Studio Team Services (VSTS), I can get VSTS to build each commit and check I haven’t broken the build. This is not that helpful at the moment, hopefully one day I will have automated tests that can be run here as well.&lt;/p&gt;
&lt;p&gt;Wow, I feel like I have done loads with this code so far but there is loads more still to do. I need to understand more about the business processes behind the code with a hope to understand why some architectural decisions have been made. I want to refactor the code as much as is possible, I would like to remove much of the html/javascript from the stored procedures as I can’t see that there is any advantage to running a website like this. Please correct my if I am wrong.&lt;/p&gt;</description></item><item><title>LINQ</title><link>https://blog-dev.funkysi1701.com/posts/2016/linq/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 06 Oct 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/linq/</guid><category term="LINQ">LINQ</category><category term="SQL">SQL</category><category term="C-Sharp">C-Sharp</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/step30.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="LINQ Language Integrated Query overview diagram" src="https://blog-dev.funkysi1701.com/images/2016/step30.jpg" loading="lazy"
width="515" height="355"
/&gt;
&lt;/p&gt;
&lt;h2 id="what-is-linq"&gt;What is LINQ?&lt;a class="anchor ms-1" href="#what-is-linq" aria-label="Permalink: What is LINQ?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;LINQ&lt;/strong&gt; is an acronym for Language Integrated Query, which describes where it’s used and what it does. The Language Integrated part means that LINQ is part of programming language syntax. In particular, both C# and VB are languages that ship with .NET and have LINQ capabilities.&lt;/p&gt;
&lt;h2 id="how-do-i-use-linq-in-my-c-code"&gt;How do I use LINQ in my C# code?&lt;a class="anchor ms-1" href="#how-do-i-use-linq-in-my-c-code" aria-label="Permalink: How do I use LINQ in my C# code?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To use LINQ the first thing you need to do is add the LINQ using statement.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; System.Linq;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In your code you need a datasource, for this example I am going to use a simple array, but it can be anything eg SQL, XML etc&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt;[] data = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt;[&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;] { &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;6&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;9&lt;/span&gt; };
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next you need a LINQ query. (Note I know the Q in LINQ means query, so I have just written query query, if you are one of those people who hates seeing PIN number you might not like this blog post.) A LINQ query is very similar to a T-SQL query, so if like me you are good with databases this should make sense to you.&lt;/p&gt;
&lt;p&gt;In T-SQL you can have:&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;&lt;span style="color:#66d9ef"&gt;SELECT&lt;/span&gt; num
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;data&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;WHERE&lt;/span&gt; num &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In LINQ this becomes:&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; query =
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; num &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; data
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; num == &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; num;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally you need to do something with the query you have written. I am just going to print the results of my query to console.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;foreach&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; num &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; query)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Console.Write(num);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="what-other-sql-like-syntax-can-i-use"&gt;What other SQL like syntax can I use?&lt;a class="anchor ms-1" href="#what-other-sql-like-syntax-can-i-use" aria-label="Permalink: What other SQL like syntax can I use?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In T-SQL you can control ordering using ORDER BY, LINQ has a similar syntax orderby&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;orderby&lt;/span&gt; num &lt;span style="color:#66d9ef"&gt;descending&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In T-SQL you can use GROUP BY, to do something similar with LINQ&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;group&lt;/span&gt; num &lt;span style="color:#66d9ef"&gt;by&lt;/span&gt; num.Type &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; type
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; type
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;foreach&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; type &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; query)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Console.Write(type.Key);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;foreach&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; num &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; type)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Console.Write(num);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="joins"&gt;JOINS&lt;a class="anchor ms-1" href="#joins" aria-label="Permalink: JOINS"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So you thought joining tables was a SQL Server only thing. Think again you can do this in LINQ&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; joinquery =
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; cust &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; customers
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;join&lt;/span&gt; prod &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; products &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; prod.CustomerId &lt;span style="color:#66d9ef"&gt;equals&lt;/span&gt; cust.Id
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; { ProductName = prod.Name, CustomerName = cust.CompanyName };
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;a class="anchor ms-1" href="#conclusion" aria-label="Permalink: Conclusion"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are loads more LINQ functionality that you can use. While writing this blog I found &lt;a href="https://learn.microsoft.com/101-LINQ-Samples-3fb9811b" target="_blank" rel="noopener noreferrer"&gt;https://learn.microsoft.com/101-LINQ-Samples-3fb9811b&lt;/a&gt;
which has loads of examples of different queries that you can write with LINQ.&lt;/p&gt;
&lt;p&gt;This has inspired me to use LINQ more in my code and learn more about the different queries that could be written.&lt;/p&gt;</description></item><item><title>Looking back Ten years</title><link>https://blog-dev.funkysi1701.com/posts/2016/looking-back-ten-years/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 29 Sep 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/looking-back-ten-years/</guid><category term="DevOps">DevOps</category><category term="ITAdmin">ITAdmin</category><category term="Servers">Servers</category><category term="Nagios">Nagios</category><category term="2016">2016</category><category term="2006">2006</category><category term="C-Sharp">C-Sharp</category><category term="Career">Career</category><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Animated graphic marking a ten-year career milestone" src="https://blog-dev.funkysi1701.com/images/2016/10-year-term-life-insurance.gif" loading="lazy"
width="471" height="314"
/&gt;
&lt;/p&gt;
&lt;p&gt;Next month I will celebrate ten years working at my current job, two weeks after that I will start a new chapter of my life at a new company. Lets take this opportunity to look back ten years at some of the great stuff I have achieved.&lt;/p&gt;
&lt;h2 id="2006"&gt;2006&lt;a class="anchor ms-1" href="#2006" aria-label="Permalink: 2006"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In 2006 I had no IT experience. If you were to ask me where Event Logs could be found I wouldn’t know, and the letters DNS meant nothing to me. I was quiet and shy but hard working. The idea of making IT my career hadn’t occurred to me, this was just a job.&lt;/p&gt;
&lt;p&gt;I started off life doing first line support and compiling health and safety files onto CD-ROMs (known by the company as Eurofiles) with HTML. At the time the company had a mix of Windows 2000 and Windows XP, using MS Office 2003. Server wise I can’t remember exactly but I think two domain controllers, a database server and a backup server using a tape drive. At this point in time I don’t believe I did a lot with the servers but I think the servers were running Windows Server 2005.&lt;/p&gt;
&lt;p&gt;As time went on I learnt more and more about what the company did and how stuff worked.&lt;/p&gt;
&lt;h2 id="nagios"&gt;Nagios&lt;a class="anchor ms-1" href="#nagios" aria-label="Permalink: Nagios"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of my early achievements was setting up a nagios server. I have blogged about &lt;a href="https://www.funkysi1701.com/posts/2014/i-love-nagios/" target="_blank" rel="noopener noreferrer"&gt;Nagios&lt;/a&gt;
before, but it is a server monitoring system that runs on linux. I am extremely proud of what I have achieved here, no one else in the company had my knowledge of how nagios worked. Initially I even experimented with using a cheap mobile phone connected to the serial port (remember when PCs had these?) to send SMS messages to alert of down time. However this was abandoned when I burned through all the credit on this phone.&lt;/p&gt;
&lt;p&gt;Nagios is still used today, and my current team have been shown how to extend the system as the business changes. My philosophy has always been if we have a problem that Nagios didn’t warn us about we need an extra nagios test. These days the nagios web interface is publicly available on the internet so can be checked from anywhere (assuming the office internet is up!) and a mobile app replaces the SMS idea we originally had.&lt;/p&gt;
&lt;h2 id="2011"&gt;2011&lt;a class="anchor ms-1" href="#2011" aria-label="Permalink: 2011"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At the end of 2010 the IT Manager resigned, then the Developer resigned and finally the Lead Developer resigned. I was alone. I was IT Manager. I negotiated my first pay rise since joining the company. I was IT.&lt;/p&gt;
&lt;p&gt;Wow things were stressful back then. I had so much to learn but somehow I managed. I learnt how to Interview, yes I have employed some clangers along the way, but also some great staff. As well as internal staff I learnt to deal with contractors. We had contractors to help with our internal systems and also contractors to do development work. One thing I have learnt about contractors is that you will always have to chase them at some point to deliver what you are paying them for.&lt;/p&gt;
&lt;h2 id="server-migration"&gt;Server Migration&lt;a class="anchor ms-1" href="#server-migration" aria-label="Permalink: Server Migration"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Around the start of 2011 our email server started to show its age. Exchange 2003 had a hard limit on the size of its information store and we were rapidly approaching this. Along with an IT contractor I worked to migrate to Exchange 2010, this was a huge project and caused all sorts of issues which we just worked through. Since then I have done other migrations so Windows Server 2012 and also virtualized many servers in 2013.&lt;/p&gt;
&lt;h2 id="bandwidth"&gt;Bandwidth&lt;a class="anchor ms-1" href="#bandwidth" aria-label="Permalink: Bandwidth"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A major limit with our infrastructure has always been the internet connection coming in. For a while we tried to load balance three ADSL connections, but the upload speed was always a limiting factor. It was a major victory for the simplification of our network when we got a leased line installed into our head office, helped by a government grant we gave us free installation. Not content with this I did the same again for our second York office, including the free installation.&lt;/p&gt;
&lt;h2 id="learning-development"&gt;Learning Development&lt;a class="anchor ms-1" href="#learning-development" aria-label="Permalink: Learning Development"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Since I started I have always been learning development stuff. But in the past few years I have learnt a massive amount helped largely by two main things. My boss passing lots of my responsibility onto others and dedicating lots of my time to development tasks, and also the opportunity to learn with our outsourced development team.&lt;/p&gt;
&lt;h2 id="finishing-off"&gt;Finishing off&lt;a class="anchor ms-1" href="#finishing-off" aria-label="Permalink: Finishing off"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are a few things that have been ongoing that we have wanted to change since I started which I can’t really take the credit for as they are not complete yet, but I am proud as they may be finished in the next few months.&lt;/p&gt;
&lt;p&gt;The company stores calendar information in one giant excel spreadsheet, this is being replaced by outlook calendars.&lt;/p&gt;
&lt;p&gt;Our last Windows Server 2003 server and tape drive is being decommissioned. This is the only server that has been running for the entire time I have been here.&lt;/p&gt;
&lt;p&gt;The way the company keeps track of work coming in and who does what is being reviewed. Over the years many people have tried to adapt the old database that one of the directors created in Access many years ago. I did a major overhaul recently to delete unused columns and added extra invoicing functionality. What is needed is a fresh system, maybe a CRM can do everything they want. I wish them lots of luck in doing this as I know it won’t be easy but it has to be done.&lt;/p&gt;
&lt;h2 id="2016"&gt;2016&lt;a class="anchor ms-1" href="#2016" aria-label="Permalink: 2016"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are many other projects and pieces of work that I have done that I am proud of. In 2016 I will leave a stable IT department. All clients are on Windows 10 and using Office 2010. We have virtual servers running Server 2012 and are using some great services from Azure to run our SaaS websites. There are of course things I would have liked to achieve, and things I wish I had done differently but on the whole it feels like the right time to move on, especially now long running projects are starting to conclude.&lt;/p&gt;</description></item><item><title>10 Ways to Survive as an IT Manager</title><link>https://blog-dev.funkysi1701.com/posts/2016/10-ways-to-survive-as-an-it-manager/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 22 Sep 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/10-ways-to-survive-as-an-it-manager/</guid><category term="ITAdmin">ITAdmin</category><category term="Backups">Backups</category><category term="DevOps">DevOps</category><category term="Technology">Technology</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/bhrzpww6aehdx1wvrrug.jpg"/><description>&lt;p&gt;So after five and a bit years of being an IT Manager here is some advice I have learned along the way in no particular order. On the whole I have enjoyed myself but it has been a real challenge at times.&lt;/p&gt;
&lt;h2 id="1-figure-out-what-plates-are-still-spinning"&gt;1. Figure out what plates are still spinning&lt;a class="anchor ms-1" href="#1-figure-out-what-plates-are-still-spinning" aria-label="Permalink: 1. Figure out what plates are still spinning"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Being an IT Manager is all about keeping everything running all of the time. A bit like spinning 5 or 6 plates. You have plates for your servers and network infrastructure, you have plates for bespoke databases that you maintain, you have plates for your staff (including any external contractors), you have plates for any websites or apps that you develop. That is a lot of plates to keep spinning and that before you start thinking about what your boss wants you to deliver. Make sure you know what is happening with all these plates, which ones are happy, which ones are on the way to the floor and which ones you need to get the glue out and repair.&lt;/p&gt;
&lt;h2 id="2-make-it-someone-elses-problem"&gt;2. Make it someone else’s problem&lt;a class="anchor ms-1" href="#2-make-it-someone-elses-problem" aria-label="Permalink: 2. Make it someone else’s problem"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you can blame someone else do so. If your internet goes down it is your ISPs fault. If your website dies its your hosting company’s fault. Take responsibility for problems but if when something goes wrong you can pick up the phone and ask for help, it will make your life easier.&lt;/p&gt;
&lt;h2 id="3-hire-good-staff"&gt;3. Hire good staff&lt;a class="anchor ms-1" href="#3-hire-good-staff" aria-label="Permalink: 3. Hire good staff"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Hiring poor staff wastes time and money and makes you look bad by others. Demand the highest salary band for new staff that you can afford and don’t agree to hiring anyone that you have doubts about. It is easy to bow to the pressure to get someone quickly but this will always result in worse problems in the long run. Once you have a good team do your best to keep them, and warn upper management of the problems if staff leaves (basically make it their problem not yours!).&lt;/p&gt;
&lt;h2 id="4-learn-learn-learn"&gt;4. Learn, Learn, Learn&lt;a class="anchor ms-1" href="#4-learn-learn-learn" aria-label="Permalink: 4. Learn, Learn, Learn"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You may or may not have the opportunity to go on training courses. Whatever your situation spend time learning new stuff that will benefit the company and yourself. You can learn a lot by reading online, you can petition for training from your managers, you can fund training yourself, you can ask for help from your different suppliers. The more you learn, the more you can do and the more useful you can be to the company, plus the more interesting you will find the job.&lt;/p&gt;
&lt;h2 id="5-say-no"&gt;5. Say No!&lt;a class="anchor ms-1" href="#5-say-no" aria-label="Permalink: 5. Say No!"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don’t be afraid to say no. You will always be asked to do the impossible and if something is impossible say so at the start. It wastes everyone’s time if you spend a lot of time trying to do the impossible. Always give your reasons for saying no, and if you always say no people will think you are unhelpful. A better way to say no is to come up with a better solution. No I can’t do it your way but here is a better solution.&lt;/p&gt;
&lt;h2 id="6-dont-give-estimates"&gt;6. Don’t give estimates&lt;a class="anchor ms-1" href="#6-dont-give-estimates" aria-label="Permalink: 6. Don’t give estimates"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you are asked how long something will take you don’t answer straight away or give an exaggerated estimate. Go away and spend some time thinking of everything that is involved before replying. There will always be something that you forgot to consider when first asked about it and looking at the different components will help plan out the work needed as well as provide an estimate.&lt;/p&gt;
&lt;h2 id="7-know-what-to-tell-your-boss-and-what-not-to"&gt;7. Know what to tell your boss, and what not to&lt;a class="anchor ms-1" href="#7-know-what-to-tell-your-boss-and-what-not-to" aria-label="Permalink: 7. Know what to tell your boss, and what not to"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a hard one to get the balance right for. You need to tell your boss enough so that they appreciate all that you do, but too much and they will stop listening and accuse you of talking in technobabble. I have never got the balance right with this one. I have always aired on the side of not telling my boss enough, and hence they don’t realize that I saved the day on Sunday night as everything is working again on Monday. Do repeat yourself. If your server is running low on resources start asking for replacement hardware early, and increase the frequency and the panic in line with the problems it is causing.&lt;/p&gt;
&lt;h2 id="8-understand-the-problems-of-the-business"&gt;8. Understand the problems of the business&lt;a class="anchor ms-1" href="#8-understand-the-problems-of-the-business" aria-label="Permalink: 8. Understand the problems of the business"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Illustration of understanding business needs and profitability as an IT manager" src="https://blog-dev.funkysi1701.com/images/2016/bhrzpww6aehdx1wvrrug.jpg" loading="lazy"
width="800" height="450"
/&gt;
&lt;/p&gt;
&lt;p&gt;Businesses need to make money. If the one you work for isn’t making enough money you will soon be looking for another. If you work for IT you will quickly start to see the problems of the business, think about what simple changes IT could make to improve things that would benefit the whole company. Some of your suggestions won’t go anywhere, but some may have a massive impact. I can think of a few changes that IT have spearheaded that I am very proud of, upgrading our internet connection, simplifying or automating processes and delivering new versions of software.&lt;/p&gt;
&lt;h2 id="9-ask-for-help"&gt;9. Ask for help&lt;a class="anchor ms-1" href="#9-ask-for-help" aria-label="Permalink: 9. Ask for help"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don’t be afraid of asking for help. There are lots of places to look for help. Other departments could take more on, you could recruit extra help, you could hire external contractors. You can ask questions on support forums like &lt;a href="https://serverfault.com/" target="_blank" rel="noopener noreferrer"&gt;ServerFault&lt;/a&gt;
or &lt;a href="https://stackoverflow.com/questions" target="_blank" rel="noopener noreferrer"&gt;StackOverflow&lt;/a&gt;
, many software re-sellers or other suppliers are a good point of contact for questions about things they supply. Microsoft Support was also invaluable for a server issue.&lt;/p&gt;
&lt;h2 id="10-think-about-disasters"&gt;10. Think about disasters&lt;a class="anchor ms-1" href="#10-think-about-disasters" aria-label="Permalink: 10. Think about disasters"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Write a disaster recovery plan or backup policy. Yes there will always be something more important that needs doing, but just stop for a moment to think how you would feel if everything died on your watch. The one thing you can rely on with technology is that it will fail at some point. A back of the envelope plan of action is better than no plan at all, even better is a detailed plan of what to do when each and every service you rely on fails. Plan additional services with an idea of adding extra redundancy. Always have multiple Domain Controllers, think about what data you could run from the Cloud. VMs could be replicated to the Cloud, and servers could be run from there.&lt;/p&gt;</description></item><item><title>Imposter Syndrome</title><link>https://blog-dev.funkysi1701.com/posts/2016/imposter-syndrome/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 15 Sep 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/imposter-syndrome/</guid><category term="Newjob">Newjob</category><category term="ImposterSyndrome">ImposterSyndrome</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/1429677066685.rendition-medium.jpg"/><description>&lt;p&gt;This week I handed in my notice at a job I have had for almost ten years. In a few weeks time I will start a brand new job as a web applications developer.&lt;/p&gt;
&lt;p&gt;This is a great achievement for me and a great chance to learn and expand my development skills.&lt;/p&gt;
&lt;p&gt;However moments after I handed my notice in, a huge wave of uncertainty enveloped me. I have read about this and I think I was suffering from an attack of &lt;strong&gt;Imposter Syndrome&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Despite external evidence of their competence, those with the syndrome remain convinced that they are frauds and do not deserve the success they have achieved. Proof of success is dismissed as luck, timing, or as a result of deceiving others into thinking they are more intelligent and competent than they believe themselves to be.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Person feeling overwhelmed and uncertain about starting a new job" src="https://blog-dev.funkysi1701.com/images/2016/1429677066685.rendition-medium.jpg" loading="lazy"
width="598" height="309"
/&gt;
&lt;/p&gt;
&lt;p&gt;I started to convince myself I couldn’t do the job I had just accepted and that moments after I arrived on my first day I would be found out as a fraud and kicked out the door.&lt;/p&gt;
&lt;p&gt;My logical brain was no match for the Imposter Syndrome. Having been kicked out the door of this new job, I would become penniless in no time with no employer (even my previous boss wouldn’t want me back) or recruitment agency willing to speak with me.&lt;/p&gt;
&lt;p&gt;OK lets see if we can fight off the Imposter Syndrome and look at a possible worse case scenario. I start at my new job, it is very hard work and a month or so later I have to move on.&lt;/p&gt;
&lt;p&gt;No employer ever would sack me on my first day. My first day will be lots of learning how they do things, looking at procedures. I have lots of experience of learning new things, looking at procedures and if I put the work in I can make this new job a success. I have lots of good ideas and useful experience that no one at my new company has.&lt;/p&gt;
&lt;p&gt;I don’t know what the solution is to Imposter Syndrome other than to try and ignore it by thinking positively and the knowledge that I have done amazing things in the last ten years and I will do the same in the next ten.&lt;/p&gt;</description></item><item><title>DZone</title><link>https://blog-dev.funkysi1701.com/posts/2016/dzone/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 25 Aug 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/dzone/</guid><category term="Blogging">Blogging</category><category term="DevOps">DevOps</category><category term="Social">Social</category><category term="DZone">DZone</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2016/dzone_02.png"/><description>&lt;p&gt;For a while now I have been sharing some of my blog posts on the &lt;a href="https://dzone.com/" target="_blank" rel="noopener noreferrer"&gt;Dzone&lt;/a&gt;
website.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="DZone developer community website homepage" src="https://blog-dev.funkysi1701.com/images/2016/dzone_02.png" loading="lazy"
width="400" height="300"
/&gt;
&lt;/p&gt;
&lt;p&gt;The Dzone website allows users to submit links to content and I have been submitting the content I have created on this website. This is how Dzone describes themselves:&lt;/p&gt;
&lt;p&gt;With over 1 Million members, DZone.com is one of the web’s largest communities and publishers of technical content for software professionals. Developers from all over the world come to DZone for the latest and best content to hone their skills and advance their careers.&lt;/p&gt;
&lt;p&gt;Well this week I have been invited to join the &lt;a href="https://dzone.com/pages/contribute" target="_blank" rel="noopener noreferrer"&gt;MVB&lt;/a&gt;
(Most Valuable Blogger) programme. The hope is that more of my readers will find my content from the DZone website.&lt;/p&gt;
&lt;p&gt;The DZone team will soon start sharing my content on the DZone website and I hope this will result in even more people reading what I have to say.&lt;/p&gt;
&lt;p&gt;If nothing else this is clearly telling me that my blog is making a difference, people are taking note of me and what I have to say. I need to keep going and keep writing articles and be more consistent.&lt;/p&gt;</description></item><item><title>Amazon Web Services Pt 2</title><link>https://blog-dev.funkysi1701.com/posts/2016/amazon-web-services-pt-2/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 04 Aug 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/amazon-web-services-pt-2/</guid><category term="AWS">AWS</category><category term="Azure">Azure</category><category term="Amazon">Amazon</category><category term="Cloud">Cloud</category><category term="DevOps">DevOps</category><description>&lt;p&gt;Last time I started looking at Amazon Web Services and how it differed from Azure. I am going to continue looking at what it can do.&lt;/p&gt;
&lt;h2 id="virtual-machines"&gt;Virtual Machines&lt;a class="anchor ms-1" href="#virtual-machines" aria-label="Permalink: Virtual Machines"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Lets look at what you can do with Virtual Machines. I selected to create a new Virtual Machine (or as AWS calls them an EC2 Instance)&lt;/p&gt;
&lt;p&gt;First you choose a name for your VM and then the OS that runs on it. There are 5 main OSes to choose from Windows Server, Amazon Linux and a selection of the most common Linux flavours.&lt;/p&gt;
&lt;p&gt;You can then download a certificate to secure your VM.&lt;/p&gt;
&lt;p&gt;Like Azure, AWS takes a few moments to create your VM. While I wait I can see that AWS has configured a firewall so only my current IP can connect to it.&lt;/p&gt;
&lt;p&gt;Once the VM is ready you can download an RDP file. However to get the login details you need to decrypt the password using the certificate you downloaded when you created the VM.&lt;/p&gt;
&lt;p&gt;It is interesting to compare the difference in security between Azure and AWS. Azure allows the resetting of passwords of VMs directly from its console, however I suspect that in AWS if you loose your certificate (AWS states they don’t keep a copy of this) you would have to recreate your VM.&lt;/p&gt;
&lt;p&gt;Like with the Websites the default name of the VM is much less user-friendly than what you get from Azure. However I suspect there are other options I haven’t spotted that may customise these.&lt;/p&gt;
&lt;h2 id="azure-portal-vs-aws-console"&gt;Azure Portal vs AWS Console&lt;a class="anchor ms-1" href="#azure-portal-vs-aws-console" aria-label="Permalink: Azure Portal vs AWS Console"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I really like the Azure Portal. It feels like something that has been designed so you can easily access all the options for a specific Azure feature.&lt;/p&gt;
&lt;p&gt;The AWS Console probably has all the same options as with Azure however I don’t think it looks half as good, and will take me a while looking through menus to find the equivalent options. Part of this is due to my unfamiliarity with AWS, so will get easier with time.&lt;/p&gt;</description></item><item><title>Amazon Web Services</title><link>https://blog-dev.funkysi1701.com/posts/2016/amazon-web-services/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 21 Jul 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/amazon-web-services/</guid><category term="AWS">AWS</category><category term="Azure">Azure</category><category term="Amazon">Amazon</category><category term="Cloud">Cloud</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2016/07/aws-300x169.png"/><description>&lt;p&gt;I am a big fan of Azure but I know zero about its biggest rival – Amazon Web Services or AWS.&lt;/p&gt;
&lt;p&gt;So lets sign up for a free trial and see what it can do.
&lt;img class="img-fluid" alt="Amazon Web Services" src="https://blog-dev.funkysi1701.com/images/2016/07/aws-300x169.png" loading="lazy"
width="300" height="169"
/&gt;
&lt;/p&gt;
&lt;p&gt;The AWS free trial is available from &lt;a href="https://aws.amazon.com/free/" target="_blank" rel="noopener noreferrer"&gt;https://aws.amazon.com/free/&lt;/a&gt;
and lasts for 12 months. From memory I think the Azure free trial lasted only one month.&lt;/p&gt;
&lt;p&gt;To start you need to login with your amazon account and create an AWS account. This requires your name and address and your payment info (you will only get billed if use services not covered by your free trial).&lt;/p&gt;
&lt;p&gt;Interestingly AWS requires you to verify your identity via an automated phone call. (I don’t recall doing anything like this for Azure but please correct me if I am wrong.)&lt;/p&gt;
&lt;p&gt;Once you are logged in you get a series of links displaying all the different services that are available. First impression is this is a simpler view to Azure’s portal with a similar amount of services. At the top right is an option to select which region you want to use, in Azure I use North Europe and West Europe, AWS has Ireland and Frankfurt.&lt;/p&gt;
&lt;h2 id="create-a-web-app"&gt;Create a Web App&lt;a class="anchor ms-1" href="#create-a-web-app" aria-label="Permalink: Create a Web App"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First thing to try is setting up a website. I selected create a web app and I get a page asking me for its basic details (very similar to Azure, however AWS asked what language your code is written in, Azure handles all of these) AWS websites appear to support a host of different options similar to Azure.&lt;/p&gt;
&lt;p&gt;The actual creation of your website takes a few moments (like on Azure). However the default URL for websites is similar to &lt;code&gt;https://test.vjbbimyv7w.eu-central-1.elasticbeanstalk.com/&lt;/code&gt; which is not quite as nice as the Azure equivalent &lt;code&gt;https://test.azurewebsites.net&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Azure has a host of command lines available via powershell. AWS has a similar command line interface called AWS CLI, including the option to deploy from git to your website.&lt;/p&gt;
&lt;p&gt;AWS Toolkit for Visual Studio is an extension that allows for the publishing of websites to AWS. (Just like you can publish to Azure)&lt;/p&gt;
&lt;p&gt;As I learn more about AWS I will continue to blog about it. &lt;a href="https://www.funkysi1701.com/posts/2016/amazon-web-services-pt-2/" target="_blank" rel="noopener noreferrer"&gt;Amazon Web Services Pt 2&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>Clever things with MS Access</title><link>https://blog-dev.funkysi1701.com/posts/2016/clever-things-ms-access/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 07 Jul 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/clever-things-ms-access/</guid><category term="Database">Database</category><category term="Access">Access</category><category term="DevOps">DevOps</category><category term="SourceControl">SourceControl</category><description>&lt;p&gt;I hate MS Access and especially developing with it as you can’t do any thing clever with it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wrong, Wrong, Wrong!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are a few clever things I have been able to script to make developing with it passable. I still would rather use Visual Studio but this improves the experience a fair bit.&lt;/p&gt;
&lt;h2 id="source-control"&gt;Source Control&lt;a class="anchor ms-1" href="#source-control" aria-label="Permalink: Source Control"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Access files are binary (I use the ADP/ADE file format but I assume other Access file formats have the same problem) and so you can’t diff them to see what has changed. This is bad.&lt;/p&gt;
&lt;p&gt;However there is a solution to this. A tool called Access SVN and can be downloaded from &lt;a href="https://accesssvn.codeplex.com/" target="_blank" rel="noopener noreferrer"&gt;https://accesssvn.codeplex.com/&lt;/a&gt;
, this gives you a way to extract to text files all the forms and reports that are in Access. Before every commit I would manually run this tool on my ADP file and extract to text files, then I would commit these text files to source control and could easily see what had changed in each commit.&lt;/p&gt;
&lt;p&gt;Despite the name Access SVN, the tool is not tied to subversion, you can use any source control system, I use git.&lt;/p&gt;
&lt;p&gt;Also included in this tool is a way to do this with the command line, so you can make this a build step on your build server. I have not used this extensively yet, but the syntax is fairly simple&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;asvn.exe e &lt;span style="color:#e6db74"&gt;&amp;#34;path to Access file&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;path to txt files&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;*.*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The filter at the end &lt;em&gt;.&lt;/em&gt; allows you to specify what to extract so you could extract all forms/reports beginning with D with &amp;ldquo;&lt;em&gt;.D&lt;/em&gt;&amp;rdquo;. I had trouble using &lt;em&gt;.&lt;/em&gt; because the names of my forms/reports contain characters not allowed in a windows file name. I am sure there is a way round this but I haven’t had chance to look into it further yet.&lt;/p&gt;
&lt;h2 id="testing-ms-access"&gt;Testing MS Access&lt;a class="anchor ms-1" href="#testing-ms-access" aria-label="Permalink: Testing MS Access"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Surely testing is not possible with MS Access? I would have agreed with that statement the other day until I found a neat way of testing if a feature is enabled.&lt;/p&gt;
&lt;p&gt;Firstly a bit of background. I develop using MS Access 2003 because the design view is far easier to use, however because it is out of support all my users use MS Access 2010. MS Access 2010 has a feature called Tabbed Documents which allows all forms and reports to open in new tabs so you can easily switch between them. This feature can only be enabled in MS Access 2010 and has no effect if opening with MS Access 2003.&lt;/p&gt;
&lt;p&gt;If you use Access SVN on your Access file with tabbed documents turned on and off you will see UseMDIMode: 0 and UseMDIMode: 1 show up in the Database properties file. UseMDIMode: 0 means that tabbed documents is turned on.&lt;/p&gt;
&lt;p&gt;In powershell I can now write a test to see if UseMDIMode: 0 can be found in the database properties file&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-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Get-Content &lt;span style="color:#e6db74"&gt;&amp;#34;General\Database properties.dbp.txt&amp;#34;&lt;/span&gt; | Select-String &lt;span style="color:#e6db74"&gt;&amp;#34;UseMDIMode: 0&amp;#34;&lt;/span&gt; -quiet
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the test passes True will be returned, if it fails null will be returned.&lt;/p&gt;
&lt;p&gt;On my build server I scripted the extraction of Database properties.dbp.txt from the ADP file with asvn.exe before running this test. While not strictly needed as Database properties.dbp.txt should be in source control, it is possible that someone could forget to extract the text files from the ADP, with this step you are always testing what is enabled in the binary file.&lt;/p&gt;
&lt;h2 id="ms-access-connection-strings"&gt;MS Access Connection Strings&lt;a class="anchor ms-1" href="#ms-access-connection-strings" aria-label="Permalink: MS Access Connection Strings"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While developing with MS Access I often swap the database connection to point to my local machine or a build server. I always try and remember to only ever commit with this set to the live database to avoid obvious problems.&lt;/p&gt;
&lt;p&gt;The other day I found on &lt;a href="https://stackoverflow.com/questions/16411430/change-access-server-connection-from-command-line" target="_blank" rel="noopener noreferrer"&gt;stackoverflow&lt;/a&gt;
a way to script this. I love this! I can include this step in my deployment process and it will overwrite what ever the connection string is in source control with what your production environment needs.&lt;/p&gt;
&lt;p&gt;All you need to run this step is, (note it is spaces between the parameters not commas)&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cscript connect.vbs Project.adp &lt;span style="color:#e6db74"&gt;&amp;#34;ServerName&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;DatabaseName&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The contents of connect.vbs can be found on the &lt;a href="https://stackoverflow.com/questions/16411430/change-access-server-connection-from-command-line" target="_blank" rel="noopener noreferrer"&gt;stackoverflow article&lt;/a&gt;
. It is also possible to pass username and password if your environment requires this.&lt;/p&gt;
&lt;h2 id="compiled-ade"&gt;Compiled ADE&lt;a class="anchor ms-1" href="#compiled-ade" aria-label="Permalink: Compiled ADE"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The last clever thing I do with MS Access is convert my ADP file into the compiled ADE version. To manually do this there is an option in the tools menu.&lt;/p&gt;
&lt;p&gt;To automate this I run&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cscript createADE.vbs &lt;span style="color:#e6db74"&gt;&amp;#34;path to ADP&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;path to ADE&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The contents of createADE came from this &lt;a href="https://social.msdn.microsoft.com/Forums/office/en-US/01fd48a9-258e-4405-86f1-adfb2f1057ee/create-an-access-2007-ade-from-a-adp-via-commandline?forum=accessdev" target="_blank" rel="noopener noreferrer"&gt;forum post&lt;/a&gt;
, the only change I made was to comment out some of the echo statements so it would run silently as part of my build process. It should be noted that cscript and wscript are almost identical and either will run these scripts however in a command line environment cscript is preferable, and wscript should be used in a windows environment.&lt;/p&gt;
&lt;p&gt;I am quite surprised at how much I have managed to do in terms of scripting the build and deployment process for MS Access. I still don’t like developing with Access but this has definitely improved things.&lt;/p&gt;</description></item><item><title>Periodic Table of DevOps</title><link>https://blog-dev.funkysi1701.com/posts/2016/periodic-table-devops/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 30 Jun 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/periodic-table-devops/</guid><category term="Chemistry">Chemistry</category><category term="DevOps">DevOps</category><category term="Tools">Tools</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2016/periodic-table-of-devops-v2.png"/><description>&lt;p&gt;The periodic table lists all the chemical elements and groups them together based on some key properties. Today I found an article about the &lt;a href="https://digital.ai/periodic-table-of-devops-tools/" target="_blank" rel="noopener noreferrer"&gt;periodic table of DevOps&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Periodic table of DevOps tools grouped by category" src="https://blog-dev.funkysi1701.com/images/2016/periodic-table-of-devops-v2.png" loading="lazy"
width="4896" height="2734"
/&gt;
&lt;/p&gt;
&lt;p&gt;I am not going to discuss every element but I thought I might go through some that I have heard of or used.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Github – The repository of lots of open source software. My Github can be found at &lt;a href="https://github.com/funkysi1701" target="_blank" rel="noopener noreferrer"&gt;https://github.com/funkysi1701&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Amazon Web Services – The second most popular cloud computing provider (not sure why this isn’t number 3?)&lt;/li&gt;
&lt;li&gt;Git – The distributed source control system that everyone uses these days.&lt;/li&gt;
&lt;li&gt;Azure – The number one cloud provider, I have used this a lot, mostly with websites but also with some of their other features like Traffic Manager.&lt;/li&gt;
&lt;li&gt;Bitbucket – like Github but allows private repositories. I have used this extensively for work based projects that I don’t want to be public.&lt;/li&gt;
&lt;li&gt;Google Cloud Platform – don’t know much about this one, but no surprise that google wants a piece of the cloud computing pie.&lt;/li&gt;
&lt;li&gt;Selenium – This is a product I want to play about with as allows front end testing with a browser.&lt;/li&gt;
&lt;li&gt;Rackspace – Before we made the jump to Azure we made use of some Rackspace servers.&lt;/li&gt;
&lt;li&gt;Subversion – The first source control system that I used, but been using git so long now not sure I can remember how it worked.&lt;/li&gt;
&lt;li&gt;Visual Studio – The IDE from Microsoft that I use to write code. I am a big fan as it does everything I could want.&lt;/li&gt;
&lt;li&gt;TeamCity – The continuous integration software that I have been using to automate my deployments.&lt;/li&gt;
&lt;li&gt;MSBuild – This is used by Visual Studio to build your software and can also be used by your deployment scripts.&lt;/li&gt;
&lt;li&gt;Trello – A website that allows you to create a board of ideas or things to do.&lt;/li&gt;
&lt;li&gt;Slack – Brings all your communication together in one place. It’s real-time messaging, archiving and search for modern teams.&lt;/li&gt;
&lt;li&gt;New Relic – A software analytics tool suite used by developers, ops, and software companies to understand how your applications are performing. Useful but find myself favouring Application Insights (part of Azure) more now.&lt;/li&gt;
&lt;li&gt;Nagios – Yay nagios is on the list! My favourite server monitoring system.&lt;/li&gt;
&lt;li&gt;Splunk – This application can be used to search, monitor and analyse all your log files to find out what is happening. Don’t currently use it but I have tried it out in the past.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is your favourite DevOps tool? Why not leave a comment below?&lt;/p&gt;</description></item><item><title>Automatic Git Tagging</title><link>https://blog-dev.funkysi1701.com/posts/2016/automatic-git-tagging/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 16 Jun 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/automatic-git-tagging/</guid><category term="DevOps">DevOps</category><category term="SourceControl">SourceControl</category><category term="Git">Git</category><category term="TeamCity">TeamCity</category><description>&lt;p&gt;One of the features of git is the ability to tag a point in my change history with a tag. For a while now I have been manually tagging my code whenever I do a release, so I can easily work out what has changed by doing a diff between two tags.&lt;/p&gt;
&lt;p&gt;Now that I am automating my release process with TeamCity I am thinking about how to manage my tags better.&lt;/p&gt;
&lt;p&gt;TeamCity has a setting called VCS Labeling which comes in very handy.
&lt;img class="img-fluid" alt="TeamCity VCS labelling configuration settings" src="https://blog-dev.funkysi1701.com/images/2016/Untitled.jpg" loading="lazy"
width="1595" height="580"
/&gt;
&lt;/p&gt;
&lt;p&gt;Configuring it is fairly simple as it only has three settings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;VCS root to label&lt;/strong&gt;: This is obviously the url to your git repository
&lt;strong&gt;Labeling pattern&lt;/strong&gt;: This is the text of the label to be added.
&lt;strong&gt;Label successful builds only&lt;/strong&gt;: Do you really want to add a tag if the build failed?&lt;/p&gt;
&lt;p&gt;A tag needs to have a unique name, so adding a tag just called &lt;strong&gt;deployed&lt;/strong&gt; won’t work. When I used to add tags manually I used the naming convention of &lt;strong&gt;deployedyyyymmdd&lt;/strong&gt;. While this naming convention is possible with TeamCity I use something a bit more complex to provide more information about what has been deployed.&lt;/p&gt;
&lt;p&gt;TeamCity provides lots of parameters that can be used in your build steps and also in the Labeling pattern box. I started off using &lt;strong&gt;deployed-build-%system.build.number%&lt;/strong&gt; as my tag which just marks git with the TeamCity build number.&lt;/p&gt;
&lt;p&gt;When I run a TeamCity deployment I don’t always use the same configuration options, I deploy locally, to a test server or to production and sometimes I just deploy the frontend or the backend. How cool would it be to include this information in the tag text?&lt;/p&gt;
&lt;p&gt;Well the next step was to change my Labeling pattern to &lt;strong&gt;deployed-build-%system.build.number%-%ServerName%-%DatabaseName%-%FrontEndPath%&lt;/strong&gt;, this adds the backend database config settings and the path the frontend was deployed to. Now when looking at git you can see commits marked with multiple tags, one for each deployment that succeeded and the tag will indicate the settings used during that deployment.&lt;/p&gt;
&lt;p&gt;Now I will never forget to add the tag after a release as the adding of a tag is part of the deployment process, if the deployment fails the tag won’t be added. I can test my deployment to test and git will show if this has been successful, and when I deploy live this will also show up.&lt;/p&gt;
&lt;p&gt;How do you use tags? Do you mark successful builds with a tag? Why not let me know or leave a comment below.&lt;/p&gt;</description></item><item><title>I’m 100 blog posts old</title><link>https://blog-dev.funkysi1701.com/posts/2016/i-m-100-blog-posts-old/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 02 Jun 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/i-m-100-blog-posts-old/</guid><category term="100">100</category><category term="Blogging">Blogging</category><description>&lt;p&gt;That’s right this is the one hundredth post that I have written on this blog.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="100-posts-old-L-fwCF_f" src="https://blog-dev.funkysi1701.com/images/2016/100-posts-old-L-fwCF_f-300x247.jpeg" loading="lazy"
width="300" height="247"
/&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So what have I learned in the past 100 posts?&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It is easier to write a blog before you become a parent. More recently I am increasingly finding it difficult to find the time to blog. It used to be that I could write on an evening, but now James is around I often prefer to play with him, or more often stop him crawling where he shouldn’t.&lt;/li&gt;
&lt;li&gt;I like my job. The inspiration for most of this site is my day job and as you can read, I do a wide variety of different things, but I have a lot more to learn as well.&lt;/li&gt;
&lt;li&gt;Finding your niche is hard. 100 posts in and I am still not sure what my niche is. I started out with the broad niche of IT and what I do, I then considered something about IT and fatherhood but I don’t think that topic is really me. My current thinking is maybe DevOps especially as my role these days fits squarely between Development and Operations.&lt;/li&gt;
&lt;li&gt;Its time for a refresh. I have been meaning to change the theme of this site for some time and I feel after 100 posts now is as good as time as any. I want to emphasise my skills and what I am learning and increase the emphasis on DevOps, which I think will be my niche.&lt;/li&gt;
&lt;li&gt;Watching visitor numbers is addictive. Every day I look at how many people have looked at my blog, but I have yet to see a pattern between what I write and how many reads I get. Is my writing getting better? I don’t know. Are more people reading? Probably not. Will I keep going? Yes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;So what is next?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hopefully a refreshed look in the next few months. Hopefully regular posts. If there is something you want to see on here drop me a message via any of the social media links or put a comment below.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is my favourite post?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Maybe &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;
which proved very popular and got me to start going to user groups something I still enjoy today. I also like &lt;a href="https://www.funkysi1701.com/posts/2016/coding-myself-into-a-corner/" target="_blank" rel="noopener noreferrer"&gt;Coding Myself Into A Corner&lt;/a&gt;
which got me to start thinking more if I was giving myself future problems. But there are many others I like such as &lt;a href="https://www.funkysi1701.com/posts/2015/baby-magic-and-becoming-a-father/" target="_blank" rel="noopener noreferrer"&gt;James and Becoming a father&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>TNG Brothers S4 E3: Battle Bridge</title><link>https://blog-dev.funkysi1701.com/posts/2016/brothers-tng-s4-e3-review-battle-bridge/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 26 May 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/brothers-tng-s4-e3-review-battle-bridge/</guid><category term="StarTrek">StarTrek</category><category term="Trekmate">Trekmate</category><category term="Podcast">Podcast</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/Noonian_Soong_2367.jpg"/><description>&lt;p&gt;My latest podcast can be found at &lt;a href="https://www.trekmate.org.uk/brothers-tng-s4-e3-review-the-battle-bridge/" target="_blank" rel="noopener noreferrer"&gt;https://www.trekmate.org.uk/brothers-tng-s4-e3-review-the-battle-bridge/&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Data jeopardizes an emergency mission to save an ill child when he gets a signal from his creator.&lt;/p&gt;
&lt;p&gt;Today James and Lou discuss (Brothers) and what we think of it, with tonight’s guest host Simon Foster, Funky Si.&lt;/p&gt;
&lt;p&gt;Credit: Main Title Theme (TV Edit) was arranged by &lt;a href="https://memory-alpha.fandom.com/wiki/Dennis_McCarthy" target="_blank" rel="noopener noreferrer"&gt;Dennis McCarthy&lt;/a&gt;
and composed by &lt;a href="https://memory-alpha.fandom.com/wiki/Jerry_Goldsmith" target="_blank" rel="noopener noreferrer"&gt;Jerry Goldsmith&lt;/a&gt;
and &lt;a href="https://memory-alpha.fandom.com/wiki/Alexander_Courage" target="_blank" rel="noopener noreferrer"&gt;Alexander Courage&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>Running Windows on Raspberry Pi</title><link>https://blog-dev.funkysi1701.com/posts/2016/windows-10-raspberry-pi-3/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 05 May 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/windows-10-raspberry-pi-3/</guid><category term="C-Sharp">C-Sharp</category><category term="RaspberryPi">RaspberryPi</category><category term="VisualStudio">VisualStudio</category><description>&lt;p&gt;Last year you may remember me talking about playing with a Raspberry Pi. Well since then my Raspberry Pi has been sat on a desk collecting dust.&lt;/p&gt;
&lt;p&gt;This week I attended Leeds Sharp and the topic was &lt;strong&gt;Running Windows on Raspberry Pi&lt;/strong&gt; and this has inspired me again to do something with a Pi.&lt;/p&gt;
&lt;p&gt;But first what did I learn.&lt;/p&gt;
&lt;blockquote class="twitter-tweet"&gt;&lt;p lang="en" dir="ltr"&gt;Here are a couple more of pics of last nights &lt;a href="https://twitter.com/LeedsSharp?ref_src=twsrc%5Etfw"&gt;@LeedsSharp&lt;/a&gt; &lt;a href="https://t.co/QvlsYjNFvB"&gt;https://t.co/QvlsYjNFvB&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/RaspberryPi?src=hash&amp;amp;ref_src=twsrc%5Etfw"&gt;#RaspberryPi&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/MSIoT?src=hash&amp;amp;ref_src=twsrc%5Etfw"&gt;#MSIoT&lt;/a&gt; &lt;a href="https://t.co/60o4wiiPSv"&gt;pic.twitter.com/60o4wiiPSv&lt;/a&gt;&lt;/p&gt;&amp;mdash; Richard Tasker 🇬🇧 (@ritasker) &lt;a href="https://twitter.com/ritasker/status/725970415189909504?ref_src=twsrc%5Etfw"&gt;April 29, 2016&lt;/a&gt;&lt;/blockquote&gt; &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;
&lt;p&gt;I had heard that a cut down version of Windows 10 could be installed on the newer Raspberry Pi’s, but I hadn’t really understood how cut down the version of windows is. Having now seen it demonstrated the OS consists of a single page with a few menu options.&lt;/p&gt;
&lt;p&gt;The real power of Windows 10 IoT is when you connect remotely to it. There are a couple of ways to do this, PowerShell (check out &lt;a href="https://github.com/MicrosoftDocs/windows-iotcore-docs/blob/main/windows-iotcore/manage-your-device/CommandLineUtils.md" target="_blank" rel="noopener noreferrer"&gt;https://github.com/MicrosoftDocs/windows-iotcore-docs/blob/main/windows-iotcore/manage-your-device/CommandLineUtils.md&lt;/a&gt;
for a few commands), and of course connecting Visual Studio to your Pi.&lt;/p&gt;
&lt;p&gt;When I had previously played with a Pi, it had been with bash scripts and linux commands. The beauty of installing Windows IoT is that you can write c# code, something I do in my day job so theoretically I should find it easier.&lt;/p&gt;
&lt;p&gt;The demonstration at Leeds Sharp was pretty impressive. If you are a fan of the Big Bang Theory you may recall Sheldon playing a Theremin. Well it is actually possible to construct a Theremin from a couple of sensors and a Raspberry Pi. The code for which is on &lt;a href="https://github.com/ritasker/IoTDemos" target="_blank" rel="noopener noreferrer"&gt;github&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Now that I have been inspired what shall I do?&lt;/p&gt;
&lt;p&gt;My Raspberry Pi won’t support Windows 10 IoT, so I need to buy the latest version. I am thinking of buying a kit so I can play about with a breadboard, LEDs and resistors. Maybe not build a robot straight away but certainly try doing something that connects to the GPIO pins.&lt;/p&gt;
&lt;p&gt;If you have any suggestions leave a comment below.&lt;/p&gt;</description></item><item><title>Exchange Web Services</title><link>https://blog-dev.funkysi1701.com/posts/2016/exchange-web-services/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 21 Apr 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/exchange-web-services/</guid><category term="EWS">EWS</category><category term="MVC">MVC</category><category term="Exchange">Exchange</category><description>&lt;p&gt;Where I work we use a really old fashioned way of recording where in the country employees are: Excel!&lt;/p&gt;
&lt;p&gt;For years I have been trying to persuade staff to use calendars in Exchange. Outlook is great for looking at one or two people’s calendars at once but quickly gets unmanageable for looking at ten or more peoples availability.&lt;/p&gt;
&lt;p&gt;Recently I have started looking into how easy it is to query this information to give a custom view.&lt;/p&gt;
&lt;p&gt;Microsoft provide an API to query exchange information called Exchange Web Services or EWS. I have only used EWS with my Exchange 2010 setup, but the documentation mentions working with Exchange 2007 and older or Exchange online.&lt;/p&gt;
&lt;p&gt;Here are the basics of what I have tried. Fire up Visual Studio and from nuget install EWS.&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-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Install-Package Microsoft.Exchange.WebServices
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I started off with a simple Console App to see how it all worked, and then extended it to a MVC website. I found querying exchange directly was slow, but it is easy enough to cache information in a database.&lt;/p&gt;
&lt;p&gt;To start you need to create an Exchange Service object, by specifying the version of Exchange you are using.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ExchangeService service = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; ExchangeService(ExchangeVersion.Exchange2010);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next you need to pass the URL you are using to access Exchange.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;service.Url = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; Uri(&lt;span style="color:#e6db74"&gt;&amp;#34;mail.example.com&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To access information from exchange you need to pass some Exchange credentials, ideally a username and password that has access to view all the calendars you want to look at.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;service.Credentials = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; WebCredentials(&lt;span style="color:#e6db74"&gt;&amp;#34;username&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;password&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next pass the email address of the user who owns the calendar you want to look at.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;service.ImpersonatedUserId = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; ImpersonatedUserId(ConnectingIdType.SmtpAddress, &lt;span style="color:#e6db74"&gt;&amp;#34;me@example.com&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My particular exchange server has a self signed SSL certificate which is not going to be trusted by remote clients. The following line ignores this validation check and makes my program connect.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;System.Net.ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) =&amp;gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that we have connected to exchange we just need a few lines to look for events in the calendars.&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Initialize the calendar folder object with only the folder ID.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; PropertySet());
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Set the start and end time and number of appointments to retrieve.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CalendarView cView = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; CalendarView(startDate, endDate);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Limit the properties returned to the appointment&amp;#39;s subject, start time, and end time.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cView.PropertySet = &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Retrieve a collection of appointments by using the calendar view.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FindItemsResults&amp;lt;Appointment&amp;gt; appointments = calendar.FindAppointments(cView);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that you have an appointments object you can loop through each element with a foreach loop. In my case I assign each elements Subject to a variable, which I can then do what I like with (display in a console window, save to a database, display in an MVC website.)&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-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;foreach&lt;/span&gt; (Appointment a &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; appointments)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (a.Subject != &lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; subject += a.Subject.ToString();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My website queries a SQL database which I can easily populate with a console app that runs at regular intervals throughout the day.&lt;/p&gt;
&lt;p&gt;There is a lot more I want to do with this project as this is only the basics of what you can do with Exchange Web Services. So expect more blog posts on this subject as I expand its functionality and learn new ways of doing things.&lt;/p&gt;</description></item><item><title>Revisiting Team City</title><link>https://blog-dev.funkysi1701.com/posts/2016/revisiting-teamcity/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 24 Mar 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/revisiting-teamcity/</guid><category term="CI">CI</category><category term="DevOps">DevOps</category><category term="SourceControl">SourceControl</category><description>&lt;p&gt;Last year I blogged about &lt;a href="https://www.funkysi1701.com/posts/2015/teamcity/" target="_blank" rel="noopener noreferrer"&gt;Team City&lt;/a&gt;
, well I have been looking at it again recently. In that time they have even changed their logo!&lt;/p&gt;
&lt;p&gt;Lets start with thinking about what I want my Continuous Integration server to do.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check out my code from source control (usually master but all feature branches would be even better)&lt;/li&gt;
&lt;li&gt;Configure specific setting for build&lt;/li&gt;
&lt;li&gt;Build my code&lt;/li&gt;
&lt;li&gt;Build my databases&lt;/li&gt;
&lt;li&gt;Run any unit tests&lt;/li&gt;
&lt;li&gt;(Optional) Run deployment to Azure Test/Live site&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are probably other things I want to achieve but I will start with these six.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Checking out code from source control is something Team City does out of the box, so I can safely say I have done this now. It even monitors a branch for changes and initiates a new check out.&lt;/li&gt;
&lt;li&gt;Team City allows you to create specific build steps so in theory you can have multiple builds for every variation of settings that you want for your code. I have not tried this yet apart from building with the default config, but I don’t expect it will be too difficult.&lt;/li&gt;
&lt;li&gt;I have managed to get my code to build with Team City, it took a bit of tweaking the different build steps but wasn’t too difficult. Team City has a visual studio build agent which takes you solution file and does what it needs to. The one problem I have found with this step is that I get errors with my tests if I select a Debug config instead of Release.&lt;/li&gt;
&lt;li&gt;Databases are always the problem part of the deployment. So far I have manually deployed my databases but I intend on revisit this step. A &lt;a href="https://stackoverflow.com/questions/21555038/how-can-i-execute-sql-scripts-using-teamcity" target="_blank" rel="noopener noreferrer"&gt;stackoverflow&lt;/a&gt;
post suggests that I can run SQL code via Team City in the following way by creating a command line executable:&lt;/li&gt;
&lt;/ol&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Command executable: c:&lt;span style="color:#ae81ff"&gt;\P&lt;/span&gt;rogram Files&lt;span style="color:#ae81ff"&gt;\M&lt;/span&gt;icrosoft SQL Server&lt;span style="color:#ae81ff"&gt;\1&lt;/span&gt;00&lt;span style="color:#ae81ff"&gt;\T&lt;/span&gt;ools&lt;span style="color:#ae81ff"&gt;\B&lt;/span&gt;inn&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;qlcmd.exe
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Command parameters: -S &lt;span style="color:#f92672"&gt;[&lt;/span&gt;ServerName&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -i &lt;span style="color:#f92672"&gt;[&lt;/span&gt;PathToSQLScript&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I have yet to try this but I am hopefully that it will just work. Dropping a database and restoring a back and then running different SQL scripts is all possible from TSQL, so I should be OK. Watch this space for more details.&lt;/p&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Running the unit tests got me stuck for a while. I tried setting it up using VSTest or MSTest neither worked mainly because a config file wasn’t being copied with the test binaries. When I tried using NUnit it just worked. The tests that failed gave me a few config settings to change.&lt;/li&gt;
&lt;li&gt;I have powershell scripts that deploy to Azure websites, I think that these could form the basis of a deployment to Azure. Again the difficult step here may end up being deploying all the different databases to Azure. This is also the riskiest step as I need to connect to live servers which is why I will leave this to last, at the very least I could generate scripts that do a full deployment.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That’s it for now. Once I have this all working I will revisit again with details of the database steps as I am expecting a few challenges to overcome. What have you used a CI Server for? Are there other things I want to achieve from a project like this? Why not contact me or leave a comment below&lt;/p&gt;</description></item><item><title>Model View Controller (MVC)</title><link>https://blog-dev.funkysi1701.com/posts/2016/model-view-controller-mvc/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 17 Mar 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/model-view-controller-mvc/</guid><category term="MVC">MVC</category><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Model View Controller software architecture diagram" src="https://blog-dev.funkysi1701.com/images/2016/27.jpg" loading="lazy"
width="327" height="314"
/&gt;
&lt;/p&gt;
&lt;p&gt;Model View Controller or MVC is a software architectural pattern for implementing user interfaces on computers. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&lt;/p&gt;
&lt;p&gt;I have been trying to get my head around the concept of MVC for a while, hopefully writing this article will help solidify my understanding of it.&lt;/p&gt;
&lt;p&gt;One of the core concepts of MVC is the ability to separate concerns so you can concentrate your energies on one aspect of the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model&lt;/strong&gt; This is the data. If your application uses a database the model often mirrors what you have in the database and concerns itself retrieving information from the database.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt; This concerns itself with displaying the data to the user. Typically this is the html pages of your application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Controller&lt;/strong&gt; This concerns itself with actually doing things and deals with user interaction. Typically it will get data from the view and send data to the model.&lt;/p&gt;
&lt;p&gt;The three concerns can be developed in isolation as they do not depend on each other, for larger development teams you can even divide up development much easier that a traditional app.&lt;/p&gt;
&lt;p&gt;The basic concept of MVC I get and understand, however I find myself getting bogged down in the details.&lt;/p&gt;
&lt;p&gt;The database doesn’t matter. I need to remember this and not get sidetracked in writing custom methods to connect to the database which end up unmanageable. I know SQL, so can easily write SQL commands to copy data into the format I need for my app. The app I am currently working on involves a large amount of existing data, and I need to concentrate on the MVC parts and worry about the database later.&lt;/p&gt;
&lt;p&gt;In previous attempts I have tried to build my model against many tables, but instead I can write a query against many tables and insert that into one table which the Model can then use.&lt;/p&gt;
&lt;p&gt;Changing the model often results in an error informing you that the context has changed since the database was created. The easy solution to this in my case is to drop the database and allow entity framework to recreate the database each time. As long as my database contains no new data, I won’t loose anything.&lt;/p&gt;
&lt;p&gt;One of the core advantages of MVC is the ability to test it or even use test driven development (TDD). I haven’t really dabbled with testing yet as I am still trying to get my head around the fundamentals, but once I have made some progress with my app I want to test, so next time I get asked to add a new feature I have no fear about breaking stuff.&lt;/p&gt;
&lt;p&gt;For the first time I have got an app with a working Authentication system from the start. And it is remarkably easy to implement with one keyword. Adding &lt;strong&gt;[Authorize]&lt;/strong&gt; to the top of your controller is all that is needed. Building the actual Authentication system is relatively easy from Visual Studio, as it has templates for Azure AD, Forms Based, Open Auth like google/twitter etc.&lt;/p&gt;
&lt;p&gt;It is still very early days for my MVC app and my understanding of it, but I feel I have turned the corner and can actually build something with it now, rather than be stuck in a downward spiral of confusion.&lt;/p&gt;
&lt;p&gt;What do you think about MVC why not leave a comment below? For more info about MVC I have been looking at &lt;a href="https://dotnet.microsoft.com/en-us/apps/aspnet" target="_blank" rel="noopener noreferrer"&gt;https://dotnet.microsoft.com/en-us/apps/aspnet&lt;/a&gt;
which has more information and tutorials.&lt;/p&gt;</description></item><item><title>Surface Book Review</title><link>https://blog-dev.funkysi1701.com/posts/2016/surface-book-review/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 10 Mar 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/surface-book-review/</guid><category term="Laptop">Laptop</category><category term="Hardware">Hardware</category><category term="Technology">Technology</category><category term="Microsoft">Microsoft</category><category term="Windows">Windows</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/en-INTL-PDP0-Surface-Book-CR9-00001-P2.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Microsoft Surface Book laptop with detachable keyboard" src="https://blog-dev.funkysi1701.com/images/2016/en-INTL-PDP0-Surface-Book-CR9-00001-P2.jpg" loading="lazy"
width="780" height="400"
/&gt;
I have just bought myself a new laptop, but it is not just any laptop it is a &lt;a href="https://www.microsoft.com/en-gb/store/d/product/8TXJ08Q9LXDT" target="_blank" rel="noopener noreferrer"&gt;Microsoft Surface Book&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;I think this is probably the first time I have bought myself a top of the range laptop and after a few days of use I am loving it.&lt;/p&gt;
&lt;p&gt;The Surface Book is the latest in Microsoft’s Surface line of tablets but the first to feature a keyboard and be more like a traditional laptop. The keyboard is detachable from the keyboard so you can use the Surface Book like a tablet.&lt;/p&gt;
&lt;p&gt;As it is a top of the range laptop, it was not cheap, so if price is a significant factor in your laptop choice this is not the machine for you. Microsoft are trying to compete with Apple’s Macbook range.&lt;/p&gt;
&lt;p&gt;So what did I get for my money:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 Pro&lt;/li&gt;
&lt;li&gt;16Gb RAM&lt;/li&gt;
&lt;li&gt;512Gb SSD (Formatted Size nearer 474Gb)&lt;/li&gt;
&lt;li&gt;6th Generation Intel Core i7 Processor&lt;/li&gt;
&lt;li&gt;Surface Pen&lt;/li&gt;
&lt;li&gt;13.5-inch touch screen&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have only had the device for a few days but these are my thoughts so far. My primary reason for buying this is for doing development work with Visual Studio and SQL Server.&lt;/p&gt;
&lt;p&gt;I really like the Surface Pen. This is a feature that I didn’t think I would use much. The Pen connects via bluetooth and allows interaction with the touch screen. The pressure sensitive screen allows all sort of touch actions to be performed.&lt;/p&gt;
&lt;p&gt;I especially like the choice of keyboards that are offered when the physical keyboard is detached. You can have either a on screen keyboard which you can type with pen or fingers, an on screen keyboard that splits in half or you can write with the pen. This is an amazing feature. My handwriting is not good but most of the time it understands my scrawl. With this option you can hand write a tweet or fill in a form on a webpage. For speed I would not recommend this form of input for large amounts of text, but for browsing the web of when you are just clicking on links it is great.&lt;/p&gt;
&lt;p&gt;Windows Hello – I can unlock windows just by looking at my screen. How cool is that! It was really easy to setup, it just takes a photo of your face and next time you login all you need to do it look at the screen. Note if you are working in tablet mode, make sure the tablet is the correct way up.&lt;/p&gt;
&lt;p&gt;It’s not all brilliant though. Detaching the screen is fiddly and sometimes takes a few moments to do. A few times I have felt I needed another hand but I am sure the more I do this the easier I will find it to do.&lt;/p&gt;
&lt;p&gt;Battery life isn’t great especially when running off the tablet only. This is due to the machine having two batteries, one in the base and one in the screen so with keyboard attached you have much longer use times. Actually I am finding the battery is lasting longer now that I have used it for a few days.&lt;/p&gt;
&lt;p&gt;The screen has a very high resolution 3000 x 2000 but using clever zooming technology everything is still readable and not tiny. However I use Remote Desktop a lot and this caused me a problem. When RDPing the remote session used the host screen resolution which made everything tiny on my servers. The solution to this can be found on &lt;a href="https://superuser.com/questions/891413/remote-connection-desktop-manager-2-7-does-not-support-dpi-scaling-anymore" target="_blank" rel="noopener noreferrer"&gt;SuperUser&lt;/a&gt;
and involved using Microsoft’s Remote Desktop Connection Manager, a cool bit of software for managing multiple RDP sessions. This is actually an improvement on the way I usually work, but until I found the answer this was annoying.&lt;/p&gt;
&lt;p&gt;Another minor annoyance with the keyboard is that you can’t press Ctrl-Alt-Del with one hand. Normally this isn’t a requirement but if the screen locks while I have my son on my lap I am stuck, but I won’t blame the surface book for this.&lt;/p&gt;
&lt;p&gt;When I got my Surface Book I was also given a Microsoft Wireless Display Adapter. I am not a fan of this bit of tech as I can’t get it to work. I briefly got my old laptop to connect but my Surface Book keeps telling me NO!&lt;/p&gt;
&lt;p&gt;Overall I like the Surface Book. It is certainly the nicest laptop I have ever used. Now that I have the docking station I can connect two monitors, have a wired internet connection and it becomes a proper work horse. What does everyone else think? Better than Apple’s range of laptops?&lt;/p&gt;</description></item><item><title>Trying Out Azure Active Directory</title><link>https://blog-dev.funkysi1701.com/posts/2016/trying-out-azure-active-directory/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 03 Mar 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/trying-out-azure-active-directory/</guid><category term="ActiveDirectory">ActiveDirectory</category><category term="Azure">Azure</category><category term="Authentication">Authentication</category><category term="AzureActiveDirectory">AzureActiveDirectory</category><category term="DevOps">DevOps</category><media:content medium="image" type="image/png" url="https://blog-dev.funkysi1701.com/images/2016/arch.png"/><description>&lt;p&gt;One of my plans is to create new MVC Webapps for my companies databases. Once I publish these I will need to secure them so only staff have access.&lt;/p&gt;
&lt;p&gt;The traditional way to do this would be insert membership tables into my database. The user then has to remember another username and password and I have to secure the storage of these credentials. Lots of work for everyone.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Diagram comparing traditional membership tables with Azure Active Directory authentication" src="https://blog-dev.funkysi1701.com/images/2016/arch.png" loading="lazy"
width="600" height="430"
/&gt;
&lt;/p&gt;
&lt;p&gt;There is a better way by using Azure Active Directory. You have probably heard of Active Directory, if you are a SysAdmin you probably use it all the time to manage your corporate users and computers. Azure Active Directory is an extension of this into the Cloud.&lt;/p&gt;
&lt;p&gt;I have blogged in the past about using Azure but this is the first time I have tried connecting my internal domain to Azure. There is a &lt;a href="https://vlabs.holsystems.com/vlabs/technet?eng=VLabs&amp;amp;auth=external&amp;amp;src=vlabs&amp;amp;altadd=true&amp;amp;labid=13535" target="_blank" rel="noopener noreferrer"&gt;Virtual Lab&lt;/a&gt;
which helped me try out some of these ideas.&lt;/p&gt;
&lt;p&gt;The first thing I did was to create a new Directory in Azure. I did this via the old portal (&lt;a href="https://manage.windowsazure.com/" target="_blank" rel="noopener noreferrer"&gt;manage.windowsazure.com&lt;/a&gt;
) it might be possible via the new portal but I don’t know how yet.&lt;/p&gt;
&lt;p&gt;Click New, select App Services &amp;gt; Active Directory &amp;gt; Directory and select Custom Create. Select Create new directory, give it a name and a domain name and select a region from the drop down. Then add a Global Admin for this directory.&lt;/p&gt;
&lt;p&gt;There is a tool called &lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=47594" target="_blank" rel="noopener noreferrer"&gt;Azure Active Directory Connect&lt;/a&gt;
. Download and Install this with express settings on one of your domain controllers. You need to specify a domain admin account to access your domain and the Azure Global Admin account you just created.&lt;/p&gt;
&lt;p&gt;At this point I went to bed so I am not sure how long it tool to sync all the domain information but by morning it was all showing in the users list on Azure.&lt;/p&gt;
&lt;p&gt;All my user accounts are showing with a @contoso.onmicrosoft.com, it is possible to use custom domains but I haven’t figured out that step yet. I made a change in my Active Directory and a while later that change was showing in Azure AD.&lt;/p&gt;
&lt;p&gt;So now what? Open up Visual Studio and see if I can use Azure to Authenticate.&lt;/p&gt;
&lt;p&gt;I selected to create a new MVC web project and clicked the change authenticate option. One of the options was Work and School Accounts, I then selected Cloud Single Organization and entered contoso.onmicrosoft.com. I then ran this app and it authenticated using Azure using my domain password. Really impressed at how easy that was.&lt;/p&gt;
&lt;p&gt;The app then shows up on Azure in the old portal. In Applications you can see a list of which users have access to your app and configure few other app related settings.&lt;/p&gt;
&lt;p&gt;This is a long way off being useful in my actual app, but it shows that the basics of what I am trying to do does work. Anyone done anything similar with Azure AD? How did you get on?&lt;/p&gt;</description></item><item><title>Coding myself into a corner</title><link>https://blog-dev.funkysi1701.com/posts/2016/coding-myself-into-a-corner/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 25 Feb 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/coding-myself-into-a-corner/</guid><category term="Databse">Databse</category><category term="Access">Access</category><description>&lt;p&gt;I spend an awful lot of my working life adding new features and improvements to a legacy database system.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;legacy&lt;/strong&gt; system is an old method, technology, computer system, or application program, “of, relating to, or being a previous or outdated computer system.” Often a pejorative term, referencing a system as &amp;ldquo;&lt;strong&gt;legacy&lt;/strong&gt;&amp;rdquo; often implies that the system is out of date or in need of replacement.&lt;/p&gt;
&lt;p&gt;My particular legacy system is Microsoft Access. We use Microsoft Access to provide the front end for all our internal databases. The particular technology we use is ADP files which are only supported in Access 2000, 2003 or 2010.&lt;/p&gt;
&lt;p&gt;Microsoft has already dropped support for Access 2000 and 2003, and support for 2010 is due to be dropped in 2020.&lt;/p&gt;
&lt;p&gt;So why am I coding myself into a corner? Its simple for every feature or improvement I create in Access, I increase the amount of features I need to create or port to a new front end.&lt;/p&gt;
&lt;p&gt;This is a very depressing thought, everything I create will need creating again. I am not saving myself work but increasing the amount of work I need to do again.&lt;/p&gt;
&lt;p&gt;The bad news is that my employers like almost all businesses demand results and like a good employee I have been delivering them. I have been promised the mythical “when we are quiet” you can work on rebuilding the database front end. I know this will likely never happen so what are my options.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do nothing&lt;/strong&gt; I have warned my managers that this work needs doing and it is up to them to give me the resources I need. This is not an acceptable option. Firstly I am not future proofing the business, 2020 will be here before we know it. Also I am not developing myself as a developer, as the only experience I am getting is with Legacy technology that has expired or will do very soon. No one wants to employ someone who only has legacy experience.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do something&lt;/strong&gt; I need to keep delivering results and doing what is asked of me. Like any good engineer I should be multiplying my estimates by four, meaning that I have some time that can be used for looking at the bigger picture. This is a win-win option really. Employer gets a solution that is future proof, Employee gets valuable experience in up to date technology.&lt;/p&gt;
&lt;p&gt;What do you think? Have you been tied to legacy technology? Why not leave a comment below.&lt;/p&gt;</description></item><item><title>Trek review: Best of Both Worlds</title><link>https://blog-dev.funkysi1701.com/posts/2016/star-trek-episode-review-the-best-of-both-worlds/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 18 Feb 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/star-trek-episode-review-the-best-of-both-worlds/</guid><category term="StarTrek">StarTrek</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/Picard_kidnapped_by_the_Borg.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Captain Picard assimilated by the Borg as Locutus of Borg" src="https://blog-dev.funkysi1701.com/images/2016/Picard_kidnapped_by_the_Borg.jpg" loading="lazy"
width="1000" height="865"
/&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Episode Title: &lt;strong&gt;The Best of Both Worlds&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Star Trek Type: TNG&lt;/li&gt;
&lt;li&gt;Original Air Date: 18 June 1990 &amp;amp; 24 September 1990&lt;/li&gt;
&lt;li&gt;Written By: Michael Piller&lt;/li&gt;
&lt;li&gt;Directed By: Cliff Bole&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Borg threaten the Federation, when they kidnap Captain Picard and destroy a fleet of 39 Starships. Luckily some original thinking from Commander Riker and Lieutenant Commander Shelby saves the Federation from assimilation.&lt;/p&gt;
&lt;p&gt;Thoughts: I love this episode! It is probably my favourite episode in the whole of trek. I can’t think of a single scene which I don’t like.&lt;/p&gt;
&lt;p&gt;It is a two parter that actually works best as a two parter. The moment that Riker orders the Enterprise to fire on the Borg is great. At the time some thought that Patrick Stewart might leave the show and be replaced by Riker/Shelby. I am very glad that didn’t happen but it is interesting to ponder what that might be like.&lt;/p&gt;
&lt;p&gt;The Borg soundtrack in this episode is great. Ron Jones really captures the spooky threat that the Borg are. I was always disappointed that some of that didn’t continue in First Contact and when the Borg return in Voyager.&lt;/p&gt;
&lt;p&gt;The episode has a cracking pace. From the moment the Borg first attack the Enterprise to the moment the Borg ship explodes the show doesn’t slow down.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;I am Locutus… of Borg. Resistance… is futile.
Your life, as it has been… is over. From this time forward… you will service… us.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Commander Shelby is a great character that enhances the episode and introduces conflict between characters, particularly Riker.&lt;/p&gt;
&lt;p&gt;I have heard that Riker’s thoughts about his career was a mirror to writer Michael Piller’s thoughts about leaving the show. Luckily for us he stayed.&lt;/p&gt;
&lt;p&gt;In a future episode of DS9 Worf comments that he felt there was nothing that they couldn’t do during this time. I have to agree the tag team of him and Data is a great one. If I want rescuing it would be Data and Worf that I would want.&lt;/p&gt;
&lt;p&gt;My good friends at &lt;a href="https://www.trekmate.org.uk/the-best-of-both-worlds-tng-s3-e26-review-the-battle-bridge/" target="_blank" rel="noopener noreferrer"&gt;Trekmate&lt;/a&gt;
have just reviewed part one, why not have a listen?&lt;/p&gt;
&lt;p&gt;The Best of Both Worlds along with all 900+ Star Trek episodes is now available in &lt;a href="https://www.episodeatlas.com/" target="_blank" rel="noopener noreferrer"&gt;Episode Atlas&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>My git repository is too large!</title><link>https://blog-dev.funkysi1701.com/posts/2016/my-git-repository-is-too-large/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 11 Feb 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/my-git-repository-is-too-large/</guid><category term="Git">Git</category><category term="SourceControl">SourceControl</category><description>&lt;p&gt;Today I did a clone of one of my git repositories and it took ages to download. Looking into what got downloaded it was easy to see why. The .git folder was over 500Mb in size.&lt;/p&gt;
&lt;p&gt;I know how this has happened. This repository was created in 2013 and has been used by me as a dumping ground for lots of things related to the code which never should have been committed.&lt;/p&gt;
&lt;p&gt;Since 2013 I have learnt a lot more about coding and git so the current version of the files in git isn’t too bad. But git keeps the history of changes for every file so bad practices like this are kept.&lt;/p&gt;
&lt;p&gt;What can I do about this? Well what does google suggest? I found this &lt;code&gt;https://stevelorek.com/how-to-shrink-a-git-repository.html&lt;/code&gt; (link no longer exists).&lt;/p&gt;
&lt;p&gt;It suggests ways of listing all the large files that are stored in git and a way to remove them. As I am the only person that regularly commits to this repository I see no problem with giving it a go.&lt;/p&gt;
&lt;p&gt;I will summarise the steps here.&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-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone url
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you need all the remote branches so there is a bash script to run&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; branch in &lt;span style="color:#e6db74"&gt;`&lt;/span&gt;git branch -a | grep remotes | grep -v HEAD | grep -v master&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git branch –track &lt;span style="color:#e6db74"&gt;${&lt;/span&gt;branch##*/&lt;span style="color:#e6db74"&gt;}&lt;/span&gt; $branch
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another bash script then lists the top 10 large files&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#set -x&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Shows you the largest objects in your repo’s pack file.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Written for osx.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# @author Antony Stubbs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;IFS&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$’&lt;span style="color:#ae81ff"&gt;\n&lt;/span&gt;’;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# list all objects including their size, sort by size, take top 10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;objects&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo “All sizes are in kB. The pack column is the size of the object, compressed, inside the pack file.”
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;output&lt;span style="color:#f92672"&gt;=&lt;/span&gt;“size,pack,SHA,location”
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; y in $objects &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# extract the size in bytes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;size&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$((&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;echo $y | cut -f &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; -d ‘ ‘&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1024&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# extract the compressed size in bytes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;compressedSize&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$((&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;echo $y | cut -f &lt;span style="color:#ae81ff"&gt;6&lt;/span&gt; -d ‘ ‘&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1024&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# extract the SHA&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sha&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;echo $y | cut -f &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; -d ‘ ‘&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# find the objects location in the repository tree&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;other&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;git rev-list –all –objects | grep $sha&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#lineBreak=`echo -e “\n”`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;output&lt;span style="color:#f92672"&gt;=&lt;/span&gt;“&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;output&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\n&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;size&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;compressedSize&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;other&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;”
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e $output
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After running the script you will see details of your largest files. I had *.msi and *.exe files in the mix. To remove them run the following, where filename is the path to the file that needs removing.&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-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git filter-branch –tag-name-filter cat –index-filter ‘git rm -r –cached –ignore-unmatch filename’ –prune-empty -f — –all
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To reclaim the disk space run the following commands&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-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;rm -rf .git/refs/original/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git reflog expire –expire=now –all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git gc –prune=now
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git gc –aggressive –prune=now
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now push your changes back to the remote server.&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-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git push origin –force –all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git push origin –force –tags
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now if you do a clone it will be much smaller than before and you can get back to coding much quicker, without having to wait.&lt;/p&gt;</description></item><item><title>SQL Transaction Log Backups</title><link>https://blog-dev.funkysi1701.com/posts/2016/transaction-log-backups/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 04 Feb 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/transaction-log-backups/</guid><category term="Database">Database</category><category term="SQL">SQL</category><category term="Backups">Backups</category><description>&lt;p&gt;Like many DBAs I spend a lot of time maintaining my SQL Server backups.&lt;/p&gt;
&lt;p&gt;From SQL Server I maintain both full backups and transaction log backups. I have often restored my full backups but until recently I have never restored a transaction log backup. All backup strategy’s are only as good as the last time you tested the restore process.&lt;/p&gt;
&lt;h2 id="so-what-is-a-transaction-log-backup"&gt;So what is a transaction log backup?&lt;a class="anchor ms-1" href="#so-what-is-a-transaction-log-backup" aria-label="Permalink: So what is a transaction log backup?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A transaction log backup contains all the transaction log records generated since the last full backup and is used to allow the database to be recovered to a specific point in time (usually the time right before a disaster strikes). Since these are incremental, if you want to restore the database to a particular point in time, you need to have all the transaction log records necessary to replay database changes up to that point in time.&lt;/p&gt;
&lt;h2 id="how-to-do-the-restore"&gt;How to do the restore.&lt;a class="anchor ms-1" href="#how-to-do-the-restore" aria-label="Permalink: How to do the restore."&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First right click on Databases in SQL Management Studio and select restore database. You should then get a screen similar to this.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="SQL Server Management Studio restore database dialog" src="https://blog-dev.funkysi1701.com/images/2016/restore1.jpg" loading="lazy"
width="878" height="732"
/&gt;
&lt;/p&gt;
&lt;p&gt;In source click the &amp;hellip; to allow you to select your backup files.&lt;/p&gt;
&lt;p&gt;Now normally I have only ever selected one file here, the *.bak file. Instead select the *.bak and all the *.trn files as well. After SQL Server has chugged for a few minutes (time will depend on number of transaction files and server/disk speed etc) the restore plan section should fill up with files.&lt;/p&gt;
&lt;p&gt;In the destination database box, type in the name of the database you want to restore. I recommend using a different name to avoid overwriting the original database, appending Test or a datetime to the name is what I usually do.&lt;/p&gt;
&lt;p&gt;On my test server I need to untick the take tail-log backups option off the options screen before I can execute the restore.&lt;/p&gt;
&lt;p&gt;Now you can either check the tick boxes in the restore plan section or (more fun) click the timeline button to select at what point in time you want to restore to.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="SQL Server point-in-time restore timeline selector" src="https://blog-dev.funkysi1701.com/images/2016/restore2.jpg" loading="lazy"
width="797" height="474"
/&gt;
&lt;/p&gt;
&lt;p&gt;You can either select the point in time with your mouse or specify the exact point in the time textbox. Alternatively you can just select the most recent point, probably the most likely option when disaster strikes.&lt;/p&gt;
&lt;p&gt;Now that I have tried doing this on my test server I feel much more confident that when disaster does strike I can get things restored quickly and painlessly.&lt;/p&gt;
&lt;h2 id="how-often-should-you-run-transaction-backups"&gt;How often should you run transaction backups?&lt;a class="anchor ms-1" href="#how-often-should-you-run-transaction-backups" aria-label="Permalink: How often should you run transaction backups?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The answer to this question depends on how critical your data is. Until very recently I ran mine ever 15 minutes, I have increased this to every 5 minutes, but I have seen recommendations of running it &lt;a href="https://www.brentozar.com/archive/2014/02/back-transaction-logs-every-minute-yes-really/" target="_blank" rel="noopener noreferrer"&gt;every minute&lt;/a&gt;
. The more critical your data the more often you should run them.&lt;/p&gt;</description></item><item><title>Development Annoyance</title><link>https://blog-dev.funkysi1701.com/posts/2016/development-annoyance/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Fri, 29 Jan 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/development-annoyance/</guid><category term="Agile">Agile</category><category term="SQL">SQL</category><category term="Project">Project</category><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Illustration about stopping development annoyance and frustration quickly" src="https://blog-dev.funkysi1701.com/images/2016/How-you-can-stop-annoyance-or-frustrations-quickly.jpg" loading="lazy"
width="425" height="282"
/&gt;
&lt;/p&gt;
&lt;p&gt;I spend a lot of my time creating new features that simplify my companies business processes.&lt;/p&gt;
&lt;p&gt;A good example of this is an invoicing system I created. Instead of users working off different spreadsheets and copying and pasting data between various different programs the user can click a couple of buttons and everything is done and they can move on to the next task.&lt;/p&gt;
&lt;p&gt;I am currently expanding this system so more of the companies work can be invoiced quickly and simply.&lt;/p&gt;
&lt;h2 id="i-like-working-on-this-kind-of-problem"&gt;I like working on this kind of problem&lt;a class="anchor ms-1" href="#i-like-working-on-this-kind-of-problem" aria-label="Permalink: I like working on this kind of problem"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I get to discuss with the different departments involved, finding out how they work and what could make their lives better.&lt;/p&gt;
&lt;p&gt;I then get to look at what structures already exist in the database and get to rip out anything that makes no sense (Today I had a Customer table which has a primary key called ClientId – its now a Client table with PK ClientId) and add new structures to store new information.&lt;/p&gt;
&lt;p&gt;I then can build a user interface so the users can interact with the data.&lt;/p&gt;
&lt;p&gt;But the most important part of the process comes next. This is when I show the users what I have built and how it will make their lives better, they can then feed back to me questions and comments. How do I do x?, what about y?, have you thought about z?&lt;/p&gt;
&lt;p&gt;After this very valuable feedback I can go back and tweak what I have done making it better and better until the users think it is suitable for what they need.&lt;/p&gt;
&lt;h2 id="now-why-did-i-call-this-post-development-annoyance"&gt;Now why did I call this post development annoyance?&lt;a class="anchor ms-1" href="#now-why-did-i-call-this-post-development-annoyance" aria-label="Permalink: Now why did I call this post development annoyance?"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I find it intensely annoying that after spending weeks of my time working on creating something to be used. Users either make do with my solution and never tell me the one thing that really annoys them or worse they go back to the time consuming process and never feedback the one or two changes I need to make to complete the project.&lt;/p&gt;
&lt;p&gt;Now I am not perfect, like many IT people my people skills are somewhat lacking but apart from asking people what can you do to get the feedback you need to complete the project?&lt;/p&gt;
&lt;p&gt;I do not have the knowledge that other departments have so I consider development a team effort that requires everyone to contribute otherwise it will not finish.&lt;/p&gt;
&lt;p&gt;The second outcome where users return to their old ways is the most annoying. It could well be months or even years before I find out that what I created is not being used any more. By that time my memory of what I did and more importantly why I did what I did has been lost and forgotten.&lt;/p&gt;
&lt;p&gt;So users please, please tell me what works and what doesn’t and what things I can do to improve things. I want my solutions to constantly improve and get better and I can only do that with your help.&lt;/p&gt;</description></item><item><title>Star Trek Episode Review Arena</title><link>https://blog-dev.funkysi1701.com/posts/2016/star-trek-episode-review-arena/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 21 Jan 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/star-trek-episode-review-arena/</guid><category term="StarTrek">StarTrek</category><category term="Gorn">Gorn</category><category term="Arena">Arena</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/Gorn.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="The Gorn captain from Star Trek TOS episode Arena" src="https://blog-dev.funkysi1701.com/images/2016/Gorn.jpg" loading="lazy"
width="662" height="977"
/&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Episode Title: &lt;strong&gt;Arena&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Star Trek Type: TOS&lt;/li&gt;
&lt;li&gt;Original Air Date: 19 January 1967&lt;/li&gt;
&lt;li&gt;Teleplay: Gene L Coon&lt;/li&gt;
&lt;li&gt;Story By: Frederic Brown&lt;/li&gt;
&lt;li&gt;Directed By: Joseph Pevney&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The episode begins with the Enterprise in orbit of Cestus III. Commodore Travers requests a tactical team join the away team. When the away team beam down Cestus III has been destroyed.&lt;/p&gt;
&lt;p&gt;Spock detects non-human life signs, obviously the aliens that destroyed the outpost. They attack the Enterprise, stranding the away team who are under heavy fire. Sulu is instructed to do whatever he can to protect the Enterprise and leaves orbit.&lt;/p&gt;
&lt;p&gt;Kirk finds the armoury and a grenade launcher, after firing the enemy withdraws.&lt;/p&gt;
&lt;p&gt;After beaming back aboard the Enterprise they pursue the unknown enemy into uncharted space. One of the survivors of Cestus III explains that the enemy attacked without warning.&lt;/p&gt;
&lt;p&gt;Kirk is determined to destroy the enemy ship before it reaches home and the Enterprise prepares for battle.&lt;/p&gt;
&lt;p&gt;An unknown solar system scans the Enterprise as they continue their pursuit of the enemy ship. The enemy ship comes to a complete stop. The Enterprise prepares to attack but before they can they also come to a complete stop. The Metrons have stopped both ships because both ships were on a mission of violence. The captains of both ships will be placed on a planet where the winner can destroy the other.&lt;/p&gt;
&lt;p&gt;Captain Kirk and the enemy captain appear on a desert planet. The enemy is a reptilian like species called the Gorn. The Gorn has superior strength to humans but Kirk manages to escape his first encounter.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;&amp;#34;This is Captain James Kirk of the Starship Enterprise.
Whoever finds this, please get it to Starfleet Command.
I’m engaged in personal combat with a creature apparently
called a Gorn. He’s immensely strong. Already,
he has withstood attacks from me that would have
killed a Human being. Fortunately, though strong,
he is not agile. The agility and I hope the cleverness, is mine.&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The Metrons said that the planet contained materials to allow the building of a weapon, however at first glance Kirk sees nothing that could help him defeat the much strong Gorn captain. He does find some diamonds, too small to be used as a weapon.&lt;/p&gt;
&lt;p&gt;Kirk pushes a huge boulder over a cliff onto the Gorn captain, which appears to knock him out, however he survives and Kirk barely escapes. Kirk then finds Sulphur, which triggers a memory.&lt;/p&gt;
&lt;p&gt;The Metrons allow the Enterprise to watch the last stages of Kirks struggle. They see Kirk discover Potassium Nitrate. The Gorn accuses the Federation of trespassing into their space.&lt;/p&gt;
&lt;p&gt;Kirk starts constructing a weapon using the diamonds, sulphur and potassium nitrate to make a gunpowder explosion to fire the diamonds at the Gorn captain. Just in time he applies a spark to his weapon and his opponent lies defeated.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Captain Kirk firing his improvised diamond cannon at the Gorn captain" src="https://blog-dev.funkysi1701.com/images/2016/Gorn_Kirk_cannon.jpg" loading="lazy"
width="600" height="450"
/&gt;
&lt;/p&gt;
&lt;p&gt;Kirk refused to kill the Gorn captain as they may have been just defending themselves. The Metron announces that Kirk has displayed the advanced trait of mercy and there may be hope for humanity after all.&lt;/p&gt;
&lt;p&gt;Thoughts: I like this episode very much. It has some classic Star Trek ideas in it.&lt;/p&gt;
&lt;p&gt;We have a super powerful alien race (the Metrons) that think there is hope for humanity.&lt;/p&gt;
&lt;p&gt;We have Kirk using raw materials to construct a weapon using simple chemistry.&lt;/p&gt;
&lt;p&gt;We have an enemy race that appears destructive but may have just been defending themselves.&lt;/p&gt;
&lt;p&gt;We have the classic location of Vasquez Rocks, somewhere that if I ever visit the US I have to visit.&lt;/p&gt;
&lt;p&gt;We have the very cheesy Gorn mask, yes its not realistic but the story is strong enough that it doesn’t really matter. Enterprise brought back the Gorn but as a CGI character and I think I may prefer the rubber mask.&lt;/p&gt;
&lt;p&gt;Interestingly the weapon Kirk builds would likely not work. The US show MythBusters proved that the bamboo wasn’t strong enough to hold the explosion and the weapon would likely wound Kirk as much as it would wound the Gorn.&lt;/p&gt;
&lt;p&gt;Score: 10/10
Redshirt Count: Cestus III Outpost, 1 Red Shirt and 1 yellow shirt from away team.&lt;/p&gt;
&lt;p&gt;Arena along with all 900+ Star Trek episodes is now available in &lt;a href="https://www.episodeatlas.com/" target="_blank" rel="noopener noreferrer"&gt;Episode Atlas&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Disaster Planning</title><link>https://blog-dev.funkysi1701.com/posts/2016/disaster-planning/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 14 Jan 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/disaster-planning/</guid><category term="DisasterRecovery">DisasterRecovery</category><category term="BT">BT</category><category term="Outage">Outage</category><category term="Flood">Flood</category><category term="Phone">Phone</category><category term="Internet">Internet</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/flood.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Flooded streets in York during the 2015 Christmas floods" src="https://blog-dev.funkysi1701.com/images/2016/flood.jpg" loading="lazy"
width="2325" height="2325"
/&gt;
&lt;/p&gt;
&lt;p&gt;Over the Christmas break the city of York experienced the worst flooding disaster it has seen in recent years. If you want to help donations are being taken at &lt;a href="https://mydonate.bt.com/events/yorkfloodappeal/272657" target="_blank" rel="noopener noreferrer"&gt;York Flood Appeal&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Luckily I wasn’t affected but it was really sad seeing many of my favourite streets full of water. Thousands of people had to be evacuated from their homes when the water was at its highest.&lt;/p&gt;
&lt;p&gt;York has its phone exchange located in the centre of the city and as the flood waters rose, this building flooded. BT who run the exchange worked flat out trying to restore phone and broadband services to York and the surrounding area, but this lead to at least 24 hours or more of downtime for users.&lt;/p&gt;
&lt;p&gt;During this time most of the city wasn’t able to take card payments from customers (due to an internet connection being required), cash machines were not working for the same reasons and the most worrying thing access to emergency services was not available.&lt;/p&gt;
&lt;blockquote class="twitter-tweet"&gt;&lt;p lang="en" dir="ltr"&gt;Anyone would think the city phones were down &lt;a href="https://twitter.com/hashtag/yorkfloods?src=hash&amp;amp;ref_src=twsrc%5Etfw"&gt;#yorkfloods&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/bthardatwork?src=hash&amp;amp;ref_src=twsrc%5Etfw"&gt;#bthardatwork&lt;/a&gt; &lt;a href="https://t.co/ZavLMsG2Js"&gt;pic.twitter.com/ZavLMsG2Js&lt;/a&gt;&lt;/p&gt;&amp;mdash; Simon Foster (@funkysi1701) &lt;a href="https://twitter.com/funkysi1701/status/681439632886738944?ref_src=twsrc%5Etfw"&gt;December 28, 2015&lt;/a&gt;&lt;/blockquote&gt; &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;
&lt;p&gt;I am in no way critical of the hard working engineers that worked on the BT exchange to restore services to the city. However I have to ask what was contained in the BT disaster recovery plan.&lt;/p&gt;
&lt;p&gt;As an IT Manager myself backups and disaster planning is something I need to think about and plan for. Recent investment in our internet connection meant that we are now on a leased line so BTs downtime would not have affected us in terms of network connectivity, I am uncertain about phone but I believe as a business we could have continued running during this time if we needed to.&lt;/p&gt;
&lt;p&gt;Planning for a disaster is not something I ever make enough time, however I definitely want to spend more time on it and I do have the basics of a plan in my head which is probably more than BT has.&lt;/p&gt;
&lt;p&gt;BT is a huge company they run almost the entire country’s phone lines and according to &lt;a href="https://en.wikipedia.org/wiki/BT_Group" target="_blank" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;
have operations in 170 countries. I think that they can afford to have someone plan for disaster recovery.&lt;/p&gt;
&lt;p&gt;The York Exchange is located next to a river that often floods. What could the company have done to avoid this problem?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Relocate some or all of its services to a location away from the river.&lt;/li&gt;
&lt;li&gt;Add the ability to reroute services through an alternative exchange.&lt;/li&gt;
&lt;li&gt;Many towns and villages surrounding York use the BT exchange surely some of these could have been configured to use other exchanges.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In these days of terror alerts and bomb scares. Imagine if York was London and all it took to take down communication ability of the capital was one Exchange to be offline?&lt;/p&gt;
&lt;p&gt;I am sure BT are looking at what they did right and what they did wrong and if you are reading this have a look at your own disaster recovery policy. Don’t get caught out like BT did.&lt;/p&gt;</description></item><item><title>Top 50 Star Trek episodes</title><link>https://blog-dev.funkysi1701.com/posts/2016/top-50-star-trek-episodes/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Thu, 07 Jan 2016 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2016/top-50-star-trek-episodes/</guid><category term="StarTrek">StarTrek</category><category term="Voyager">Voyager</category><category term="DeepSpaceNine">DeepSpaceNine</category><category term="Spock">Spock</category><category term="Kirk">Kirk</category><category term="Enterprise">Enterprise</category><media:content medium="image" type="image/jpeg" url="https://blog-dev.funkysi1701.com/images/2016/07df3N8m.jpg"/><description>&lt;p&gt;
&lt;img class="img-fluid" alt="Star Trek franchise promotional image celebrating fifty years of the series" src="https://blog-dev.funkysi1701.com/images/2016/07df3N8m.jpg" loading="lazy"
width="512" height="512"
/&gt;
&lt;/p&gt;
&lt;p&gt;In 1966 a TV show called &lt;a href="https://www.startrek.com/" target="_blank" rel="noopener noreferrer"&gt;Star Trek&lt;/a&gt;
first aired in the USA. Since then 726 episodes have been made and 12 films have been released. 2016 marks the 50th anniversary and Star Trek is as alive as ever with a new film due out this summer and a brand new TV series in the works for broadcast in 2017.&lt;/p&gt;
&lt;p&gt;But what can I do to celebrate? With that many episodes I don’t have enough time to re-watch every episode so how about a re-watch of the top 50 episodes.&lt;/p&gt;
&lt;p&gt;Star Trek has five live action TV series so all I need to do is pick my top 10 from each.&lt;/p&gt;
&lt;h2 id="star-trek"&gt;Star Trek&lt;a class="anchor ms-1" href="#star-trek" aria-label="Permalink: Star Trek"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Landing party beaming up from the Guardian planet in Star Trek TOS" src="https://blog-dev.funkysi1701.com/images/2016/Landing_party_beams_up_from_Guardian_planet.jpg" loading="lazy"
width="1440" height="1080"
/&gt;
&lt;/p&gt;
&lt;p&gt;The original Star Trek series first aired on September 8th 1966. It lasted only three years and 79 episodes. This series featured the iconic characters Kirk, Spock and Bones on a five-year mission to explore space.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The City on the Edge of Forever&lt;/li&gt;
&lt;li&gt;The Devil in the Dark&lt;/li&gt;
&lt;li&gt;Balance of Terror&lt;/li&gt;
&lt;li&gt;The Trouble with Tribbles&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.funkysi1701.com/posts/2016/star-trek-episode-review-arena/" target="_blank" rel="noopener noreferrer"&gt;Arena&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;This Side of Paradise&lt;/li&gt;
&lt;li&gt;Amok Time&lt;/li&gt;
&lt;li&gt;Space Seed&lt;/li&gt;
&lt;li&gt;Mirror Mirror&lt;/li&gt;
&lt;li&gt;The Deadly Years&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="star-trek-the-next-generation"&gt;Star Trek: The Next Generation&lt;a class="anchor ms-1" href="#star-trek-the-next-generation" aria-label="Permalink: Star Trek: The Next Generation"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Senior staff poker game aboard the Enterprise in Star Trek TNG" src="https://blog-dev.funkysi1701.com/images/2016/Senior_staff_poker_game.jpg" loading="lazy"
width="1436" height="1080"
/&gt;
&lt;/p&gt;
&lt;p&gt;The first spin-off series set 100 years after Kirk featured a new Enterprise continuing to explore space. This series aired between 1987 and 1994 for 178 episodes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.funkysi1701.com/posts/2016/star-trek-episode-review-the-best-of-both-worlds/" target="_blank" rel="noopener noreferrer"&gt;Best of Both Worlds&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Yesterdays Enterprise&lt;/li&gt;
&lt;li&gt;The Offspring&lt;/li&gt;
&lt;li&gt;The Measure of a Man&lt;/li&gt;
&lt;li&gt;Disaster&lt;/li&gt;
&lt;li&gt;All Good Things…&lt;/li&gt;
&lt;li&gt;Tapestry&lt;/li&gt;
&lt;li&gt;The Inner Light&lt;/li&gt;
&lt;li&gt;Cause and Effect&lt;/li&gt;
&lt;li&gt;Unification&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="star-trek-deep-space-nine"&gt;Star Trek: Deep Space Nine&lt;a class="anchor ms-1" href="#star-trek-deep-space-nine" aria-label="Permalink: Star Trek: Deep Space Nine"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Federation fleet preparing to engage the Dominion fleet in Deep Space Nine" src="https://blog-dev.funkysi1701.com/images/2016/Federation_fleet_prepares_to_engage_Dominion_fleet.jpg" loading="lazy"
width="694" height="530"
/&gt;
&lt;/p&gt;
&lt;p&gt;The second spin-off series which ran at the same time as TNG was set on a space station so instead of exploring adventures arrived via a stable wormhole. This series aired between 1993 and 1999 for 176 episodes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Emissary&lt;/li&gt;
&lt;li&gt;Duet&lt;/li&gt;
&lt;li&gt;The Way of the Warrior&lt;/li&gt;
&lt;li&gt;The Visitor&lt;/li&gt;
&lt;li&gt;Sacrifice of Angels&lt;/li&gt;
&lt;li&gt;Waltz&lt;/li&gt;
&lt;li&gt;Trials and Tribble-ations&lt;/li&gt;
&lt;li&gt;In the Pale Moonlight&lt;/li&gt;
&lt;li&gt;Far Beyond the Stars&lt;/li&gt;
&lt;li&gt;Siege of AR 558&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="star-trek-voyager"&gt;Star Trek: Voyager&lt;a class="anchor ms-1" href="#star-trek-voyager" aria-label="Permalink: Star Trek: Voyager"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Voyager away team on an alien planet in Star Trek Voyager" src="https://blog-dev.funkysi1701.com/images/2016/Voyager_away_team.jpg" loading="lazy"
width="609" height="499"
/&gt;
&lt;/p&gt;
&lt;p&gt;The third spin-off series ran after TNG and featured a female captain and a starship stranded in a remote part of the galaxy journeying home. This series aired between 1995 and 2001 for 172 episodes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scorpions&lt;/li&gt;
&lt;li&gt;Year of Hell&lt;/li&gt;
&lt;li&gt;Caretaker&lt;/li&gt;
&lt;li&gt;Message in a Bottle&lt;/li&gt;
&lt;li&gt;Eye of the Needle&lt;/li&gt;
&lt;li&gt;Heroes and Demons&lt;/li&gt;
&lt;li&gt;Jetrel&lt;/li&gt;
&lt;li&gt;Timeless&lt;/li&gt;
&lt;li&gt;Pathfinder&lt;/li&gt;
&lt;li&gt;Riddles&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="star-trek-enterprise"&gt;Star Trek: Enterprise&lt;a class="anchor ms-1" href="#star-trek-enterprise" aria-label="Permalink: Star Trek: Enterprise"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Andorians at the P&amp;rsquo;Jem monastery in Star Trek Enterprise" src="https://blog-dev.funkysi1701.com/images/2016/Andorians_pjem.jpg" loading="lazy"
width="669" height="461"
/&gt;
&lt;/p&gt;
&lt;p&gt;The most recent spin-off ran after Voyager and was set 100 years before Kirk. This series aired between 2001 and 2005 for 98 episodes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Broken Bow&lt;/li&gt;
&lt;li&gt;The Andorian Incident&lt;/li&gt;
&lt;li&gt;Shuttlepod One&lt;/li&gt;
&lt;li&gt;In a Mirror Darkly&lt;/li&gt;
&lt;li&gt;Twilight&lt;/li&gt;
&lt;li&gt;Damage&lt;/li&gt;
&lt;li&gt;Azati Prime&lt;/li&gt;
&lt;li&gt;Regeneration&lt;/li&gt;
&lt;li&gt;Impulse&lt;/li&gt;
&lt;li&gt;Zero Hour&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I am not going to review each episode here, I will save that for future blogs. With 50 episodes that is one a week to get them all reviewed during Star Trek’s birthday year. We will see if I manage to keep to that schedule.&lt;/p&gt;
&lt;p&gt;Track all these episodes and more in &lt;a href="https://www.episodeatlas.com/" target="_blank" rel="noopener noreferrer"&gt;Episode Atlas&lt;/a&gt;
.&lt;/p&gt;</description></item></channel></rss>