Blog

  • Silence is broken

    It’s been over a year since my last blog. I’d like to say that this is down to something interesting. Perhaps due to a period of deep meditation. Or maybe having to be ‘off the grid’ due to government agencies being after me. Sadly it’s none of these things. I’ve been working on the new site you see before you, so Ta-Da! Welcome to the new Nickbennett.co.uk!

    I made some pretty big decisions last year…

    1. No more My full English
    Having given up the fried delicacy due to the extreme Dad bod I’m already rocking. It seemed to me the idea had run its course. Google already do a great job with the map and review service. Also, I’ve come to the conclusion that if I want to learn something new I should push for it in the 8 hours at work, and not in the exhausting hour after work. Starting another green field project is just too much commitment.

    2. Migrate nickbennett.co.UK away from WordPress
    Decision one means that I need a better platform to demonstrate my skills as a developer. I needed a more flexible framework that allows me complete control of the site. The new site is a Symfony project that uses WordPress as a service.

    The new site is up and includes everything I wanted. I have ported everything from the old site over with some extra additions.

    The past year had some interesting life events. I got married, I became a front-end developer and my boy started school. Now the silence is over I’ll tell you more about it in the up and coming months.

  • Attack on free speech or lack of respect

    I’ve been playing the latest attacks in France over and over in my head. First off let me make my position on the atrocities absolutely clear. The attacks were appalling and the perpetrators got exactly what they deserved. My concern is that a line of respect and common decency has to exist if we are going to live in a peaceful co-existence.

    The declarations for un-negotiable freedom of speech are coming from the same liberals that are offended by anything that comes out of Frankie Boyle’s mouth. They’re complete hypocrites. I’m all for COMPLETE freedom of speech but I accept that in practice it just isn’t feasible. Surely, I can’t go up to someone call them a c*** and demand my rights of ‘freedom of speech’ should that person want to hurt me. It’s ridiculous.

    I’m not religious but I appreciate it’s a very personal thing that means a lot to millions of people. When I’m talking to anyone about religion I tread carefully because I respect them and their religion. For a publication to totally disregard the feelings of so many people is just irresponsible. On all of the coverage, I saw just one interview with someone that dared make this observation.

    Luckily, my faith in humanity came from a very unlikely source. The head of the Catholic church!

  • New Look NickBennett.co.uk

    I recently decided to sit down with my site and see what needed doing. I scrolled to the bottom and realised the theme hasn’t changed since 2010!! Despite some sniffiness from some of my colleagues at the fact my portfolio site is a WordPress blog, I decided to stick with it. It’s done me well this far and why reinvent the wheel.

    Key features of the new site

    • Responsiveness
    • Updated music player
    • Content update

    I’ve managed to get the 3 main objectives achieved in a quick time. And that’s why I love WordPress. Hope you enjoy the new layout and I promise not to leave it so long next time.

  • My Full English – Project Management

    My Full English – Project Management

    Personal projects can quickly become lost by the wayside. The initial momentum is difficult to maintain throughout the project cycle. That’s why it’s always good to consider how you’re going to manage the project early on. Part of this process should be to consider how you intend to keep the project active in your consciousness and how to keep delivering features.

    Approach

    From the outset, we knew we were going to run the project with an Agile methodology. So delivering key features from the project backlog quickly as part of a 2-week sprint cycle was how we intended to deliver the application.

    Tools

    In an ideal world where money isn’t a concern, I would always recommend going down the Atlassian route. Their products are second to none with seamless integration between them making the process completely pain-free. However, it is expensive. The current MFE budget erm is £0. Fundamentally, all you need is a well-organised spreadsheet that can be shared. Google docs to the rescue. We have 3 spreadsheets.

    1. MFE Features
    2. MFE Bugs
    3. MFE Sprints

    The first 2 sheets are fairly similar and contain a list of features and bugs with priorities against each. Each item has a unique number against it so it can be tracked.

    spreadsheet

    The sprints spreadsheet has a tab for each sprint. The sprint will contain a list of features/bugs for that 2-week sprint. There is also a tab to log how many story points were achieved in each sprint. Setting out 2 weeks’ worth of work is a good way of ensuring the project is moving forward. A sprint is a commitment of work that WILL be completed.

    sprint

    Version control

    My evolution through the version control system has progressed from CVS->SVN->GIT. Each one offers something over and above its predecessor. GIT has become an industry standard and tools like bitbucket make it even easy to collaborate on projects

    What next

    In the next post, we’ll look at the database design.

  • My Full English – The Design Phase

    My Full English – The Design Phase

    Close Photoshop immediately. You are trying to run before you can walk. Have you ever just stared blankly at a completely blank PSD waiting to be hit in the face with the inspiration bat? I have and know it can be soul-destroying.

    The initial design phase has to exclude all detail. To force this approach I took a Sharpie pen and some blank pieces of paper. Firstly I identified my main user paths. Luckily for MFE, there are only 2 of them.

    1. I need to find a venue for my breakfast
    2. I’ve just finished my breakfast and I would like to add a review

    Both of these paths need to be achieved in as few amount of steps as possible and work on both mobile and desktop devices. Here are some of the initial sketches.

    MFE Wireframe
    MFE Initial Design

    Ok, I’m unlikely to win any art competitions but by roughly sketching out ideas I managed to get a much better idea of what the flow of the site needed to be.

    Once I was happy I created a digital version of the designs and flow to make it easier to share and reference. I used Mockingbird, which is a very easy-to-use wire-framing tool and is free for 1 project.

    MFE Digital Wireframe
    MFE Digital Wireframe

    Once transposed I exported it to a PDF which I could then share with others and also use as a constant reference for the ultimate goal of the project.

    What Next

    In the next post, we’ll look at how we are going to manage this project

  • Deploying to AWS with Phing

    Deploying to AWS with Phing

    After a recent switch to Amazon Web Services, I thought updating my Phing build XML would be a straightforward task. It wasn’t. There weren’t a lot of resources out there for this particular scenario so I decided to write this blog piece.

    AWS comes with good security out of the box. This is obviously a good thing but it does require a bit more thought when setting up your Phing build file.

    Filesync
    During the process of setting up your micro instance, you will be prompted to create an SSH private key which you can download. Put this file somewhere safe and ensure you update the permissions.

    chmod 644 mykey.pem
    All deployment will be done using the ec2-user user. So to save frustration ensure that this user has the write permissions on your target directory (on your target box).

    Where my file sync previously prompted for a password the identityfile parameter automatically connects to instance.

    <filesync
    sourcedir="${source.path}"
    destinationdir="${target.user}@${target.host}:${target.path}"
    verbose="true"
    checksum="true"
    excludeFile="${exclude.file}"
    identityfile="${source.identityFile}" />
    SCP/SSH
    You would think this would be the same as filesync. Unfortunately not. This requires you to create a public key using your private key. From the private key location run the following.

    ssh-keygen -f mykey.pem -y > mykey.pub
    Now in your build XML add these parameters

    <scp
    username="${target.user}"
    privkeyfile="${source.identityFile}"
    pubkeyfile="${source.pubIdentityFile}"
    host="${target.host}"
    todir="${target.path}/mytargetpath"
    autocreate="true"
    file="${source.path}/local.txt" />
    You should be good to go. Hope this is useful.

  • My Full English – A new beginning

    My Full English – A new beginning

    Making the leap into a complete rewrite can be a difficult one. If you can afford the time it takes and the pros out way the cons then go for it. I’ve been busy working on the latest version of my full English. In my next few blog posts I’m going to go through the process I went through from conception to delivery.

    The latest version of MFE3 is now available. Although nothing special to look at, it does at least allow the same functionality on mobile as it does on desktop devices. Just writing the previous sentence justifies to me all the work I’ve put in to completely re-writing the previous version.

    So what was wrong with the previous version?

    As a developer, you build things with the knowledge you have at the time. When we kicked off version 2, a fully functioning site on mobile was only really ever a side thought. The site was built on a custom framework I had built from scratch which I called Mastersolution. Despite the cool name, the framework was very unloved. It was basically a bespoke MVC framework using Smarty as the template engine. When we completed the desktop version we thought ‘oh we had better do a mobile version’. A quick redirect with device detection took you to the ‘mobile’ version. All you could do is find venues near you and get directions to those venues. The functionality to add new venues and reviews just wasn’t available? This sucked.

    So what did the new version have to do?

    I set out clear goals and objectives with the new version of my full English.

    1. I would use the new version as a vehicle to learn as many new technologies as possible
    2. I would concentrate on MFE until I have at least 100 reviews added (hopefully not just by me although 100 full English breakfasts do sound tempting)
    3. The same functionality should exist on the desktop and mobile versions of the site

    What were the initial decisions?

    Framework

    I decided that it was time to move with the times and move to either Zend 2 or Symphony. A similar debate was happening at work at the time. And Zend 2 was decided as the way to go.

    Responsiveness

    I had decided that Twitter bootstrap was the best way to go. I had used it before, and as a ‘backend’ guy I loved how easy it was to make things look nice.

    What next?

    So I was all set for my journey into the unknown. See how I get on in the next blog piece!

  • PHPUnit Dramas

    A frail PHPUnit suite is one thing, but one that completely crashes MySQL is something else entirely!

    I wanted to do a quick blog as this problem isn’t well documented and I want to save people the same pain I went through.

    The problem manifested on a rather large suite of tests with a dedicated MySQL instance. When running the suite we were getting ‘database gone away’ errors in our DB unit tests. Our first thoughts were that it was potentially an issue with our out-of-date version of MySQL. Upon investigation, though it appeared the problem could be replicated and indeed fixed.

    The problem seemed to be a number of things.

    1. Multiple table creation scripts for the same table (I know)
    2. Mixing up engine types for tables within the same database
    3. Having MySQL comment blocks in the table creation statements
    4. The use of set foreign constraints statement

    After much pain, the suite was eventually restored to working order. The lesson learnt was to centralise all of the DB unit table creation scripts. This ensures 1 point of entry for changes and debugging.

  • Innovation

    Innovation

    How do I innovate? Do I need to invent something new? How do I measure success?

    As a developer, I’m often looked upon to use technology to improve processes. This to a degree is innovation but you don’t necessarily need IT solutions to innovate something. You just need a good imagination.

    “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.”
    Albert Einstein

    Often when I oversee a process it’s easy for me to offer suggested improvements mainly because I’m neutral about it. I bring an outsider’s perspective. Becoming too close to any system can lead to not seeing the wood for the trees. I’ve compiled a simple suggested list of things to do which could help define your next project. By looking at something that needs improving you can follow the list and hopefully identify how to innovate it.

    1. Issues with the current process
    Make a list of every single bugbear you have with the existing process. Anything that is causing the process to be slow or inefficient. Every small thing no matter how trivial is worth noting down. Sometimes the small things are the quickest things to fix and have a larger positive impact than you may think.

    2. Goals of the new process
    What are the ultimate measurable goals that can be used to assess the success of the new process? Some examples may be the time to process a record, the number of people required for the process and the cost to run the process. Make sure you mark down the values of the current system so have something to measure against.

    3. Forget everything you know
    If you were to start again today, how would you set up the process? Think in terms of ultimate solutions. Don’t think about any constraints, just consider a perfect world and a perfect system. Does the new system avoid the issues listed in part 1? Good, then you’re ready for step 4.

    4. Feasibility
    Carry out a feasibility study to see how much of the ultimate solution is possible. Looks at budget and time restraints. Think about the downtime of existing systems and how you can deploy the new solution.

    5. Build
    I would recommend using an Agile approach in delivering the solution. Aiming to get quick wins out there into the real world ASAP. Look at 3rd party solutions to hit the ground running. Don’t try to reinvent the wheel. By introducing these changes quickly you can get buy-in from the users.

    6. Assess
    Once you’ve completed the changes that budget and resource has allowed, take a look at your initial goals. Did you hit most of them? Yes, then it was a success. Cross-reference your ‘perfect solution’. Maybe you already have an idea about your next project may be.

    Processes, technology and requirements are always in constant flux. You should look to re-assess any system at regular intervals to see if you can make further improvements. Remember 3rd parties may be able to help in the future if they can’t at the moment.

    I hope you find this useful.

  • Essential LAMP tools

    Essential LAMP tools

    For the last time am I going to utter the words ‘I wish I’d found this earlier’. There are so many great tools out there for developers that it can become overwhelming. I used to just accept the flaws in my text editor or database client. Often telling myself ‘it’s better the devil you know’. Recently, however, certain frustrations have caused me to reassess the tools I am using. At this current point in time, I have reached a state of LAMP developer nirvana! This article is to help you reach the same higher state of consciousness!

    OK, few points to know before we kick off. I am very tight with my cash. Despite this, I am a keen Apple advocate (maybe the two traits aren’t entirely unrelated). The tools I’ll talk about will be for OSx but I’ll try to mention some Windows tools along the way.

    MySQL
    Free GUIs for MySQL have come a long way since the free ones provided by MySQL. The latest incarnation is Workbench. The killer functionality here is the ERR modelling creation tool. You create your database, tables, initial inserts and relationships. Hit forward engineer and hey presto! Your schema is all up and running. And you also have a fully documented schema. As a habit, I try to add comments to all tables and some columns. This diagram process is one of my first tasks for any new project. The query editor for Workbench doesn’t include a decent auto-complete functionality. An essential feature if you ask me. For this try Sequel Pro. It’s snappy, free and highly intuitive.

    Text editor
    OK, the most delicate of subjects. I’ve never really used a full IDE to develop but I hear Eclipse is the front-runner on this. I had been recently using Komodo edit which is a great free text editor. My highlight feature on this is the scanning of other PHP DocBlock comments. Within your current file, it sees you’re calling a method from another class (in another file) and tells you what parameters the class expects. Pure black magic. My only gripe with the editor was that the shortcuts weren’t intuitive and some just didn’t work. I’d found Textmate was better for this so gave Textmate 2 a try. They’ve really dropped the ball on this. Textmate 2 is awful! That’s when I found Sublime Text. Sublime Text will cost you around £45 but it’s worth every penny. Once package control is installed you have a world of useful plugins at your fingertips! For Windows, I always find Notepad++ a decent free editor.

    Source control
    I’ve used CVS and Subversion. Both of which are quite similar. Recently, I’ve made the switch to GIT and I am amazed by it! I’ve implemented a GIT flow approach which means I have a solid workflow which doesn’t interfere with other feature branches on the same code base. Switching to different features is so easy and still makes me go ‘wow’ when I do it.

    Linux/Apache
    I work on the mac mainly as it’s a UNIX-based operating system. This allows me to use a lot of the Pre-built commands available with my personal/work Linux servers. The terminal app is very good on the Mac and likewise Putty on Windows is also very good. For package installation on the Mac Macports is essential and for Linux Yum is superb!

    I guess that’s it for the time being! To take the pain out of setting up your LAMP environment on your mac I would highly recommend Zend’s community server.

    Next time I’ll discuss my project process methodology.