Another Day, Another Web Page.

My first Hackathon.

Mary Wenzel
2 min readNov 16, 2020

Tell us about something you learned this week.

There was a lot of focus this week on OOP (Object Oriented Programming) and I think I have a fairly good grasp on it so far. This week I learned about something called a Hackathon. A hackathon is when you get together with a few fellow web devs or coders and you are presented with a few different prompts (challenges or web pages you have to build), you and your team then only have the day to finish the challenge. I really looking forward to being able to go out and pull some allnighters with some friends when the world isn’t exploding.

What are the pros and cons of immutability?

The text-book definition of mutability is liable or subject to change or alteration.

In programming, we use the word to mean objects whose state is allowed to change over time. An immutable value is the exact opposite — after it has been created, it can never change.

How can you achieve immutability in your own code?

When creating variables you could use “const” but using that prevents any changes from being made to that variable. Instead of const you can use “let” When using let it allows changes to be made to that variable.

What are Divide and Conquer algorithms?

A basic Divide and Conquer algorithm uses the following three steps to solve a problem.

Divide: break the given problem into subproblems of the same type.

Conquer: repeatedly solve these subproblems.

Combine: combine the answers.

Explain the difference between mutable and immutable objects.

A mutable object is something that can be changed after its created while an immutable object can not.

What are the three laws of algorithm recursion?

These algorithms all have to follow three rules:

  1. A recursive algorithm must have a base case.
  • A base case is the condition that allows the algorithm to stop recursing. A base case is typically a problem that is small enough to solve directly

2. A recursive algorithm must change its state and move toward the base case.

  • A change of state means that some of the data that is being used is modified.

3. A recursive algorithm must call itself, recursively.

--

--