Sunday, 28 December 2014

Not a computing book this week

This week I have read the Roadcraft the police drivers handbook, I had read the previous edition and the update has a few good common sense approaches. I did like the idea of constant improvement through reflection and asking questions about performance to gain insight. 

book cover, road with police car, green background and bold white text

A couple of the take aways apart from reminding me of bad habits I need to correct. 

  • It is pull push, I always push pulled. It is smoother to steer their way.
  • Do not wrap your thumbs around the steering wheel, due to possibility of hitting potholes high kerbs and breaking a thumb. I did this as I was always told if you wrapped your thumbs around the steering wheel you could lose them if the airbag deployed.
I liked Knuth's presentation,2014 Kailath Lecture: Stanford Professor Donald Knuth

Old half broken blog from hacker news, found the article interesting. The Bipolar Lisp Programmer.

Visual studio short cut, you can repeatedly press ctrl +  v and cycle through visual studio clipboard. Handy working on other machines where a clipboard manager such as ditto is not installed.

Saturday, 20 December 2014

Design of everyday things and challenges

Keeping up with reading, this time I read The Design of Everyday Things. There are a lot products in the book that I have encountered, a sink I couldn't empty or a tap that looked weird and took a few seconds to work out rather than just being obvious. Apparently it is all poor design, most I agree with especially hob control layout. 

A5 sized book with green cover, yellow title, with image of teapot having handle and spout on same side

Take aways for me are,
  • Affordances, a chair affords sitting.
  • Anti-affordances, put a slope on a control panel so people don't put coffee on it.
  • Signifiers, a clue of what should happen or what to do.
  • The 5 whys.
  • Poke yoke, idiot proofing.
People make errors, slips and mistakes, in fact this is not always our fault, humans can live with the situation being a bit fuzzy, machines often need precision. Asking humans to be very precise is not a good idea. 

For all of this I bought some new shoe polish, cherry blossom, it is actually made in England and cheap. The point is the tin, instead of the wedge which has to be twisted all you do on these is press and the tin pops open. Simple effective design. 

Small tin of shoe polish with press here to open displayed at the bottom

Still been going at the coding challenges, the grey-scale image one, simple yet nice to see something other than console output for a challenge 

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

namespace Challenge179
{
    class Program
    {
        static void Main(string[] args)
        {
            var path = @"C:\Users\R\Desktop\bikers.bmp";
            var pictureStream = new FileStream(path, FileMode.Open);
            var rawImage = new Bitmap(pictureStream);
           
            for (int i = 0; i < rawImage.Width /2; i++)
            {
                for (int j = 0; j < rawImage.Height; j++)
                {
                    Color pixelColor = rawImage.GetPixel(i, j);
                    var newColor = (int)Math.Round((pixelColor.R * 0.21) + (pixelColor.G * 0.72) + (pixelColor.B * 0.07));
                    rawImage.SetPixel(i, j, Color.FromArgb(newColor, newColor, newColor));
                }
            }
            rawImage.Save(pictureStream, ImageFormat.Bmp);
            pictureStream.Close();
        }
    }
}




Also properly tackling an intermediate challenge without asking for help or browsing the already prepared solutions, I am pleased. Challenge 181. 181 iterates over speed average speed camera logs to check for the limit and car registrations. 

Little bits, blog has now been up for six months, behind with my own website and should get on with the MVC book. Looked at a lot of algorithm and Maths books, how much this will help I don't know. Going to re-read the pragmatic programmer. Hopefully this will give some insight into how far or how little I have come. 

Sunday, 14 December 2014

Challenges, car stuff and found podcast

This week, I have managed a couple of challenges, Re-formatting dates from one file into another was a fun challenge, at least I learnt a bit about the DateTime library, even though I did this one manually. Challenge 188.

Second challenge, of words within words, it seems there are a couple of ways of doing this, by building a binary tree apparently this works very quickly for very large sets with the penalty of building the tree. For the ~179,000 words, iterating over each string would take a long time, using hash set time went from 10 minutes to finish the first half of words beginning with 'ato completion in under one second. Challenge 190. My solution after refactoring came out very close to the reddit C# solution.

Noticing some of the guys at work using the dark colour scheme for visual studio, I tried it and you get used to the darker colours with a little less eye strain. 

