r/learnruby • • Jun 29 '19

Learn Ruby from tutorials, books & courses

Thumbnail
reactdom.com
14 Upvotes

r/learnruby • • Jun 17 '15

r/LearnRuby is the Subreddit Of The Day!

Thumbnail
reddit.com
14 Upvotes

r/learnruby • • Jun 29 '17

'Write an Internet search engine with 200 lines of Ruby code'

Thumbnail
blog.saush.com
13 Upvotes

r/learnruby • • Jan 29 '19

Is Ruby the primary language of any niche or domain outside of Rails development? Any reason to choose Ruby as 1st language over Python in 2019?

12 Upvotes

Hi all;

Thanks for seeing the time to answer my questions.

I have a strong interest to learn programming. I feel the need to create things and build.

I know alot ABOUT programming, but I don't know how to program. This has me in a weird spot psychologically.

I'm attracted to Ruby because it's genuinely quirky. You install packages with 'gem'. They're gems, like I'm plugging infinity stones into my gauntlet of programming power. The idioms of the culture surrounding Ruby is very much me. It's a bit weird and goofy and I like it.

However, with that being said most of the topics I have interest exploring are mostly better served with Python. At least, to my knowledge.

I don't have a strong interest in front-end web development, but the strongest proponent of Ruby's use is Rails as a backend framework. How common is it for someone to completely skip front end development and take up residence as a RoR back-end developer? This doesn't sound likely, but who knows.

Python projects I would have had interest in were/are:

  • Web scraping with Scrapy.

  • Build a Roguelike with Libtcod

  • Bots, bots and more bots. Twitter. Reddit. Instagram. Whatever. A great vehicle for learning these are.

  • Explore the Evennia MUD framework. (Yes, I'm old enough to know and have played MUD's)

With that said, if I can't do all or any of the above, that's fine. I'm not hard pressed on these. They were just ideas for learning vehicles for me.

Besides back-end web development, which seams to be Ruby's main usecase, what else is Ruby generally used for in practice?

thanks so much. Genuinely curious.

ninja edit: Discussing this with a co-worker, he advised I learn Ruby anyways because, in his words, "All you listen to is Japanese Math-Rock anyway. You might as well complete the image and learn Ruby."

So there's that.


r/learnruby • • Jun 20 '14

I love Ruby, but I hate Rails... Am I screwed?

12 Upvotes

Hey guys,

I recently started learning some Ruby at the UW. It's been a blast. I loved how quickly I could build things to aid me on the command line.

However, once we started RAILS I quickly was turned off. I really have no interested in Web Development.

Is there any future for just the Ruby programming language or is everything Rails these days?


r/learnruby • • May 06 '15

Aspiring Rubyists: Which Ruby books are relevant in 2015?

11 Upvotes

I've been doing Ruby for almost 5 years now. Someone recently asked me for a book recommendation to get started, and it hit me that I probably don't know what to tell people anymore.

My question is geared mostly towards those who have learned Ruby in the past year: if you could recommend one book for an absolute beginner, what would it be?


r/learnruby • • Sep 27 '14

I took a bunch of (basic) notes and want to share them with anybody that may benefit from them (x-posted from /r/learn programming)

11 Upvotes

r/learnruby • • Jan 16 '21

Algorithms are just abstract methods

9 Upvotes

I’m learning about data structures and algorithms and how to implement trees. And I just had an epiphany that algorithms are just an idea and that methods are the concrete form of what that idea is.

It seems like in order to be a great software engineer, I have to think about think abstractly and then make that idea concrete concrete through code through methods, classes, etc. and the way to do that is through Having an idea, creating and algorithm for it and then bringing it to life with methods(code)

Just wanted to share something that was mind opening to me.


r/learnruby • • Sep 19 '17

Learn to Program

9 Upvotes

Hey everyone,

I recently started Launch School and I came across Chris Pine's "Learn to Program" Ruby book. After looking around this subreddit and "Ruby" it looks like the community is pretty familiar with Chris Pine and his work. I just wanted to point out to anyone who is learning like I am that you can get this awesome book through a Ruby app.

I'm not sure if it's just on iOS, so Android users, sorry if you can't find it. The app name is rubyi.

rubyi - run code, autocomplete, outline, color code by XiaoWen Huang https://itunes.apple.com/us/app/rubyi-run-code-autocomplete-outline-color-code/id581732143?mt=8

