Tuesday, 27 December 2016

2016 claims Metal Hammer

In the 90s there was a ‘Rock Music Magazine’ called Raw Power (later renamed to Noisy Mothers, before getting cancelled) which aired on ITV in the early hours of Saturday morning. I often saw it in the Radio Times and sometime in the early 90s started recording it. As my obsession for Rock and Metal grew I also started reading the fortnightly Raw Magazine, which in the late 90s transformed into a more indie based publication for one issue and then died. At the same time I was buying Kerrang! weekly, Metal Hammer once a month and at some point I had a subscription to Terrorizer magazine. Raw Magazine was always my favorite, but then it went crap and died, Kerrang! became like Smash Hits for Metal kids (or maybe I grew up a bit) and Terrorizer didn’t have enough of a range of metal bands to make it worth the subscription, so I was left with just a Metal Hammer subscription which I maintained for the album reviews so that I knew what was coming out.

Last week 2016 claimed another casualty, Team Rock, the company who bought Metal Hammer from Future Publishing. It appears they just ran out of money, stopped and brought in the receivers. This of course means that there is hope for Metal Hammer if someone can be found to buy it and/or Team Rock. Although it’s not feeling very likely.

In the late 90s I would read all the magazines I bought cover-to-cover. In more recent years it’s just been the album reviews, of the bands I recognised, and the odd interview if it looked interesting. Did that make it worth the subscription? Absolutely! Convenience is something I’ve been happier and happier to pay for as I’ve got older and having Metal Hammer drop through my door once a month and enable me to keep abreast of the latest album releases was fantastic.

I am going to miss Metal Hammer and inevitably miss album releases, which will mean I save a bit of money. The alternatives mean me taking positive action to follow bands on the internet, Facebook or Twitter and I’m unlikely to fit it all in.

Metal Hammer was how I discovered the Bloodstock Festival, my now annual pilgrimage to Derbyshire with around 10,000 other metal heads. It’s how I discovered Dream Theater, Behemoth and countless others. I discover most new bands at Bloodstock now, but still…

I’ll be keeping my fingers crossed that someone acquires Metal Hammer, if not the whole of Team Rock and maybe I need to investigate a Terrorizer subscription once more.

Let’s just hope we don’t lose Princess Leia before the year’s out (or in the 2017 for that matter).




Sunday, 25 December 2016

Passengers

Every time I’ve seen Jennifer Lawrence on the Graham Norton show she has been drunk and obnoxious. In The Hunger Games she wasn’t exactly a charismatic resistance leader. I’d heard bad things about Passengers and that coupled with the fact it had Jennifer Lawrence in it wasn’t giving me any hope, but the trailer made it look like an interesting sci-fi, so I went to see it anyway.

I’m glad I did. It wasn’t amazing, but it was good. I don’t think I’d need or want to see it a second time. If you put aside the fact that it’s set on a spaceship in a universe where hibernation for long distance travel is possible, there isn’t a great deal of science fiction in the this film. It’s a film about morals.

What’s more, Jennifer Lawrence is actually quite good in it and not at all annoying. Chris Pratt is also very good in this predominantly straight role (I’ve only seen him in Guardians of the Galaxy before) and of course Michael Sheen is, as always, amazing even in a supporting role.

The special effects are good, but don’t make the movie. They’re as they should be, there to tell the story not to outshine it. The climax is your usual last minute saving of the spaceship and characters just in the nick of time. Some of it is difficult to suspend belief for, but then it’s a sci-fi film.

Go see it, it’s many times better than Arrival.

Sunday, 18 December 2016

Rogue One

So much better than The Force Awakens, but still a little way to go and it all ended a bit Blakes 7.

After the disappointment that was the Force Awakens, I approached Rogue One with some trepidation. It was slow going to begin with and I missed the usual scrolling introduction to the story so far, but as one of three standalone Star Wars movies I guess there was no story to tell.

My heart fell more when there started to be a lot of references to the other films, especially Princess Leia in Return of the Jedi, as this was one of the things that had detracted from the Force Awakens, but they were just references, it wasn’t actually the same story!

Half an hour in it was great and I really enjoyed it from that point on. I liked the way it was almost split into two stories with two separate climaxes. I started to get a bit worried towards the end. I remember the beginning of the original Star Wars film (now called A New Hope) and how the Tantive IV had received the transmitted plans for the Death Star. The way Rogue One was playing out didn’t look as if it would be consistent. Then the plot sped up, just like it does at the end of The Clone Wars and the story played out just as expected to align with A New Hope.