vs ide with black background and text highlighted in orange for strings, blue for types and keywords, otherwise white

Sadly someone ( I think ) stole the roof rail plugs from my car as they have to be levered out and one was on the ground next to the car. Ordering plugs for a MG-ZT the part number is DYB100121, nearly £4 from Rimmer bros they are not good value. They did come with a website printed on the new part, skiffy. This way it would have cost me £40 for a 1000 of the plugs, at least it is good value for money and ebay'd the surplus. 

black plastic disc with built in clips in plastic bag on wood desk


I found this competency matrix ages ago but couldn't find it again until now, matrix. Which was an eye opener looking at how far I have come but so little I actually know. There are a couple of books to add to the reading list, thinking forth is even free.

Podcasts, a new one for the me, hello world by Shawn Wildermuth, the podcast is about how many got started in their industry.

Sunday, 7 December 2014

Keeping up

Learnt quite a bit this week, ab / abn testing and that keeping testing well defined can be challenging.

For testing qualifications it seems ISTQB are the standard, exams are not too bad at ~£200, courses vary for a few days at ~£1000 does not seem good value. Syllabus and glossary are free to download from their site.

Coding, I have one solution for counting the amount of distinct words in a book, linq and regex just simplify the problem down so much. Words in book sln.

Sunday, 30 November 2014

New job so busy

I have started work at a corporate, everything seems quite slow in comparison, which is both good and bad, the pay though was a significant improvement. I think it is what you make of it, having time to test thoroughly and use some different tooling. 

In the making the most of an opportunity, I am making tools so that the test team (which I am in) no longer have to fire up database software and check the databases are up to date, quick winforms app just does it. I hope to build on the automation with selenium just to check sites exist as just a quick test after deploys. 

As a way to get my professional development up, I listen to podcasts on the commute which at the moment is over ten hours per week. The podcasts working for me at the moment are:
  • .Net rocks
  • Hanselminutes
  • Software Engineering radio
  • This agile life
New podcasts I am trying out
  • {coding blocks}
  • Jessie Liberty - Yet another podcast.
Ignored my programming challenges and a couple of weeks away from it simple things take a little getting used to again. Anyway an implementation of the hang man challenge from reddit daily programmer. Hangman sln.

Getting back to reading, way of the peaceful warrior by Dan Millman was quite an eye opener.

Came across a new word percussive maintenance, when you tap a device to make it work

Sunday, 16 November 2014

Heatings broken

So the heating has broken and oil filled radiator on, got me thinking, I used to fold at home a lot, after two years of inactivity I am still in the top 100k. Anyway it makes a good job of heating up the study without the radiator. 


Running in firefox browser showing percentage done and timers for cpu and gpu folds


Install is so easy, no messing about for the GPU to fold, the GPU work units are not significantly larger than before.


Found another good place for coding practice, new challenges quite often with differing levels of difficulty and a community to discuss them with! Reddit daily programmer.

Monday, 10 November 2014

Been a funny couple of weeks

Had a few interviews and learnt a few things,
  • Saying I don't know is better than trying to BS your way through things it still means you will not get the job so I understand now why many do.
  • Most seem more concerned about specific skills than general knowledge, problem solving, and clean code, which seems at odds to what I am told elsewhere that specific skills can be taught.
  • To me ASP.Net does not just mean MVC, only a few places have done this, where I have applied got there and then oops most of your experience is with webforms so are not interested. 
  • The blog genuinely seems to help with getting an interview. 
  • FizzBuzz did come up.
  • Junior to me meant someone who doesn't know everything, knows the basics and willing to learn which is why they are applying. I think to employers this means someone who can do almost everything and can be left to sort themselves out.
One interview was quite good, "we need a junior who can hit the ground running" and paraphrasing here with no training and no supervision. Why are they advertising for a junior, in my humble opinion they wanted a lower paid middle weight developer.

Making it sound worse than it is, I met some interesting and very smart people so rant over.
 
To do list which I think would help
  • Build own website to show off skills and store examples
  • Build an application that installs
  • Learn more about MVC
  • Entity framework
  • Linq to SQL 
  • Timed code tests to get used to coding under pressure, perhaps with some default system with a tiny screen. A lot of the tests were on laptops.
  • Keep up with problem solving on the blog I was ready to give up last week.
I got a job testing! Which I think could be fun, get to learn about Clojure, functional programming has been on my to do for a while.

Good article from information weekly about the IT talent shortage.

Interview prep for ASP.Net 300 interview questions.

Sunday, 26 October 2014

Don't make me think

A shorter a book I think a lot of clients would find worth reading regarding their own websites, a lot of common sense in this book to the oh yeah that makes a lot of sense.

Red matt finish book with book title in bold white text with cartoon picture of a mans head

Had this book on my reading list of a while, but since it is required reading for OU, I thought I would give it a go. 

The take aways from don't make me think for me are
  • Convention is not all bad
  • Accessibility is really a lot of common sense and fringe benefits including potential for increased traffic
  • We tend to scan websites for information and do not read it all
  • Usability testing is worth while doing and does not have to cost much at all.
  • Goodwill can be bought and lost at a rapid rate.
Browsing more interview questions, can I sort a dictionary by value and by key which didn't come out too badly, however I have installed resharper ( yay student discount ), resharper does heavily push linq. 

The linq solutions are terse relative to my own explicit solutions.

namespace boredbasics
{
    class Program
    {
        static void Main(string[] args)
        {
            var aDictionary = new Dictionary<string, string>
            {
                {"d", "a first value"},
                {"z", "a Second value"},
                {"a", "a ThirdValue"},
                {"n", "a forthValue"}
            };

            DictionarySorter.PrintDictionary(aDictionary);
            Console.WriteLine();

            //sorted by key
            DictionarySorter.PrintDictionary(DictionarySorter.SortByKey(aDictionary));
            Console.WriteLine();

            //sorted by value
            DictionarySorter.PrintDictionary( DictionarySorter.SortByKey(DictionarySorter.KeyValueSwap(aDictionary)));
            Console.WriteLine();


            Console.ReadLine();
        }
    }
}


namespace boredbasics
{
    public class DictionarySorter
    {
        public static Dictionary<string, string> 

            SortByKey(Dictionary<string, string> aDictionary)
        {
            return aDictionary.Keys.OrderBy(k => k.ToString()).ToDictionary(key => key, key => aDictionary[key]);
        }

        public static Dictionary<string, string> KeyValueSwap(Dictionary<string, string> aDictionary)
        {
            return 

            aDictionary.Keys.ToDictionary(key => aDictionary[key]);
        }

        public static void PrintDictionary(Dictionary<string, 

                                        string> aDictionary )
        {
            foreach (var key in aDictionary.Keys)
            {
                Console.WriteLine("key: {0}, value: {1}", key,  

                aDictionary[key]);
            }
        }
    }


Apart from all of that found a good link on Hanselman's blog for good applications

GitHub for windows and Windows memory tester being news to me, so I will give those an install and see how they go. As using github via the command line does make it a pain to use. Must give linqpad a go.

Wednesday, 22 October 2014

Interview cake fibs question

Had a browse around interview cake I like the site, anyway I got this weeks free practice problem. I did a recursive and iterative solution. I would change a few bits looking back at it now, as it is lacking any guard conditions for inappropriate input.

fib program below running through the console using visual studio ide


namespace boredbasics
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i <= 10; i++)
            {
                Console.WriteLine(fib(i));
            }

            for (int i = 0; i <= 10; i++)
            {
                Console.WriteLine(fibRecursive(i));
            }

            Console.ReadLine();
        }

        public static int fibRecursive(int nthFib)
        {
            if ( nthFib == 0)
            {
                return 0;
            }
            else if ( nthFib == 1)
            {
                return 1;
            }
            else
            {
                return fibRecursive(nthFib - 1) + fibRecursive(nthFib - 2);
            }
        }

        public static int fib(int nthFib)
        {
            if (nthFib == 0)
            {
                return 0;
            }
            else if (nthFib == 1 || nthFib == 2)
            {
                return 1;
            }
            else
            {
                int first = 1, second = 1, temp = 0;
                for (int i = 2; i < nthFib; i++)
                {
                    temp = first + second;
                    first = second;
                    second = temp;
                }

                return temp;
            }
        }
    }
}

Sunday, 19 October 2014

First go at async

Playing about with async so a really simple example partly ripped from illustrated C#.

