Top products from r/ruby

We found 102 product mentions on r/ruby. We ranked the 70 resulting products by number of redditors who mentioned them. Here are the top 20.

Next page

Top comments that mention products on r/ruby:

u/[deleted] · 2 pointsr/ruby

sorry to hear you're having trouble; i get my ass kicked all the time.

if programming languages were like poems, i'd liken things like C# to an epic and ruby to a haiku. both are packed full of meaning, but the approach toward expressing it is radically different (imho: just an impression, keep the hatches battened down). the ruby community focuses very much on readability, in the sense that code sometimes reads more like pseudocode, or even just regular text, than i've seen in other lanaguages. this focus on readability is tightly coupled with a preference for terseness wherever and however possible: things like dry (don't repeat yourself), etc. are heavily emphasized.

sometimes it feels to me like i'm meeting a new person when i learn a new language, tool, etc.: it can go well or poorly, but regardless it takes a while to learn each other well enough in order to communicate effectively. the only way to expedite the process is familiarity. if familiarity is in short supply, patience appears to be the only way forward. disagreements will arise, but i try to look at those as opportunities to potentially broaden my perspective.

i'd recommend just taking some time in a low-pressure environment to work through some examples (small, easy ones just to get the feel for it) and read things like the pickaxe or the ruby way. eloquent ruby is on my reading list as well.

as far as editors go, i tried aptana (eclipse), rubymine, etc. i finally settled back on vim, with a few plugins to help along. so far, i've got pretty much everything i need out of an ide - granted, i do tend to use nix as an IDE. if you'd like some more information on that, here's a blog post i wrote a while back about my setup then. it's for ubuntu, but some of the gems, etc. it references may be helpful. of particular note is rubocop, which is a linter for ruby. about the only things i don't have via vim (either as part of default vim or via plugin) is code-completion (honestly don't use it that much) and a built-in debugger (again, nix as an IDE, plain old ruby debug gets me by. yes, pry. i know.). for built-in debugging, there's vim-ruby-debugger, and for autocompletion there's youcompleteme. i haven't personally used those plugins yet, but they're on my list to try out. there are probably others as well.

hope this helps.

u/evansenter · 5 pointsr/ruby

As the other posters have mentioned, I develop with Ruby as a day job doing web development on the Rails platform. That being said, I also used Ruby throughout college to do machine learning programs, genetic algorithms, and bioinformatics work. In general, Ruby's great for anything you want to just get done, without worrying about the contortions that some of the other explicitly focused languages put you through. Just having a REPL loop like IRB is great for very quickly trying things out.

That being said, Ruby is not good at any heavy computation. I don't care which version of Ruby it is, it's still slow for any heavy number crunching, so if you're going to be working with heavy datasets, it's best to pick your battles. As you've said you're just getting into programming, I would - rather than worry about if Ruby is the right language for you - just pick it up and learn with it. Certainly we aren't tied down to just using the bike on which we first learn to ride, and the same goes for languages.

If you have some *NIX / programming experience, I've heard great things about http://github.com/edgecase/ruby_koans

If you like to buy books, http://www.amazon.com/Ruby-Programming-Language-David-Flanagan/dp/0596516177 is the best and only Ruby book I'll bother owning. I have a short attention span (except when writing comments, apparently) and have found all other resources laud on and on about how great Ruby is, rather than tell you anything about it. Otherwise, they read like a dictionary. Not useful for me.

You've probably had it recommended, but if you like cartoon foxes, bacon, and a lot of comedic nonsense in your learning, check out http://mislav.uniqpath.com/poignant-guide/book/ - it's a quite fun way to get exposure to the language!

Ultimately the first steps are the hardest - and the best way to move forward is to set a goal. Perhaps write a program that takes a number n, and tells you what the _n_th prime number is. Certainly not the most exciting program, but something that can be improved on, etc etc.

u/sihui_io · 3 pointsr/ruby