Rogue One did what The Force Awakens failed to do. It built some brilliant characters, but then it did the worst thing you can imagine. It killed them all. I know people have wrongly said that the story was borne out of Mon Mothma saying “...many Bothan’s died to bring us this information…”, but it wasn’t necessary to kill everybody!

Friday, 16 December 2016

Nor(DEV):con 2017 Saturday Keynote Speaker – From Coda to Code: The SupaPass Journey


Nor(DEV):con keynote speaker, Saturday 25th Feb

From Coda to Code: The SupaPass Journey
Juliana Meyer

Join Norfolk Developers to discover the tech startup story, that began from a bedroom in Norwich with a vision for a more efficient rewarding future for creatives, and has led to a globally recognised tech platform working with artists from major record labels.

About Juliana
Juliana Meyer is Founder and CEO of SupaPass, the fair-trade music streaming app. SupaPass gives anyone with a fanbase their own subscription streaming service. Fans subscribe to a specific creator’s channel from £1 per month and creators earn up to 100% net revenue share of their fan subscriptions.

Juliana founded SupaPass to give efficient, fair, transparent revenue from streaming for artists, labels and publishers. Working with global artists like Grammy Award-winning Imogen Heap, SupaPass is exploring cutting edge technology including Blockchain.

Prior to founding SupaPass, Juliana Meyer ran her own label and was an award-winning singer-songwriter, including writing Norfolk’s Official Olympic Song for the 2012 Olympics. She also has a Masters Engineering Degree from Oxford University. One of the first steps in founding SupaPass was co-founding SyncNorwich in order to find and build the team.

Juliana also won the overall award at the 2016 DevelopHER awards.

RSVP: https://nordevcon2017.eventbrite.co.uk

Nor(DEV):con 2017 Saturday Keynote Speaker: The Technologist’s Guide to Hitchhiking


Nor(DEV):con keynote speaker, Saturday 25th Feb

The Technologist’s Guide to Hitchhiking
Seb Rose

Are you assessed according to the professional development plan you submitted at last year’s appraisal? Where will you be in five year’s time? Have you ever been hitchhiking?

While it’s important to acquire relevant knowledge and skills to further your career, it’s also useful to occasionally reflect on the role that serendipity plays in all our lives. I’m not talking about loosely thought out escapist dreams or delegating your career to a higher power. The best professionals and business people are those that are able to take advantage of opportunities when they arise – something that observers often characterise as luck. If it is luck then, to some extent, we make our own luck.

You may be wondering where hitchhiking comes into this. In part, it’s through the long relationship that technologists have had with the work of Douglas Adams and the number 42. Hitchhiking is also a good metaphor for the development of a career in technology, incorporating all the elements of forecasting and preparation, but combining them with massive unpredictability.

I’ll draw on over 30 years of software development (and hitchhiking) to encourage you to both loosen up and apply yourself.

About Seb
Consultant, coach, designer, analyst and developer for over 30 years. Seb has been involved in the full development lifecycle with experience that ranges from Architecture to Support, from BASIC to Ruby. Recently he has been helping teams adopt and refine their agile practices, with a particular focus on collaboration and automated testing.

Seb is the lead author of “The Cucumber for Java Book” (Pragmatic Programmers) and a contributing author to “97 Things Every Programmer Should Know” (O’Reilly). He has written for many online journals, including Agile Connection, Simple Talk and the Prose Garden. He has spoken at dozens of UK and international conferences, including Software Architect (London), XP (Vienna & Rome), Agile 2014 (Orlando), Java One (San Francisco), NDC (Oslo), Agile Testing Days (Potsdam) and Eurostar (Maastricht).

RSVP: https://www.eventbrite.co.uk/e/nordevcon-2017-tickets-26029662421

Nor(DEV):con 2017 Friday Keynote Speaker: Are you ready for the coming revolution?


Nor(DEV):con keynote speaker, Friday 24th Feb

Are you ready for the coming revolution?
Russel Winder

UK school curriculum underwent a revolution as of 2014-09: ITC was replaced with programming (aka computer science). Whilst the change itself was campaigned for, and widely wanted, the way government handled the change left a lot to be desired. Some, but not all, universities and colleges have joined in realising the change and preparing for the consequent revolution in university computer science curriculum, c.2018 onward. Are businesses ready for the knock-on change?

This presentation will delve into some of the most important and/or obvious issues surrounding this world leading experiment in child education.

Ex-academic, Analyst & consultant Russel talks about the important issues surrounding the government’s push for programming in UK schools, and how the way it’s been handled has left a lot to be desired.

From 2015 ICT in UK schools is to be replaced with programming, but the way the government handled the change left a lot to be desired. Russel talks about some of the most important and obvious issues surrounding this world leading experiment in child education.

