WeAreDevelopers CODE100 Congress Data Challenge

Writing code is creative. There are lots of ways to solve any given problem. Many aspects of programming are shared across all languages. Processing data, performing calculations, producing some kind of output – each language will allow a developer to perform these functions. And yet each programming language has its own strenghts and weaknesses.

I am most comfortable writing in PHP. It’s the language behind most websites on the internet, it’s easy to get started with and it’s relatively forgiving. I’ve been building websites and web-based software in PHP for nearl 20 years, but I’m not an expert. As a ‘full stack’ designger and developer I work on both the front-end and the back-end of websites for which I often do all the visual design work as well as things like copywriting and SEO. I appreciate and enjoy the variety of work I undertake for my clients, who recognise the value I bring to their projects as someone who can handle a diverse range of technical, design and content requirements.

However, it’s sometimes nice to know that I’m still just about keeping up, when it comes to writing code!

WeAreDevelopers World Congress 2024

Earlier in the year I had the opportunity to visit Berlin, to attend the WeAreDevelopers World Congress. I had a great time, and attended lots of talks across a wide range of topics. It was also an opportunity to meet representitives from lots of software companies and get to know their offerings a little better.

WeAreDevelopers World Congress 2024

One of the events held as part of the Congress is the final of the CODE100 – Europe’s Ultimate Coding Competition. This sees developers go head to head, writing code to solve specific problems. First to solve the problem is the winner. Some of the competition is tackled as individuals, other rounds in pairs. It’s not exactly a thrilling spectator sport (unless you’re really into live coding), but it was interesting to see how different developers solve the same problems, which languages were used and their methodology.

WeAreDevelopers Live

WeAreDevelopers run online events throughout the year, focussing on particular aspects of software development. A few weeks ago they ran a session covering some areas of web development. As part of these live events they have been providing opprtunities to tackle CODE100 challenges. In this instance the task was to process a bunch of JSON data, which contains details of the World Congress talks.

The requirement was to analyse the data:

  • sessions: the amount of overall sessions
  • streamedSessions: the amount of sessions that were streamed (that have a stream provider)
  • moreThanOneSpeaker: the amount of sessions that had more than one speaker
  • types: an array of all the types of sessions without repeats
  • longestTitle: the longest session title as a string
  • averageTitleLength: the average title length

You can see the rest of requirements of the challenge here.

Congress Data Challenge

I chose to write my solution in PHP, my favoured language. I probably could’ve solved the problem in JavaScript too, but I’m more confortable handling and processing data in PHP.

Here’s the code I wrote to solve the problem:

I didn’t really spend any time verifying my results, I was fairly confident the results were correct, but didn’t have any confidence my solution would actually win the competition. But it did! My solution was picked at random from a hat (or at least a randomiser). I wasn’t necessarily the quickest, nor the most succinct, and definitely not the most cutting-edge. I always aim for simple, robust solutions which are easy to debug.

Coding is Accessible and Fun!

For me, the interest in programming and writing code has always been about solving problems and increasing efficiency. Analysing this data could have easily been done manually, but it would’ve taken more time than it took to write the code above.

Connecting with WeAreDevelopers over the past few months has been fantastic. I’ve had my interest in development re-ignited and really enjoyed joining the online events, as well as the in-person Congress. So much so that I’ve jsut booked my tickets for next year!

Find out more about WeAreDevelopers by visiting their website.

Jack Barber, freelance web developer based in Whitby, UK

Written By

I'm a freelance web developer based in Whitby, UK. I built my first website using GeoCities, and learned to write HTML and CSS using Notepad. Web technology has come a long way since then, as have my web development skills!

These days I love helping my clients make the most of the internet. I provide design, development, marketing and IT support services, forming long-term partnerships with my clients.

Connect With Me

Posted in PHP, WeAreDevelopersTagged , ,