There are some SUPER valuable insights in the replies of this thread that took me YEARS of programming to fully understand. So you did yourself a great service asking this question here :)

 

These insights are:

by u/cmd-t
> think in OOP in terms of passing messages from object to object. Every function call is actually sending a message to an object: a request for it to do something.

by u/saturnflyer
> Don't model the real world. Create the world you need.

by u/tom_dalling
> It's a common misconception that classes model real-world things. Classes model data, or behavior, or responsibilities.

 

To answer your question, yes, OOP is hard to master. As a result, there are many books written on the subject. And for a complicated system, even senior developers will have trouble getting the design right on a first try.

 

If you feel lost, it's not because you are not good at this. It's because the subject you are learning does require lots of time and practice.

IMHO, the best way to learn this is by actually working alongside with senior engineers in a real production project. So you can see some existing designs and also bounce ideas with other engineers.

While that might not be possible at the moment, you can

u/VancouverLogo · 6 pointsr/ruby

I strongly recommended The Well Grounded Rubyist

This gives you a great foundation, it's extremely well written and a nice reference to go back to.

I also recommend Practical Object Oriented Design in Ruby

This book is just amazing. If you're new to object oriented programming, and even if you have a bit of experience, this is going to improve your skills dramatically.

Good luck!

u/thecoffman · 1 pointr/ruby

I would strongly recommend The Ruby Programming Language over the pickaxe book at this stage. For a long time the pickaxe was the definitive book on Ruby so people tend to suggest it out of habit - but in the past year or so this book came out and in my opinion its substantially better. Check out the Amazon reviews if you have any doubts.

Additionally, if you want a fun intro to programming that's short, informative and funny, you can't go wrong with _why's poignant guide to ruby (give it a few pages, but trust me, its awesome.

u/ryanlue · 3 pointsr/ruby

Personally, I did not find the Ruby Koans helpful as a complete beginner. They cover a lot of ground without giving you an opportunity to put the lessons into practice, which is the surest way to forget the things you've studied.

To start, an exercise-oriented book or online tutorial series is best, IMO (I used Learn to Program by Chris Pine, and personally enjoyed it very much). Once you have that under your belt, it will behoove you to develop an interest in various facets of computing beyond the practice of programming itself (learning a powerful text editor, learning the command line and some of the more indispensable utilities for it) as you tackle various collections of programming challenges (e.g., Ruby Quiz, /r/dailyprogrammer, HackerRank) with the help of Google/StackOverflow/the official Ruby docs.

At that point, you'll have your feet wet, and will have a better foundation for deciding (or even just asking) where to go next.

u/danimoth2 · 1 pointr/ruby

I think you have to read a lot of different books to get things, but for me, Destroy All Software is really good. You have to pay for it but you'll get your money's worth in terms of productivity gains. Clean Code had a big effect on my code after. Check out Uncle Bob's talk here. Google all of Sandi Metz's talks but this one is my favorite. She also wrote Practical Object Oriented Design in Ruby, awesome. You still have to code though! I think you'll figure out patterns just by coding and asking around.

u/munificent · 8 pointsr/ruby

One of the things we can do to make our lives harder in software engineering is muddle terminology. It adds needless friction to our job if when you say "flernb" you're referring to a widget but when I use say it, I'm talking about a whozit.

In low level code, we're pretty good about sticking to the first term that was coined for something. If you have a series of objects, each with a reference to the next, you'll probably call it a "linked list", just like I would.

But when it comes to higher-level architecture and design, names get a lot messier. Fortunately, some dudes wrote a book that tries to be the beginning of a taxonomy for architecture. Ultimately, the names they pick are arbitrary, but if we all agree to stick to them, then they become concretely useful.

What the author describes here is not a proxy. A proxy is a local object that represents a distant one, usually on another machine or process. It's not a very common part outside of distributed systems.

The author created an adapter.

u/joemi · 31 pointsr/ruby