About Russel
Ex-theoretical physicist, ex-UNIX system programmer, ex-academic. Now an independent consultant, analyst, author, expert witness and trainer. Also doing startups. Interested in all things parallel and concurrent. And build.

Actively involved with Groovy, GPars, GroovyFX, SCons, Me TV, and GStreamer. Also Gradle, Ceylon, Kotlin, D, Go, and bit of Rust. And lots of Python, especially Python-CSP.

Full agenda: http://www.nordevcon.com/agenda-2017/

RSVP: http://www.nordevcon.com/

Nor(DEV):con 2017 School conference day


Norfolk Developers are excited to announce their programme for Nor(DEV):con’s schools day, put together by Paul Foster, Microsoft in consultation with many members of faculty from different schools across Norfolk & Norfolk Developers themselves.

09:00 Arrival/Opening keynote segment (20 Minutes allowing for arrivals)

09.20 Paul Grenyer & Paul Foster Open event

09.25 Keynote- “Whoops”, and other classic programming phases by Dom Davis, (@Idomdavis).

Schools now teach algorithms and programming from the age of 5, so it’s hardly rocket science. Except when it is. And even when it isn’t it goes wrong a lot. I should know, I’ve been responsible for some of that wrongness. The trick is to learn from your mistakes, and to make sure that when it goes wrong, it does so in a way that no one will notice, and definitely not in the ways I’m going to spend this session talking about.

10:00 break

10:25 Guided technology task (2 hour activity)

In this activity students will learn how to blend software and hardware to build a modern digital device. Working in pairs, students will learn how the internet of things uses sensors and actuators to build intelligent feedback systems that can interact with the real world.

12:30 Lunch. (Allocated 1 hour)

Lunch is not provided.

A loop of inspirational technology videos will run during the lunch break to give students further ideas.

13:30 STEM student challenge (3 hour activity)

The STEM Student Challenge aims to help students connect the dots between the STEM subjects they study today and the impact those subjects could have on their ability to be part of the next generation of technology heroes. We invite students to use their knowledge of STEM subjects and marry it with research and creativity to imagine and depict their vision of technology in 2027.

The challenge is open to teams of 4-6 students in years 10 to 13. The challenge is to select one of the following categories and come up with an original technology idea that could exist in that field in 10 years’ time.

  • Artificial intelligence and virtual reality
  • Data Security
  • Healthcare

Students must depict or “pitch” their idea in the form of a two-minute video.

1. Form a team. Teams should be made up of 4-6 students.

2. Choose a category and start imagining! We’re surrounded by technology, whether it’s in our pockets, our homes or our schools, and it’s only going to become more central to our daily lives. Microsoft is working in areas that will change the way we work, play and look after ourselves and we want you to think about how these might look 10 years from now. So choose from one of the categories below, and get to work – come up with an original idea for a future technology. Challenge entries should reflect your team’s creativity and your knowledge of your chosen category.

You are part of the generation that will help bring the technologies of 2027 to fruition, so in doing this challenge, we hope you’ll think more about how you can be part of driving the exciting world of tomorrow’s technology. Each team should choose one category and submit one idea only.

3. Create a video. Create a video that depicts your idea. The tech doesn’t exist yet, so you’ll have to get creative! Make a science show, do a skit, demo a mock up prototype using available materials – just keep it under two minutes. Please make sure that your team is familiar with the judging criteria which you can find in this document.

4. Submit your entry. Upload your video to OneDrive by 16:20

Video Entry Judging Criteria

1. Originality of idea Does the technology idea show creative thinking? Does it stand out from the crowd? Is the idea unique and original?

2. Quality of research methods Have the team shown the research that they have undertaken to lead them to their technology idea? Does the video demonstrate that the team has researched and understood the category they have chosen?

3. Understanding of STEM subjects How well does the video entry demonstrate a sound knowledge in one or more STEM subjects?

4. Quality of presentation and clarity of idea Is the video well presented, clearly describing the future technology idea? Have the team presented their idea in a creative, interesting and entertaining way?

5. Is it feasible? Have the students demonstrated how their technology idea could be possible in the year 2027?

6. Evaluation of the process Have the team demonstrated what they’ve learned from the experience of coming up with their technology idea?

7. Judging will occur after the event with schools being notified of results by the end of February

16:30 Close (dependent on lunch break length and required school departure time)

NorDev: Pre-Conference Special



Pre-Conference Special: Machine Learning & Take the risk out of Digital Marketing

Warm up for the main conference day with the pre-conference special.

Date: Thursday, 23rd February 2017

Time: 5.30pm – 7pm

