3.14 Tdd, practice and test prep(!!!)

7.5 + 1.5 Tomorrow is our first test at Launch Academy. I’m super nervous, but if I were able to look at myself from the outside I would definitely be fine. I ran through all of the homework for the week and I redid a ‘marathon’ assignment from today that is supposed to closely mimic the info on the test. I’m hopeful that I’ll be feeling more certain about my chances of success tomorrow at 12:15!

Today we mostly recapped the stuff from the week. There were one or two new things I learned though.

I learned that defining a method like this

def writer = (attribute)
end
def writer
end

is much different than this

def writer(attribute)
end

The difference seems to be that the top one is really two different methods with the same name(!). The first one will be run whenever an argument is present, and the second one will be called when an argument is not given. That seems to be a good way to avoid argument missing errors.

I also started using the shovel operator instead of push. I don’t love the ruby-specificness of it, but it is shorter and I should try to write ruby that looks like ruby.

I’ll try to come up with more notes and a weekly recap sometime this weekend. In the meantime I need to get some sleep!

Tell me what you think.

This site uses Akismet to reduce spam. Learn how your comment data is processed.