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

0
votes
3answers
310 views

How can I teach my 12 years old brother how program? [duplicate]

Possible Duplicate: What are some good tools for introducing kids to programming? Explaining programming to a child I have a 12 years old brother whom asks me how he can build a website, ...
0
votes
2answers
244 views

How do I read API documentation?

I've been trying to read through the RoR API to try to learn things that the tutorial missed, and I haven't been able to follow it at all. The only time I've read documentation was when I needed to ...
2
votes
3answers
214 views

What is a legitimate reason to use Cucumber?

I've worked in several contracts where the client used Cucumber and I've often felt that the testing suite didn't really have a place in our stack. From what I understand, business ...
1
vote
2answers
97 views

How to start a ruby community? [closed]

We are trying to start a ruby community in Guadalajara, México. Does anyone has experience or ideas that can share regarding how to start and what can be done to be successful?
2
votes
3answers
162 views

Ruby/RoR development: desktop or server

Our company has started development of own systems "in-house". We already got couple of developers, who will be responsible for writing code in Ruby/RoR. We are currently discussing about ...
2
votes
1answer
128 views

Is it possible to use RubyGnome2's/QtRuby's HTML renderers to make UI for a Ruby script?

I'd like to make a graphical user interface for my script, instead of running it from the console. I'm aware there's a wealth of UI libraries for Ruby, but I'm quite familiar with HTML and CSS and I'd ...
2
votes
6answers
1k views

How much Ruby should I learn before moving to Rails?

Just a quick question.. I can never get a definitive answer when googling this, either. Some people say you can learn Rails without knowing any Ruby, but at some point you'll run into a brick wall and ...
21
votes
6answers
2k 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 ...
1
vote
2answers
100 views

Cataloging events, projects and tasks: Is SQL appropriate?

I have this idea for a database: it would hold everything I "need to remember", and allow future coding projects to access the information. These future projects include a day-planner and historical ...
2
votes
1answer
136 views

How to identify a PDF classification problem?

We are crawling and downloading lots of companies' PDFs and trying to pick out the ones that are Annual Reports. Such reports can be downloaded from most companies' investor-relations pages. The PDFs ...
1
vote
1answer
143 views

Ruby using the Gosu framework: why it runs slow first time?

I'm creating a Ruby game using the Gosu framework. All good. Sometimes, when I run the game, it has some kind of slow startup, and probably it will be rather slow during the whole game. So I close it ...
1
vote
3answers
166 views

If I use Ruby Migrations, do I have to use the rest of Ruby on Rails?

I'm currently trying to come up with a database migrations strategy for my organization. This includes getting the database scripts into source control, managing versioning, managing releases to QA / ...
0
votes
1answer
133 views

In rails, what defines unit testing as opposed to other kinds of testing [closed]

Initially I thought this was simple: unit testing for models with other testing such as integration for controller and browser testing for views. But more recently I've seen a lot of references to ...
1
vote
1answer
238 views

When to use mixins in Ruby

I am wondering when to use mixins? I have read about them. Many authors compare them to interfaces, abstract classes, etc. Mixins are modules that are mixed-in and modules are a way to group similar ...
-1
votes
1answer
356 views

What is the difference between class level attributes, Class constants and singleton methods?

What the difference given they all exist 'once per class'. When should I use one over another, i.e. for what purpose? I use Ruby.
0
votes
2answers
603 views

Good ruby book with exercises? [closed]

I find that I learn the best with a book that has a number of exercises at the end of each chapters. A great example of this is C++ Primer Plus by Stephen Prata or Scientific Programming with Python ...
1
vote
1answer
385 views

rails fake data, considering switch from faker to forgery, any advantages or pitfalls?

With Ruby on Rails I've usually used Forgery for generating dummy data for testing. I've noticed recently that several clients and tutorials are using Faker They both seem fairly similar in use ...
3
votes
1answer
176 views

Is the puts function of ruby a method of an object?

I'm trying to understand how the puts function fits in Ruby's "Everything is an object" stance. Is puts is the method of a somehow hidden class/object? Or is it a free-floating method, with no ...
12
votes
3answers
1k 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 ...
3
votes
1answer
87 views

Rails solution for mobile-specific content filter?

To note, I'm not interested in simply 'hiding' content for mobile devices, I want to filter out that content completely. I'm also not trying to address the issue by building a mobile specific ...
1
vote
3answers
451 views

Backtracking with Killer Sudoku

I'm developing a Killer Sudoku solver for a school project. I've programmed 10 human strategies showing what they are doing in order to be the most educational possible. It can solve hard Killer ...
0
votes
2answers
242 views

Is class_eval() Bad? [closed]

In the book I am reading from currently, it says that monkeypatching is, to cut it short, a Bad Thing. Its example for monkeypatching is basically: class Fixnum def print_out puts "foo" end ...
1
vote
2answers
250 views

