Friday, September 26, 2014

Learning Blog, Week 1


   Week one is in the books. Before I get into this weeks experience I think I should probably take a few lines to explain my learning project. For this assignment I chose to learn Ruby. Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. At least that is what the internet tells me. To be honest I don’t know what most of that means. What I do know, is that I’ve wanted to learn some programming for quite awhile, and I never seem to have the determination to actually get started. I figured that this learning experience blog project would be the perfect excuse to muster some gumption and get going. I talked to some programmer friends of mine and they recommended Ruby (which I hear is a dynamic, reflective, object-oriented, general-purpose programming language). The second stage of the selection process was to find a way to learn Ruby. I chose two tutorials, one of them from Lynda.com and the other from Tutsplus.com.  Both of them were designed for novice programmers who know nothing about Ruby. My desire was to do 1 lesson from each tutorial once a week as well as chatting after those tutorials with a friend of mine who has some experience programming.  I chose two different tutorials because I learn best when I get multiple explanations and then put what I learned into practice several times before I let it soak in.  My end goal is to create a website with Ruby.  This is the framework, which I am guessing will be tweaked and rethought a couple times over the next two months. But this is my launching point.

    Week 1- Today I went through the first tutorials on Lynda.com and Tutsplus.com. So far so good. I was able to download all the necessary tools I will need to learn Ruby. There are three important programs to have in order to access Ruby.  First is Ruby itself, which comes standard on all Macs (which I have).  Second is Terminal(or iTerm) which also is already installed on any Mac in the utilities.  The third program I needed to download.  It is called TextMate.

    My first learning experience began once I had these three programs loaded and ready to go. I was nervous I have to admit.  I had all the normal anxieties I usually have when starting something new and unknown.  I have tried to learn programming before, and have always come away confused and frustrated.  This was the first time however that I’d tried an online tutorial.

    In regards to the process of my learning, I noticed a couple of things occurring while I followed along with the voice on the tutorial. First, I became aware of my working memory. There are a lot of new terms and procedures that I have never seen before.  These came pretty quickly through the tutorial and I had to sort of feel them out and stash them away.  I forgot most of what I saw the first time through.   I’m sure I’ll need to know what they mean later, but I’m thinking that as a novice course the instructor will probably define them again as they reappear.  If not, being a video I can pause and skip backward and forward if need be.   Also, I should have plenty of time to make a glossary of terms if I feel the need for one.  So, I felt new information come into my mind and was able to work with that information while I worked through the tutorial.  We didn’t learn anything very complicated during the first tutorial (the Lynda tutorial).  It was nice to have the same tools as the instructor and to follow along, doing the same thing he was doing.   A few times I missed a letter or a capitalization and I got an error as I mimicked his actions and had to stop down.  I was able to pause the tutorial and look at his code and then try again.  A few times I found myself branching out a little bit.  The first functions we performed were simple math equations.  He had us use Ruby to add 1+1.  Before he was done explaining I was trying 30+100, 3*55, 9-4, and 45/100 just to get a few reps on the new concept.  They all came back properly calculated.  He then introduced us to the IRB (interactive Ruby) and using TextMate to program long sequences (though we didn't do anything long).

    The second tutorial, Tutsplus, was harder to follow.  The instructor seemed to base all his explanations on PhP comparisons.  Since I don’t know PhP it was very difficult to follow along.  He went over much of the same material that the Lynda instructor covered, but also went a bit further and quite a bit faster.  I felt pretty frustrated by the end of this tutorial.  I was supposed to have my first real bit of programming done and mine wasn’t cooperating.  I had to watch through a few more times before I saw what I was doing wrong (not to mention the trial and error. Oh the trial and error!) In the end, after I realized what I was supposed to be doing, I went a bit further on my own.  I tweaked the simple equation program into what I called a Magic Number generator.  The instructor showed us how to set it up add two numbers and then multiply the sum to the power of the sum.  He showed us how to ask the user to give us two numbers and then how to make the program perform the equations.  I went further and had the program ask for the month you were born and the last digit of your birth year (though these numbers could be anything) and ran them through a slightly more complex series of equations.  In the end it spits out your magic number. (no real magic, sorry). And while this program is utterly useless as a bit of programming, I found it very useful to see how some terms and concepts I had learned in the tutorial worked.  And just for fun I add a part for folks who are familiar with the works of Lewis Carroll.


    There is still a lot of information that I felt slip away from my mind.  I can't remember what strings are, or what constitutes a method or how to check which is which.  I think that the volume of new ideas is going to be the biggest challenge.  I have a long way to go before I reach any sort of semblance of automaticity.

    The next morning I woke up from a dream in which I was programming an interactive NFL/College football site.  On the site the user could make predictions prior to the game and then receive information and stats as the game was played.  In the dream I was struggling with some code. I realized I didn’t know what any of it meant, and couldn’t hold all the information in my mind long enough to see how it fit together.  Everything was happening too fast.  With my mind engaged, I couldn’t go back to sleep.  So I got up and made some eggs.  While I was cooking I thought about my learning experience from the day before.  I began to think about ways I could use what I’d learned to do different things.  I thought, instead of making a number appear I wonder if there is a way I could use the same ideas to create a digital magic 8 ball.  Could I use an equation to create a randomly selected phrase appear?  Could I use the number of characters that are input somehow to power the equation?  I didn’t know the answer, but I went through the mental steps as best I could.  I’m eager to try when next I sit down to learn.