Guest Post

Caitlin Moran, Girls in Coding & the Future Workforce

caitlin-moran-girls-who-code

This is a guest post from Sinead Bunting, Marketing Director at Monster and organiser of tomorrow evening’s Girls in Coding: How they will be critical to female roles in the future workforce event, being held at Skills Matter. The event is free though tickets are limited, so book now!


I used to be a bit of a blogger, and enjoyed nothing more, than regularly posting a good cathartic piece of my mind at the industry blog; Digitalrecruiting.co.uk. But I stopped contributing about three years ago. Having moved media/solution side, I felt my thoughts wouldn’t be viewed as being as objective as perhaps they once were. Also, maybe nothing got me fired up enough to bother putting my tuppence worth out there in the blogosphere. Yet here I am today, fired up and ready to go!

So, What Happened?

In July last year I went to see Caitlin Moran launch her new book, How to Build a Girl in Union Chapel, Islington, London. I was pretty excited; I’m a big fan of Caitlin and I was also about to go on holiday to France, so was looking forward to a bit of downtime and a break from all things work.

That night however, rather un-expectantly, Caitlin said something that got me thinking all about work!

She said something that was so fundamentally important to the future of the workforce that I immediately thought to myself, ‘something has to be done about this’ and Monster and its mission of helping folks ‘Find Better’ in their career and its strength in connecting tech talent, has some role to play here…

This is what Caitlin said:

“If 90% of coders are men, developing and owning the language of the future, women won’t be part of the conversation”

monster-event-twitter-post

This hit me like a bolt of lightning – well perhaps a slight exaggeration – but it did really hit home. I was worried. Whilst there is still some way to go in terms of true equality, whether it’s in equal pay or the low percentage of women in senior management positions, females have made some significant strides in the UK workforce in recent years. This has been to the benefit of all concerned with reports showing that companies who have more women on their boards and in their senior management teams aren’t just ‘doing the right thing’, they are generating greater profit. The prospect of this gender equality progress unravelling, due to females not being sufficiently skilled in tech to converse in a world where all things tech prevail, is hugely concerning. It’s also the wrong direction to go in for a stronger, fairer and more successful society. As Hilary Clinton stated last month at a conference for women in Silicon Valley; “We’re going backward in a field that is supposed to be all about moving forward”.

Girls in Coding and the Future Workforce

Intuitively, the solution seems pretty clear; we need to show girls that a career in coding can be hugely interesting, rewarding and that coding and technology are fundamental skillsets required for any industry or role they hope to pursue in the future. Additionally we need to enable girls to learn these skills and also up-skill females (and males) who are currently in the workforce. So, by no means an easy or simple task. This is further compounded by worrying retention rates of women current working in tech, who are leaving the industry due to a chauvinist culture and female-unfriendly working environment. If we are building a pipeline of female tech talent but it goes into an environment that’s not accessible or sustainable, we have a ‘leaky bucket’ effect, which does not solve issues in the long-term.

The good news is that contrary to popular opinion, girls and women actually quite like technology with recent reports showing that there are now more women than men gamers in the UK. Having spoken to numerous women in and around the area of technology and ‘women in tech’ in last month or so, there is some fantastic work and initiatives already being done it this area. There is such an appetite and passion to help girls and women get into technology that the future is incredibly promising.

Next Steps – Working Together

Our goal at Monster is to raise awareness of the issue amongst talent acquisition and HR professionals and to show both current and future candidates the importance of coding skills in current and future careers.

Our first step towards raising awareness is to host a Monster #TechTalent event on April the 16th at Skills Matter eXchange, London: Girls in Coding: How they will be critical to female roles in the future workforce.

The event will consist of a series of interactive panel discussions with leading figures in this space discussing issues around the long, mid and shorter term areas and possible solutions to help girls get into coding and women into technology.

The event is open to all parties, and of course both genders.

The following panellists have been confirmed:

  • Amali de Alwis, CEO and Executive Board, Code First: Girls
  • Ruth Nicholls, Managing Director, Young Rewired State
  • Amelia Humfress, Founder and CEO, Steer
  • Anne-Marie Imafidon, Founder, STEMettes
  • Marily Nika, Co-ambassador, London Geekettes
  • Debbie Forster, UK Managing Director, CDI Apps for Good
  • Gina Jackson, Managing Director, Next Gen Skills Academy
  • Graeme Goulden, Senior Product Lead, Monster Worldwide
  • Alexa Glick, Global Diversity Program Manager, Microsoft
  • Wendy Devolder, CEO, Skills Matter

