I've discovered the less I think about what I'm doing with Ruby and Rails the more I learn and the more fun I have. I don't mean I'm not thinking about the code I'm writing, but rather if I stop and allow myself to feel overwhelmed and frustrated by what I don't know how to do yet, I get discouraged and coding seems like a chore.
I went back to Beginning Ruby tonight and did some work with gems that generate html and search through html for specific tags and/or information. Markaby, Redcloth and Hpricot, take a bow!
Right now I'm seeing actual Ruby work as being kind of secondary, though. I've decided I need a project to work on, so this weekend I'm going to begin work on a site that allows users to store characters for a Dungeons and Dragons campaign. It's a known fact I'm a huge DnD nerd and I've used similar sites in the past, so I think this is a good project for me. I know a lot about the mechanics of DnD and what I expect from a site that stores characters, and I've learned enough Rails that I think I can figure out how to get things started.
This big picture stuff was a huge mystery to me even a month ago, and I really need to keep that in mind. I still don't know exactly how to do it, but I have a good idea and I know where to find information, so I'm on the right track.
My name is Tyler. I'm learning Ruby on Rails. This is a blog for me to talk about what I've learned. I'm no longer completely new to Ruby and while I don't feel comfortable calling myself a coder or programmer yet, I am absolutely a Ruby Enthusiast and a Rails Fancier. I've been working with Ruby on Rails since February 1, 2011. You know that song about "lovin' every minute of it?" Bingo.
Showing posts with label Gems. Show all posts
Showing posts with label Gems. Show all posts
Thursday, March 31, 2011
Sunday, February 27, 2011
Getting past my MySQL gem issues
So the MySQL gem has absolutely killed my productivity today. A simple command line install didn't work. So I installed macports, only to have my friend Eli recommend homebrew instead. Then I had to uninstall macports (surprisingly difficult, it was like an infestation) and install homebrew. So I finally get homebrew installed, hoping to use it to install MySQL, then use that installation to install the MySQL gem. MySQL was installed, but I'm still having errors with the gem. WHAT!
tldr: the MySQL gem is a headache I don't need to deal with right now, so I'll skip it.
So this morning I've been learning about how to create, document and distribute gems. It seems a bit far-fetched to think I'll be writing code others might want to use, but who knows? One thing I really like about Ruby is the openness of the community: experienced developers are open to helping newbies and developers are open to sharing code that others might find useful.
It feels good to be back in the swing of things and not just beating my head against the wall. This is one of those things I told myself I wouldn't get hung up on.
tldr: the MySQL gem is a headache I don't need to deal with right now, so I'll skip it.
So this morning I've been learning about how to create, document and distribute gems. It seems a bit far-fetched to think I'll be writing code others might want to use, but who knows? One thing I really like about Ruby is the openness of the community: experienced developers are open to helping newbies and developers are open to sharing code that others might find useful.
It feels good to be back in the swing of things and not just beating my head against the wall. This is one of those things I told myself I wouldn't get hung up on.
Saturday, February 12, 2011
Working with the Standard Library in Ruby
Aww yeah, lots of progress today! I got through chapter 6 and 7 of Beginning Ruby. Chapter 6 took me through making a basic text-based dungeon, including designing and manipulating classes for the dungeon, rooms inside of it and a player character. I also defined a means of navigating the dungeon.
However, when I said basic, I meant just that. It's just a four room dungeon with no easy way to get input from players and interpret that into changes in the dungeon itself. Apparently I won't be learning about collecting data until chapter 9. I'm getting impatient, since I've wanted to use variables defined by a user from the beginning, since it's obviously more practical than a static variable. All in good time, I suppose.
Chapter 7 was all about the require command, libraries and Ruby Gems.
Wrong Gem! Beginning Ruby walked me through installing and including various Gems. Easy enough!
The require command and why you'd want to use it is another concept that came easily to me. I find the more I learn about Ruby, the more I get why people like it so much. Some of the syntax itself gives me trouble, but the basic concepts are simple. Maybe that's true for most programming languages, but it's especially true for Ruby.
I did have a question about Ruby. Is code that is easier to read later usually preferable to code that's more efficient? I know a lot of things can be done on a single line, but are usually spread out over a few lines for readability. If I'm correct and readable code is typically preferred, is that unique to Ruby? Seems like it is.
However, when I said basic, I meant just that. It's just a four room dungeon with no easy way to get input from players and interpret that into changes in the dungeon itself. Apparently I won't be learning about collecting data until chapter 9. I'm getting impatient, since I've wanted to use variables defined by a user from the beginning, since it's obviously more practical than a static variable. All in good time, I suppose.
Chapter 7 was all about the require command, libraries and Ruby Gems.
Wrong Gem! Beginning Ruby walked me through installing and including various Gems. Easy enough!
The require command and why you'd want to use it is another concept that came easily to me. I find the more I learn about Ruby, the more I get why people like it so much. Some of the syntax itself gives me trouble, but the basic concepts are simple. Maybe that's true for most programming languages, but it's especially true for Ruby.
I did have a question about Ruby. Is code that is easier to read later usually preferable to code that's more efficient? I know a lot of things can be done on a single line, but are usually spread out over a few lines for readability. If I'm correct and readable code is typically preferred, is that unique to Ruby? Seems like it is.
Subscribe to:
Posts (Atom)
