Sunday, March 26, 2017

Project Proposal

So, my proposal is this:

I intend to create a program which will ask for an input string, a current base, and a targeted base (and a-z vs 0-p for base 26) anywhere from base 1.0000001 to base 62.999999, using 0-9, then a-z, and then A-Z.

Essentially, it will convert any base to any other, be it large, small, integer, non-integer, etc.  It will also be able to convert non-integer numbers, and have a moderately large number of digits following the decimal point if needed.

This program will be properly sanitized, with the standard returns of errors if the inputs do not fit demand.

Sunday, March 19, 2017

Ruby Vs. Java: Why is Ruby Used So Much In Industry?

Ruby is everywhere in industry, as anyone who went to the Healthcare IT event can tell you.  But why?  It's not a specialized language like PHP or SQL, it's not a derivative of C, and it doesn't have as varied a library as Python.

The answer lies in its versatility, simplicity, and numerous frameworks/enhancements, like the famous Ruby on Rails, RubyForge, RAA, RubyGems, and libraries for website and GUI applications.  As such, Ruby is extremely useful for basic scripting and clear, intuitive design.  An example of such a benefit is evident from this hypothetical scenario.

Suppose that you had to write a program in Java which took an array of literally anything (ints, strings, other lists, nulls, objects, kitchen sinks, black market organs, wookiees, etc-- all jumbled together) and returned it without all the nulls and duplicates.  You could use sets or the like, but that'd be very complex.  You could use an augmented for loop to add values to a new list if they're not nulls and not contained in the list, but that'd be very long.  There are no solutions that are both simple and short.

So what can a more general language such as Ruby do?  Well, this:



Oh snap.