Ruby workflow in Windows

I've done some searching and quite haven't come across the answer I am looking for. I do not think this is a duplicate of this question. I believe Windows could be a suitable development environment ...
1
vote
4answers
122 views

Depend on built technology, or build your own [duplicate]

Possible Duplicate: How to decide between using an existing eCommerce solution and building your own? I am starting a ecomm business and my site idea is pretty similar in functionality to ...
0
votes
2answers
172 views

Where can I find language specific programming standards and style guides?

Is there a good source of best practices, programming standards and coding styles for different languages, specifically Ruby and Javascript?
10
votes
5answers
2k 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 ...
2
votes
1answer
234 views

Am I experienced enough to learn and develop immediately using Ruby on Rails?

General Question I understand that discussions revolving around questions of this form run the risk of becoming too specific to help others. So, perhaps a better, general question would be: What ...
3
votes
3answers
468 views

Why rails use yaml to config database instead of plain ruby code?

Most of configuration files in ruby such as Gemfile, gemspec, are just ruby code itself. Why database configuration file in rails is the exception?
8
votes
2answers
604 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 ...
5
votes
1answer
570 views

Ruby Shoes for non-trivial apps

I've been taking a look at Ruby Shoes for GUI development with Ruby. So far, it's been a pretty good experience for making simple apps. However, I am quite worried about being able to write large ...
1
vote
1answer
142 views

Rails Book Suggestions [duplicate]

Possible Duplicate: Is there a canonical book on Ruby on Rails? I'm looking to learn Ruby on Rails. I already have a small background in Ruby and don't really need a book that covers both, ...
19
votes
3answers
839 views

Moving away from .Net to Ruby and coping without intellisense

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 ...
10
votes
4answers
896 views

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

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 ...
40
votes
7answers
9k 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++, ...
8
votes
4answers
382 views

I have a bad memory. Is dynamic typing language+vim appropriate for me?

I am switching from C#+Visual Studio to Ruby+Vim for a few months. The only thing that I am missing from C#/Visual Studio is intellisense, especially when I have a new ruby gem to familiarize. As a ...
1
vote
1answer
571 views

Starting with Ruby on Rails? I see a lot of criticism everywhere. Is it okay to start with Rails now in 2012? [closed]

I have worked on C before and have never tried my hands on any web application creating framework. After some convincing from one of my friends I thought of giving Rails a go. Before starting to work ...
4
votes
2answers
172 views

How to deal with variables when extracting methods in to smaller methods?

This is an abstract question to clarify a refactoring concept in the ruby language. Assume in the real world that there would be many more variables and method in the Furniture Class and Refinish ...
1
vote
4answers
382 views

Should a novice programmer learn several languages at once? [duplicate]

Possible Duplicate: Is it worth being computer languages polyglot? I am half way through my first year at university studying computer science. I have been learning Java on the course and ...
0
votes
1answer
203 views

Client wants to resell the app I programmed [closed]

Not sure if this is the right forum. If it's not, please let me know and I'll move it. So I have been asked by a client to develop a RoR Web App for them. He asked me if the development is their ...
5
votes
3answers
238 views

Generalized VS Specialized technical solution; what to take into account?

We recently had a discussion in the office because of conflicting views between developers. One side (side S) argued technical solutions -generally- need to be a specific as possible, while the other ...
3
votes
2answers
377 views

How to match responses from a server with their corresponding requests?

There is a server that responds to requests on a socket. The client has functions to emit requests and functions to handle responses from the server. The problem is that the request sending function ...
3
votes
2answers
552 views

Ruby Drag-n-Drop IDE and Ruby programming related

I am writing a small desktop GUI application using Ruby and Gtk2. I am using RubyMine 3 on Linux (Fedora). I created a simple class to create a Gtk Window but now I feel it takes more time to just ...
0
votes
1answer
60 views

Which technology should be used for a minimal Job Controlling System on Linux shell? [closed]

I'm designing some sort of console tool for linux shell, which must be able to start processes in the background and, depending on their output, continue it's functonality in a specific manner. ...
3
votes
2answers
173 views

Managing constants in application

Our application is having 2 parts a web app running ROR and a web service running Sinatra. The application communicates with the mobile device for which we use different constants depending on the ...
6
votes
2answers
490 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 ...
9
votes
3answers
2k 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 ...
7
votes
1answer
471 views

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

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: ...
2
votes
1answer
2k views

Why do people suggest not to use instance variable for views in Ruby on Rails

Why do I hear that it is not good to share instance variables between controllers and views. I kind of like it because I can see immediately via the @ that something is coming from the controller. I ...
3
votes
4answers
1k views

What is better done in Ruby and what is better done in Haskell? [closed]

If you have experience with both Ruby and Haskell, which of the following best describes the applicability and comparative power of the two languages? The two languages better suit different kinds ...
6
votes
3answers
1k 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 ...