Posts

  • » How much more productive is pair programming compared to solo programming?

    Priya and I began working the Path to Mastery app a few weeks ago. We have spent the majority of the time pair programming. It has been technically challenging pairing continuously for 2 weeks with a single person. We have learned a lot from each other. From our different styles...

  • » Does modern software development practices prefer unit tests over UML diagrams? (part 2)

    Agile methodologies The Agile manifesto was created by a group of prominent individuals in the software industry, individuals such as Kent Beck, Martin Fowler and Bob Martin. One of the core principles of the manifesto is, “Working software over Comprehensive documentation”. Unlike other methodologies that have an over reliance on...

  • » Does modern software development practices prefer unit tests over UML diagrams? (part 1)

    Introduction A question that’s been brewing in my mind for some time now has been. Are UML still being used the industry and if so are they prefered over Unit tests? I wanted to look at the different software development methodologies, this would be a good starting point in answering...

  • » Thoughts on Agile Software Development book part 1

    Agile Practices I’ve been reading Agile Software Development, Principles, Patterns, and Practices by Bob Martin. I’ve found the book to be interesting so I thought I would take the opportunity to write an overview of certain parts of the book. The book is all about Agile(in the title) and all...

  • » Thoughts on first full code retreat

    Wednesday this week we had an all day code retreat with Eric Meyer in the office. A code retreat is usually an all day event whereby a group of developers pair program on Conway’s game of life. The day is split up in intervals. At the end of each interval,...

  • » Normal Forms in Normalisation part 2 of 2

    1NF table from previous post. Table1 (projectCode(Primary Key), projectDesc, clientNo, clientName) Table2 (projectCode(Foreign Key), crafterNo(Primary Key), crafterName, experienceLevel, noOfDays) The last post we had converted our un-normalised table to 1st Normal form. We will now continue by converting the 1NF table to Second Normal Form(2NF). 2NF Definition: A table is...

  • » Normal Forms in Normalisation part 1 of 2

    Functional Dependencies In order to normalise data, it’s important to first understand functional dependencies. Functional dependency is the relationship between two attributes in a relation. If two tuples in a relation have the same values for attributes A1 & A2 etc, then two tuples must also have values for attributes...

  • » Starting Behaviour Driven Development with Javascript & Jasmine

    In this style of test driven development, we describe what the code should be doing, then our expectation on the code. This is important of BDD. Test behaviour, not implementation. We first describe the group of specs that we are going to define. I like using a kata for my...

  • » Thoughts on Normalisation

    Introduction Priya and Danny have recently done Zagakus on Normalisation which I found particularly interesting. I find the topic interesting because a lot of research has been done on it. When I started learning normalisation, I mistakenly believed that it was a case of changing tables based on what I...

  • » Starting with Ajax

    Ajax… it took a while for me to pronounce it A-Jax and not I-YAX( like the football team). :) AJAX the way to do some asynchronous javascripting. Although it stands for asynchronous JavaScript and XML, I get the sense that less and less XML is actually used. AJax makes it...

  • » First days of Javascript

    I’ve recently started delving into the world of Javascript. I’ve developed in Javascript briefly in various Rails project and other front end project but I never really got too deep into it. I’m required to add some Ajax functionality to my Tic tac toe so this is a great opportunity...

  • » User testing with Capybara

    Cucumber Writing unit test is important for less stress and more productivity in the long run, why shouldn’t we have the same love for UI testing? That’s where Cucumber comes in. Cucumber is a BDD, acceptance testing tool written in Ruby. It makes it easier to run business style rules...

  • » Programming in a functional way

    Intro It’s been a great experience learning Clojure, lisp and functional style programming. This is just a short list of some principles I’ve learned about Functional Programming (FP) design. Learning from my previous paradigm It’s only natural to bring your previous experiences along with you when learning something new. Usually...

  • » Presenter Pattern

    The Problem Spending time in the Ruby on Rails world, I find that controller objects have a habit of doing too much and violating the Single Responsibility Principle. Another issue I often see is that logic creeps into view templates. Here is a snippet of from a view that displays...

  • » Ruby in a more functional way : Freezing

    One of the tenets of functional programming is immutability. Freezing variables Immutable values means that once a variable has been set, it can never change. It's forever the same, immutable. But wait a second, if a variable is frozen....doesn't it mean that it no longer varies? which means it's not...

  • » Rack in 5 minutes

    What is Rack uses Ruby's built-in WEBrick web server provides a web server interface a protocol for building composing web apps collection of middleware utilities Web server interface Rack provides an interface so that you don't have to deal with some elements of the server. Such as listening on a...

  • » The fears of a consultant

    We had the first of a multi-part Consulting Series. Enrique stated that there are 3 main fears of a consultant. I. Fear of losing the business A client ultimately hire consultant to solve a problem, add value and ultimately provide a service. If a consultant is not solving, adding value...

  • » Clojure.. thanks for the many lessons

    I learnt a lot today as I paired with Chris on the minimax problem in Clojure. The biggest hurdle so far in my Clojure journey, this language has made me feel uncomfortable. Inferior, embarrassed, question my ability to develop software. Because of this learning Clojure during my apprentice has been...

  • » Higher order funcitons

    We are used to in object oriented programming to pass variables into parameter arguments, return values from methods. What higher order functions allow us to do is pass in functions themselves into other functions as parameter arguments A popular example of a higher order function is the 'map' function found...

  • » Attempting to test drive minimax

    One of the reason I struggle with minimax is that it's a difficult to test drive. I like to first do the smallest thing possible that would get me started and make me feel like I'm doing something of value. I outlined a rough idea of what I want from...

  • » It's okay....sometimes you just need to take enough breaks

    I learned so much today and what's more importantly I applied some non code skills I have learned through my apprenticeship. When things are going well, tests are passing, loose coupled code, straightforward refactoring, adding value. Life is easy. What I have been trying to improve on since the end...

  • » Polymorphism in Clojure

    First lets define what is Polymorphism. Simply put, polymorphism is about having a single interface for different data types. Different types of polymorthism There are different types, some with different names. Static binding Time This is related to method overloading Dynamic binding Related to method overriding [code lang="java"] interface Animal...

  • » Functions, Lists, Input, Output.

    I paired with Daisy on the roman numerals Kata in Clojure. Daisy doesn't have much experience with Lisp or Clojure, so this was a great opportunity for me to teach someone a language that I had recently been learning. The first thing that I felt was important to cover is...

  • » Diary: Data should flow through your system.

    Worked on my game loop today which I find challenging but incredibly rewarding once I had completed it. I wanted to have an idea of where I wanted to get to, so I decided to spike my solution, which raised a couple of questions. How do I effectiely recursed so...

  • » Clojure - Iterating through a collection problem

    I've been working on my Tic tac toe's board. Starting from the test that I believe will give my the most value, the game-over. As this is the behaviour that will then require testing the win, draw and loss behaviour. After implementing each row winning combination, I noticed a pattern...

  • » Lets Talk more Clojure

    Sets Sets are simply a mathematical set, which means it retuns the no duplicates from a collection. A collection such as the one below only returns the unique elements. [code lang=clojure] <br />(set '(1 1 1 2 2 2 3 3 3)) #{1 2 3} [/code] To retrieve the union...

  • » Package Principles with *CedConMan™*

    Imagine you've created a wonderful contact management system that has all the bells and whistles, meets the clients needs. It creates, edit, deletes and read contacts. This system has various different classes that don't strictly relate to one and another but are all required to make the system operate. In...

  • » ListView or DataGrid in C-sharp

    In my contact management app I was looking for a way to list contacts in a table. The simplest UIElement object that would allow me to do this. The ListView UIElement seemed the most appropriate, it list a data items, pretty much does what you want. With a listView one...

  • » Once you eliminate the simplest solution, whatever remains, no matter how improbable, might still be the simplest

    I was pairing with Mollie today trying to help her with some test she had written that was giving a NullPointerException. It was one of those peculiar problem that looked straightforward to fix at first glance. However the more we looked at it together, the more our perspective changed. At...

  • » Diary: Testing, C# WPF and Separation.

      I've spent the recent iteration adding a GUI to my Contact management(ConMan) app. When I originally made the estimation there was a lot of doubt as I had never used WinForms or WPF, in fact I wasn't even aware of them as I had not done any development in...

  • » My early thoughts on XP

    I remember years ago when I first heard about eXtreme programming and my only thought was that I preferred it's branding than Waterfall's. I started to hear work collegues around me wanting to adopt some of the principles. Such as code reviews, increasing communication with stakeholders and the introduction of...

  • » Simplicity in XP

    Software development is difficult, for years the traditional Waterfall method that a lot of organisation used for large systems failed them. The requirements would be given, then software architecture, implementation, testing of the system and finally the maintenance phase. All this up front assumed that the requirements wouldn't change, the design...

  • » Simple Design: State vs Behaviour testing

    When we are facing a problem and taking the classic/Detroit style TDD we tend to start with the outermost object than work our way in. If we look at the Tic Tac Toe game, we may start with testing an empty board. [code lang=java] public void TheBoardStartEmpty() { var board...

  • » Reading and writing to a CSV in C#

    A simple way of reading and writing to a CSV is by using Visual Basic assembly file called FileIO, which can be easily imported by searching in the Reference Manager within Visual Studio Microsoft.VisualBasic.FileIO" Write to the CSV [code lang="java"] var destinationPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); var destinationFile = Path.Combine(destinationPath, &quot;MyContacts.csv&quot;); private...

  • » 4 Rules of simple design part 3: Duplication of knowledge

    When designing, we should ask ourselves what happens when we change something. And if we were to change, how much effort is required? how many places will have to change. Continuing with the Game of life example. For our next set we want to set that a cell is alive...

  • » 4 Simple Rules of simple design pt 2: Test names

    Test Names should influence an Object's API As I've written before, tests are important. We should keep our tests as clean as our production code. With this in mind it should follow the simple rules. I will be using the Conway's Game of Life as an example, written in C#...

  • » 4 Simple Rules of simple design part 1

    Have the mindset of better design and not best design At times I suffer from coding paralysis. I used to want the best design up front, so I would be in a state where I would continue thinking without doing any productive work. I am beginning to realise that it's...

  • » Deliver deliver deliver deliver deliver deliver.

    At the end of the day as developers we are here to deliver, specifically delivering value. If we are not delivering value, our client, whomever that may be is receiving a negative ROI. I got into the software industry through my passionate of writing code. Back then I didn't write...

  • » What is simple enough?

    While working on persistence on my Contacts management, I researched around and decided on using XML file format to save my contacts to disk. Initially I decided on this approach because C# had decent support for reading and writing XML files. Making it relatively straightforward to implement within my allocated...

  • » Steadily Adding Value Principle part 2 of 2

    Made a mistake, now what? Take responsibility The work that we deliver is our work, as professionals we should refrain from making excuses and take responsibility. Sometimes working in a team it may not be clear who was the one who actually made the mistake, but I find that usually...

  • » Steadily Adding Value Principle part 1

    This is one of my favourite principles and here's why. To deliver well crafted, well thought out software takes time, skills and patience. It's not enough to just deliver software, it has to be well crafted, as software is usually not delivered once but is improved upon over time. This...

  • » Why a software craftsmen should be multidisciplined

    It is the duty of a software craftsman to be multi disciplined. To know various programming languages, technologies and have a varied skill set at their disposal. It's about rejecting narrow specialisation. It's not enough to complete a small task really well or look at their system from a ground...

  • » Why Demos are important

    Demos are a time to demonstrate all the features that have been completed in the previous iteration. Demos also highlight what's left to be done in addition to feedback on what we could've improved on. What I particular like about demos is that it's showtime, time to demo hopefully all...

  • » Diary of my experience developing a Tic Tac toe game in Swift (part 2)

    Vim for Xcode I installed XVim for Xcode, which as you would guess is a plugin which enables Vim bindings, I'm so happy, I feel....almost... comfortable in Xcode, need a couple more days with it. A lot of improvements have been made to it since the last time I used...

  • » Variables in Swift

    Like many languages, Swift has its variables and constants. Swift offers a REPL like environment called Playground, which I have been using to learn more about the language. Variables We can assign a variable with an unknown type by doing the following. var welcomeMessage = "Hello World" As you can...

  • » Test Driving While loop is challenging and the C# Virtual Keyword

    TDD'ing While loops Today and yesterday has been about test driving a while loop. I've never really thought much about this. At first I thought it would be straightforward. How wrong I was.. Test driving my loop required creating a stub class, passing in stub data, stub methods and so...

  • » Refactoring a for loop using Linq

    Do the smallest thing that works We do the smallest thing that works first so that we can reach the solution quicker. With good test we know we can refactor to our hearts content to make the code cleaner, readable and above a joy to work with. The Mess I...

  • » Brief Comparison of C# IDEs

    C# IDE's For my first language as part of my apprentice is to learn C# language, as I have done Java professionally and learnt Ruby when I was learning Rails for fun. C# has various available IDEs, below are the ones I conducted a little of research on. Microsoft Visual...

  • » Quotes for the week ending 26th February

    "Perfection is Achieved Not When There Is Nothing More to Add, But When There Is Nothing Left to Take Away" "Big modeling up front" (BMUF) is the desire to create comprehensive models of the requirements for a system, the analysis of those requirements, an architecture that fulfills those requirements, and...

  • » Simplicity is hard, that's why we have 4 Rules

    I've been recently struggling with keeping the design of my systems small. My problem stems from my presumptions of what the system will need. I predict what the system will need in the future, so when the future arrives, my system can be ready for that change. Sometimes though the...

  • » Diary of my experience developing a Tic Tac toe game in Swift (part 1)

    I've never developed a Swift application in iOs before but I thought it would be fun to spend some time rapidly developing a Tic Tac Toe game and document my experience. My first step is find out how to setup an ios environment. This part was easy as I had...

  • » Methods should tell a story.

    Before completing my echo server, my mentor noticed that I wasn't using test doubles effectively. He suggested that I do spike of the echo server to get a better idea how the final implementation would look like. Once I had completed the spike, I was happy with the start method...

  • » Method Argument types: Niladic, Monadic, Dyadic & Triadic

    Method arguments come in various flavours. Niladic The method contains no arguments, this one can be easy understand, for example, Java's 'ToString()' method Monadic The method contains a single argument. Java's base class Object#equals(Object obj) Dyadic A method with 2 arguments, for example the String method replace....... replace(char oldChar, char...

  • » Top-down and down-up design (part 2)

    Yesterday I wrote about top down approach to design, bottom up is the reverse approach With this approach we first predict what components on going to be required. Going back to the EchoServer example, the echoServer class depends on a echoConsole module, this means by first designing the echoConsole, we're...

  • » Top-down and down-up design (part 1)

    This week while working on my echo server I had a chat with one of my mentors about the design approach that I was taking my program. Here is my Echo Server requirements Start program prompt user to type something Type "hello<return>" Program responds with "Hello\n" Type "exit<return>" Program terminates...

  • » Writing to Memory Streams in C#

    Picking up from where we left off from stream reading, this time we'll be discussing writing. Here is the code below we will be discussing. private MemoryStream stream; 1 public void Write(string message) { 2        using (StreamWriter streamWriter = new StreamWriter (stream)) { 3      ...

  • » Reading Memory Streams in C#

    I have been working with streams the last couple of days and they were confusing at first, especially the way C# does it differently to Java. With the help of MSDN and nearby kind craftspeople, it's beginning to become clearer. We will use a simple example to explain how they work....

  • » Why do we want clean code?

    Good code is important, but why is it important? Here are a few of my observations from my time as a developer. It's important as it allows to work faster in the long run, to, to adapt to change. As code becomes messier, productivity lowers, as productivity lowers, management interferes...

  • » Theruputic Code kata'ing

    The more I do, the more I learn. I am beginning to see the benefits of repeating the same kata, again and again. The more I do a particular kata, the more I enjoy the rhythmic nature. Write a test, do the simplest action to get the test to pass,...

  • » Have we met before C#, in another life perhaps?

    Today I delved into the world of C# and I have to honestly say it felt like I had once visited this particular world before. Having a background in Java made using C# seem familiar but not quite. There were many times where my assumptions were proven correctly. For example,...

  • » Making TDD easier in Ruby by automating your tests

    I’m a fan of test driven development, in order to speed up my turnaround time from writing functionality to testing the functionality, I use Guard(https://github.com/guard/guard) tool to automatically run my test any time I make a change. This greatly speeds up my development time and hopefully it’ll help you too....

  • » What I learnt by doing 100 days of Github commits..

    Challenge Commit code to a public repo for 30 days. A while ago I spoke about doing a 30 day github streak challenge. Well I went for 100 days instead :) What are github streaks Github streaks show how many consecutive days a user has committed a change or raised...

  • » How to fix the “"Too many gem names"” error when running "gem build"

    I was getting a strange error each time I ran “"gem build tic_tac_toe.gemspec”" in order to build a  gem I was working. I had no idea where “document” was coming from. With a bit of google-fu I learnt about the gemrc file. A configuration file that hosts info about your gem...

  • » Few things I dislike about the Ruby language.

    I'’ve been learning Ruby for a while, it has mainly been a joyous experience. It has opened my mind in many different ways. I glee in delight when I think to myself “I wonder if that will work..?” and Ruby surprises me when it does. Saying that, there are a...

  • » Switching to HAML from ERB

    I've recently switched from ERB to HAML and I have to admit it's an absolute joy to use, not sure why I didn't make the switch sooner. I find the best way to learn a new framework or language is to put it through a short litmus test. For Haml I built...

  • » split your folder to a new branch

    I do this too many times. This post is a reference to the solution. http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository/17864475#17864475

  • » 30 days of github challenge

    About 30 days ago, I began an ambitious goal at the time. The goal was to commit code to Github for 30 consecutive days. I'm happy to say that I did it and this is what I learnt. The first couple of days or so it wasn't  difficult, however on...

  • » Useful aliases in bash

    The bash aliases are a great way to improve productivity, I find myself all too often typing the same commands repeatedly . Here is a list of the most useful aliases to my workflow, I'm always looking to add more. It has  greatly improved my productivity by at least 200%! (yes I...

  • » Fixing iTerm's movement shortcut

    Since I switched to ITerm from Terminal, I missed being able to jump between words using the alt key and corresponding left and right keys. To change this, you have to go to iTerm's preferences then "Profiles" tab, select "Keys".   Change the keyboard shortcut   " ⌥← "  (option+left arrow)...

  • » Switched to ITerm, the OSX Terminal replacement.

    Today I switched to iTerm 2, a replacement for Terminal and the successor to iTerm. I went to a Swift meetup 3 months ago, there was a guy there who was proficient at Vim and using bash. I asked him to tell me more about his setup and he recommended...

  • » Handy java code snippets

    http://viralpatel.net/blogs/20-useful-java-code-snippets-for-java-developers/

subscribe via RSS

Software Developer

CED RI C   KI SE MA

Crafting beautiful software