Questions about Ruby, dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.
0
votes
1answer
65 views
ruby-idiomatic hashes vs arrays
So I am still fairly new to ruby, though I have noticed that it is very hard to create 2d-array and that hashes seem to be more of the go to data structure than arrays.
I was wondering why the Ruby ...
0
votes
2answers
67 views
Ruby - When is it adequate to create a class method?
I was reading a bit about class methods, here: http://www.railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/
It explains how to create a class method, but frankly, it is a bit ...
2
votes
1answer
61 views
How do I know when should I package my classes in Ruby?
In Ruby, I'm creating a small game development framework. Just some personal project - a very small group of friends helping.
Now I am in need of handling geometric concepts. Rectangles, Circles, ...
0
votes
1answer
64 views
Algorithms for Data Redundancy and Failover for distributed storage system?
I'm building a distributed storage system that works with different storage sizes. For instance, my storage devices have sizes of 50GB, 70GB, 150GB, 250GB, 1000GB, 5 storage systems in one system. My ...
0
votes
3answers
207 views
What can I do with Ruby beside RoR?
Beside RoR, what do people use Ruby for? Is there any use for Ruby on Windows platform? If you use ruby for scripting why not use Bash or Powershell?
0
votes
2answers
75 views
What is the general concept name for mocks and stubs? - RSpec
Is there a common concept name for mocks and stubs? What word should I use when speaking over both of them?
-5
votes
0answers
66 views
How can I create an online programming course? [closed]
I have started using CodeCademy to teach Ruby, but after creating four exercises, it has become apparent that their SCT (code validator) is faulty, and cannot test for variable definition.
Is there ...
7
votes
2answers
207 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 ...
-1
votes
0answers
26 views
Load Testing of Ruby Rest Client [closed]
I'm developing a REST client which is responsible for posting large numbers of notifications to various urls. It's fully unit-tested, now I want to do some load testing.
One option seems to be to ...
1
vote
0answers
49 views
Does RubyMotion have good libraries/frameworks?
I know Ruby; I refuse to spend time learning Objective-C (tried and strongly disliked it). But I'd really like to develop apps for iOS, and I recently discovered RubyMotion.
But despite some initial ...
0
votes
0answers
219 views
Why is Ruby considered elegant language and Python not? [closed]
Can someone explain me what is elegant in ruby? Because these two languages have both good simplicity, readability, writability, maintainability. What makes ruby elegant and python not?
-1
votes
0answers
54 views
Cross platform web+client-server application, Ruby? [closed]
I would like to get some ideas on my new project.
Here is some background of myself and the project:
I have been a Oracle Form developer and VB/MSSQL "back-end" developer. Most of my work is in the ...
-2
votes
1answer
168 views
Learn Ruby or Java as a total beginner [closed]
I want to change my career from information security to RoR developer I left my job and I'm commited to study some months by myself, I don't have a lot of knowledge developing. I have read some books ...
0
votes
0answers
69 views
How do I test my non-Ruby website using Ruby?
I would like to build some Ruby tests to test my non-Ruby website. I love the Ruby testing tools (webrat, capybara, etc.) but they seem to be targeted to testing local sites.
How can I use these ...
2
votes
1answer
118 views
How do I distinguish between things belonging to the standard library, specific gems, and those that are user-generated in Ruby?
I'm a beginning programmer, that for various reasons is using an existing Ruby codebase to learn to program. My goal is to be able to understand and eventually extend this codebase. However, I find it ...
0
votes
2answers
97 views
Why there is much more support for closed xls format in rails (and ruby) than to an open ods format?
It is little depressive, but it seems to me that there is much more support for manipulating ugly proprietary closed format like xls in rails (and ruby) in general that to documented open Open ...
0
votes
1answer
92 views
Benefits of using XML builder vs templating language like ERB?
I'm doing a lot of work with XML, our legacy XML generators use the ruby template language ERB to create the XML files. I've been experimenting with Nokogiri and the builder model of creating XML, but ...
3
votes
1answer
122 views
Order collisions in ecommerce
Suppose I have a web app where sellers add their products and set them as available for sale. Then I show a list of products in my mobile app, where I get products via my REST API.
My problem: suppose ...
0
votes
3answers
132 views
Why would you want to use an array, or hash as hash key in ruby?
i'm using Ruby 1.9.3
I figured out that you can use an array, or a hash as hash key in ruby:
h = Hash.new
h[Array.new] = "Why?"
h[Array.new] # Output: "Why?"
h[Hash.new] = "It doesn't make sense"
...
0
votes
0answers
8 views
How can I capture data using regular expressions in Ruby? [closed]
How could I capture just everything before the underscore using regular expressions for the following group of strings? These strings are in an element of an array.
"FBXW7_NM_018315_2"
"PTEN"
...
3
votes
2answers
255 views
Getting practicality of PHP from Ruby or Python
I have a rather odd problem. I love the practicality of PHP - specifically that I can fairly safely assume that on any random server I'll have access to the MySQL libraries, and that I can go between ...
1
vote
1answer
492 views
Why does gmail use java? Is there really a advantage over something like php or python? [closed]
Note: I know that none of you (probably) work for google, so this is a lot more of a conceptual question.
So yeah, i discovered that Gmail uses java and that got me thinking, Why?
I personally never ...
1
vote
3answers
158 views
Is there any situation when there's no alternative to instanceof?
It seems to me that instanceof comes from the land of functional programming and is a watered down version of pattern matching and that the OO altenative to it should be dynamic dispatching.
In OO ...
4
votes
1answer
272 views
Is it possible to write a code without class methods, globals, and class variables? [closed]
I'm designing my own programming language for fun, and I'm thinking of making it fully Object-oriented (no statics, no globals, no class variables, no class methods), so I need to find a way to ...
0
votes
0answers
321 views
How to stay up to date as a programmer and developer [duplicate]
So I am going to college right now for computer science, and I am reading a lot of books on different languages that have nothing to do with my courses in school, and I found out that I am completely ...
0
votes
1answer
127 views
How does dependency inversion principle work in languages without interfaces?
In C#/Java, the dependency inversion principle is often demonstrated by high-level classes that depends on an interface/abstraction (that it owns). Low-level classes will implement the interface, thus ...
2
votes
1answer
130 views
Attempt at understanding the double-dispatch pattern
I've been trying to grok the double-dispatch pattern and having a hard time. I finally attempted a sample program to help myself understand. Here's the gist. But then I decided to attempt it without ...
-2
votes
1answer
124 views
Preliminary Ruby Resources [closed]
I've been programming with PHP for awhile as both a professional/hobbyist and would like to learn Ruby as well. I was going to pick up Agile Web Development with Rails and was wondering if there is ...
0
votes
1answer
99 views
Online stores service design
I am designing an online store service app with rails. Everyone who wants to make his/her own store can do it with this app by just signing up and choosing a domain. I want to make it as SaaS as it ...
-1
votes
1answer
479 views
Simple game using Ruby on Rails [closed]
I want to create a simple game like tic-tac-toe or connect4 or something like that using Rails. I have a (very) basic idea of how to write a Rails app with regular html elements, but I don't really ...
8
votes
2answers
229 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 ...
1
vote
1answer
163 views
Should an open source gem contain .rvmrc?
Using .rvmrc seems to be considered a best practice for apps.
But should an open source gem contain .rvmrc in their source code on Github? I think it's not good to require everyone who wants to ...
1
vote
1answer
183 views
Ruby manager for Windows: Is Ruby's PIK alive or dying?
At first, please forgive probably offtopic and/or notconstructive question, but I truly have no idea where to ask it. At first I targetted StackOverflow there's at least some PIK-related traffic ...
1
vote
1answer
75 views
Building an RPC framework
I'm curious about what it takes to build a simple and robust RPC framework. I've only looked at a few ruby frameworks but they are all lacking in some way. What I want out of an RPC framework is some ...
1
vote
1answer
190 views
When can one call themselves a “Rubyist”? [closed]
I was wondering what that term even meant. Is it something to do with one's amount of knowledge about the Ruby language or just the plain idea of using it. When can one call themselves a "Rubyist"?
20
votes
6answers
883 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, ...
3
votes
3answers
204 views
Is there an idiom for a loop that executes some block of instructions between iterations? (In Ruby in particular)
I often need to do some operations in a loop and some other operations between the iterations. A simple example would be collecting words from an array into a string, spelled backwards and separated ...
2
votes
3answers
292 views
Setting up a simple Ruby\Rails environment
I am coming from a .NET background and beginning my journey into the Mac OSX\Ruby\Rails environment.
A lot of the resources I have found such as this one have between 5-10 steps for setting up a ...
2
votes
2answers
269 views
How to fix bad fundamentals? [closed]
I am a native PHP developer, and have been for about a year or so. I love PHP and it was very easy for me to learn, but I have developed some bad habits along the way due to never having a formal ...
2
votes
1answer
150 views
Does it make sense to create a Ruby wrapper to reference a Java object that does exactly the same thing?
I am using JRuby.
In my Java code, I have a class called Texture, capable of doing some graphic manipulation stuff.
In my Ruby code, I will usually need to draw things, so though I should simply ...
2
votes
1answer
305 views
What is a closure and how is it implemented in Ruby?
In the context of the Ruby programming language, what is a closure and when do you use one? What are the uses for it in Rails?
0
votes
2answers
396 views
How to execute a Ruby file in Java, capable of calling functions from the Java program and receiving primitive-type results?
I do not fully understand what am I asking (lol!), well, in the sense of if it is even possible, that is. If it isn't, sorry.
Suppose I have a Java program. It has a Main and a JavaCalculator class. ...
0
votes
3answers
141 views
Render Ruby object to interactive html
I am developing a tool that discovers network services enabled on host and writes short summary on them like this:
init,1
└── login,1560 --
└── bash,1629
└── nc,12137 -lup 50505
{
...
-2
votes
1answer
147 views
Where can I find out about basic python usage, cli, editor and testing? [closed]
I'm coming from Ruby / Ruby on Rails to Python.
Where can I find or find resources about:
The command prompt, what is python's version of 'irb'
info and recommendations on editors, plugins and IDE's
...
0
votes
1answer
103 views
Should tests be in the same Ruby file or in separated Ruby files?
While using Selenium and Ruby to do some functional tests, I am worried with the performance. So is it better to add all test methods in the same Ruby file, or I should put each one in separated code ...
3
votes
1answer
252 views
combining ruby and C++
I've been discussing a conceptual project with a friend of mine and the the most effective way we've seen of doing it is writing the engine in C++ while the logic would be done in Ruby.
However, we ...
0
votes
2answers
173 views
Question about initial interview for job [closed]
So I feel kind of stupid having to ask this but tomorrow I have a phone interview with a good company. Phone interviews themselves not a big deal for me, but having to tell them my salary ...
8
votes
1answer
524 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 ...
6
votes
4answers
355 views
Is it okay to define a [] method in ruby's NilClass?
Ruby by default does not include the method [] for NilClass
For example, to check if foo["bar"] exists when foo may be nil, I have to do:
foo = something_that_may_or_may_not_return_nil
if foo ...
4
votes
7answers
456 views
Getting my younger brother started on programming [closed]
My younger brother is 13 years old, I started programming when I started to develop Android applications when I was 15, last year my brother gained an interest in it and he would always pestering me ...