Friday, September 25, 2015

Back to blogging

  Heeeello, everyone!

  It has been a couple of weeks since my last post. I have been somewhat busier than usual at work, but I am back to normal now. I am planning on posting consistently again. Realistically, it does not take long to make a blog post, but I have not been coding as much, and it felt like I did not have much to share.

  Anyway, in the last weeks, I did work through Chapters 39 to 44 of Shaw's "Learn Ruby the Hard Way".

  Chapters 38 through 40 covered hashes, classes and modules, and Chapter 41 introduced the concept of "object oriented programming".

  I must say Chapter 41 had me really stuck, considering that I was just blowing though the material previously. When I was trying to wrap my head around the exercise code, it really felt like I accidentally skipped a couple chapters. This is  --> the code <-- I am having difficulty with. I understand what it does, I just don't 100% understand HOW it does it. You can see my #comments in the code where I am having difficulty. What I ended up doing is just submitting to the idea that I do not understand it all the way, and moving to the next chapter. I will give it some time, work through some more material, and come back to this equipped with more knowledge to hopefully understand it better.

  Chapter 42 reinforced the differences between classes, subclasses and objects. After the brutality of the previous chapter, the code seemed very easy, and I think I understood it pretty well.

  Chapter 43 was fairly difficult but really cool. Mr Shaw goes through a process of analyzing and designing "object oriented" code, which basically has you building code from "top to bottom". He walks through his thought process of building code from scratch from an idea to the final code.

  Chapter 44 describes the difference between class inheritance and composition, and briefly touches on when one is preferred over the other.

  Chapter 45 is all about building another game, and that is what I am working on right now.  I have the game designed already, and I am writing small snippets of code, and testing everything to make sure it works how I want it to, before I start building the actual game code. It will be a small dungeon-crawl style game, where you fight monsters, improve your character to face the boss in the end of the game. There are some things I want the game to do, that I have NO idea how to do it in code, so I am planning on learning a lot during this project!

  This post has gotten a little too long since I have last two weeks of "not posting" to catch up on. Thanks for following my blog, and thanks for reading!

  I have some exciting things planned this weekend, so I will talk about that in my next blog in a couple of days, and I will talk through some code examples that I am working on for the game I am working on.

  Have a great weekend, everyone!

 - Andrei
 

  

No comments:

Post a Comment