Role Models

Additionally, what we know is that ‘people buy people’ and girls are hugely influenced by roles models and their peer group. Monster is working with the London Met Film School to film a selection of women in tech, as role models to show girls just how rewarding and successful a career in and around technology can be. We will be distributing this content online with the aim of influencing not only girls but their parents who as gatekeepers are hugely influential when it comes to subject and career choice.

Plug the Digital skills Gap & Fuel Economic Growth

It’s estimated that the UK requires an additional 745,000 workers with digital skills by 2017and 77% of firms within Tech City in London say they could grow faster if they had access to better skilled digital staff. All too many studies highlight that in tech, its men who are leading the way in this crucial aspect of the workforce. To ensure we meet this tech talent challenge, plug the digital skills gap, as well as develop tech that meets the needs and requirements of both genders, this needs to change.

Having spoken to many industry figures and women in technology in the last few months, it’s fantastic to know that there are many great initiatives and passionate professionals out there wanting to and already making a difference in this key area. We’re looking forward to marking the start of our Girls In Coding campaign with our upcoming event and believe that, by raising further awareness of the issue amongst the HR and talent acquisition community, we can work collaboratively to really make a difference to the amount of girls and women considering coding as an exciting and rewarding career option.

Watch this space…..


For more information on the Girls in Coding: How they will be critical to female roles in the future workforce event, or to register, click here.

 

Unit Testing Lambda Expressions & Streams

Richard Warburton

This is a guest post from Richard Warburton, who has worked as a developer across varied areas including Statistical Analytics, Static Analysis, Compilers and Networking. He is a leader in the London Java Community and runs OpenJDK Hackdays.

Richard also teaches a course on modern development with Java 8 at Skills Matter, alongside Jim Gough & Raoul-Gabriel Urma. At the end of this course, you will be ready to use Java 8 on your day job and be familiar with the cutting edge programming approaches which allow you to write more flexible and concise code. You can find out more information about the course here, or head to the Skills Matter page to book your place now!


Usually, when writing a unit test you call a method in your test code that gets called in your application. Given some inputs and possibly test doubles, you call these methods to test a certain behavior happening and then specify the changes you expect to result from this behavior.

Lambda expressions pose a slightly different challenge when unit testing code. Because they don’t have a name, it’s impossible to directly call them in your test code. You could choose to copy the body of the lambda expression into your test and then test that copy, but this approach has the unfortunate side effect of not actually testing the behavior of your implementation. If you change the implementation code, your test will still pass even though the implementation is performing a different task.

There are two viable solutions to this problem. The first is to view the lambda expression as a block of code within its surrounding method. If you take this approach, you should be testing the behavior of the surrounding method, not the lambda expression itself.

Here’s an example method for converting a list of strings into their uppercase equivalents.

public static List allToUpperCase(List words) {
    return words.stream()
                .map(string -> string.toUpperCase())
                .collect(Collectors.toList());
}

The only thing that the lambda expression in this body of code does is directly call a core Java method. It’s really not worth the effort of testing this lambda expression as an independent unit of code at all, since the behavior is so simple.

If I were to unit test this code, I would focus on the behavior of the method. For example, here is a test that if there are multiple words in the stream, they are all converted to their uppercase equivalents.

@Test
public void multipleWordsToUppercase() {
    List input = Arrays.asList("a", "b", "hello");
    List result = allToUpperCase(input);
    assertEquals(asList("A", "B", "HELLO"), result);
}

Sometimes you want to use a lambda expression that exhibits complex functionality. Perhaps it has a number of corner cases or a role involving calculating a highly important function in your domain. You really want to test for behavior specific to that body of code, but it’s in a lambda expression and you’ve got no way of referencing it.

As an example problem, let’s look at a method that is slightly more complex than converting a list of strings to uppercase. Instead, we’ll be converting the first character of a string to uppercase and leaving the rest as is. If we were to write this using streams and lambda expressions, we might write something like the following.

public static List uppercaseFirstChar(List words) {
    return words.stream()
                .map(value -> {
                    char firstChar = value.charAt(0);
    firstChar = toUpperCase(firstChar);
                    return firstChar + value.substring(1);
                })
                .collect(Collectors.toList());
}

Should we want to test this, we’d need to fire in a list and test the output for every single
example we wanted to test. The test below provides an example of how cumbersome this
approach becomes. Don’t worry—there is a solution!

