So after spending a couple of days trying to work through the freeCodeCamp algorithm script Exact Change I came across a rather unexpected issue.
After running around in circles crying foul and threatening my laptop with a number of things that would break the Geneva Convention I had a look around the internet to see if anyone else had experienced the same problem.
It turns out that my anger was misdirected at my laptop (apologies); in fact it should have been aimed at a young man by the name of Gottfried Lebiniz, the inventor of binary.
The problem is that computers speak in the language called binary (a sequence of Zeros and Ones) meaning that numbers have to be stored in a format called “binary floating point”. This format is designed in such a way that it is unable to actually represent the true value of some decimal places.
Confused? Yeah me too, until I chanced across this video, it’s about 30 mins long but if you can get through it, you’ll no longer be preparing to hang your computer’s toes over some burning coals, but quickly googling good old Gottfried in order to put a curse upon him (he died in 1716 just fyi, I guess someone else got to him first). Also you might just learn a thing or two about how binary floating point works.
If you’d like some more information on the floating point format I’d recommend the website http://floating-point-gui.de.
As for the freeCodeCamp’s Exact Change … move over Ben Affleck, Math.round() has just become my new best friend.
So for my current day job I sit at a desk for 7-8 hours a day, and when I get home from that and hit the coding books, I’m back at another desk for 1-2 hours. This ongoing routine of sitting awkwardly has resulted in my back becoming stiffer than a 2×4 plank of wood.
Recently some kind soul who’s name I cannot for the life of me remember now (forgive me mystery angel) passed me a link to this video and it’s been a real boon to both my spine and sanity.
So I thought I would pass on the favour.
I might suggest that you try and find a quiet, discrete spot to perform these exercises, as you may get a funny look or two when flapping your arms up and down or climbing an imaginary ladder.
Good luck and keep climbing!
This is my version of the Free Code Camp Weather App written up on Codepen. I’m pretty happy with how it has turned out. A couple of things I am particularly stoked about are the toggle on the degrees <div> where you can click to change from Farenheight to Celsius; and the minimal design of the app, which I think is suited to its purpose.
One feature I’ve really enjoyed about Free Code Camp is that you can enter into a “contract” with the Camp, where each month you donate a sum of money to a choice of charities until you finish your selected certificate. It’s really rewarding knowing that you are achieving your goals of learning code whilst also giving others less fortunate a leg up in achieving their own dreams. I decided to donate monthly to the http://www.blackgirlscode.com/ school and have been 9 months.
freeCodeCamp is no walk in the park by any means, but if you really push yourself, the rewards that come from completing algorithms and projects is legit.
Give it a shot.
But complete and utter despair at my lack of ability isn’t something that gets me down for (too) long and after a couple of weeks of persevering I was running through the intermediate problems with increasing confidence. As intimidating as stuff like this can be when you first look at it, once you have a basic grasp of the fundamentals, the world is your oyster.
I hate that saying… I don’t even like oysters.
The world is your oyster deep fried mars bar.
A weekly update of what I’m currently reading, watching and listening to.
x = reading
Freakonomics – Steven Levitt and Stephen J. Dubner
This book is a really interesting read that gives you a different perspective on the world and what’s going around you. Their answer to the reasons behind the drop in crime in the USA still feels ridiculous to me.
x = listening
Tourist – U
x = watching
Defines the term ‘slow burn’, but crazy good acting and a super gritty storyline keeps you on-board and clamouring for answers. Ben Mendleson is the GOAT.
x = podcasting
Two comedians that review fast food restaurants in the USA. Thanks to these guys I’m this close to selling everything I own, moving to the USA and living the short, yet enjoyable dream of hyper-obesity.