picture of visual studio 2013 pro with console window open running async console app

namespace boredbasics
{
    class Program
    {
        static void Main(string[] args)
        {
            Task<int> t1 = 

            countCharsAsync(1, "http://stackoverflow.com/");
            Task<int> t2 = 

            countCharsAsync(2, "https://news.ycombinator.com/news");
            Task<int> t3 = 

            countCharsAsync(3, "http://www.bbc.co.uk/");

            Console.WriteLine("call one:\t{0: 20}", t1.Result);
            Console.WriteLine("call two:\t{0: 20}", t2.Result);
            Console.WriteLine("call three:\t{0: 20}", t3.Result);
            Console.Read();
        }

        public static async Task<int> countCharsAsync(int id, string uri)
        {
            Console.WriteLine("Starting count chars {0}", id);
            var wc = new WebClient();
            string result = await wc.DownloadStringTaskAsync(new Uri(uri));

            Console.WriteLine("char count complete {0}", id);
            return result.Length;
        }
    }
}


A few things to add to my list, don't make me think has been ordered for uni reading, ASP.Net MVC book arrived yay!

If any other job seekers are reading, I was hanging around imgur lots are seeing the same things with junior tech jobs.

commant stating Must have 5 years experience milking purple Himalayan goats...and know html




Reading about the gingery furnace and found a few places to order a good metal bucket for the furnace and a smaller bucket to create the void.

http://www.oipps.co.uk/
http://artisanfoundry.co.uk/

Can't wait to get setup and build a lathe.

Sunday, 12 October 2014

Uni ebooks

OU courses are finally starting, a lot of the reading material no longer comes on paper, which is not great for me as I like a break from the screen and humming machines. There is a good tool to convert into kindle compatible format which is currently free, http://calibre-ebook.com/ .

Part of the units being studied cover web development, I am usually pretty keen on firebug and the in built chrome tools, for quick validation and good features the plugin for firefox https://addons.mozilla.org/en-US/firefox/addon/web-developer/ works well.

Car and 3d printer video of interest, a model transmission, when I first looked at it I thought it would be quite basic however it supports six forward speeds and reverse, youtube.

Sunday, 5 October 2014

Interviews

Interviews are tough going, I think it is worth being aware that the developers doing the hiring may not have all the input into job specification.

Practical tests, I did mess up more than once, keeping things simple and being able to justify what is written is more important than a poorly implemented feature.

Being asked to do a black jack implementation, although not perfect, left as is because I know it gets used for homework, link to sln.

Still reading Agile principles, patterns, and design practices in c#. The explanation of design patterns although not going over all the gof, being able to understand template and command in a practical sense is useful. In the other pattern books at the end being left with so what, how does this help me.

Book, Agile priciples, patterns, and practices in c#, blue black cover with white and blue text with an image of a nebula

Saturday, 27 September 2014

Euler 3

Quite challenging as you cannot brute force a solution, I tried, the solution takes a long time to run. Had a go with TDD for a change, actually made it easy to think the problem through, even though I came up with the wrong answer. My solution would only work when the largest prime is less than the square root of the argument value. Solution

Easiest solution to implement for me was trial division algorithm is implemented on the page in python this is easy to convert to C#. Implemented in the tests this took 1-11ms to run which isn't bad considering the numbers magnitude, 600851475143.

Lists and enumerable range types do have a limit in their sizes which isn't too bad, I was playing around the idea of a linq solution which I think would work for smaller numbers.

Trying to keep a clear head and getting out I went to the zoo.

red panda in enclosure with trees, panda is sat on wooden box

Sunday, 21 September 2014

Interviews are hard

The topic of software development is vast, trying to get everything together to at least make sure I know what I know. 

I did get asked about SOLID, annoying as I should have known all this and been able to rattle it out even though the understanding was there, full on mind blank. A refresher from Agile principles, patterns, and practices in c# ( working through at the moment ). Wiki SOLID.

Also asked about, database service providers and Entity framework.

A good site for practice is project Euler, lots of small puzzles some are quite complicated and require a bit of maths to get going.

