I have just released TryRuby R4.
Website: http://www.tryruby.nl
Source: GitHub - ruby/TryRuby: This 4th iteration of TryRuby is a website where you can learn the Ruby language.
This is the fourth iteration of TryRuby. The original was created by
_why. R4 was created for several reasons:
- The lesson content was getting a bit dated. For instance the stuff
about reading and writing disk files does not really belong in an
entry level course these days.
Writing blog software is also not very appealing anymore - Lesson content also missed some important information
(like IF statements) - All previous TryRuby versions consisted of an irb interpreter with
a web front-end.
Even though some security measures have been taken (isolating and
restricting the irb process and whitelisting input), this still
sounds like a disastrously bad idea from a security perspective!
TryRuby R4 runs inside the web browser -
TryRuby.org (R3) is embedded in a commercial venture. This doesn’t
seem in line with the free spirit in which TryRuby was created - Since I have a C/C++ background and am switching to Ruby, I needed
a small but significant Ruby project for my resume. The original
lesson content was brilliant stuff, so working on TryRuby was a most
enjoyable experience
Changes
By changing the TryRuby mechanics from running irb on a server, to
running Opal in the web browser, I had to make some alterations to the
TryRuby lesson content. Also updated some outdated stuff.
- Opal uses immutable strings, so [ ] based string manipulation was
replaced with gsub - File reading and writing removed and replaced by getting a json file
from the internet - Since irb is not used anymore, it is possible (necessary) to run
entire programs, not enter commands line-by-line - Removed the pop-up stuff
- Removed mousehole stuff
- Improved the feedback given to the user based on the program’s output
a bit - Added support for lesson content in multiple languages. Translators
are welcome !
I will be starting on the Dutch translation soon - Added explanation of if/else statements
- Changed the subject of the “Class” tutorials from building a blog (so
last decade) to making an instant messaging app called: Twatify - Used markdown with frontmatter for editing lesson content
- Used middleman as development environment
- Added some articles with more background information for aspiring
software developers
Any suggestions for improvements are welcome.