code

The Dev Bootcamp Rap Recap Repository

Here are all the Dev Bootcamp Rap Recaps I’ve uploaded to date. Thanks in advance for listening and pulling your friends over to your screen of choice so they can listen too.

Look for a new one each weekend here or at my homepage.

WEEK 1 (Full post with lyrics here.)

 

WEEK 2 (Full post with lyrics here.)

 

WEEK 3 (Full post with lyrics here)

 

WEEK 4 (Full post with lyrics here)

 

WEEK 5 (Full post with lyrics here)

 

WEEK 6 (Full post with lyrics here)

 

WEEK 7 (Full post with lyrics here)

Advertisements

Sudokode

Today was all about communication. When my group was good at it, I was having a blast. When we weren’t, I was only able to keep from crying by concentrating on not throwing up. Total emotional roller coaster today.

This will be a shorter post because I am exhausted. Week 1 kicked my butt with boots on, and I’m glad it’s technically over. I say technically because I still plan to spend eight hours onsite tomorrow.

But that’s tomorrow. This is today. And today I learned that if I can’t write a program in plain English, I damn sure can’t code it. I was at a mental standstill until I took a step back and plotted my course. Once I did that, I started working out the solutions to my problems at a good clip, no problems, no stress.

They call it pseudocode. It’s a hybrid between saying what you want a program to do and actually coding it. Line by line, you work through the steps of your program until all you have to do is convert your instructions into syntax. It’s a great habit to get into because it makes it possible to implement a solution in a variety of different languages. I think. Right now I’m only just getting comfortable with the one.

But Ruby is a lot like plain English, so the transition from pseudo to code is quicker. As an example, let’s say I wanted to write code that displays a basic greeting. The idea is to say hi to a person by name. Here’s one way I might pseudocode it:

Define a method called greet_by_name that takes a string as an argument.
Create a variable called name that stores the value of the string.
If the value of the name variable is the same as “Duke Greene,”
Display a greeting that says hello to the value of the name variable and asks how the blogging is going.
Otherwise, display the same greeting and ask how the blog lurking is going.
Close the method.

Call the greet_by_name method on “Duke Greene”.
Call the greet_by_name method on “Jamie McBloglurker”.

At this point, my work is cut out for me. Line by line, I can read through my instructions and translate them directly. If I get stuck, I probably just have to take another look at my pseudo and rewrite it. So my greeting example might code out like this:

def greet_by_name(string)
name = string
if name == "Duke Greene"
puts "Hello, #{name}. How's the blogging going?"
else
puts "Hello, #{name}. How's the lurking going? You know you can comment, right?"
end
end

greet_by_name("Duke Greene")
greet_by_name ("Jamie McBloglurker")

That’s going to return

Hello, Duke Greene. How's the blogging going?
Hello, Jamie McBloglurker. How's the lurking going? You know you can comment, right?

just like I expected it to.

The hardest part about solving today’s challenge wasn’t getting along with the computer. It was getting along with each other. Everyone had their own solution idea and it was a real struggle to agree on one implementation. To make matters worse, we didn’t write any pseudocode until after 5pm. Oops. We could have saved so much time if we hadn’t just plunged in without a map.

Lesson learned. It’s late and I’m tired. Phase 0 boots, they’re not playing when they tell you to pseudocode. Practice the skill now because you’ll definitely need it later.