Solutions to the first two

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace basics
{
    class Program
    {
        static void Main(string[] args)
        {       
            //If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
            //Find the sum of all the multiples of 3 or 5 below 1000.

            var aList = new List<int>();
            for (int i = 1; i < 1000; i++)
            {
                if (i % 3 == 0 || i % 5 == 0)
                {
                    aList.Add(i);
                }
            }
            Console.WriteLine(aList.Sum());
            Console.Read();
        }
    }
}

---------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace basics
{
    class Program
    {
        static void Main(string[] args)
        {
            //Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

            //1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

            //By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
            int first = 1, second = 1, third = 0;
            int sum = 0;

            while (third < 4000000)
            {
                // gen fibs
                third = first + second;
                first = second;
                second = third;

                // less than 4 mill and even add to sum
                if (third < 4000000 && third % 2 == 0)
                {
                    sum += third;
                }
            }

            Console.WriteLine(sum);
            Console.Read();
        }
    }
}
--------------------------------------------------------------- 


Good articles read this week

Monday, 15 September 2014

Solving and sorting

Been back to reading a lot again, How to solve it. The maths part of this book wasn't great as well the writing style being old text book. Colours, chapters and descriptions would have been nice rather than the maths equivalent of the old Haynes proverb, fitting is reverse of removal.

Book cover with white back ground and thinking man made of numbers

One of the things I did like was the idea that with all problems you need to get purchase on the problem at hand. This maybe by digging a screw driver into the problem, waggle it and look for signs, which seems quite foreign to me as a way of solving a maths problem.

There is also a lot of good common sense items,
  • Start at the end and work backwords
  • Did you use all the data.
  • What are the data (written that way all through the text)? Unknowns etc.
  • What is the condition?
  • Use auxiliary elements.
  • Use auxiliary problems to simplify until the ridiculous.
  • Have you solved something like the problem before?
After reading clean code, I should know quick sort, I did take a quick youtube refresher. I think I am making it harder than it should be.

Sunday, 7 September 2014

Cows are bigger in person

After being a bit down I read The clean coder and I am rejuvenated. Very handy tips on dealing with pressure and saying no. 

The interesting item recommended in work ethic is time outside of work dedicated to learning, the recommendation being 20 hours. The thing is this really isn't that much when pod casts are taken into account. I easily get through 3 hours a week with .net rocks and Hansel minutes, what does help is having a tech book and when not in the mood a not so tech book like clean coder.

Black book with white title and picture of purple nebula

Liked the parts about not rushing, as I have seen this a number of times and refactoring out crazy variable names.

I read about the woods being good all round for health and creativity so found Haldon forest park, early morning it is quite empty. Note the speed hump on the way out that has the claws to stop cars driving in the exit are brutal going the correct way over it.

trail spliting woods with mist

Cows are about and they would only move for excuse me, cows, manners matter.

two black cows on the trail




Other bits from this week, lots of the visual studio shortcuts work in SQL server management studio.

Words of the week

Niladac
Function with no arguments

Connascence

Change in part means a change in another part of the program, I think is the side effect of units which are tightly coupled. 

Saturday, 23 August 2014

Git

Signed up for github and started using git bash, the commands are a little clunky but then I am used to svn with tortoise as a front end which makes it so easy.

Couple of things that help with setup, paste is insert, change directory cd and ls to list all files within the working directory.

Talking of commands, I have been harassed about not resetting IIS properly, proper way apparently is using an admin prompt and issreset /start /stop as needed, without the args iisreset will reset IIS.

Had a minor issue with go daddy DNS this week, meaning some of the dev team could not access any of usual servers for staging, demo or production. To work around this just add the IP address to your machines host file.

To get the server address for those with access you can use prompt and ping which will show you the address in the first line.

shows a commend prompt window of ping command to bbc

If the rest of the team are not awake yet, getip worked for me.

A short cut I always forget, alt + printScreen to take a screenshot of the current window.

Sunday, 17 August 2014

Monitors

After reading the pragmatic health book I looked at a number of monitors, only one I could find that is light sensitive and low blue, the BenQ BL2410PT. Lots of good points and a few not so great.

Monitor with black surround showing autotrader and luminous worm to one side

 Note: The worm is for rubber duck development also makes the place look a bit cooler.

The good over my old 24" monitor, no eye pain and headaches. I do not know if this is the low blue, height adjustment, flicker free or reminder to look away however it just works. The only bad point is that it cannot be set to low blue and auto brightness however the auto brightness works well in standard mode for gaming.

