A photo of the Minecraft loading page

Week 7

Howdy! I hope you've all had a good week!


Work on the Code Enigma theme has progressed really well since my last update:

  • I've refactored a good portion of code out of the theme file into pre-processing functions in a custom module
  • I'm beginning to establish a clear boundary between theme and application: templates shouldn't know about database field names
  • I have the theme installed and working on the development client dashboard environment

There's still a fair bit to do before we can open source it but for now, it's usable internally across other Code Enigma services.

I've also been working on the client dashboard itself: we're using SimpleSAMLphp, configured as a service provider so that users can log into it using our identity services. With the exception of a few small issues regarding access to our new auto-scaling cluster build, it has all been pretty straightforward... implementing SAML based identity and service providers is something I've done plenty of times before... we should be rolling it all out to production soon.

In the ears

I listened to a super episode of the Corecursive Podcast in which Adam Gordon Bell interviews the wonderful, inspirational Kate Gregory. Kate speaks about her battle with terminal cancer and the five pieces of advice she initially wrote down to pass onto her children however she realised the advice had wider relevance for every software developer. It's a captivating listen, I definitely recommend it and there's a happy ending too!

PHP Enumerations

The RFC for enumerations in PHP landed this week and I'm very excited about it!

Enums enable the modelling technique of "make invalid states unrepresentable," which leads to more robust code with less need for exhaustive testing.

The enum keyword will land in PHP8.1 later this year and we'll be able to replace all those annoying occurrences of if (!in_array($value, ['each', 'peach', 'pear', 'plum']) { // Get outta here! }; It's almost C++11!

There's a call for help to add support for enum in the symfony/var-dumper and symfony/var-exporter components, I thought it might be a good opportunity to pair up and perhaps even stream it on Twitch... if you're interested, let me know!

Git commit message of the Week

A screenshot of a Git commit message: Same as before, with feeling

More from the developer cabin

A photo of Code Enigma developer, Chris.

Written by

Chris Maiden

Web Developer