General

Posts that cover general aspects of programming.

#! code Logo

Creating Presentations In Markdown With Marp

15th May 2022 - 14 minutes read time

Marp or Markdown Presentation Ecosystem is a collection of tools that allows the generation of presentations of different formats from a markdown template. The tools are written in JavaScript and have a number of options that allow presentations of different styles and formats.

This tools stood out to me as it has syntax highlighting built in and allows the creation of presentations using markdown. The presentation can also be altered using standard CSS styles.

I've spent many hours fiddling with presentations in Keynote and Google Slides, so I wanted something that would be simple to use and generate the presentation files I needed.

#! code Logo

7 Common Mistakes To Avoid When Writing Tests

13th February 2022 - 21 minutes read time

I was talking with a fellow programmer the other day about a poor test that we were reviewing and we got onto the subject of what makes a poor test. The test in question had a reliance on a previous test being run, and the problem we encountered was that on some systems the dependent test was run after this test, which caused it to fail.

This also caused some headaches in local development as it couldn't be run in isolation. We had to ensure that both tests were run, in the correct order.

After fixing the tests so that they could be run independently I created a list of some common problems that programmers might come across when writing tests. These rules can be applied to most coding test, not just unit tests or behavioural tests.

#! code Logo

A Look Back At My MSc Computer Science Degree Thesis

16th January 2022 - 29 minutes read time

2022 marks 20 years since I started my MSc in computer science degree at the University of Aberystwyth. So, I thought I would take a look back at my thesis for the degree and see how far I have come since then.

The title of my thesis was "Using The Java3D API To Visualise Molecular Compounds". I used a system called Java3D to create ball and stick models of molecules. A second requirement was to allow the application to compare two molecules together.

The course I did was known as a conversion course and was designed to compress the three years of the undergraduate computer science degree into a single year, along with an introduction to Java programming bootcamp the summer before the course started. This was a year of hard work with 12 hour days and weekends of constant study. The drop out rate for the course was about 80%, with most of that being in the first few weeks.

#! code Logo

Managing Website Rescue Projects, From Audit To Onboarding

14th November 2021 - 40 minutes read time

I have been a web developer for quite a few years, and one constant that is an unfortunate story in the industry is the rescue project. This is a web project that has been mismanaged by an agency or developer in some way so that the site is at a critical point. Either, the site is unable to launch or it has already been launched and suffers from serious issues. Projects in this state are caused by a variety of factors, and can be challenging and difficult to turn around.

Some agencies, quite understandably, won't go near rescue projects as they can be extremely tricky to manage. The client will have already invested money in getting the site in the first place, so spending money to fix the site can be a little painful for them. This is especially the case for small business sites, clubs or charities without any extra funds.

#! code Logo

Vissles LP85 Ultra-Slim Optical-Mechanical Keyboard: A Review

4th November 2021 - 9 minutes read time

Vissles recently sent me their new LP85 keyboard to review, and I've spent a few weeks giving the keyboard a go. I have already reviewed the V84 mechanical keyboard from Vissles just a few months ago and that keyboard has been my daily driver ever since. I was therefore very interested in testing out this new product. The LP85 is a low profile keyboard with optical switches that come in a sleek aluminium chassis. Instead of the usual mechanical switches that make a physical connection, optical switches break a beam of infrared light to activate the key press. As there is no physical switch being clicked this means that optical switches last longer than mechanical ones.

#! code Logo

Vissles V84 Wireless Mechanical Keyboard: A Review

16th June 2021 - 13 minutes read time

I recently acquired a Vissles V84 mechanical keyboard and I have spent some time giving it a go. Vissles was founded in 2018 and have a selection of decent looking accessories and devices including wireless chargers, headphones and monitors. The V84 is the second of keyboard that Vissles have created, iterating on the previous design.

The keyboard itself has 84 keys and is a 75% ANSI layout, this is also called tenkeyless as it is a normal keyboard without the keypad. This keyboard moves a few of the keys around in order to fill the entire surface of the board with keys, rather than separate out the arrow and home/end keys. The compact design gives the keyboard a slim look, but it doesn't feel cramped or small to use.

#! code Logo

Failed Web Predictions And How Not To Talk To Web Developers

6th June 2021 - 11 minutes read time

Picture the scene, it's 2010, you're a young web developer working in a satellite office of a fast paced digital agency. The work is interesting, but normally quite stressful as there are tight deadlines and high expectations on delivering good work. There is a lot going on so you tend to finish one website and jump onto the next. The company you work for has a history of firing people and making people redundant, especially in the satellite office you work at. Low morale, a culture of blame, and absolutely zero investment in people means that there is very little enthusiasm for the work from anyone. The economy is still recovering from the collapse of the banking system from a couple of years before. You have a young family at home and so you'll put up with a lot of poor working conditions to ensure a pay cheque every month.

#! code Logo

Keychron K2 Wireless Mechanical Keyboard: A Review

13th July 2020 - 9 minutes read time

I (like a lot of other people) recently started to work at home a lot more, and with a permanent desk setup at home I wanted a decent keyboard to work with. My work machine is a MacBook Pro 2018 and I dislike the keyboard quite a lot. It feels 'poppy', has some interesting key placements (the up and down arrows in particular), has no escape key or function keys at all.

#! code Logo

Wrap Around Increments

21st June 2020 - 6 minutes read time

Something I've been writing long hand for a number of years is wrap around increments. This is essentially adding to a value that has an upper limit, and wrapping back to 0 when that max value is reached. This can be done with an if statement.

#! code Logo

Creating A Chatbot Agent With Dialogflow And Kommunicate

19th April 2020 - 14 minutes read time

Having a chat feature on your website (commonly called 'live chat') is useful when helping your users overcome any difficulties they are having. You can pop up a little chat window in the page and ask if they need any help finding what they need. This can be especially useful on large commerce sites where users might get stuck looking for things.

The addition of a chatbot also allows you to automatically answer some of more common questions. For example, if a user asks where they can find the delivery and returns policy then a chatbot can automatically respond with a response. These rules can get more complicated, but it depends on what you instruct the bot to answer to.