Thirty Days of JavaScript – Update

I have failed in my challenge to complete Thirty Days of JavaScript in April. I got off to a strong start, completing twelve of the challenges in thirteen days, but then life got in the way – some other things cropped up and it got shuffled down the priority list for what seems to be my ever decreasing amount of free time after the boys have gone to bed.

I enjoyed getting my teeth back into JavaScript, my favourite daily assignment was the video player on day eleven, shown above, where I had to add the video control elements and link them to the JavaScript video player control methods. Not only was it a fun task, but I was able to complete large parts of it myself without needing to watch the course notes to figure out the correct techniques. It really felt like I had made good progress.

The lesson I felt that I struggled with the most was the “Array Cardio” on day four. I was not familiar with the various methods to manipulate data in arrays, so this is one part of the challenge that I will be revisiting when I have completed the other tasks. The reason I decided to tackle the thirty days of JavaScript was to improve my skills – identifying areas that need more work is a key part of this, so am taking it as a positive.

After mentioning in my original post how much I appreciated the debugging setup in VSCode I have not been able to get it working again. I think either Chrome or a VSCode extension has updated. Whilst I was focused on “must complete a task each day” I was not able to fully investigate it. I have a good workflow going with Microsoft’s Edge browser, but it would be easier to have console output straight into VSCode again – something else to investigate.

I have really enjoyed the tasks, and definitely feel like my JavaScript skills are improving, so I am committed to completing the challenge. Whilst I would like to say that I will finish the thirty days of JavaScript in the next few weeks, I need to be realistic and balance it with my other commitments. That said, I am going to aim for three episodes a week, then revisiting the areas I have struggled with There is also a little JavaScript project that I have been meaning to do for a few years, so I will do that as a little end of course assignment.

Godiva Trail Riders Lockdown Challenge

In parallel to the HKT Winter Defiance Handbook challenges I have also been participating in another challenge over this third national lockdown. The local mountain bike club, the Godiva Trail Riders, set up a segment on Strava to see who could ride it the quickest. The route started and finished at the Lady Godiva statue in Broadgate in the city centre and followed the trails parallel to the Kenilworth Road as far as Gibbet Hill, then crossing over from the west side to the east side of the road and following those trails back to Lady Godiva. I regularly ride most of these trails, albeit heading into the city, so thought it would be a fun challenge.

My first ride, a week after the challenge was announced, was an eye opener – I had never seen the trails so muddy, or churned up! The wet winter and lack of anything else to do meant that the woods were getting a lot more traffic that usual, but I was most shocked by the amount of mountain bike tyre trails. I struggled through the mud to finish the ride, but decided to wait until the trails were a lot drier before tackling it again. Time: 1:19:21.

By the end of February the weather had improved, so I had another attempt at the lockdown challenge. The trails had not dried as much as I had expected, and I was not really in the right headspace, but I did manage to pull five minutes out of the time. Time: 1:14:43.

By this point I could see that plenty of other people had put in sub hour times, and that became my new target – I was pretty convinced that it was doable with drier trails, and less stops. I also had a think about bikes – both of my attempts so far had been on my Orange Four, a full suspension trail bike, which I have set up with quite aggressive tyres. I had chosen it due to the tyres, but really did not need the rear suspension and associated extra weight. The ideal set up would have been my Orange Clockwork Evo hardtail trail bike, but fitted with grippier tyres from the Four, however that was too much hassle. It did not escape me that the record had been set on a simple single speed bike, albeit ridden by somebody a lot fitter than I am!

I had planned to do my last attempt on the Clockwork Evo on 28th March – the last day of the “stay at home” lockdown. However due to a mechanical fail the previous weekend the Clockwork Evo was out of action, so I would be back on the full suspension bike. I was also getting over a cold. And it was windy. You can probably guess from the long list of excuses that I did not quite meet my target…

I started off too hard, I was already at my max heart rate before I got to the first off road section. I knew then that I was not going to be putting in a good time, so decided to ride smart, keep my heart rate down, and keep the wheels turning. By the time I got to the trails I was riding well, the trails were drying, but still boggy in places. Going up Gibbet Hill I was keeping pace with runners on the pavement, despite taking the windier muddier route, although they dropped me on the final kick. As I emerged from the woods at the top of the hill, I saw a couple of other riders drop into the Wainbody trail, one of my favourites in Coventry. I paused to check the elapsed time (less than expected) and create some space, which was completely unnecessary as they were long gone. This trail had been particularly muddy on my previous attempt, but was drying nicely, although someone had ridden a horse down it, so the surface was churned up. Who rides a horse on a bridleway in a city? The run from Wainbody Woods to the A45 felt like a big slog, but I kept going, at one point getting passed at speed by an e-biker. I had ridden the next section of trails along the War Memorial Park the weekend previously, so knew they were not too muddy, and buoyed by this I picked up speed, then stepped up another gear on the final leg from Spencer Park to Lady Godiva. As I pulled up in Broadgate I took a selfie with Lady Godiva (main picture for this post) and checked the elapsed time since setting off from home and thought it would be close to the hour mark for the challenge segment. I had not really left much on the table and struggled to ride up the hill to get home, especially given the strong headwind.

When I made it home there were two boys waiting for me with their bike gear on. I had told Owen that we could go for a ride when I got back, and Henry did not want to be left out! So I got back on my bike and did a lap of the woods with Owen, whilst Jen took Henry for a ride on his balance bike, meeting up with us in the woods. Henry’s riding is coming on leaps and bounds, to the point I think he may be ready for a pedal bike before the end of the year. When I had a chance to check my time for the earlier ride, I saw I had improved my time on the challenge segment, but was still over the hour mark. Given the wind and my cold I was not disappointed. Time: 1:06:30.