Location: The King’s Centre, Norwich City Centre

R.S.V.P: http://www.meetup.com/Norfolk-Developers-NorDev/events/233466379/

Take the risk out of Digital Marketing
Marcus Hemsley
Fountain Partnership

In this talk Marcus Hemsley will outline how the most successful Digital Marketing Campaigns minimise risk through accurate forecasting and testing. He will outline the three most important numbers to consider before you take a product or service to market, and discuss the most common mistake businesses make when launching a new marketing campaign. He will conclude the talk by running through the most effective strategies for business growth in 2017.

Machine Learning
Darren Cook,
QQ Trend

Darren will be speaking about machine learning, specifically with H2O, a fast, scalable, open source machine learning system with APIs in R, Python, CoffeeScript (and quite a few others). After an introduction there will be a live coding session to show using deep learning on a hard machine learning problem. There might even be time for Q&A and to give away a couple of copies of my book: Practical Machine Learning with H2O, published by O’Reilly. All in 30 minutes.

Pre-Conference Dinner

Location: The Library Restaurant, Norwich City Centre

Time: 7.30pm – late

Price: £30 pp

An intimate dinner at a lovely local restaurant, limited to 25 places. Attended by speakers and organisers and affiliated sponsors and guests.

Find the menu here

R.S.V.P: http://www.meetup.com/Norfolk-Developers-NorDev/events/233466479

Sunday, 4 December 2016

Test-Driving JavaScript Applications

Venkat Subramaniam
ISBN-13: 978-1680501742

I wanted to start this review simply with "Wow! Just wow!", but that’s not really going to cut it. It’s true to say that when I first learned that there was going to be a book published called "Test-Driving JavaScript Applications" I was sure it was going to be the book I had been waiting for since at least late 2007 when I was forced to write JavaScript in production for the first time. It’s publication date was pushed back and back, so it really felt like I was being made to wait. However, I wasn’t disappointed and this book was everything I hoped it would be and more.

We all know JavaScript is evil, right? Why is it evil? It’s the lack of a decent type system, the forgiving nature of the compilers and an inability to write meaningful unit tests, especially for the UI (User Interface). It’s difficult to do a huge amount about the first two points, but now JavaScript can be meaningfully unit tested, even in the UI context, with Karma, Mocha and Chai. Test coverage can be measured with Istanbul and System Tests (referred to by Subramanian as Integration Tests - this is my one bugbear with the book) written with Protractor. All of this is described in Test-Driving Java Applications.

I think it’s important to read all of part 1, Creating Automated Tests. The chapters cover everything you need to know to get started writing unit tests for both server side code and UI code, how to test asynchronous code (very important in JavaScript) and how to replace dependencies with test doubles such as fakes, stubs and spies. It’s all demonstrated with a completely test first approach with excellent commentary about how this leads to good design.

I cherry picked from part 2, Real-World Automation Testing. I was only really interested in how to write automated tests for the DOM and JQuery and how to write ‘Integration’ tests. Other chapters included how to write tests for Node.js, Express and two versions of AngularJS. The DOM and JQuery chapter was excellent showing me exactly how to take advantage of test doubles to write fully tested JavaScript without having to fire up a browser, resulting in something I can make immediate use of.

The Integrate and Test End-to-End chapter, which describes how to use Protractor, was almost enough to encourage me to abandon Java (Selenium) for System Tests and move to JavaScript. However, while looking at the latest version of Selenium, there are some other things I want to investigate first.

The final chapter, Test-Drive Your Apps is the equivalent of Pink Floyd playing Run Like Hell at the end after Comfortably Numb. It’s still good, but is really there to help you wind down from the climax and could just as easily have been omitted, but it would feel a bit odd if it was.

If there was one more thing I could get from this book it would be how to send test and coverage results to SonarQube.

If you want to use JavaScript, intend to use JavaScript or are forced to use JavaScript, get this book and automated the testing of your JavaScript.

Friday, 2 December 2016

Naked Element produce a more efficient client-facing web presence for Bluemoon College


Bluemoon Investigations are a long established company, specialising in covert inquiries for both public and private concerns. From providing evidence to the court in cases of fraud, to tailing cheating spouses across the globe, Bluemoon have had over thirty years experience in getting to the truth. They also run a College training people how to become professional private investigators. They came to Naked Element with a desire to have a better and more efficient client-facing web presence for the College.

