Deeper look into TDD and OOP; Week 6 and 7

Week 6

So in my previous post, I was talking about how I had a working solution yet again, right? This is partially true as my algorithm and whatnot worked, but I still wasn’t organizing my methods correctly. I knew this because I wasn’t able to chain my methods. For example, I was unable to do something like:


I knew what I had to do, but because of my lack of familiarity with the Ruby language, I didn’t know my limits. I found that I was subconsciously limiting Ruby, and that was the trouble I had with my code.

In week 6, my meet consisted of how to build a test for something such as this image blur, and how it proves to be useful for the future. At this point , I just just finished writing tests for the places app (, using factorygirl and such as dummy-data. At its most simplest form, you are basically stating what you expect and it compares the data to an actual variable, formula, etc. and if they match, it passes, if not, it fails.

I felt horribly bad because I felt as if I was drawing blanks that week. I wasn’t linking up to what he was saying when it comes to methods and objects, how certain methods aren’t actually returning anything, etc. So as HW for week 7, he told me to write up complete tests for image blur 2 and 3. And on top of that, he gave me hints towards what steps to take next, which were to get values from my methods, and that I should not have any code which repeats.

Week 7

Moving forward, I built my tests first. Building the test first saved my time because even if the test fails, it shows me what it’s actually doing. It was also easier to run than running my whole code to have a complete output print out. The test analyzes the code side by side with the expected and actual, and therefore more easier to read and identify where something is going wrong.

My mentor is dope though, every time I’ve e-mailed him, he’s responded within 24 hours with hints and not answers. I understand how this is an important part of the process as those hardships are what keep what you learned in mind; or at least, that’s how I feel. I definitely touched bases with him more often this week outside of our weekly meets than usual, but it helped out a lot. I told him that to me, “those e-mails were like save points, where I can analyze my next step depending on what my next move is and such” and proved to be super useful.

In his e-mails he gave me hints and I pondered on those hints for quite some time until I realized what I was doing wrong. Because I don’t want to give the answer away, I’ll just say that I had an issue with classes and what was allowed to be in/happen within classes.

I e-mailed him, and he e-mailed me back and said that I was really getting there, and everything looks great. I asked him about a testing issue I had, and there are still some things that I have to learn. In todays meet, he clarified much of the testing issues that I had, which dealt with accessors, and their background ability to become methods. He didn’t want me to remember it that way, and he prefered me to remember I was getting a value of something by using an accessor and the syntax just happens to be that I call on it as a method (blur.accessor).

So after a grueling 2-3 weeks of really hammering out this project, I can say that I have a much deeper understanding of how methods should be isolated and what they should return, as well as ways to reiterate something that has been modified through a method already. I also learned how the philosophy of test driven development will help save me time and write better code. I was able go through the bunny slopes of computer science, and although I fell multiple times, I feel I can take the same route without doing so anymore, and will be ready for the harder slopes that follow.

I took the rest of todays meet to ask questions, which primarily pertained to stuff that I’m going through. Because of all the computer science stuff, he helped me out with identifying the differences between Ruby and Rails, and how they work together to achieve the things we look to achieve.

I also asked about whether or not by the end of the program, I could build something like an eCommerce store which stores a database of 1000 products, my question on security and such, and he said that by the end of the program, I should definitely have a deep enough understanding of how to go about tackling that project. This wasn’t a project for myself, but a family friend was asking whether or not I could help tackle this project, so I decided to inquire.

Then I asked about what type of interview questions I should expect to encounter. I’ve done my own research and found many companies give a challenge of some sort, so I was asking about this in particular, and he said the term for it is “whiteboarding”, and it’s actually a bad way to evaluate a person, to see whether or not they will be a good developer. Many of the problems asked to be solved are not really part of daily use, and more-so as he said “well, I had to learn this in school, so you should know how as well”. He talked about how that’s why we go through these coding challenges, because they are often the ones that are asked, and that although there is a debate and a shift to change such philosophies on interviewing, it still greatly exists.

Lastly, I asked about meetups, and saw that I could probably attend this Tech Startup meet because 1. it was soon, and 2. I wanted something more friendly to jump into. The spectrum of members attending ranged from entrepreneurs, company owners, and such, to web devs, product designers, and such. The answer he gave, which stuck out to me is to just go and that “just as important as knowing what you like are finding out the things you don’t like”, meaning that I can learn much about the type of environment and people whom I feel I can work with, or not.

Week 8 will be the last week before we actually decide what is best for me, to join in on a team and build a chess program, or whether I should focus on a project that is more tailored for what I would need. I still prefer to go forward with a team project just to have that in my pocket in case I can’t freelance, but for now, we’re going back to the web development side of things, and kicking the computer science stuff back for background processing. I looked through the lessons and there seems to be tons of features that we will tack on to this, so I’m pretty excited.

I still plan to go back to the image blur project to see what cool things I could do, perhaps refactor, or even add a new method to do something else. It’ll be important to keep that stuff fresh in the head because it’s not the last we’ve seen, as there will be at least one more coding challenge, the linked list.

Until next time,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s