@Test
public void twoLetterStringConvertedToUppercaseLambdas() {
    List input = Arrays.asList("ab");
    List result = uppercaseFirstChar(input);
    assertEquals(Arrays.asList("Ab"), result);
}

Don’t use a lambda expression! I know that might appear to be strange advice in an article about lambda expressions, but square pegs don’t fit into round holes very well. Having accepted this, we’re bound to ask how we can still unit test our code and have the benefit of lambda-enabled libraries.

Do use method references. Any method that would have been written as a lambda expression can also be written as a normal method and then directly referenced elsewhere in code using method references. In the code below I’ve refactored out the lambda expression into its own method. This is then used by the main method, which deals with converting the list of strings.

public static List uppercaseFirstChar(List words) {
    return words.stream()
                .map(Testing::firstToUppercase)
                .collect(Collectors.toList());
}

public static String firstToUppercase(String value) {
    char firstChar = value.charAt(0);
    firstChar = toUpperCase(firstChar);
    return firstChar + value.substring(1);
}

Having extracted the method that actually performs string processing, we can cover all the corner cases by testing that method on its own. The same test case in its new, simplified form is shown here:

@Test
public void twoLetterStringConvertedToUppercase() {
    String input = "ab";
    String result = firstToUppercase(input);
    assertEquals("Ab", result);
}

The key takeaway here is that if you want to unit test a lambda expression of serious complexity, extract it to a regular method first. You can then use method references to treat it like a first-class function.


There’s a buzz in the air… or is it on your arm?

Can you feel it yet?

Apple Watch

This is a guest post by Boisy Pitre, Mobile Visionary and lead iOS developer at Affectiva. You can find him on Twitter here, and see his previous guest posts here.


It is the imminent release of Apple’s latest gadget-wonder… the long awaited Apple Watch. Announced last year, the wearable device is due to hit stores in a few months; its launch, sale price, and subsequent success or failure is the basis for immense speculation in and around the techno news websites and journals.

Last Fall’s announcement of the eagerly anticipated watch was true to Apple’s style of introducing something new: bold yet gentle, glamorous yet modest, confident yet demure. Touted as something truly personal to the wearer, the Apple Watch wooed and wowed the event’s audience and the wider general public. It was easy to see that this wasn’t just another technology device trying to act like a watch, but perhaps the very redefinition of the watch itself.

Predictably, it didn’t take long after the announcement for the questions to follow. How briskly will it sell? Who will buy it? And who wears a watch anymore?

What’s Old is New Again

The concept of wearable devices isn’t necessarily new; it’s been around for some time and has existed in various incarnations. Thinking back 15 years ago, I can distinctly remember attending PalmSource (yes, I’m talking about the Palm Pilot for those of you who can remember) in 2000, and witnessing an attendee walking around the show floor with Palm devices strapped to his forearms. It was reminiscent of Locutus of Borg in an episode of Star Trek: The Next Generation.

Thankfully, we’ve come a bit farther in style today. From arm bands with iPods to smartwatches like the Pebble and offerings from Samsung, you don’t have to look like a cyborg to have technology up close and personal to your body. And all indications are that with its myriad of colors, band styles, and body types, the Apple Watch will be as much of a fashion statement as a technology wearable.

Of course, as developers we are the spark and fuel that moves the pistons of Apple’s engines. Seeking new opportunities and pathways for our work is a constant motivation. So what does the Apple Watch mean for the developer?

A Totally New Platform

Just like the iPhone spurred the creation of the amazing “app economy” in 2008 with the release of the native iPhone SDK, the debut of the Apple Watch brings a whole new set of creative potential to the table. Although it has some utility on its own as a timepiece, where the Apple Watch really shines is its integration with the iPhone itself. The Apple Watch is really complete when it can pair up with an iPhone. The iPhone acts as a deliverer of both content and apps to the watch via Bluetooth. In essence, your Apple Watch becomes an extensible and conveniently accessible accessory to your iPhone.

This means if you have an iOS app already written, you can extend it to bring its functionality to the Apple Watch (assuming that there is some aspect of your app that makes sense appearing on someone’s wrist). Your iPhone is the “carrier” of the smarts that your Apple Watch will use; and in doing so, you have whole new ways to extend the usefulness of your iOS apps.

Think Different

A watch is not a phone, and a phone is not a watch. We carry our phones in our pockets and on our hips, but our watches adorn our wrists. As something that you will wear on your arm, the Apple Watch becomes a very convenient, immediate, and intimate place to view and interact with data. It opens up a whole new world of ideas for apps.

