Showing posts with label Michael Hartl Ruby on Rails. Show all posts
Showing posts with label Michael Hartl Ruby on Rails. Show all posts

Friday, August 21, 2015

Month 1: Looking Back

I started this in the strangest way.  I am a gamer and in mid July, I read an article on Kotaku about the "Exceptional Beauty of Doom 3's Source Code".  I did not really read the article deeply but have since read it many times.  The article (re)flipped a switch and  reminded me that I was very interested in code in high school (around 1995).  I even worked a whole semester on a project in BASIC under one of the math teachers at my high school.

I did not pursue coding because I was already in the process of deciding to hate math at that point.  When I got to college I saw that one would have to take many math courses to do anything with computers and so I turned from it pretty quickly.  Everyone was pretty surprised because I was a computer geek from age 13 on and worked pretty consistently with them after I bought my first one in the summer of 1993.  I think tying computers and coding to math makes some sense, but we are also losing a lot of great people to this marriage.  Coding has math in it, but it is also about logic, creativity, and critical thinking.  I also did not code then because the software was so expensive.  I always wanted to learn Pascal, but it was $100s of dollars and I never could muster up that much desire.  Now, it is all more or less free which is so amazing!

At any rate, this article reminded me of coding and so I googled it a few days later and came to a kids coding website with inspiring interviews from Bill Gates, Facebook guy, and a host of others.  I was intrigued!  Shortly thereafter, I discovered CodeAcademy and since then I have been off and running.  Let's take stock of where we are now:

The Good:
(1) I love it!  Learning new commands and solving mysteries you previously did not understand is so refreshing.  I am no master, but I have come so far in a month and have really loved learning every bit I have.  Coding is super fun!  (Yesterday I worked on understanding ARGV in Ruby!)

(2) I am working on it every day, because I like it!  I wondered when I first started how long I would do this for.  I do not dread it and I do not do it because I want to "finish what I started".  I look forward to learning, finding new resources and gaining confidence and skill.  Over the past month I have done something with coding every single day.

(3) I have found many (too many?) resources ranging from Pine and Shaw's books to TreeHouse, Code Academy, and Code Newbie.  I have made friends and acquaintances and have come to really love the community.  It is welcoming and inspiring!

The Bad:
(1) I need to focus fire.  I am doing too many things at once.  Currently I am working on 3 books, TreeHouse, and Code Academy.  This is probably too many.

(2) I have nothing to show for my study yet outside of a basic shell of a Ruby text adventure game.

(3) I am still a bit confused by GitHub and how to share work and I do harbor a fear that I will never actually be able to create things on my own!

Where is this going?  I have no way of telling if coding will be my next career move, but right now I am absolutely in love with it and can't get enough of it!  I am definitely open to pursuing options in coding, but before I commit to that, I want to prove to myself that I can write a piece of code that works and is useful.  As always, thanks for reading!

Friday, August 14, 2015

Git Immersion Tutorial

So I broke down and purchased Josh Kemp's "No Degree, No Problem" (more on that later) and one of the early lessons I kind of skipped over was a brief tutorial on the version control utility "Git".  As I understand it, this is simply a way to track the changes to your programs as well as collaborate and share your work through GitHub where folks can presumable browse and edit your work without destroying all past versions of it.

Git is one of those things you just have to learn about and it does make some basic sense.  The tricky part about it is that you have to work on a terminal to use it and it works best with its own Terminal (GitBash).  Does everything need its own terminal, really?  However, I was able to work through the first 12 or 13 lessons as well as establish my own SSH key with only mild frustration and a few searches of Stack Overflow.

Do I totally understand Git and how it works?  Hell no.  However, I have a broad sense of how it works and have now worked through it twice on a basic level, the first bring when I did the early portions of Hartl's tutorial.  I do plan to finish that, but I am working on a few earlier steps first because it has a bit of a reputation as a beast of a tutorial.