Online marketing agency Clark St. James had been working with Will Clayton, Director of Bluemoon, to improve their web search rating, and recommended Naked Element to him for a new website. “Our old website wasn’t branded, slow and not working for us, we needed a whole new design to improve communication, speed and our web presence to potential business.” Our designer Shelley took on the challenge and worked closely with Will to get the result Bluemoon wanted. “The process was easy and straightforward – Shelley made design suggestions, and we approved those we liked, and the build was quick and painless! We’ve received prompt help and support for the small changes we’ve requested since the site went live too. There were some style changes I wanted to make, which Shelley explained could be difficult, but Naked Element worked hard to resolve them and give me what I wanted.”

The result is a responsive website that welcomes potential clients and provides Bluemoons’ service details in a clear and user-friendly way. From Shelley’s point of view the process was mostly plain sailing. “The only challenge I had was super tiny – it was to do with text layout on one page. Most people approach web design like magazine design (which has a fixed size and layout), so they assume you can be pixel perfect. Due to different screen sizes, that’s not always possible, but there are always workarounds so it was a case of trying to get the right balance across all screen sizes.”

“Will can be a bit of a perfectionist, which is really nice actually – he’s not at all picky but is great at noticing detail. Working with him was nothing but a pleasure.” And from Will’s point of view? “I haven’t had to be involved much with Naked Element in all honesty – the whole process has been painless and relatively easy, which is exactly how it should be.”


A class what I wrote

When I was a member of the ACCU their regular publications always appealed for people to write articles for them. There were a few suggested topics, but the one which stuck in my mind was to write about a class you'd written. I often used to wonder about doing this, but it's quite difficult as I rarely wrote a class which was stand alone enough to write about, without having to write about a load of other classes too. Maybe that's a symptom of a design which is not loosely coupled, but I'll leave that for a late night discussion with Kevlin Henney.

Today I wrote such a class, and was very pleased with it as it reduced a lot code which was repeated in a number of methods down to a single line of code - it even manages a resource! Here's the code I started with:


try
{
    final OutputStream os = response.getOutputStream();

    try
    {
        IOUtils.write(JsonTools.toJson(...), os, "UTF-8");        
        response.flushBuffer();
    }
    finally
    {
        os.close();
    }
}
catch (IOException e) 
{
    log.warn(e);
}  

It's Java. It gets an output stream from a HttpServletResponse instance passed into a Spring MVC controller method, writes some JSON to it, flushes the buffer and cleans up. If there's an error and an exception is thrown, the output stream is still cleaned up, the exception is handled and logged. All reasonably simple and straightforward.

With the class that I wrote, it's reduced to:

try
{
    new ServletResponseWriter(response).write(JsonTools.toJson(...));
}
catch (ServletResponseWriterException e) 
{
    log.warn(e);
}

An instance of the class is initialised with the HttpServletResponse instance and a single method called to write the JSON to the output stream. If an error occurs and an exception is thrown, it's handled and logged, just as before.

There is far less code to maintain by using the class instead of repeating the original code.

Let's take a look at the class itself, ServletReponseWriter:

public class ServletResponseWriter
{
    private static final String UTF8 = "UTF-8";
    
    private final ServletResponse response;
    
    public ServletResponseWriter(ServletResponse response)
    {
        this.response = response;
    }
    
    public void write(String data)
    {
        write(data, UTF8);
    }
    
    public void write(String data, String encoding)
    {
        try
        {
            final OutputStream os = response.getOutputStream();

            try
            {
                IOUtils.write(data, os, encoding);                
                response.flushBuffer();
            }
            finally
            {
                os.close();
            }
        }
        catch (IOException e) 
        {
            throw new ServletResponseWriterException(e.getMessage(), e);
        }
    }
}

Let's start at the top and work our way down. The constructor takes a ServletResponse which is an interface implemented by HttpServletResponse containing the getOutputStream method. The ServletResponse is saved within the class as an immutable field.

The first of the write overloads allows the user of the class to write to the output stream using UTF-8 without having to specify it every time. It calls the second overload with the UTF-8 encoding.

The second write overload is much the same as the original code. It gets an output stream from the response and writes the supplied string to it, flushes the buffer and cleans up. If there's an error and an exception is thrown, the output stream is still cleaned up, the exception is handled, translated and re-thrown.

The keen-eyed among you will have noticed that there are two new classes here, not just one. I'm not a fan of Java's checked exceptions. They make maintenance of code more  laborious. So I like to catch them, as I have here, and translate them into an appropriately named runtime exception such as ServletResponseWriterException.

ServletResponseWriter implements the finally for each release pattern of the original code and the common pattern implemented by classes such as Spring's JDBCTemplate which wraps it in a reusable class intended to manage resources for you.

Resource management is vital, but the real advantage here is that the code is more concise, more readable and reusable. And, I've had the chance to write about a class I once wrote.