I am still convinced that I have a sub-hour time in me, when I am at full health and the trails are drier, however as lockdown eases I am going to try and get out in my van and ride some other trails, ideally with my friends. However I will have another shot at the challenge segment later in the year, maybe once the Five Guys restaurant opens up on Broadgate, which will definitely be an incentive waiting for me at the finish line!

HKT Winter Defiance Handbook

Five months of challenges to stay motivated, inspire others, have some fun and f*ck winter

Over the lockdown in 2020 I started listening to the HKT Podcast and really enjoyed the mountain bike chat, with a side helping of current affairs. Davi, the host, predicted that this past winter was going to be rubbish for a lot of people, with potential lockdowns on top of the usual winter weather – he was not wrong! So on World Mental Health Day he released a list of 250 challenges, to give the “podcast family” something to focus on over winter and keep them motivated. This sounded like a great idea to me, so I downloaded it as soon as it was available.

The challenges were split into the following groups:

  • Riding challenges (50) – I must admit that I took a look at the list of tricks and feats of endurance and thought “no chance”. However, without specifically trying, as I thought it was way out of reach, I did manage to complete the “ride 100 miles in November” challenge. The only other riding challenge I completed was to “organise a ride with an old friend” – Partho and I rode at Cannock Chase the day after the challenge started. I have known Partho for twenty years, so he must count as an old friend! We both also rode with Ali for my birthday and I have known him for even longer!
  • Fitness challenges (50) – again, I was not so keen on these, but thought that some of the smaller push up challenges would be doable – I made 10, but struggled to get to 25 although I did not do enough practice. I had also intended to dig out my trainers and go for a run to check off some of the shorter running goals, but with limited free time, the bike always won out.
  • Random challenges (50) – there were all sorts of challenges, from litter picking to writing a poem and even getting a tattoo! The challenge to “bake a cake from scratch” prompted me to bake Jen a carrot cake for her birthday – Jen makes the best cakes, so I felt pressure to deliver! The cake was a success, not as good as one of Jen’s, but definitely edible.
  • Podcasts to listen to (25) – I am a newcomer to podcasts, so liked the idea of recommendations for others to check out. I enjoyed the few that I listened to from the list, and have more saved for future listening, whilst working on bike in the garage or driving my van.
  • Books to read (25) – the only books I seem to read are bedtime stories to the boys! I started reading The War of Art by Steven Pressfield Amazon affiliate link but have not finished it yet. I really should as there is a podcast episode to go with it.
  • Movie night (50, spilt between action sports and mainstream movies) – this was the group where I was able to tick off the most challenges, often helped by the boys. Even with Despicable Me 1, 2 and 3 being one challenge I could have ticked that off multiple times, as the boys, especially Henry love the minions. I watched a few films with Jen and also some new riding films, from which I added my favourite music from the soundtrack to my MTB music playlist on Apple Music.

The challenge I am proudest of is “spend fifty hours learning a language”, I chose PHP, and specifically the Laravel framework. I doubt a programming language was the idea of this challenge, but the real goal was taking the time to learn a complex subject. A decent chunk of the fifty hours was spent making a web application, running on my Mac through Docker, to track my progress on the challenges. I find that I learn best when I am working on a project and an updatable list of challenges seemed like an ideal project to learn on.

In the end I found that I had not completed as many challenges as I would have hoped – only 15 out of the 250, but although the challenge has officially finished, I will still refer back to the lists of moves/podcasts/books when I am looking for inspiration for something to watch/listen to/read. The main thing though was that it gave me something to focus on over the winter, other than work or homeschooling.

Thirty Days of JavaScript

JavaScript, alongside HTML and CSS is one of the three legs of web development. HTML defines the content, CSS the styling/layout and JavaScript defines the behaviour of a webpage. Recently I have realised that my web development tripod is a bit wonky. I studied JavaScript at university, I have barely used it since, only occasionally in frameworks, such as Bootstrap. I also used Flash ActionScript, which is a similar language, in my day job developing automotive touch screen interfaces, but even that was ten years ago. Instead I have kept all the logic of my websites server side, using PHP to control the behaviour, which is still a valid way of doing things, but I should not be relying on it.

JavaScript has evolved since I used it – frameworks such, as Vue and React, have become the mainstay, the “ES6” has come along – replacing “var” with “let” or “const”, and you can even run it server side with Node.js. JSON (JavaScript Object Notation) also seems to have largely replaced XML. Basically JavaScript has matured and seems to be here to stay! Therefore I decided it was about time brush up my skills. Before I tackle frameworks I wanted to get get the basics right, and refresh my vanilla JavaScript knowledge. Whilst looking for inspiration I came across 30 days of JavaScript, which seemed to be pitched at my level – knowing the basics, but needing to improve. I learn best by working on projects, so the thought of thirty small projects to work on really appealed to me.

You may be able to tell from recent posts (HKT Winter Defiance Handbook and Godiva Trail Riders Lockdown Challenge) that I like to set myself a challenge. So as April has thirty days, and there are thirty exercises, I am going to try to get them all done in April! I am aiming for one per day, but I may have to catch up/get ahead of myself depending on other commitments. I will post again at the end of the month, with my progress, what I have learned and which exercises have been my favourite.

I have completed the first challenge, the JavaScript drum kit at the top of the page. The content and structure were cloned from GitHub and the challenge/tutorial was write the JavaScript to capture the keyboard presses and assign them to the corresponding sound file, then play it and add the animation. It was definitely at the right sort of level for me, I needed to look up a couple of things to understand what they were doing, but learning is the main goal behind this challenge. Possibly the hardest thing was getting my Visual Studio Code set up for debugging JavaScript – switching to Chrome, after reading this guide, seemed to do the job. Hopefully over the course of the month I will be able to see if I can get debugging working in Firefox or even Edge.