The second week of the Bootcamp is complete!
We focused a lot more on code and less on computational thinking (the coaches drilled it into our heads!).
We started the week with some tasks to apply our knowledge on DOMs (Document Object Models), using mainly document.querySelector()
and document.getElementById(id)
. One of the tasks included changing a value incrementally when a button is clicked.
Next we learned about setInterval()
, setTimeout()
, addEventListener
and other events.
And then we learned about fetch()
.
I was completely amazed by APIs (application programming interfaces) and their potential. As one of my coaches said, APIs are efficiency powerhouses and upon further research, I found that some companies have risen mainly depending on APIs.
For example, Uber depends on APIs from Twilio and Google for its foundations - one could argue that Uber would not have risen to such heights without depending on APIs. If you're unaware of what APIs are, please watch this video.
We used Kanye West Quotes API to make a website that generates random quotes (which were hilarious, to be honest, 🤣).
All of us were made to do a Myers-Briggs on 16Personalities - anyone care to guess what my result was?
We then discussed in groups of four, the strengths and weaknesses our personalities bring and how we can ensure personalities don't clash. Then we moved on to the importance of cognitive diversity and the many benefits it brings to a working environment.
This week we had Jeff Watkins, the Chief Engineer at AND digital talk to us about the importance of clean code and refactoring your code. Jeff mentioned that in the early days of the Tech industry, coders were judged by how many lines of code they were able to write and not by the quality of their code.
That idea that a coder was judged by quantity and not quality was counterintuitive, and since then, code quality is now what is being encouraged - refactoring code is a way of producing clean code.
Some of the key points that were mentioned include:
- 'Don't make me infer through logic' - don't write code where the logic is not obvious
- 'Don't repeat yourself' - don't write the same code more than twice (a general rule)
- 'Don't reuse temporary variables' - reduces the chances of bugs when code is refactored
Jeff also recommended Martin Fowler's book, Refactoring: Improving the Design of Existing Code, which I hope to purchase and read soon!
You know what's next, every Friday is Hackathon Friday!
This task was called the 'Fetch Hackathon' - we were given a list of APIs and it required us to use all the knowledge we had gained thus far, and put together a mini-project in a few hours.
The APIs that we had to choose from
Naturally, being a long-time Pokémon fan I had to choose the Pokémon API and thought to make some sort of Pokédex using the data the API provided.
My coding partner and I made a plan, discussed what we wanted from the Pokédex, and used the rest of our time coding away. I am enjoying working in different teams and pair programming is beneficial in multiple ways. These include:
Being forced to use Git/GitHub to send code to each other (remote Bootcamp)
Fresh pair of eyes can spot issues on code much quicker
With our limited time, we decided to focus on functionality rather than design and were able to produce a functioning, but very basic Pokédex.
As you probably can see though, we had to refresh every time we wanted to input a new Pokémon and some other issues associated with the Pokédex.
However, we were very happy with what we made given the limited time that we had. We were able to apply everything that we had learned and with the help of some Googling, we were able to get to where we wanted!
However, I did think, if I had more time to work on this mini-project, what could I produce?
I spent most of the Friday evening and Saturday working on my version of the project and that in itself needs a post - watch this space!
In the meantime, here's a sneak peek!
And that was my week in a nutshell!
If you're still reading, thank you so much, I hope to use this blog to post and share useful information I gain! I would love to connect with other developers to see what they're learning and learn from them - please connect with me on the following:
Twitter: @codewithmohamed
Github: github.com/codewithmohamed
LinkedIn: Mohamed Mohamud
Email: m.mohamud1992@gmail.com