It allows you to run ruby code through this app. I was scrolling through the settings and other menu options and I found that their are lessons in this app. To my surprise, I found Chris Pine's entire book on here. I have the actual book, but it's nice to have it on my phone when I'm on the go!

I hope this helps someone. It has truly been helpful for me.


r/learnruby • • Sep 19 '21

Data Structures and Algorithms in Ruby: Linked Lists Part #2

Thumbnail
youtu.be
8 Upvotes

r/learnruby • • Sep 12 '21

Data Structures and Algorithms in Ruby: Linked Lists

Thumbnail
youtu.be
8 Upvotes

r/learnruby • • Jul 13 '20

I created a list of all job openings for Ruby developers that auto-updates every day

Thumbnail docs.google.com
8 Upvotes

r/learnruby • • Jul 04 '20

Books for learning to think like a programmer

8 Upvotes

Hi All,

So, one thing that I'm learning is that I am really good at picking up syntax but struggle to think like a programmer about how to solve problems and implement ideas. Has anybody found books that are good for thinking through that process?

Thanks in advance.


r/learnruby • • Feb 02 '17

We're updating our filtering!

8 Upvotes

We've noticed a recent uptick in spam sneaking its way into our little corner subreddit on the web, and have taken some steps to try and reign it in. If you post something new and believe it was blocked in error please message a mod right away, thanks!


r/learnruby • • Jun 29 '16

A comprehensive list of online courses available to master Ruby on Rails

Thumbnail
bafflednerd.com
8 Upvotes

r/learnruby • • Oct 02 '13

For anyone interested I created a subreddit for anyone wanting to follow BerkeleyX's Softare as a Service course (in ruby)

8 Upvotes

From their webpage:

CS169.1x teaches the fundamentals for engineering long-lasting software using highly-productive Agile techniques to develop Software as a Service (SaaS) using Ruby on Rails. Students will understand the new challenges and opportunities of SaaS versus shrink-wrapped software. They will understand and apply fundamental programming techniques to the design, development, testing, and public cloud deployment of a simple SaaS application.

The first week material hasn't even been released yet, so it's definitely not too late to apply!

Link to the course

Link to the subreddit


r/learnruby • • May 04 '18

30 Days of Code: Day 8: Dictionary and Hashes

7 Upvotes

Problem

You will read in a number in the first line, call in N.

There will be N lines after that with a one word name, followed by a space, followed by a phone number (basically, a series of digits).

After that, there will be a list of names.

If the name was part of those N lines, you will print out the name, an equal sign, and the phone number. If that name wasn't listed, you will print out "Not found".

Here's an example of the input:

3
sam 99912222
tom 11122222
harry 12299933
sam
edward
harry

This would be the output

sam=99912222
Not found
harry=12299933

What is a hash?

Last post, we looked at an Ruby array. In other languages, (like Python), it is called a list. An array looks like:

[1, 2, 3]

You can access individual elements of the array via an index. For example, if we had

arr = [2, 4, 6]

Then, arr[0] is 2, arr[1] is 2, and arr[2] is 6.

An index is an int value that refers to a position. Ruby array indexes (like many languages) start at 0 (instead of 1).

However, sometimes we want to relate something that isn't a number (i.e., the index) to a value.

For example, we might want to relate a person's first name with their phone number. This is what a "hash" is for. "Hash" is short for hash table (sometimes called a dictionary). It relates something called a key with something called a value. In this case, the key is the first name, and the value is the phone number.

To create a hash, we create an instance of a hash table. This is how it's done.

hash = Hash.new

Hash is the name of a class. When we call new (we saw this with the post on classes), Ruby creates an object with a type of Hash.

To add a new key-value pair to the hash, we write

hash["sam"] = 122334455

That is, we put the variable name referring to a hash table, then put the key in square brackets (in this case, the string "sam") followed by a = sign (also called the assignment operator) followed by the value we want associated with the key.

Crafting the solution

So, here's how the solution would look. First, read in the number (as we've done several times before).

N = gets.to_i

Then, create the hash.

phone_nums = Hash.new

Then, read each line for N times.

N.times do 
   line = gets.strip
   arr = line.split
   name = arr[0]
   phone = arr[1].to_i
   phone_nums[name] = num
end 