I got talking to the guys at work about second monitors and context switching, I am limited by desk space at the moment. They are very much fans of multi-monitor setups. Behold the bosses beast setup.

monitor tree holding 4 monitors and a laptop running on the left


Been reading quite a bit, handy to have tech book and book about tech which doesn't require a lot of learning. This book is packed with tips and some I am trying out already. 

white book with black text refactor your wetware with what looks like grey brain cells with colours between them


The whole use your right brain thing to complete tasks is useful. As someone who can't draw and getting the right brain to draw was amazing for me to actually do it (close enough).



I am yet to try the personal wiki, as I take a lot of notes and they are disorganised so this could be the thing I need.

Using the SQ3R method of reading text books, I am going to give this a go with T-SQL fundamentals although not a massive book will take time.

I am also planning for unemployment, this sucks as I like to work and slows down my own development as I cannot buy books and other fun things like pluralsite. Do I go mad with OU and do as much as I can or code like mad have a look at open source projects and see what I can do. Lots to think about. Sad really as I have seen the project become so much better over the last two years.



Sunday, 10 August 2014

Clean Code

One of the few books that has truly changed the way I code for the better. The other book being pragmatic programmer. 

Some sections were tough, especially chapters 14-16

Most books will get a positive review as I put a lot of research in to what I will read next.


Some things found, 

UVA online judge , good site for code challenges, they can be quite time consuming, my solution 3n+1 undecided how to leave code examples as some are large. Quick examples can be left as simple text documents so anyone can view easily.

Talking to the boss about Kata's and he found what looks to be good a collection of them code challenges to help train your brain.

Some bits learnt this week, 

Win + x, power user short cut, device manager, admin prompt etc.

When using collapsible panel extender, if the default expanded view crushes the content, then works when you collapse expand the panel. Easy solution is to set the target panel style and it will just work.

#targetPanel {
  height: 0;
  overflow: hidden;
}

 
 

Sunday, 3 August 2014

Improving my home network

I have been trying to improve my home network, first of all I thought I would get rid of the massive amount of cat5e and coax from behind the desk. 10m of decade old cat5e has been replaced with new 1.5m of cat6, 15m of coax has been replaced with 5m of low oxygen copper coax cable. Hoping this would reduce my ping by a small amount and tidy up behind the desk, doing this has seen no difference to pings. Researching, each meter of copper cabling adds ~5.48ns, meaning I have saved 0.000129ms.

Results have been much better with power line adaptors over wireless for watching netflix and general browsing.

two white UK plug boxes in white box with three lamps power, connection speed and network activtiy

Less stutter and much quicker response, the adaptors have a network health lamp, which when green has a connection of at least 100mbpsFitment can be a bit of pain as the plugs extend downwards and the network socket plugs into the bottom of the adaptor. Only one network connection per adaptor which was easily fixed with a gigabit router. I was going to write up a setup guide however it was all just plug in, worked first time. 

left a4 sized box with a image of black box the router on it, right smaller box with image of two white powerline adapters on the front


pile of cabling and other computer peripherals in a pile


Things learned this week, 

Be careful copying mark up and macros' from notepad into Kentico editable text regions as this has created some strange errors, save publish then a small edit via the in page editor left this working fine. 

Kentico 6 does not support embedded code blocks which contain markup, two ways of doing this. Split up page content into regions, content that has to be hidden having its own region set by the visibility property. Advantage that the content editors can still manipulate the content, I went with an in line control so the content can be reused elsewhere without editing the template. 

Kentico 7+ does support embedded code blocks which contain HTML using k#. 

Alt+F12 in visual studio 2013 for peak definition is so handy, as you can type whilst looking at the definition of what is being used, this also has a bread crumb feature to go back and forwards through definitions.

Always check IE for minor layout changes even if it works in chrome, firefox, and opera.

Lots more to come but I will save it for when I have finished reading clean code.

Sunday, 27 July 2014

Patterns

Finally bought myself a patterns book, lots of wow and that is very clever moments and to get the best out of it a number of re-reads is a must. 

Factory, prototype, adapter, chain of responsibility and singleton I can see how they can be useful, they make a lot of sense. Some others will have to be left until I can go through them again




