loading...

Weeknotes - 05 Makers

ruthmoog profile image ruthmoog ・2 min read

Week 5

This week... we learned JavaScript... ermergerd! Learning JS made me realise how much I enjoy the friendliness of Ruby - but I'm convinced that comfort makes it harder to learn a new language.

JavaScript

It's an asynchronous client-side programming language, that does whizzy things in the browser! With Node.js it can be run server-side too. It's become rapidly popular (especially with codebar students!) because of it's use across the stack, it's shiny appeal and, probably, it's quirkiness.

I struggled with the need to write function() all over my code, but learning about how they're used to execute a block of code helped me understand Ruby better.
JS has special functions known as constructors which define properties and methods that will be inherited by their instances. Imagine Donkey as a function. Every instance of a donkey will have the same donkey traits. Say jenny and jack (who are instances of Donkey) are a bit slow when giving rides on the beach, you could use prototype on the Donkey function to add traits, such as the ability to append a jetPack to each and every donkey!

Configuration Files

A pull request I made after doing some investigating into a bug (on a .yml file used by Makers students to lint Ruby code) got accepted this week. I hadn't really understood why YAML files were in the file directory but they were throwing errors when I linted my code and I wanted to know why!

Configuration files are used to configure settings in some programs. These files should be human readable (arguably like all code files) and they can contain key/value pairs to specify configuration settings.

πŸ’‘ you may have seen general purpose config files (especially for open-source software) in .json .xml or .yml files, like:

Editing a configuration file gives you flexibility to use only the parts of a library you want, and to customise how someone else's file runs with your own code, so that you won't be limited to the default settings.

Projects

During the week we wrote FizzBuzz in JS, and had a go at re-crafting the Airport challenge in JS (I had hoped not to revisit this one tbh). We built a thermostat app to control temperature with a neat interface, and the weekend challenge was to create a Bowling scorecard - a two-weekender!

Misc.

🐫 which way does the camel face in camelCase? (this way <--)

πŸ’€ I didn't look after myself too well which meant sleep deprivation and I've learned my lesson the hard way.

πŸŒ” Every now & then one should remember to surf the Space Jam website.

🌈 The Makers summer party was great! I learned some hula-hoop and saw an ashy mining bee!

πŸ‘ Thanks to Oliver for helping me unravel JS at LEGO codebar.

Discussion

pic
Editor guide
Collapse
zepherine2006dev profile image
James Hylins

Another great blog post Ruth!