So, for N times, we read in a line and get rid of the leading/trailing white space. Then, as in the last post, we split which creates an array of "words", which is the name at arr[0] and the phone at arr[1]. We convert arr[1] to an int. This is strictly not necessary. We could have left it as a string since we don't need it to be a number.

Finally, we associate the key with the value using:

   phone_numes[name] = num

Then, repeat while we still have input

while name = gets
    name = name.strip # If we get here, name has a value
    if phone_nums.key? name
       puts "#{name}=#{phone_nums[name]}"
    else
       puts "Not found"
    end
end

To repeat something indefinitely, we use a while loop. This does a gets and saves it to a variable name. If gets doesn't get a result, the condition will be false, and we exit the loop.

Once we're in the loop, we know name has a value. Since it came from gets, it should have a trailing new line, so strip removes that.

We use the method key? on the hash to find out if the key exists in the hash. If so, print out the name, followed by =, followed by the key. Otherwise, print "Not found".

Hashes are reasonably useful. I'd say arrays are more common, then hashes used once in a while.

The entire program

N = gets.to_i
phone_nums = Hash.new

N.times do 
   line = gets.strip
   arr = line.split
   name = arr[0]
   phone = arr[1].to_i
   phone_nums[name] = num
end 

while name = gets
    name = name.strip # If we get here, name has a value
    if phone_nums.key? name
       puts "#{name}=#{phone_nums[name]}"
    else
       puts "Not found"
    end
end

r/learnruby • • May 19 '17

Learning Ruby quickly to (hopefully) land a job

7 Upvotes

Hi guys, I've been programming since a very young age but haven't had much experience with Ruby. I've been going through tutorials to learn syntax, but I keep running into situations where I'm just not familiar with the Ruby landscape and culture, like what the big important packages are (besides rails), what blogs I should read, what really important design patterns I should know/follow, basically everything non-syntax related. It feels like the more intangible side of learning a new programming language. Can anyone recommend resources to be able to pick up on this stuff quickly?

For the record, I'm trying to land a job at a place that does a lot of rails stuff. I have a lot of experience programming, but all on my own, this would be my first programming job. And my first real ruby/rails experience. Any recommendations?


r/learnruby • • Dec 23 '16

Which Ruby courses / books to pick for a more serious learner? (free/paid)

7 Upvotes

Hello. I'm looking to pick up Ruby, to support Chef and Rails with a focus on ops. The nice thing about Ruby is there is a LOT of material out there. Unfortunately there is a LOT of material out there. What do I choose? I tend to like learning materials that:

  • Move at a quick pace, and condense information well without glossing over salient details

  • Explains the why (language internals/strategy) as well as how (syntax/patterns/recipes)

  • Is complete, or at least covers all the 'good parts'

  • Is up to date

I don't mind paying for excellent material within reason. (think hundreds of dollars not thousands) I'm also not picky about delivery format: video or text or interactive stuff works for me.

I haven't tried codecademy Ruby, but I have gone through their JS course. It was a bit shallow and basic. Probably good for an intro to programming, or a nice refresher. Can anyone who has worked through the Ruby course tell me if I can expect the same?

On first glance Learn Ruby the Hard Way seems like my path. Can anyone with experience with this book chime in? Are the videos good stuff?

Has anyone taken any Udemy courses they can recommend?

Thanks!


r/learnruby • • Oct 07 '16

Learning Ruby with my template

7 Upvotes

Hello everyone, I decided to learn Ruby following a simple template that I defined for learning any programming language. My first example is an extreamly simple integer calculator. If you can give any suggestion for my template or my ruby code I'll really appreciate it. :D


r/learnruby • • Aug 09 '16

This e-book is specifically for web designers who want to learn Ruby

Thumbnail
leanpub.com
7 Upvotes

r/learnruby • • Jul 28 '14

CodeQuizzes. I found this site was helpful in bringing together everything I learned on codeacademy.

Thumbnail codequizzes.com
7 Upvotes

r/learnruby • • Mar 18 '14

The basic loops of Ruby -- Ten ways to do the same thing

Thumbnail
skorks.com
7 Upvotes

r/learnruby • • Jul 03 '13

Hackety Hack! [osx/linux desktop app for learning ruby, its fun its cute, and engaging. go at it]

Thumbnail hackety.com
7 Upvotes

r/learnruby • • Aug 25 '20

Ruby's Global Scope is Not Really Global

Thumbnail
blog.kiprosh.com
6 Upvotes