Are you on GitHub? I would love to see some work and check out how people use it if you are!

Total hours into Programming: 62 (3 today)
My Text game: 2 hours, 107 lines

Progress on Shaw's Learning Ruby the Hard Way: Finished Exercise 1-5

TreeHouse (228 Points, 4 Badges) 
Code Academy Points: 568
Code Academy Badges: 60
Code Academy Skills Finished: 2 (Make a Website, Ruby)
Progress on Hartl's Tutorial Ready to start Chapter 3! 

Resources Finished:
Josh Kemp's No Degree, No Problem 8/14/2015
Chris Pine's Learn to Program 8/9/2015 

Monday, August 3, 2015

Toy_app Done!

I finished chapter 2 of Hartl's book which is a great feeling!  Everything worked and I even had the chance to correct a few mistakes.  I also learned from a few different Stack Overflow questions and am really beginning to feel like I could perhaps do this unguided one day.  Whereas I was feeling pretty defeated a couple days ago, making slow and steady progress through the Ruby on Rails tutorial book has been rewarding.

That said, chapter 3 is really where it begins.  The earlier chapters essentially say that you will not pick much up in terms of deep understanding jut by doing them, but they do give you some momentum.  I am also getting more and more comfortable with git, bitbucket, and heroku.  I even got my app to display and work on an actual browser!

Python has gotten a little more sticky, but I have made it to around 40% through that Code Academy tutorial.  I have gotten to the dictionary portion of the tutorials and am trying to work through how to print the key with the values from two separate dictionaries in one output.

I also notices that I have made it over 40 hours on this journey so far.  Going from no knowledge at all to a decent foundation in basics in Ruby and Python as well as a solid foundation in Ruby on Rails is a pretty good start.  While I love the idea of working as a programmer, coder, or developer I am not relentlessly and desperately pushing for that at this point.  First things first, I want to be literate enough to code some of my own small programs.

Total hours into Programming: 41 (6 today)
Progress on Hartl's Tutorial Ready to start Chapter 3! 
Code Academy Points: 447
Code Academy Badges: 50
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Back to Rails

Last night I redid the early part of the Hartl Ruby on Rails tutorial and I managed to get it work correctly this time.  I am still working very slowly through it, but I am trying to take solid notes and get a grasp for what is going on underneath the scaffolding features of rails.  While scaffolding provides a real time saver and gets an app off the ground very quickly, it can be very confusing if you have never done such a thing before.  On the plus side Hartl does an amazing job of explaining in both diagrams and text what is happening when a person visits your app and how controllers, routes, and applications work together to store their information and display the correct HTML.  I am cautiously optimistic going forward!

Total hours into Programming: 39 (4 today)
Progress on Hartl's Tutorial 2.2.2
Code Academy Points: 440
Code Academy Badges: 50
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Sunday, August 2, 2015

Learning How to Start Over

Last night I got on a roll in Hartl's Ruby on Rails Tutorial.  Everything seemed to be going very smoothly (outside of Heroku issues).  I fairly quickly generated the app and the database needed for the toy_app.  Then, sadly, things went awry.  My database was supposed to include two prompts, one for username and one for email.  However, it included 4 - one for email, one for string, one for username, and another for string.  I must have mistyped or misunderstood something along the way.  I tried to overwrite the database using the --force command I discovered on Stack Overflow.  I could not get this to work.  So, finally, I learned how to delete the app, its git repository, and delete it from Heroku.  While this was not the most desired outcome, I did learn a new skill of sorts.  Now, to start again!

Total hours into Programming: 35 (5 today)
Progress on Hartl's Tutorial 2.0.0 (got the 2.2.1, but am starting this section over)
Code Academy Points: 403
Code Academy Badges: 47
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Saturday, August 1, 2015

Python and Rails