I might not be the best person to answer this for you, since I learned Ruby after I already knew programming in general (JS, Python, C, Java) so learning Ruby for me was more about figuring out the Ruby way of doing things than learning how to program. But these are some resources I see recommended a lot that appeal to me:

  • Why's (Poignant) Guide To Ruby (free online book -- a whimsical illustrated intro to Ruby basics -- you might already know some/most of this, but it might still be a fun read)
  • Learn Ruby The Hard Way (free online book, I think? -- a less whimsical intro that goes a bit deeper than Why's guide)
  • Practical Object-Oriented Design in Ruby by Sandi Metz (non-free book, also available as an ebook maybe? -- for when you want to get deeper into Ruby beyond basics and start thinking about programming patterns and program design)
  • Ruby's Core API documentation (you can learn a lot about Ruby just from the documentation of its own modules and classes and methods)

    I've been meaning to read Sandi Metz's book since I've watch some talks she's given and they've been very informative. And searching/browsing/reading the Ruby documentation is something I end up doing almost every day, whenever I'm programming. It's a good reference if you can't quite remember the name of a method, and it's also great to click the "click to toggle source" link so you can see how Ruby's own methods are defined. Some of the most basic and important methods are going to be in C, but a lot of the methods (especially in the std-lib) are themselves written in Ruby, and the C is often simple enough to understand what it's doing if you understand Ruby but don't have any experience with C.
u/duggieawesome · 3 pointsr/ruby

Sounds like you want to grab the Pickaxe book. It's a tome, but it'll take you through the Ruby way of doing things. The Ruby Way is great and easily accessible, but I don't believe it's been updated for Ruby 2.0.

Lastly, you can always skim through the Ruby docs.

Edit: You should also check out POODR. Great way of learning how to refactor!

u/postmodern · 27 pointsr/ruby

Sidebar

  • Link to /r/rails and /r/ruby_proposals. Encourage all Rails-centric posts/questions to go in /r/rails.
  • Remove some of the Rails-centric books from the sidebar, add more Ruby-centric books (such as The Well Grounded Rubyist and Eloquent Ruby).
  • Link to TryRuby.
  • Link to the GitHub (Free) Sign-Up page.
  • Link to the RubyGems Sign-Up page.
  • Link to RVM.

    Moderation

    Remove link/blog-spam. It's kind of pointless to read a summary on RubyInside, when I can read the original full-article written by the primary-author/project-lead on their own blog. Summaries of complex issues which span multiple blog-posts are OK though, I enjoy reading those.

    Also, please no more articles about simple things like recursion or Arrays (that's what TryRuby and RubyKoans are for).

    What's this about a Contest? Sounds fun.
u/jb3689 · 6 pointsr/ruby

All of the OO stuff is great but I've found it to be mostly subjective and repeating a lot of the same old boring stuff. I've always felt that programming with heuristics works better for me (e.g. least-visibility principle, sprinkling design patterns where it makes sense, focusing on interfaces, doing mostly TDD but trying to test meaningful contracts instead of being hardcore about red-green-refactor, etc)

Russ Olsen's Eloquent Ruby is still, and will probably always be, my favorite. It taught me how to right Ruby "the right way" by teaching me to learn the core libraries in-depth and explaining what the conventions were in them

Outside of that, Jesse Storimer's books are all good for learning how to use OS features from Ruby which is something I find critically lacking instruction of in the Ruby community

u/Eshakez_ · 12 pointsr/ruby

Clean Code is a great resource that touches on this topic and several other coding conventions.

http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882

Uncle Bob (the author of Clean Code) recommends that you organize your methods based on the context and the level of clarity. He would suggest putting the high level code near the top with the smaller helper methods near the bottom.

It compares a class to a newspaper. In a newpaper, you generally have the Subject at the top, with a high level description of the events that have taken place. As you read down the page, the articles will change from high level descriptions to low level details of the events.

Obviously, there are sometimes exceptions to this suggested rule.

TLDR: I wouldn't organize methods alphabetically. I would organize them logically from high level to low level.

u/InanePenguin · 2 pointsr/ruby

Are you looking for something to teach you specifically ruby syntax or something a little less syntax heavy? I'd HIGHLY recommend Design Patterns in Ruby by Russ Olsen.

It's answered so many common problems I have run into and have to work around. To me it seems like pretty advanced thinking/techniques but I'm not sure your level. Either way, it should provide some great insight! He dedicates a chapter to reviewing Ruby so maybe that would at least help some.

u/ViralInfection · 1 pointr/ruby

Here's a nice explanation: http://madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html

That said, if you're starting to notice the metaprogramming concepts in ruby I highly advise you to checkout Metaprogramming Ruby and here is a nice video on Ruby Internals it's a bit old, but provides a great view from the c & ruby aspects and is generally entertaining and intriguing.

u/kgoblin2 · 2 pointsr/ruby

Best Patterns:
The patterns are honestly not going to be that different, you just have more tools in the toolbox; and generally it is much easier and possible to keep everything very simple. The biggest mistake I see other Java folks make regarding Ruby is they make too big of a deal about solving particular problems, not realizing that while Java may need a 3rd party lib & 1000's of lines of code, Ruby can do it with maybe a 100 or so.
Bear in mind I have a different perspective from a lot of Rubyists on this topic, eg. I strongly disagree with the party line on Dependency Injection being useless/unneeded in Ruby land (most of the rationale I have seen for said statement displays a lack of understanding on what DI is and why it is useful). That is a bit of the Java side of me infecting the Ruby side.

Resources:
I can recommend 2 books in particular:

  • The Ruby Way 1st edition of this book was what really got me into Ruby & what I could do with it when I started ~10 years ago. Note that it is written with the assumption you are already strongly familiar with the basic Ruby syntax
  • Metaprogramming w/ Ruby this will take you on a whirlwind tour of Ruby's metaprogramming aspects, which are what really set the language apart from everything else, and specifically give it a leg-up over java in terms of programmer productivity.
u/oaddit · 2 pointsr/ruby

Design patterns in Ruby is great for this. Much more lighter and entertaining than it sounds, and a fantastic introduction to both OOP design patterns and more advanced Ruby techniques.

u/readitmeow · 3 pointsr/ruby

I started learning ruby 3 months ago. I started with "Learn Ruby The Hard Way" that really holds your hand so that should help you with how to get started. Then I read the first 9 chapters of pickaxe. Then I did enough easy, medium and a few expert problems on codeeval.com to hit top 95% for ruby. Now I'm going through a few rails tutorials. Good luck.

u/Cheetah3300 · 1 pointr/ruby

Head First Ruby is my favorite for beginners. It's an easy and fun read that introduces the core concepts well. I recommend doing all the exercises and moving onto Project Euler.

u/vaxinate · 2 pointsr/ruby

this is kind of a silly book, but it's about ruby. and pretty entertaining honestly. Why's Poingniant Guide to Ruby

EDIT: i hadn't read this in a long time so i was skimming it, but seriously if you can get past how out there the book is, its honestly a pretty legit way to learn ruby.

EDIT AGAIN SHIT: also Eloquent Ruby

u/chadcf · 1 pointr/ruby

In addition to the info here, if you plan to stick with ruby I would highly recommend reading Metaprogramming Ruby. It's a pretty easy and entertaining read and really digs into ruby's object model and things like blocks, and how they differ from more traditional OO languages.

u/aparadja · 2 pointsr/ruby

Eloquent Ruby is one of the best programming books I've ever read. I highly recommend it. It'll get you started quickly with the basics, and then make you fall in love by showing the simple and powerful beauty of the language's design.

The poignant guide (the cartoon fox thing) is funny and smart, but Eloquent Ruby will make you really grok Ruby.

u/MelissaLiberty · 1 pointr/ruby

> If you're curious about how Ruby works under the hood, this book is exceptional: https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277. It's a few years old so it might be a bit out of date with the garbage collection in particular, but it's hugely helpful!

Thanks for the recommendation! Not sure if I will get around to read it (reading POODR by Sandi Metz right now) but I put it on my Amazon list.

u/vxxn · 1 pointr/ruby

I mispoke (somebody else in thread linked it), but Russ Olsen most definitely wrote a great book on patterns.

http://www.amazon.co.uk/Design-Patterns-Ruby-Addison-Wesley-Professional/dp/0321490452

u/jrochkind · 1 pointr/ruby

The game piece example is about using singleton to, yes, conserve memory, with simple data types. For instance, you'll note that ruby itself, analogously, uses it with integers. 101 is always exactly the same object in ruby (which is necessarily immutable for that reason; in general, singletons that have any mutable state at all are going to give you nightmares, especially under concurrency). (You can verify this checking 101.object_id, always the same for any 101 anywhere in a program execution. This is not true for string "101", which is of course also mutable).

In the "Gang of Four" book, which introduced the notion of "design patterns" in programming as well as the "singleton" pattern specifically -- I think this particular pattern would actually be identified as the "flyweight" pattern, rather than "singleton", although it's implementation might in this case be in terms of singleton.

I probably wouldn't be likely to actually implement a chess game that way. I think the "flyweight" pattern is pretty specialized in contemporary programming, where RAM is a lot more bountiful compared to when the GoF was writing. The times you need to conserve RAM this way and it's worth the added complexity are probably rare (although probably not never ever encountered).

u/Slackwise · 4 pointsr/ruby

I've read both the "Pickaxe" book and "The Ruby Programming Language" (co-authored by Matz and _why), and I have to say TRPL is much better.

It's a no-BS book about every single Ruby detail. Covers all the quirks and features I didn't even know existed. I definitely owe my knowledge of Ruby directly to it, but my introduction to the Pickaxe (only (free) book at the time). Pickaxe may be good to start with, but you can learn the same from TRPL and TRPL provides a much better reference later on.

u/attr_reader · 3 pointsr/ruby

Exercism.io is a great resource where you're able to use your problem solving skills while you level up your Ruby.

In addition, Basic Ruby. This is extremely basic, however, BR does a great job with the fundamentals of Ruby.

+1 on Ruby Monk. -1 on CodeAcademy.

I'd recommend Sandi Metz's Practical Object-Oriented Programming.

u/danwin · 1 pointr/ruby

Well, while we're on the topic, I'll recommend another book I've liked ;)

"Design Patterns in Ruby" by Russ Olsen

http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452

It covers Gang of Four patterns (well, most of them) except in Ruby...an extremely helpful reference and very readable...my only caveat is that if you get it for Kindle, the code is not particularly well-formatted.

u/optimal_persona · 3 pointsr/ruby

I'm getting good mileage out of David Copeland's Build Awesome Command-Line Applications in Ruby 2 (2013). For Ruby-specific best practices (I'm coming from PHP), Sandi Metz' Practical Object-Oriented Design (2019) and Russ Olsen's Eloquent Ruby (2011) are opening my eyes to how it's done here. In particular, Metz' focus on the role of messages in OO design has changed my approach to planning and testing - just in time for a critical project.

u/OtavioHenrique · 1 pointr/ruby

I pretty recommend this book: http://createyourproglang.com/, and this series: https://hokstad.com/compiler


If you want something more advanced you can read the famous https://www.amazon.com.br/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277 to understand how a language works behind scenes. Understanding Computation is also good too.

u/LegionSB · 15 pointsr/ruby

> Where can I learn the ruby way of things? for ex: I think ruby does str.reverse! rather than str = str.reverse()

You want Eloquent Ruby. It's a book about writing idiomatic Ruby, which is what you're asking about.

The Pickaxe book and POODR are both excellent books that you also want, but Eloquent Ruby is probably the best book for what you're specifically asking about.

u/brainbag · 3 pointsr/ruby
  1. Ruby has symbols that are used in place of most strings. If you have a :word_symbol, that is a globally unique identifier. Anywhere you see the exact phrase :word_symbol it's the same as all of the others. Ruby inherently gains a lot of performance from this that would otherwise be from immutable strings, without losing the easy mutability of strings.

  2. IIRC, hashes keys for strings use a memory copy as an immutable string, which is the other major performance gain. However, the key lookup still has to do a string comparison, which (again IIRC) are optimized for small comparison sequences, I think under 32 length.

    >> string_key = "word"
    => "word"
    >> hash = { string_key => 'whatever' }
    => {"word"=>"whatever"}
    >> string_key = 'word2'
    => "word2"
    >> hash # no change to the key
    => {"word"=>"whatever"}

    If you're curious about how Ruby works under the hood, this book is exceptional: https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277. It's a few years old so it might be a bit out of date with the garbage collection in particular, but it's hugely helpful!
u/Stubb · 6 pointsr/ruby

Read Principles of Object Oriented Design in Ruby. Quite a few things clicked for me when reading that book.

Programming in Ruby is also just fun, and when I get frustrated, the reason for that frustration inevitably turns out to be a pleasant surprise, as in there was a language construct that I didn't quite understand and that figuring out the solution unlocked a new way of doing things.

Also not sure how much programming you've done in other languages. In Java you inevitably run up against bone-headed decisions made by the designers to dumb-down the language. They were clearly designing Java for their intellectual inferiors.

Then go attempt to debug some C++ template errors. Dear gods what a mess that can become…

Python can't figure out where it wants to go with the v3 vs. v2.7 schism.

I'm a huge fan of Lisp, but the lack of libraries makes it difficult to use for many tasks. I see Ruby as giving me all the things that I love from Lisp along with access to a large selection of polished libraries.

u/vsalikhov · 2 pointsr/ruby

First, a superficial note: the Ruby way is to indent 2 spaces, not 4. This is the first thing that sticks out about your code as "strange" ruby.

Second, name the method by the thing that it returns. So, instead of the procedural create_array, the method name would be thingies_array since it returns an array of "thingies". Or, better yet, the method name should just be thingies, as the plural already signals that the method returns a list. Recommended reading is Smalltalk Best Practice Patterns. But first read this to get some context of how the ideas in this book apply to Ruby.

Third, get to know the methods provided by the Enumerable module and the Array class well. You will find that idiomatic Ruby leans heavily on the Enumerable methods.

Finally, here is my take on your example in what I feel is more idiomatic Ruby (remember, in the end, this is all subjective, there is no one right way):

def thingies_from_json(json)
json['thingies'].map do |t|
thingy = Thingy.new
thingy.id = t['id']
thingy.desc = t['desc']

........ code ......

    thingy<br />
  end<br />
end<br />
u/freakyDaz · 3 pointsr/ruby

Learn basic ruby first. It's simple you can install it on your computer and then run your own scripts from the command line like so:

rb /path/to/ruby/script.rb

There are some really nice introductory books on Ruby and they can teach you some very useful techniques that can be used in a variety of languages.

I started with Learn to Program and it helped loads towards understanding the language and ultimately understanding rails.

u/Fiend · 6 pointsr/ruby

Design Patterns In Ruby - Russ Olsen

u/CaptainKabob · 3 pointsr/ruby

I read it about 6 months ago and found it incredibly relevant despite actively working in Ruby 2.x. The syntax is still pretty modern, unlike, say, Why's pognant guide to Ruby.


I would read both Eloquent Ruby and Practical Object Oriented Design in Ruby which also covers the practical experience of working with Ruby. i.e. Eloquent Ruby tells you how to write good Ruby code, Practical OOD covers how to feel good doing it.

u/brandonweiss · 2 pointsr/ruby

I realize this is something you probably don't want to hear, but you've got a way larger problem than the problem you posted about. If you're unable to figure out why you're getting an undefined method error from a really simple bit of Ruby code, then the actual problem is that you don't understand Ruby well enough yet. You should stop using Rails and first learn how to use Ruby properly. There are some excellent Ruby-only books, like the pickaxe book. And there are some great online courses as well. Once you can write non-Rails Ruby programs with ease, then you can start using Rails, and you'll find it'll be a thousand times easier.

u/Muchaccho · 2 pointsr/ruby

For me, these two books are essential:

u/enry_straker · 5 pointsr/ruby

It's been too long since i read Programming Perl but "The Ruby Programming Language" is the book that i use the most.

While the Pickaxe is good, you can't beat the pedigree of "The Ruby Programming Language" what with Yukihiro Matsumoto aka Matz aka The guy who created the ruby programming language in the first place, co-writing the book along with Mr.Flanahan.

Amazon_Link

u/garrettd714 · 1 pointr/ruby

Ruby under a Microscope is good, if you want a better understanding of Ruby internals. http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277

u/Bizkitgto · 1 pointr/ruby

If you're new to Ruby, Head First Ruby is a really good intro book, follow it up with POODR by Sandi Metz.


**

The Ruby Programming Track on Odin Project is also good for someone new to Ruby.

u/TWR9939 · 3 pointsr/ruby

Nice work! Coming from python, when I started learning Ruby I was kind of miffed at the absence of something like this. However I found David Black's The Well-Grounded Rubyist to be a decent substitute.

u/colonpee · 14 pointsr/ruby

You want Eloquent Ruby! This book is perfect for someone that is coming from a different language and has some of the basics of Ruby down already.

u/excid3 · 4 pointsr/ruby

Metaprogramming Ruby was by far the best thing I read coming to Ruby from Python and other languages.

u/stevewedig · 3 pointsr/ruby

We evolved an app architecture similar to the one he presents. However, it is also proprietary. It is truly a joy to work with though :)

I would say the key characteristics are roughly:

  • It is a Ruby/Python app, not a Rails/Django app. Most files are domain logic that don't import the web framework.
  • The Rails/Django ORM is hidden behind Repositories
  • The domain objects are plain-old-Ruby/Python-objects, not web framework DB models.
  • The Rails/Django http container is wrapped to implement a protocol independent req/rep container.
  • In unit tests, we are free to either mock the repositories, or fake them with in memory dictionaries.
  • In unit tests, we use mocks to cut the object graph, since the component under test shouldn't need to travel long distances.
  • Plugging in the real database implementation is an afterthought. We had a significant portion of the app working with memory fakes before we got around to it.
u/michellemustudy · 1 pointr/ruby

I’ve heard great things about The Odin Project.

Aside from Sandi Metz book, I personally learned a lot from Russ Olsen’s book Eloquent Ruby.

u/BLITZCRUNK123 · 7 pointsr/ruby

A book called Ruby Under a Microscope is a great start to learning about the MRI internals.

u/DudeManFoo · 2 pointsr/ruby

Most of us started this way... if not with Ruby then another language...

Then you get more experience and start writing better code... some of the shortcuts take a while to get...

This book has quite the collection and is pretty much how most of us do it...

EDIT : OOPS... wrong book... that is a great one, but I meant this one for your level

u/tomthecool · 2 pointsr/ruby

I presume it's Domain Driven Design -- This was a popular, well received book. DHH in particular has blogged, talked and tweeted about it on numerous occasions.

u/canyoufixmyspacebar · 2 pointsr/ruby

This is a very good book. Much more than just the Object Model.

u/yosheek · 8 pointsr/ruby

A great book for learning about the inner workings of Ruby is Ruby Under The Microscope:
http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277

It walks through the the whole MRI implementation, the parser, lexer, byteocdeo, YARV etc. along with some of the C source code to give you a picture of how Ruby actually works internally. I believe there's some chapters about Jruby and Rubinius as well but I haven't read those yet.

u/abashinyan · 5 pointsr/ruby

Practical Object-Oriented Design in Ruby: An Agile Primer (Addison-Wesley Professional Ruby Series)

www.amazon.com/Practical-Object-Oriented-Design-Ruby-Addison-Wesley/dp/0321721330/ref=sr_1_6?ie=UTF8&amp;qid=1398842637&amp;sr=8-6&amp;keywords=ruby#reader_0321721330

Eloquent Ruby

http://www.amazon.com/Eloquent-Ruby-Addison-Wesley-Professional-Series/dp/0321584104/ref=sr_1_9?ie=UTF8&amp;amp;qid=1398842637&amp;amp;sr=8-9&amp;amp;keywords=ruby

Metaprogramming Ruby: Program Like the Ruby Pros

http://www.amazon.com/Metaprogramming-Ruby-Program-Like-Pros/dp/1934356476/ref=pd_rhf_se_s_cp_6_BXWQ?ie=UTF8&amp;amp;refRID=02JTWKY2ZDHPVZWX181R

u/tomcopeland · 1 pointr/ruby

FWIW, Paolo Perrotta's "Ruby Metaprogramming 2" has a nice explanation of it in an appendix:

http://www.amazon.com/Metaprogramming-Ruby-Program-Like-Facets/dp/1941222129

u/hc5duke · 1 pointr/ruby

+1 for Ruby Koans.

I also recommend Eloquent Ruby to anyone starting out in Ruby and/or Rails.

u/limitlesschannels · 1 pointr/ruby

I second the railscasts recommendation.

For SOA i'd recommend Service Oriented Design with Ruby and Rails. Covers a lot of ground in that regard.

u/MetalMikey666 · 1 pointr/ruby

So I learned when rails 3 had just come out - many of the online examples were made obselete so that made things harder.

My rough path was:

  1. Saw a video about ROR, wanted in
  2. Installed ruby, played around
  3. Tried to read this book: https://www.apress.com/gp/book/9781590597361
  4. Gave up because all of the examples were out of date and nothing worked. I also felt I needed a grounding in ruby first.

    At this point I should point out that I'd come from a c# background and was not used to things "going out of date". I was not learning web dev, I was learning rails.

  5. Read this book https://www.apress.com/gp/book/9781484212790
  6. Read the rails official docs
  7. With all this context, re-read the book from step 3, now able to transpose the examples so they work.
  8. Read this book https://www.amazon.com/Design-Patterns-Ruby-Addison-Wesley-Professional/dp/0321490452

    By the time we get to steps 5-8 I am also regularly watching http://railscasts.com, doing kata on codewars and had started working on a web application that I would eventually deploy.

    I went on to have a 5 year rails career before moving to node.js a few years ago.
u/sprayAtMeBro · 15 pointsr/ruby

A friend recently passed on his copy of Eloquent Ruby. It's slightly outdated but still holds up.

u/dacat · 2 pointsr/ruby

Ruby by Example

Design Patterns

Well Grounded Rubyist

by the time you finish those three.. you will know what you want to move to.

u/banister · 6 pointsr/ruby

Getting a bit dated now but rails anti-patterns is a decent book.

Also, this blog post is gold

EDIT: ruby science is also recommended by some people, but i didn't get a lot out of it - it doesn't even mention many of the modern refactorings such as service objects and so on, and i couldn't stand the way its structured, makes it very hard to find what i'm looking for.

u/KryptykPhysh · 6 pointsr/ruby

Eloquent Ruby was one that really helped me out.

u/andrewd18 · 1 pointr/ruby

I can't rave about The Well-Grounded Rubyist enough. Very approachable.

u/brandonhilkert · 2 pointsr/ruby

This isn't dedicated to algorithms, but I think of it in the same category. It's one of the few patterns books not in Java: http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452

u/recycledcoder · 2 pointsr/ruby

No worries, it's always good to make the implicit explicit. I am (and I suspect others would be as well) referring to Domain Driven Design.

"Domain", in this case, can be defined as the problem space that the software you're writing addresses. The business entities, actors, processes, activities, etc. that your software manipulates.