Questions about Ruby, dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.

learn more… | top users | synonyms

73
votes
9answers
34k views

Why is Python used for high-performance/scientific computing (but Ruby isn't)?

There's a quote from a PyCon 2011 talk that goes: At least in our shop (Argonne National Laboratory) we have three accepted languages for scientific computing. In this order they are C/C++, ...
32
votes
11answers
4k views

Is it okay to make coding style changes on an open source project that doesn't follow best practices?

Recently, I came across a number of open source Ruby (or majority of it was Ruby) projects on GitHub that when checked with a code analyzing tool like Rubocop, create a lot of offenses. Now, most of ...
31
votes
8answers
2k views

Ruby but not Rails on my Resume [closed]

I have listed Ruby as a skill on my resume becuase I've been programming in Ruby for 5 years while I work on my Ph.D. thesis. I've mostly been using it to implement natural language processing ...
28
votes
7answers
4k views

Explanation on how “Tell, Don't Ask” is considered good OO

This blogpost was posted on Hacker News with several upvotes. Coming from C++, most of these examples seem to go against what I've been taught. Such as example #2: Bad: def ...
26
votes
4answers
3k views

Concrete examples of Python's “only one way to do it” maxim

I am learning Python and am intrigued by the following point in PEP 20 The Zen of Python: There should be one-- and preferably only one --obvious way to do it. Although that way may not be ...
24
votes
2answers
2k views

Do modern languages still use parser generators?

I was researching about the gcc compiler suite on wikipedia here, when this came up: GCC started out using LALR parsers generated with Bison, but gradually switched to hand-written ...
22
votes
8answers
17k views

Ruby or Python? [closed]

This question is extremely subjective and open-ended. It might even sound like something I should just research for myself and make my own decision. But I'd like to put it out there and get some ...
22
votes
8answers
11k views

Ruby on Rails downsides and caveats [closed]

This is not an opening gambit for RoR bashing - honest! I'm learning Ruby and the Rails framework. Prima facie it appears to be pretty cool, and a wonderful experience compared to PHP. (In fact, it's ...
22
votes
3answers
1k views

What are Ruby's strengths?

Before I'd read this article, I never understood why anybody liked LISP. After reading it, I was able to give LISP a fair enough shot and have since grown to like it. It wasn't until I read this ...
20
votes
3answers
4k views

What functionality does WebStorm contain which RubyMine does not?

I am looking at buying Rubymine as I am doing a small amount of ruby, but a large amount of html5/javascript. I was going to get Webstorm as I do have a lot of pure html5/js based frameworks/apps ...
19
votes
5answers
1k views

How to avoid giant glue methods?

In my current job, I've been tasked with cleaning up old code a few times. Often the code is a labyrinth and the data behind it is even more tangled. I find myself combing out things into nice, ...
18
votes
3answers
1k views

Why do so many languages treat numbers starting with 0 as octal?

I've read Where are octals useful? and it seems like octals are something that were once upon a time useful. Many languages treat numbers preceding with a 0 as octal, so the literal 010 is actually ...
18
votes
3answers
1k views

Moving away from .Net to Ruby and coping without intellisense [closed]

I am in the process of trying to learn Ruby, however after spending nearly 10 years in the MS stack I am struggling to get by without intellisense. I've given RubyMine a try which does help however ...
17
votes
18answers
1k views

How do I “ease into” programming coming from a designer background?

Is there a way I can 'ease in' to programming. Like learning to use/modify CGI scripts to add some functions to a basic html site? Even if it's the only thing I learn it's still useful, right?. Unlike ...
17
votes
4answers
5k views

Return random `list` item by its `weight`

I have, for example, this table +-----------------+ | fruit | weight | +-----------------+ | apple | 4 | | orange | 2 | | lemon | 1 | +-----------------+ I need to return random ...
16
votes
2answers
2k views

In what area is LISP's macro better than Ruby's “ability” to create DSL

One of things that makes Ruby shine is the ability to create Domain Specific Languages better, like Sinatra Rspec Rake Ruby on Rails' ActiveRecord Though one can duplicate these libraries in LISP ...
16
votes
6answers
3k views

I'm a student learning C++ and I've recently found out about Ruby. Would learning (some of) Ruby help me with C++ or would it just confuse me?

As the title says, I'm a student that will be starting my second year of C++ very soon. I've discovered Ruby, however. While I've heard much buzz about the language before, I've disregarded it because ...
15
votes
7answers
2k views

Is Windows suitable for Ruby development?

I've read that Windows is not recommended for Ruby development and this is last thing that stops me from starting some projects in Ruby. Are there any changes to this? Or any suggestions to make ...
15
votes
8answers
6k views

Ruby: The Bad Parts [closed]

I recently read Crockford's book "Javascript: The Good Parts" and one of the underlying premises was that programming languages can have bad sets of features which programmers should avoid. I'm a ...
15
votes
1answer
7k views

Best Ruby Git library?

Which is the best Git library in Ruby to use? Git, Grit, Rugged, Other? Background: I'm the current maintainer of TicGit-ng which is a distributed offline ticket system built on git, and I've read ...
14
votes
5answers
4k views

What should a Python developer know while learning Ruby? [closed]

I have been a Python programmer for about 18 months, consisting of one internship and a few side projects, and I consider myself pretty comfortable in the language. However, there seems to be a lot ...
13
votes
7answers
8k views

Do experienced Ruby on Rails developers use scaffolding?

In the Ruby on Rails tutorial, I read something that suggested that experienced developers do not use scaffolding since they tend to like to just write the code to connect the MVC on their own. In a ...
13
votes
3answers
5k views

What is a symbol in Ruby?

I'm totally new to the Ruby world, and I'm a bit confused with the concept of Symbols. What's the difference between Symbols and Variables? Why not just using variables? Thanks.
13
votes
2answers
448 views

How to handle technological “Dogmatism”

I left a job (to relocate to another country) where I programmed in Javascript and Haskell (some python) most of the time. I really liked it because people were objective, positive, mathematical, and ...
13
votes
7answers
489 views

Where is the best place to teach myself a language, and which one?

I do not know any programming languages at all. I will self teach myself and need to know the best place to do so where I can learn from a most basic level. Where is a great place to begin learning ...
12
votes
5answers
3k views

Is monkeypatching considered good programming practice?

I've been under impression, that monkeypatching is more in quick and dirty hack category, rather than standard, good programming practice. While I'd used from time to time to fix minor issues with 3rd ...
12
votes
4answers
2k views

What did Ruby do right (or was it Rails)? [closed]

Most programming languages have some design decisions that influence their usage and applicability. For example: Python focused on maintainability/readability of code and had indentation be a part ...
12
votes
7answers
1k views

Is there anyone who has used Python/Ruby and PHP for a long time and still prefer PHP? [closed]

I am usually fascinated by articles defending PHP and the arguments being used. Quite often authors of these types of articles don't mention what experience they have with other languages. Personally ...
12
votes
2answers
2k views

How does using a LGPL gem affect my MIT licensed application?

I am developing an open source ruby application under the MIT license. I am using this license because I don't want to place any restrictions on the users of the application. Also I can actually ...
11
votes
10answers
2k views

Is dynamic language always interpreted?

Looking at most (if not all) dynamic languages [i.e Python, PHP, Perl and Ruby], they are all interpreted. Correct me if I'm wrong. Is there any example of dynamic language that goes through ...
11
votes
5answers
1k views

Do you think that GAE alone is enough to justify learning Python over Ruby? [closed]

Considering the fact that you don't have to get involved in setting up/buying a server or even buying a domain, do you think that fact alone is enough to choose one over the other? I don't ...
10
votes
8answers
1k views

How to end my dependency on .NET? [closed]

I have been developing Windows GUI applications since many years and jumped into .NET in early 2005. .NET is a undoubtedly a remarkable platform and I am still using it, but with a variety of ...
10
votes
5answers
853 views

Would it be ok if I decide to write all my Ruby as if it were Haskell?

Given that Ruby has good list operation capabilities in-built - reduce, map, select, collect etc. It has Procs, Blocks and Lambdas, and has nice iteration support (the each family), would it be a bad ...
10
votes
6answers
761 views

Interviewing a developer who's skilled in a language you don't know

Background: I'm an experienced developer and technical architect (C#, Delphi, Java, Clojure, Assembler, Perl, various esoteric functional programming languages) We need to hire some Ruby developers ...
9
votes
3answers
11k views

Can we create desktop application with Ruby? [closed]

I know the Ruby on Rails framework is only for web development and not suitable for desktop application development. But if a ruby programmer wants to develop a desktop application, is it suitable and ...
9
votes
9answers
995 views

Which Programming Languages Support the Following Features? [closed]

My personal programming background is mainly in Java, with a little bit of Ruby, a tiny bit of Scheme, and most recently, due to some iOS development, Objective-C. In my move from Java to Objective-C ...
8
votes
6answers
838 views

How do I showcase my work experience in programming? [closed]

I'm a student of web development languages like PHP, Ruby, and Python. Currently I'm working on some school projects but I'm trying to work on some weekend projects which I can use to showcase for ...
8
votes
1answer
4k views

Why did Microsoft abandon IronRuby and IronPython? [closed]

Several years ago, Microsoft announced that Ruby and Python were coming to .net. The projects were called IronRuby and IronPython, respectively. Microsoft said that the projects would be built on ...
8
votes
1answer
361 views

Are there tasks which require significantly less work with Ruby than C# 4.0?

I just finished reading the Ruby chapter of the book 7 Languages in 7 Weeks. Aside from some syntactic sugar here and there I can't really see anything which can't be done with C# with a similar ...
8
votes
3answers
3k views

Can I use Ruby to automate everything?

I face various types of applications (web-based, GUI-based, command-line, etc.) on various platforms (Windows, Linux, etc.) to operate everyday. There is a great opportunity for me to automate tasks ...
8
votes
2answers
2k views

Why if statements do not introduce scope in ruby 1.9?

if statements do not introduce scope in Ruby 1.9, what is the rationale behind this change from ruby 1.8?
8
votes
2answers
315 views

Why don't Python and Ruby make a distinction between declaring and assigning a value to variables?

Two of the most popular dynamically typed scripting languages, Python and Ruby, do not make a distinction in syntax between the declaration of a variable and assignation of a value to it. That is in ...
8
votes
3answers
408 views

Is Non-Deterministic Resource-Management a Leaky Abstraction?

From what I can see, there are two pervasive forms of resource-management: deterministic destruction and explicit. Examples of the former would be C++ destructors and smart pointers or Perl's DESTROY ...
8
votes
1answer
750 views

Classless tables possible with Datamapper?

I have an Item class with the following attributes: itemId,name,weight,volume,price,required_skills,required_items. Since the last two attributes are going to be multivalued, I removed them and ...
8
votes
1answer
731 views

What's the best way to learn nature-inspired algorithms? [closed]

I completed the Machine Learning course (Stanford) and got very interested, also after some research, I decided that I'd like to learn nature-inspired algorithms. I've found some resources like: ...
7
votes
8answers
2k views

Python : how can I impress people coming from Ruby/Java?

I am preparing a presentation about Python for my company, and would like to show Python's awesomeness to developers using Java or Ruby ! I guess it will be very simple to write shorter and cleaner ...
7
votes
7answers
5k views

What advantages switching to ruby might give me as a python programmer? [closed]

This is my first question on stackoverflow, so please bear with me. I'm trying to stay away from any form of trolling or flame baiting as i have a tremendous respect for both languages. I'm a python ...
7
votes
3answers
1k views

Help understanding server-side scripting

As far as I understand, there are basically 3 options for doing server-side scripting these days: Using scripting languages that can be directly interpreted/executed by the web server (e.g., PHP and ...
7
votes
2answers
254 views

How to share control of links/domains on an open source project with many collaborators?

I'm trying to help the Rebol project re-engineer its web presence now that it is open source as Apache 2 — after nearly two decades of proprietary license! The language's creator currently has ...
7
votes
2answers
650 views

Do Ruby (and other dynamic language) programmers use IoC / Dependency Injection?

I'm primarily an ASP.NET developer and the single thing i've been introduced to in recent years that has had the most dramatic impact on the quality of the code I write has learning how to use IoC ...