Today I worked with Python in the early section of the Code Academy site.  I am finding that to be a kind of review of what I did in Ruby and it is satisfying to understand much of it without having to grip my skull in agony.  I have a solid grasp on if, or, not, else, elif, else, equal, less than, greater, than and most of the basics (sometimes called Control flow).  I am hard at work forming an app that converts words into Pig Latin which is a real challenge since Pig Latin on its own is more confusing to me than it should be.

I also completed Hartl's Chapter 1.  In the intro there is a introductory paragraph singing the tutorial's praises by some brave soul that completed this whole tutorial in 3 days.  I can't imagine anyone who really needs this training completing this in 3 days.  So far, I have completed an app that only displays one line to the world and in that process I have been introduced to a host of programs/websites that I had no clue existed before, memorized a basic directory structure for Rails apps, gotten basic training and a definition of version control, and deployed the app to Heroku (without success, see below).

Good news, everything went slow, but great.  Bad news, my stupid app does not run on Heroku like I desperately wanted it to.  Just as I was about to paste my app's test web address into an email and send it my wife (to demonstrate that I have indeed learned something!) , it failed to work.  I followed up on a few of the Heroku error messages such as putting a Ruby version in the gemfile, but my meager store of knowledge is not yet strong enough to troubleshoot deploying an app.  So, this was kind of bittersweet.  I completed the chapter and the exercises and feel really good, but I was robbed of my small moment of glory! That said, I remain undeterred and will start the "Toy App" tomorrow in chapter 2.



Total hours into Programming: 33 (3 today)
Progress on Hartl's Tutorial 2.0.0
Code Academy Points: 393
Code Academy Badges: 45
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Friday, July 31, 2015

Ruby on Rails Tutorial: Day 1

After a very confusing intro to Ruby on Rails via Code Academy (where I somehow managed to "complete" 24% of the lesson), I was not feeling so confident about apps, Ruby on Rails, or much of anything really.  Tonight, I started Michael Hartl's Ruby on Rails tutorial book which seems to be a real standard in learning the ropes of Rails.  I spent about 2 hours with it so far and have completed 1-1.4.1.  This doesn't seem like much and at the end of the day it is a very small chunk of the tutorial, but I am trying to take my time and really learn it.

So, how is it for the complete newb?  I like it a lot, actually.  I am actually working in an Integrated Development Environment, and it is really explaining in detail what is going on at every stage.  I was introduced to Cloud 9, Git, and Bitbucket today and I have a pretty solid concept of what version control is and why programmers do it.  Hartl does a nice job of explaining what is pertinent to the new coder without speaking a different language I would never understand.  I was also really happy to recognize some of the formats I had learned from the Ruby Code Academy tutorial and understood what was going on when instructed to place a method within the controller.  I also now have a clue what a gem is and understand what is happening on some basic level when rails designs the framework for your new app.  So far, I really love it!

I also worked through a few lessons on Python this morning which were much easier and faster than my early Ruby lessons.  I am enjoying the learning process and have actually had a few moments today where I knew what to do without making many, many mistakes and having to scratch my head in frustration.  Good day!

Total hours into Programming: 30 (4 today)
Progress on Hartl's Tutorial 1.4.1
Code Academy Points: 368
Code Academy Badges: 43
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Tentative Plan of Action

After a long and fitful sleep, I have come up with a plan of action.  I am going to concentrate on doing Michael Hartl's Ruby on Rails tutorial when I have time to really think and concentrate.  The Code Academy tutorial was frustrating to me and did not include nearly the level of detail I wanted.
However, when I have somewhat distracted time I am going to continue to work through Code Academy's intro lessons to other languages so I have some sense of them.  First up: Python!  This way, I will be learning Ruby on Rails in a meaningful way, but also getting a wider breadth of knowledge as I go.

Based on my estimates, I am around 30 hours into learning coding so far.

Code Academy Stats
Skills: Ruby (Complete)
Make a Website (Complete)
Python: 3%
Ruby on Rails 24%

347 Points
41 Badges

Hartl's Tutorial:  Begins Tonight!