Assaf Arkin

Author
+ Follow
since Feb 09, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Assaf Arkin

Thank you for having us, it was a pleasure. And congratulation to the winners.
15 years ago
Very similar. The main difference is that you use raise/rescue/ensure instead of throw/catch/finally. (The catch keyword is reserved for something else)
15 years ago
Check out [url=http://shoooes.net/tutorial/]Shoes[/url]. On Windows you can use Ruby.Net, and on Mac Ruby has access to all the Cocoa APIs.
15 years ago
Are you using a proxy server? Try using the option --http-proxy or setting the HTTP_PROXY environment variable.
15 years ago
Yes. Check Amazon, Hulu, LinkedIn, YellowPages and [url=http://rubyonrails.org/applications]many more[/url]. We do cover deployment for production servers in chapter 8, and deploying Web apps with load balancing in Appendix C.
15 years ago
You might need to set $KCODE = 'U' in your script to tell Ruby to use UTF-8 by default.
15 years ago
Grails was originally called "Groovy on Rails", and from what I understand copied all the good ideas behind Rails to the Groovy language. I think it did a good job copying Rails, but also Rails is still far ahead.

15 years ago
Meta-programming is big. You don't realize how much time you spend maintaining unnecessary code until you go down the path of meta-programming. You're letting the code do more work for you.

Behavior Driven-Development. In some languages, writing tests is painful, feels like punishment. Ruby makes testing so much easier, so it's easier to develop applications tests first, easier to refactor the code, since you have tests that can tell you when something goes wrong. It's easier to keep the code clean and without smell. And the next step, writing the design of the application, the behavior, as part of the application itself.

Duck typing, in fact the whole approach to OO, means my Ruby code has very shallow class hierarchy, and less classes than the Java equivalent, which by itself gets rid of a lot of complexity.

Scripting. I'm surprised every time I see people clicking through menus, upload wizards, admin panels to deploy a new version of the application. Can't you just automate it with a simple script? Not all scripting languages are actually good for automating your workload, though. You can do a lot of that with Ruby, not so much with JavaScript.
15 years ago
I get a lot out of working with Ruby, part of it are all the tools/libraries out there, part because it's a very productive language: it may not do more, but you'll get more done in a given day. Its fun to use, which might be a reason for getting more done with it.

Just my impression, but I think there's a lot of innovation and creativity happening around Ruby. Maybe there's something in the language? When I notice that other languages are comparing themselves to Rails, Web frameworks to Rails, etc the logical question is, why not be in the center of it all?

Remember that Ruby runs very well on the JVM (JRuby), but being its own language gives it opportunity to do things differently, possibly better.
15 years ago
For internationalization, there are several libraries to choose from. The one I'm most familiar with is [url=http://github.com/mattetti/i18n]i18n[/url], which I use as part of Rails.
15 years ago
I was working on a PHP library for extracting microformats from HTML, when a friend introduced me to Ruby. As an exercise, I decided to rewrite it Ruby, and fell in love and never looked back.

The applications I work on mix front-end and back-end stuff, and on the back-end I think Ruby is a league away from PHP. On the front-end side, for larger applications I'll use Rails, I never used CakePHP so I can't tell if it's better or not. For smaller stuff, I'm going to use a smaller framework like Sinatra, or no framework at all, and it will be either Ruby or PHP, most likely PHP: my site it a WordPress blog, so it's just easier to do everything PHP.
15 years ago
Don't believe everything you read on TechCrunch :-)

They're still using RoR for the site, so do many other high profile sites. The key to that, Rails keeps moving forward, it came a long way since 1.0, the upcoming 2.3 is much faster, better caching support, smarter queries, etc. I think Rails got to be good enough for general purpose sites around 2.1.

The scaling strategy for RoR is the same as PHP and Python, and I recommend you check out the [url=http://railslab.newrelic.com/scaling-rails]Scaling Rails videos[/url].
15 years ago
On the testing front, have a look at [url=http://cukes.info/]Cucumber[/url]. It's a BDDt framework that allows you to specify how your application should behave, and then fill out the details to test that behavior. You write the specification in your native language, the code in Ruby.

[url=http://buildr.apache.org/]Buildr[/url] is a build tool that came out of the need for something better than Maven. It uses a DSL for defining projects and build tasks; technically ESDL, since it's a mini-DSL embedded in a host language. In the book we talk about God.rb which has an ESDL to describe monitoring and management of services.

That's just off the top of my head, and yes, I think we'll see a lot more DSLs in the future.
15 years ago
Most of what we cover in the book applies to both standard Ruby (aka MRI Ruby) and JRuby. You'll be able to use the same code samples and libraries with both.

With JRuby you can also use Java libraries, or run Ruby scripts inside your Java application, so we cover that in a separate appendix. We also deal with deploying Ruby Web applications as WAR files.
15 years ago
We don't mention Watir. We only had one chapter to talk about testing, clearly not enough :-)
15 years ago