Not only is the Apple Watch as a platform more physically accessible, but its screen is considerably smaller in size than any previous iOS device. Given that the largest Apple Watch is 42mm tall (the other option is an even smaller 38mm in height), you have to carefully think about your app idea, and how it will “fit” onto such a targeted space.

The smaller design space of the Apple Watch, along with the intimacy and complete accessibility that it offers, is certain to inspire creative app extensions. It’s going to be interesting to see where developers will lay stake in this brave new world.

And It Will Get Better

Like all technology, the Apple Watch is bound to get “smarter” over subsequent revisions and generations. The perceived limitation of its tethering to the iPhone will become less and less pronounced, eventually to the point where Apple Watch may become a truly stand-alone, Dick Tracy type futuristic device. Think full audio and video interaction… a complete communications experience right on your wrist.

Challenges certainly remain to get there. Increased processing horsepower and capacity required to drive more features will require more battery life, and that will challenge Apple in interesting ways. There’s not a lot of room to put larger and larger batteries on your wrist.

Are You Ready?

Wearables are about to get a lot more popular, and the apps that will empower them are going to be more and more in demand. If you’re an iOS developer with an existing app, I encourage you to look at how your app might be able to augment your user’s experience on their wrist with their Apple Watch. Not all apps may be able to find that crossover, but many will, and with it will come the opportunity for you to become more familiar and close to your users.


Swift London Are you interested in iOS development? Swift London is a group for iOS and OS X developers of all abilities who want to learn how to use it, who meet regularly at Skills Matter. You can join them for their next meetup on Tuesday 17 February – full details here.

The organisers of the Swift London Meetup group have also put together an impressive line-up for a two-day Swift Summit which is taking place in London on 21 & 22 March. The programme includes speakers such as Chris Eidhof, Daniel Steinberg & Ayaka Nonaka. See the full agenda here.

What is our community expecting for 2015?

2015 is well and truly upon us, and it came along quick! After a busy, event-filled but ultimately fun 2014, we asked a range of experts from across the Skills Matter community what their predictions are for the year ahead. From social networks to BDD, here’s what they thought…


Cate Huston

Social Networks: Cate Huston

“These are less predictions and more hopes.

There’s some great insight in Coder’s at Work from Douglas Crockford where he talks about the social systems that existed around timesharing and how those went away when we moved to the “personal” computer. But social is normal – to be human is to be social – so I’d like to see social networking move away from contrived ideas of what social is, and more to enabling normal, human, social, interaction.

I think we will see fewer new social networks and more integrations and innovations on top of existing ones. See the way that Discourse is doing logging in as an example, they accept almost anything. It’s kind of ridiculous that so many people are building their own versions of identity. Android has had intents for a long time, but the advent of extensions in iOS 8 is a good sign for this.

The other thing I’d like to see is social networks taking harassment seriously. In 2014 we saw some truly appalling treatment of women online, taking place on social networks. Death threats, rape threats, revenge porn… I’d like to think by the end of 2015 we’ll have found better ways to balance freedom of speech and the freedom to threaten and harass.”

Cate Huston is a developer and entrepreneur focused on mobile. She’s lived and worked in the UK, Australia, Canada, China and the United States, as an engineer at Google, an Extreme Blue intern at IBM, and a ski instructor. Cate speaks internationally on mobile development and her writing has been published on sites as varied as Lifehacker, The Eloquent Woman and Model View Culture. She blogs at Accidentally in Code and is @catehstn on Twitter.


Daniel Steinberg

iOS Development: Daniel Steinberg

“At the end of 2014 developers had to decide whether to transition to Swift or to adopt the new techniques and APIs introduced in iOS 8. Apple will certainly give us more widgets, services, and APIs to play with in June, but I think this year will be about exploring what it means to write idiomatic code in Swift. This is a year where we’ll figure out the design patterns and best practices for coding in Swift. This will also be the year where Apple revises the language and the libraries to work more naturally together.”

Daniel Steinberg has been writing and teaching about programming the iPad and iPhone since the SDK’s first appeared in beta and Mac OS X for many years before. He has presented at Apple’s Worldwide Developer Conference, MacWorld, MacHack, CocoaConf, and other Mac and iOS developer conferences. Daniel also teaches the iOS 8 development and Swift Kickstart: Introducing the programming language and platform fundamentals course at Skills Matter.


christina ohanian

BDD: Christina Ohanian

