Basic Calculator in Ruby

Well, now that I have my Internet back (thanks, drunk driver! that pole wasn’t necessary for anything), I can post what I’ve been working with again.

I’ve opted to try to make a very basic calculator in Ruby. I seem to recall the making of a calculator being a fairly standard program for novice programmers as they make their ways through their early days, so I figured, why not?
Continue reading

Posted in Programming | Tagged , | Leave a comment

Dragons Game in Ruby – Final Product

Considering the project was simply an adaption of an existing program, redone in Ruby (the original was done in Python by Al Sweigart), there was no real difficulty with this program, outside of the discovery of the need of Ruby’s chomp command.

As I had stated before, my primary goal with this was simply to better familiarize myself with methods.

The source can be found on Github.

Posted in Games | Tagged , | Leave a comment

Playing with Methods in Ruby – Planning Stage

Currently, I feel that there are two very critical aspects of Ruby that I need to solidify to be able to truly advance with it. These are methods and Classes. To be fair, the primary concern I have with methods is not so much their difficulty, but that the primary level of exposure I have had with them in the past has been through C and C++, and that exposure has generally be with pointers, instead of normal variables.

As such, I suppose my concern with methods in Ruby is not so much that I will not understand them, simply that I have ever had a dog of a time trying to fully grasp pointers in the C and C++ method calls.

Continue reading

Posted in Programming | Tagged , | Leave a comment

Follow-up: Conditional-Learning AI

I have definitely bitten off far more than I am currently prepared to chew with this idea. At the beginning, the idea seemed fairly straight-forward, and truthfully, it is. However, not yet being confident with such simple things as methods, the program’s pseudo-code has turned into a troubling mess.

Continue reading

Posted in Programming | Tagged , | Leave a comment

Simple Conditional-Learning AI

This goal is probably well above my current level of abilities, but even if it is not a true “learning” type of AI, it does deal more directly with what I would like to do eventually (artificial intelligence, specifically in games), so I figured, why not? The sooner, the better, even if it is simply turning in the right direction, as opposed to facing elsewhere, it is still a change for the better.

The overall project is very simplistic, and other than the user’s input, does not currently involve any other outside influences. I would like to add those, but that is more complex than where I currently am at.

Continue reading

Posted in Programming | Tagged , | Leave a comment

Why I am not using Python

For the time being, the overwhelming majority of posts will deal with Ruby, even though much of what I am currently doing would likely be better done in Python.

There is a simple reason for this: I have had a fair bit of exposure to Ruby already, studying it while also studying Ruby on Rails, while my experience has been significantly less with Python.

Continue reading

Posted in Programming | Tagged , , | Leave a comment

Hot and Cold Number-Guessing Game – Final Product in Ruby

This is the conclusion of the Ruby version of the Hot-and-Cold game.

The source code is available for download at Github, while a brief write-up about the code and my thoughts about the project are available following the break. The source is also posted at the end of this post for convenience.

Continue reading

Posted in Games, Programming | Tagged , | Leave a comment