…Michael and Satoshi (all 3 are novice chess players) have requested you to write a Ruby program for them, that could help them with a listing of the best black opening chess moves.
You tell your chess friends that if they need help they should individually send you a text file containing the white's first move, as follows: h4 a3 e4
h4, a3, e4 would be Ruby methods in your DSL program. Once we get the DSL to follow valid Ruby syntax, Ruby does all the work to parse the file …
…Michael and Satoshi (all 3 are novice chess players) have requested you to write a Ruby program for them, that could help them with a listing of the best black opening chess moves.
You tell your chess friends that if they need help they should individually send you a text file containing the white's first move, as follows: h4 a3 e4
h4, a3, e4 would be Ruby methods in your DSL program. Once we get the DSL to follow valid Ruby syntax, Ruby does all the work to parse the file …
…with a colleague of mine. RuPy is a conference in Poland about both Ruby and Python, and since we use both at Podio it seemed like a good conference to visit. Also we have yet to hire our first employee from Poland or any other East European country at Podio, so it could be a good chance for some networking.
The talk is titled " Dogfood your API" and is about the Podio API and how our entire web application is based on the API, never making …
Have you run any performance test with this? Any bad affect on Ruby's internal method lookup/caching?
Jim Gay said on Friday, September 30, 2011:
@ Ben, I've not run performance tests on this. As far as I understand, the VM will clear the method cache any time this happens.
At first glance, that may seem expensive, but I'm going to do more research on it. With well separated code, the impact of that goes down since we wouldn't be relying on most of those …
…user written Ruby code server-side is it could be EVIL! Yes, whatever you type in that Ruby console, we will run it on our precious little web server.. sounds dangerous right? With the help of Dray Lacy, Eric has created a library we'll be releasing shortly called RubyCop. He'll be doing a talk on Sandboxing this Saturday at Rubyconf if you happen to be here.
New Host - We are hosting TryRuby up on Heroku , which (in our minds) makes things even …
In this episode, Peter and Jason talk about some upcoming releases of Ruby and the new release candidate, performance and monitoring, and some noteworthy new queueing systems.
Show Notes Open links in a new window.
Be Prepared for Ruby 1.9.3 and 1.9.4: What's New and What's Different
How to install Ruby 1.9.3rc1 with RVM - waiworinao ★ random notes by arvid andersson
Ruby 1.9 Walkthrough: Learn Ruby…
As a language, Python has much in common with Ruby, Heroku's origin language. But the Python community has its own unique character. Python has a culture which finds an ideal balance between fast-moving innovation and diligent caution. It emphasizes readability, minimizes "magic," treats documentation as a first-class concern, and has a traditon of well-tested, backward-compatible releases in both the core language and its ecosystem of libraries. It blends approachability …
…in there for different situations" hints at a deeper problem that I've seen in a lot of Ruby and Rails applications.
Instead of working to refactor the code in the controller, I'd like to back up a bit and take a look at an alternative refactoring that relies on OO concepts while taking advantage of some of the facilities that Rails has to offer. In the end, we'll be left with more idiomatic Ruby and Rails code that is also easier to understand and maintain.
…benchmarks, we found this approach to be much faster than doing the regular expression matching in Ruby, mostly because of the lack of ActiveRecord overhead.
Caveats
Using regular expressions in your SQL has the potential to be slow. These queries can't use indexes, so a full table scan is required. If you can get away with using LIKE , which has some regex-like functionality, you should. As always: benchmark, benchmark, benchmark.
Additionally, MySQL supports POSIX regular …
Continuous Testing with Ruby, Rails, and JavaScript now in print
Designed for Use: Create Usable Interfaces for Applications and the Web now in print
Podcast: Interview with Avdi Grimm, author of "Exceptional Ruby"
June Issue of Pragmatic Programmer magazine, PragPub
Exceptional Ruby: Master the Art of Handling Failure in Ruby now available
Rails Sale! 40% off
May issue of our Magazine, PragPub…