One of the things I love about Dev Bootcamp is it makes me feel like a kid again. I feel that overwhelming urge to learn as much as I can and immerse myself in the material until I learn everything (which will never happen but it’s fun to try). I remember when I was a kid feeling the same way whether it was reading or math or history or science and just devouring books and spending my free time trying to learn stuff. School and growing up made that harder to find again but it’s definitely coming back now. I was worried that because before Dev Bootcamp I was having a hard time putting in long hours coding, I might have a hard time at first but thankfully my willpower and motivation is coming back better than ever and I have no problems not checking email, Facebook, Twitter, etc all day which is good because I am (a bit) addicted. Before I came here, I figured I’d leave at 6 with my brain exhausted and needing a break before I came back the next day. That thankfully isn’t happening. Now I can stay till 10 pm or so (with a break or two in between) and still feel focused, motivated and energized to learn as much about Ruby as I can.
I think it’s a combination of things. One is learning Ruby on Rails (and everything that goes with it) is my number one priority right now and the reason I came here was because I’m motivated to learn it. As I mentioned before, the environment helps a lot with having a dedicated place with great design and computers, awesome people around me also learning and helping each other out with problems. Only having two months is also something that helps as it’s a constant reminder that we need to learn all we can in this time before the opportunity is lost. Being around people also gives me that extra incentive to push myself to my limits, to learn Ruby the best I can and not wanting to get left behind encourages me to try hard at learning as much as possible to keep up. For all those reasons, I feel like there’s this invisible force within me pushing me on to keep working and keep learning. And I forgot the biggest reason: it’s fun! There’s a huge difference with listening to boring lectures (when we have lectures it’s interesting and dynamic) and getting a chance to solve problems with people while learning to code which I love.
One of the things we’ve been learning is how to first create code that solves the problem and then refactor it to make it simpler, DRY and ideally shorter. Christian was helping me write each step so that it made total sense with words that clearly described what it was doing, making new variables for each new thing and not chaining as we first figure out what each step is doing. It’s important to look at the big picture first and not get stuck in the details. By first simplifying each problem into small tasks we can do in a function that does ONE thing, it’s easier to understand and make steps into solving the problem. After that, we then looked at substituting defined variables into the actual steps if it was simpler to look at and looked at not repeating any code among other things.
Shereef was talking about questions to ask when refactoring: what is the cost of reading, writing and memory for each step? Also think about what the code is going to be used for and how it will be changed in the future (maybe by others) so you can optimize it for future use. For example, think about whether someone might be sending massive amounts of data into your program and how you can make your code use less memory in order to reduce the cost to the servers. It’s difficult at first but I love to simplify so it’s a great challenge. Another thing was to look at the rspec tests for each step and try to solve each single test without putting a ton of code and then checking as it makes it easier to fix each thing as it comes up instead of having to find every problem in your code. Looking forward to learning more about rspec and how it works in the next couple days not to mention months.
Refreshed and ready for today, can’t wait to get started!