Skip to main content

All Questions

4 votes
2 answers
918 views

Ruby price calculator for groceries

I am good at logic and most of the time I write working code. But I want to learn writing code which follows best practices and is very efficient. I tried to implement some of them in my code but it ...
Praneetha's user avatar
  • 165
2 votes
1 answer
74 views

Table class to fill array structure with values

The code creates a table and adds rows and columns. Does it make sense to write the code like this? Would you design it differently? Is there a better OOP approach to this? ...
Christian's user avatar
  • 131
2 votes
2 answers
332 views

github page/ DHH Score Challenge in ruby

I wrote the following code which when executed prints the score of https://github.com/dhh. ...
Praneetha's user avatar
  • 165
5 votes
3 answers
1k views

Hangman game in Ruby

I'm just a few months in learning to code and never had my code reviewed. Is this class structure ok? Should I split it differently? How is the code overall? ...
JMac's user avatar
  • 53
3 votes
1 answer
159 views

Vehicle inheritance exercise

I'm learning about using inheritance and super in Ruby. This is a continuation of one of the exercises that is in a book I am reading. I set up my Vehicle class to be the superclass. From there, <...
Nathan's user avatar
  • 165
4 votes
3 answers
3k views

Ruby banking system program

As a beginner I'd like to get any kind of feedback. The more the better. Any optimization and style mistakes? ...
edvard_munch's user avatar
2 votes
0 answers
153 views

Ruby - Asteroids Remake

After some feedback on my last Ruby Code I decided to start another one with two big concerns in mind: Trying to adequate my coding to the OOP paradigm Trying to follow the Ruby Style-Guideliness I ...
IanC's user avatar
  • 259
5 votes
2 answers
1k views

Simple Blackjack program

I created this Blackjack program as a first attempt at Ruby. Would appreciate a code review to see if I am doing things the Ruby way (is there a better way to get user input?), using OOP correctly and ...
tj63's user avatar
  • 53
1 vote
1 answer
218 views

Ruby backup/restore for provisioning

This is my second Ruby coding attempt. Also - this is my first OOP usage in Ruby. I'm using if __FILE__ == $0 form here - same as it is in Python because it's ...
setevoy's user avatar
  • 797
3 votes
2 answers
61 views

Moving a clock forward

I am taking a Ruby class and our assignment was to write a class that takes two users inputs (1. the time, 2. the amount of minutes to move forward). Then based on the two inputs forward the time by ...
Aaron's user avatar
  • 965
6 votes
2 answers
2k views

Bank ATM program in Ruby

After reading a bunch of Ruby tutorials, I decide to write fake ATM bank software. I've tried to use OOP design and just want to know if I'm on the right road. ...
junior stephane's user avatar
5 votes
1 answer
265 views

TicTacToe game in Ruby

I would appreciate any feedback you could offer. I'm self-learning, so I don't really know a "standard" that my code should be up to. I'm also not sure how to get rid of that bit of logic at the ...
chrabyrd's user avatar
7 votes
1 answer
376 views

Command line flashcard game

I've built a simple command line flashcard game for learning Korean. I'm a beginner programmer, so I just wanted to make sure I'm following best practices, especially pertaining to OOP principles. ...
Jamie B's user avatar
  • 315
14 votes
2 answers
763 views

Nokogiri crawler

The following code works but is a mess. But being totally new to Ruby I have had big problems trying to refactor it into something resembling clean OOP code. Could you help with this and explain what ...
Dave Gordon's user avatar