Little bits, looking through pluralsite agile courses the agile manifesto was mentioned which I have signed. 

Doing other reading about collection types, just how easy it is to implement a list, stack, queue, once the concept of a node is understood, I made my own list!

Hopefully this then makes it easy to see that you can add lots of different methods for push, pop, enqueue, dequeue, contains etc.

namespace basicsTests
{
    class Program
    {  
        static void Main(string[] args)
        {
            var firstNode = new aNode<string>("first string");
            var secondNode = new aNode<string>("second string");
            var thirdNode = new aNode<string>("third string");

            var someList = new aList();
            someList.add(firstNode);
            someList.add(secondNode);
            someList.add(thirdNode);

            someList.displayList();
            Console.Read();
        }
    }

    class aNode<T>
    {
        public object stored;
        public aNode<T> nextNode { get; set; }

        public aNode(T objectToHold)
        {
            stored = objectToHold;
        }
    }

    class aList
    {
        aNode<string> headNode = null;
        aNode<string> tail = null;

        public void add( aNode<string> node)
        {
            if (headNode == null)
            {
                headNode = node;
                tail = node;
            }
            else
            {
                tail.nextNode = node;
                tail = node;
            }
        }

        public void displayList()
        {
            var displayNode = headNode;
            while ( displayNode.nextNode != null)
            {
                Console.WriteLine( displayNode.stored);
                displayNode = displayNode.nextNode;
            }
            Console.WriteLine(tail.stored);
        }
    }
}






And apart from that a dragon fly flew into me, they make a decent noise when they take off.



 

Sunday, 20 July 2014

Getting healthy

The healthy programmer

Book with laptop and colourful coder walking away from it

At the moment I have not been able to implement all of the suggestions, new desk and monitor are needed. The only monitor about that meets the auto light adjustment and low blue is the BenQ BL2410PT.

Books website http://healthyprog.com/ 

A few of the main take aways from this book are to not sit for longer than an hour. Get walking, I bought a pedometer I am quite far short of the 10,000 steps per day so walking after lunch this week to see how the stats change.

Don't buy a cheap pedometer, there are lots about for less than £3, they don't count properly in my experience. Tanita 3 axes is working well.

Silver black pedometer with 3 buttons and counter display


Signing up for the yoga class sounds a pain, there are a few classes about, not just fitness centres the local college here offers different courses.  

Little useful things

OnClientClick can be added from the code behind just as an attribute
someButton.Attributes.Add("OnClientClick", "someJS();");

Off by one errors even happen to experienced devs and can produce strange results. 

Browsing stack exchange, there is a good thread on books to read, I have added a lot to the reading list
http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read 

Things for me to think about, I need to address the lack of knowledge with Regx, SQL and XML. When should I start looking at another language to dive into, apparently since I have done more in object orientated languages I should look at functional. Which functional language, f# and erlang look good, then looking at the job boards opportunities are limited. So much to learn!




Sunday, 13 July 2014

New Server!

Purchased a new server to manage back ups and a few bits, and this was on sale, the HP MicroServer N54L, they are the older model but for £130 not bad.

Decided on Linux to run it, ubuntu seeming the the in fashion flavor I went with that, a few hiccups with the install via USB which worked in the end using LinuxLive.

The only problem with ubuntu being graphics drivers, apparently this server has a built in mobility radeon 4500, which caused a black screen of death. 

To actually get into ubuntu was a bit of a faff, mash the shift key while it boots, this gets you into grub, hit e to edit, then after the kernel command add nomodeset. This allows ubuntu to boot properly.

When I get the basics set up, crash plan can go on and will sort it self out with backing up a remote copy of all the files I have.

More about the hardware, I like lots of little touches, the HP logo being red if you do something bad, easy HDD removal, internal USB port, and all the screws you need with their own torx key mounted inside the door. 

computer screen with purple background and dialogue box with scrolling text
black cube server box with white hp logo


server cube black with front door open showing quick release hard drives

server cube with door open and top off for optical drive

black server cube open with top off and quick release drives out


Little things learnt this week, asp button onclientclick will allow the onclick to run if onclientclick returns true.

Paint.net is not really that bad if you take the time, lot of short cuts for cropping images which I have done a bit of this week. 

Just dump zombie code and let svn handle it, so much effort to work around.