“Behaviour Driven Development (BDD) isn’t a new concept in the software development industry, but it certainly has come a long way since the early days. BDD has proven (certainly for me) that behaviours and examples are very useful and powerful conversation starters to describe and talk about how our solutions should be experienced by people. It allows development teams the chance to discover ways to build (and test) their systems, collaboratively, with the ultimate outcome that we have built the right solution for our users where the system behaves as it should.

However, it hasn’t all been plain sailing. BDD has suffered from a number of misconceptions throughout the last few years, and I feel it is starting to lose its core meaning and purpose. One pertinent example is something I witness a lot: an unfortunate misunderstanding that confuses the practice of BDD with the practice of automating tests. The two are very different and distinct, and their role should be regarded as complementary – if practiced correctly. This topic has been at the core of many recent conversations. I hear the following questions often: what do we mean when we say BDD? How does it relate to test automation? Hang on – I thought BDD was just another way of writing test scripts? These are questions, which if interpreted incorrectly, can lead to harmful misconceptions. Ironically, they have the potential to lead, ultimately, to the very thing BDD was created to avoid – too much emphasis on the right way to build, instead of actually building the right thing for users.

My prediction for 2015, or perhaps my aspiration for the year ahead, is that we need to look at how we tackle this misconception, so we can get back to the essence of what BDD is. This is critical, as we continuously grow in today’s digital world: a world where new behaviours are created at light speed, shaped by powerful forces like mobile.

So bring on 2015, and let’s get back to the fundamentals of good BDD practice.”

Christina Ohanian is a member of the team at The App Business heading up the Quality Assurance team, where she manages and coaches a talented and motivated group of mobile testers. You can find her on Twitter, check out her website, or see her talk at the upcoming London Tester Gathering Workshops in June.


Evelina Gabasova

Machine Learning: Evelina Gabasova

“I think that machine learning and data science in general will become even more pervasive than it is now, and the area of its applications will grow even further. For example, I?m a big fan of emerging data-driven journalism or computational social science. Another trend which will get more important over the next year is making machine learning easier to apply and accessible to non-experts. Unfortunately, applying machine learning to data is still far from straightforward. Typically there are many steps we need to take before we can even start playing with clever machine learning algorithms ? like sourcing and pre-processing data. I love how in F#, data can effectively become a part of the programming language itself and make this part of the process much more fun.”

Evelina Gabasova is a PhD student in statistical genomics at Cambridge University in the MRC Biostatistics Unit. You can find her on Twitter, check out her blog, or see her talk at this years F# eXchange where she will be discussing how she uses F# for data processing in her research.

First class functions in Java 8

Raoul-Gabriel Urma

This is a guest post from Raoul-Gabriel Urma, a PhD candidate in Computer Science at the University of Cambridge. His research centers on programming languages and software engineering. Raoul has written over 10 peer-reviewed articles and given over 20 technical talks at international conferences. He has worked for large companies such as Google, eBay, Oracle, and Goldman Sachs, as well as for several startup projects – and has recently written a book on Java 8 in Action: Lambdas, Streams and functional-style programming by Manning.

Raoul also teaches a course on modern development with Java 8 at Skills Matter, alongside Jim Gough & Richard Warburton. At the end of this course, you will be ready to use Java 8 on your day job and be familiar with the cutting edge programming approaches which allow you to write more flexible and concise code. You can find out more information about the course here, or head to the Skills Matter page to book your place now!


Java 8 adds functions as a new form of value. What does this mean? Let’s look at a simple example.

Suppose you want to filter all the hidden files in a directory. You need to start writing a method that given a File will tell you whether it is hidden or not. Thankfully there’s such a method inside the File class called isHidden. It can be viewed as a function that takes a File and returns a boolean.

However, to use it you need to wrap it into a FileFilter object that you then pass to the File.listFiles method as follows:

File[] hiddenFiles = new File(".").listFiles(new FileFilter() {
   public boolean accept(File file) {
      return file.isHidden();
   }
});

Ouch, that’s pretty obscure! We already have a function isHidden that we could use, why do we have to wrap it up in a verbose FileFilter object?

In Java 8 you can rewrite that code as follows:

File[] hiddenFiles = new File(".").listFiles(File:: isHidden);

Wow! Isn’t that cool? We already have the function isHidden available so we just “pass” it to the listFiles method. Our code now reads closer to the problem statement.

The use of File::isHidden is a rather special case of a new feature called method references in Java 8. Given that methods contain code (the executable body of a method), then using methods as values is like passing code around.

I hope this brief post has sparked some interest in Java 8! You can find a longer explanation in this 10min animated video we put together: