DEV Community

Scott Wears
Scott Wears

Posted on

2 1

2 for 1, Closure sale

Alt Text

So this blogpost is going to cover two weeks of bootcamp (I was naughty and forgot to write last week).

Over the past 2 weeks of boot camp we have been covering the FUNdamental's of JavaScript, we have covered some lovely topics that have been pretty easy to get my head around but we have also covered some really abstract concepts that have been a lot harder to understand.

The main theme of the past two weeks have been Test Driven Development (TDD), the idea that we use testing to help us build up the complexity of our code while testing its functionality, this is a concept I've never looked into or thought about before, at fist it seemed pointless, normally I've only thought about just writing code and using console logs to make sure I got to where I was going (or trying to go), its also been an interesting experience in that we expect it to fail first so we can learn and fix it/build up its complexity after (RED, GREEN, Refactor).

the past couple of weeks we have also covered recursions and closure, Now I thought recursion was some mystical thing that you had to be a Sheldon cooper to understand but I was wrong, recursion at its basic level is pretty understandable, Closure how ever is a whole other story, I still don't feel like I understand closure fully, I know how to use it and I understand why it works and I hope for now that is enough.

OOP's

At the end of this week we covered OOP (Object Orientated Programming), this is a type of programming I love and I feel like I have a good handle on it, take a bike for example.

In OOP we have a bike, the bike is basic and has what we would expect, it has a seat, it has wheels and brakes, and it has a frame. the bike is out object.

class Bike{
    constructor(frame, wheels, seat, brakes, handleBars){
        this.frame = frame;
        this.wheels = wheels
        etc etc....
    }
}
Enter fullscreen mode Exit fullscreen mode

Now using Classes. we can take this bike and use it as the base for other objects, we can extent bike into a "roads bike" this road bike is use for riding on roads so lets give it a bottle and some better handle bars, that might look something like this

class RoadBike extends Bike{
    constructor(waterBottle, roadHandleBars){
        super();
        this.waterBottle = waterBottle;
        this.roadHandleBars = roadHandleBars
        etc etc....
    }
}
Enter fullscreen mode Exit fullscreen mode

I love this way of programming, using inheritance I can make more bikes with out having to define what a bike is every time.

So Now onto next week

Next week is making me nervous, on Monday we have "revision day", working alone we have to spend the day doing a solo sprint. This sprint will cover everything we have worked on in the last few weeks. I'm worried that I haven't picked everything up, or that I need to go back and add something to my "Big list of learning".

I mean its a good thing to identify holes in my knowledge just the name "Revision Day" makes it sound scary.

I'm still really enjoying the boot camp and I'm starting to come around to pair programming, its a little awkward at first but its awesome to have someone to work with and to bounce ideas off. I look forward to working with more of my peers in the future.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay