Started out with ruby, but have some regrets. Not sure what to do. Help?

So, to start, I basically returned to college for a second degree
(graduated recently), to try to get a CS degree. I had to stop though
due to money issues.

I now have a full time job not related to programming. However, I
really enjoy programming and overall want to start building and making
stuff.

I went with ruby because many people recommended it. Many people said
it would be a good one to start with (I was using Java when I was in
college the second time).

I began learning it on my own. I am actually about to finish a course I
paid for to learn ruby. After I finished it, I planned on building some
different things.

For example, I wanted to build some bots that did things for me. For
example, reddit is a big website. I wanted to do two things on it.
One, I wanted to create something that could search a particular
username that I entered and return something I was lookinng for. For
example, maybe pictures they posted in a certain subreddit (say
/r/funny). Or return statistics on a user, say how much they post in a
certain subreddit (percentage).

Also, I was looking to build maybe bots that posted for me. Say, you
build one that posts statistics if a certain thing occurs or does a
certain activity.

When I asked about this, everyone said to use python. So, now I’m just
frusterated.

In the long run, I want to design webpages/web apps/etc… In the short
term, I wanted to get some practice with ruby before moving onto RoRails
for website stuff.

However, I’m just scared I’m going down the wrong path. I need to learn
a language and pick one that is right for my goals.

I just would love some real advice. I really want to pick a language
that has to most resources for learning. I’m scared ruby was once
popular and now the resources aren’t there anymore. I just don’t know.

Thanks for any help or advice :/.

On Tue, 3 Dec 2013, JD JD wrote:

One, I wanted to create something that could search a particular
username that I entered and return something I was lookinng for. For
example, maybe pictures they posted in a certain subreddit (say
/r/funny). Or return statistics on a user, say how much they post in a
certain subreddit (percentage).

I’ve built web spiders in the past, but that was a decade ago. These
days
I would recommend looking at WATIR and using that library to drive a web
browser. I used that last summer with good results.

Also, I was looking to build maybe bots that posted for me. Say, you
build one that posts statistics if a certain thing occurs or does a
certain activity.

Same tool.

When I asked about this, everyone said to use python. So, now I’m just
frusterated.

In the long run, I want to design webpages/web apps/etc… In the short
term, I wanted to get some practice with ruby before moving onto RoRails
for website stuff.

There are lots of other Ruby tools besides Rails.

However, I’m just scared I’m going down the wrong path. I need to learn
a language and pick one that is right for my goals.

I just would love some real advice. I really want to pick a language
that has to most resources for learning. I’m scared ruby was once
popular and now the resources aren’t there anymore. I just don’t know.

Ruby is still very popular. Python picked up some libraries for
mathematics and scientific programming early on and has got a strong
user
base in those kind of communities. Python is also a good language, but
requires a bit of a different mindset.

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

On Mon, Dec 2, 2013 at 10:03 PM, JD JD [email protected] wrote:

For example, I wanted to build some bots that did things for me. For
example, reddit is a big website. I wanted to do two things on it.
One, I wanted to create something that could search a particular
username that I entered and return something I was lookinng for. For
example, maybe pictures they posted in a certain subreddit (say
/r/funny). Or return statistics on a user, say how much they post in a
certain subreddit (percentage).

Mechanize (http://mechanize.rubyforge.org/) is perfect for this. I’ve
used
it very happily for years.

Although Reddit has an API, so you may not need to drop to the level of
screen-scraping. There are even Ruby gems, such as this one:
https://github.com/samsymons/RedditKit.rb

Ruby is well suited to website interaction. Indeed, it’s a language I
chose specifically because I wanted to automate website work.

I recommend Mechanize for sites where JavaScript is not essential, and
Watir-Webdriver for sites which rely on Javascript. For the simple
stuff, there’s open-uri.

second mechanize
with nokogiri for parsing html and xml.

Some pesudo code would look like:

m = WWW.mechanize.new
Page p = m.get ‘http://reddit.org/pages/123’ # this is mechanize using
http
get method to get web page content
p.get(’//users’) # this is the xpath and nokogiri comes in, to get a
specific element from html downloaded

Thxthat’s just take a lifelong time.

2013123գ10:39Dave A. [email protected] д

Did I talk to you on irc last night (my irc nick is “pontiki”) ?

On Mon, Dec 2, 2013 at 10:03 PM, JD JD [email protected] wrote:

In the long run, I want to design webpages/web apps/etc… In the short
term, I wanted to get some practice with ruby before moving onto RoRails
for website stuff.

However, I’m just scared I’m going down the wrong path. I need to learn
a language and pick one that is right for my goals.

You’re going down a perfectly fine path… but don’t take just one.
It’s more like an open field, or a network of city streets, than a
forest with paths through it. Learn raw Ruby, then some frameworks
like Rails (including add-ons like ERb/HAML, SASS/LESS, CoffeeScript,
etc.) and maybe Sinatra and Padrino and so on, sure… but also learn
Python, its popular libraries and frameworks, JavaScript (hard to
avoid if you’re doing web stuff anyway), its popular etc., maybe even
some very different things Scala, Clojure, Erlang, Haskell, whatever.
Also dive deep into the machine and learn C, maybe even assembly, so
you have a better understanding of what’s going on under the hood.
(In the case of Ruby, especially learn C, as that may help you grok
what MRI is doing under its hood.) Learn enough of them that you can
pull back from the down-in-the-weeds view of a given language, and
get familiar with the linguistic patterns and meta-concepts. This may
sound like touchy-feely woo-woo to you now, but trust me, it will help
you immensely…

-Dave

What’s to regret? Grok the concepts not the syntax! Ruby is conceived
from
many languages before it. Find out what those are and learn about them.
For
an everyday language any dynamic language will do.

Thanks for the responses (thanks for that too Dave, that was really
helpful to read). I think you all are right and ruby is probably fine
for now.

Also, when I get into this, I will try to look into what some of you
suggested. I may just move into RoR after this and do this as a side
project. Not really sure yet. Still a lot to learn it seems. But it
sounds like I have a few options from some of these responses.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs