New Year, New Method

It's officially 2019 and officially the year I will finish my boot camp program and (hopefully) begin working as a software engineer.


So far we have covered: Variables, Methods, Command Line Applications, Booleans, Logic and Conditionals, Looping, Arrays, Iteration, Hashes, Data Structures, Regex, annnnnnd we've started Object Orientation and the fun that goes with it.

In July I didn't know what Ruby was, and only had a vague memory of HTML from a 6th grade computer science class. Learning is amazing.

I'm glad that we started off with variables and methods because building on that has meant repetition and repetition has meant actually remembering what I've learned.

I remember that variables aren't capitalized (that's saved for constants!) and that you need to be concerned with their scope. Global variables can be dangerous because they could be changed accidentally and make for difficult debugging. What you name your variables doesn't technically matter, but it matters for clarity. If you can't keep track of how your information is moving around inside your program, you're gonna have a bad time.

In Ruby, what we'd otherwise call "functions" are called methods. After poking around a bit in other languages, I've come to appreciate the syntactic beauty of Ruby and its simplicity. To create a function, you just put "def function_name(function_argument)". That's it. Then you get to writing out what you want it to do. No extra punctuation to keep track of, just making sure you use the "end" keyword. Like variables, I've learned it's important to clearly name your methods. Clarity is your friend.

These notes aren't impressive or complicated, but they're important to learning Ruby and they're important to me because they came from practice and a desire to learn, and that desire to learn came from genuine curiosity and love.