Apr 10

App Engine with Ruby, Python, and Perl

Comic, Perl, Python, Ruby, Tech with tags: 7 Comments »

App Engine with Ruby, Python, and Perl

Since I am still in London, my sarcasm quotient extends just a little more than usual (it’s pretty high in the US to start with, even if it is the “lowest form of humour”).

I had a fair amount of email from people, and saw some blogs, complaining about the fact that Google App Engine currently supports Python only. On the video, and in the docs, it is frequently mentioned that other languages are to come, and that the infrastructure itself is language neutral. We have to start somewhere!

I personally have a slight Ruby preference, but there is a funny thing about Python. Hardly anyone really hates it. It may not be the language of choice for many people, but a lot of people are telling me:

  • Ah, was hoping to try more Python
  • I was looking for an excuse to code a Django app
  • I can deal with that. Thank god you didn’t force Java

This is a little like the iPhone SDK being Objective-C. People are picking it up. I think this happens then your desire to play with the new toy is greater than your religion!

I am very excited to see more languages and features on Google App Engine, but I know that I just have to be a bit patient, and in the meantime, I had been looking for an excuse to code a Django app.

Mar 05

Choosing a Web framework over the years

Comic, Ruby, Tech, Web Frameworks 3 Comments »

Choosing a Web Framework

I read through Wired on the plane. In fact, I use Wired as a barometer on how much I am traveling. If I go to the airport and there IS NOT a new Wired for me to pick up, I know I am traveling too much.

Anyway, I perused the article on 37signals which did a good job on not being a total love-fest. It is one of those articles where you take out of it what you thought before. If you think they are arrogant gits you will say “yup, arrogant gits”. If you think they are doing great things for the industry, you will continue to think that too.

It did make me think about how great we had things a couple of years back when Rails was red hot. There was that brief time where you tons of people were saying “Wow, I am going to choose Rails for my next application”. The alpha masses from Java, PHP, ASP, all checked it out.

Now though? They are moving on to check out other solutions. Many frameworks have copied some of the good things from Rails that make sense in their worlds. Now when I think about the next toy to play with, I have a large set of potential “cool looking” frameworks to try.

For such a brief time, life was easy.

Mar 03

It’s 3am…. can your Web framework handle a diggin?

Comic, Politics, Ruby, Tech, Web Frameworks with tags: , 2 Comments »

Rails at 3am

I hate the fear ads, and seeing the Clinton one was sad to see. Showing pictures of kids etc… are you kidding me?

I know Hilary is scrapping for her life, but still. I really don’t understand the experience line too, since she has only been a Senator for a few years. How she comes up with 32 years baffles me.

Anyway, it all reminded me of the fear-monging around Rails scaling.

Feb 29

Lisa Awards: Biggest Hack for a Language Runtime

Comic, Ruby, Tech with tags: , , No Comments »

Lisa Awards: Biggest Hack for a Language Runtime

People make fun of the Ruby MRI runtime. The Java and Pythonistas giggle. What is interesting though is how it has been good enough for a lot of people. However, there is no reason for a Ruby runtime to be that slow, so it is great to see the competition across YARV, Rubinious, and of course JRuby.

The beauty of being slow, is that you have a lot of room to get faster :)

Want to learn about Ruby 1.9? Matz came to Google the other day to talk about it:


What about the other awards?

Got some ideas for awards you would give?

Feb 14

Interview Day: Ruby

Comic, Ruby, Tech with tags: No Comments »

Interview: Ruby

Build a Continuation DSL … without using class_eval

What about the other languages?

Got some good ones for other languages like Fortran, BASIC or assembly?

Jan 05

Skynet: MapReduce in Ruby

Ruby, Tech with tags: 3 Comments »

Adam Pisoni of Geni.com has released a Ruby Gem of a new library skynet (have to love the name!), which is a Ruby implementation of MapReduce (not a wrapper on Hadoop or anything like that):

With Skynet, one can easily convert a time-consuming serial task, such as a computationally expensive Rails migration, into a distributed program running on many computers.

Skynet is an adaptive, self-upgrading, fault-tolerant, and fully distributed system with no single point of failure. It uses a “peer recovery” system where workers watch out for each other. If a worker dies or fails for any reason, another worker will notice and pick up that task. Skynet also has no special ‘master’ servers, only workers which can act as a master for any task at any time. Even these master tasks can fail and will be picked up by other workers.

In general:

Skynet works by putting “tasks” on a message queue which are picked up by skynet workers, who execute the tasks, then put their results back on the message queue. Skynet works best when it runs with your code. For example, you might have a rails app and want some code you‘ve already written to run asynchronously or in a distributed way. Skynet can run within your code by installing a skynet launcher into your app. Running this skynet launcher within your app guarantees all skynet workers will have access to your code. This will be covered later.

Skynet currently supports 2 message queue systems, TupleSpace and Mysql. By default, the TupleSpace queue is used as it is the easiest to set up, though it is less powerful and less scaleable for large installations.

If you are in Rails-land, you get some nice additions to ActiveRecord such as a distributed find:

YourModel.distributed_find(:all).each(YourClass)
YourModel.distributed_find(:all).each(:somemethod)

and send_later:

model_object.send_later(:method, options, :save)

I can’t wait to see people implementing Terminators ;)

Jan 04

The Zed Shaw Interview

Ajax, Ruby, Tech with tags: , , , 2 Comments »

Rob kindly kicked in some podcasting time when he was at RailsConf, and I sat on the content for far too long. It didn’t really fit right on Ajaxian, since Zed only talks about Ajax a little bit, but it was fun content and I wanted to get it out there, so I finally published the interview with Zed Shaw on the Rails community, the role of the Enterprise, the state of Ajax, JRuby and Rubinius, documentation, tests, tooling, the role of patents in software, and a whole lot of opinion.

it is interesting to listen to Zed in the wake of his Rails rant, as you see some of the seeds of that rant, but hearing them with a real voice is a lot different to the harsh medium of the pen. It is softer to hear someone jabber on, even if he still swears and has very strong opinions indeed.

People like to pick sides, but I am trying not too. There is some truth in there, and things that the Rails community can learn from at the very least. Then again, I haven’t been personally abused in his rant so it is easier for me to take than someone who was directly attacked.

A few quotes:

  • On Semantic Web: Einsteins brain on a crack whores body isn’t going to happen
  • I’m waiting for someone to blind-side the entire Web stack
  • Some people hate me, but love Mongrel
  • Where is the XP for managers

Listen to the interview directly, or subscribe to the podcast.

Jan 04

Predicting Rails with Google Trends

Ruby, Tech with tags: , , , 2 Comments »

Since the Zed Shaw rant, everyone has been coming out of the wood work to say one of:

  • Zed is a dick, and wrong
  • Zed is a dick, and right
  • Rails is OK, and here is why
  • Rails is in trouble, and here is why

Tim Bray put his predictions out there, and Joe Gregorio responded.

One of the core problems with predicting the future, is knowing the present. When you look at “how successful Rails is” people use varying metrics:

  • Woooah look at the book sales
  • DHH is being really loud
  • Look at the number of jobs out there
  • Look at Google Trends
  • I know a couple of people, and one of them is doing a startup in Rails

Obviously, they are all minor data points. To talk to Joe’s Google Trends hypothesis, you normally find that a technology takes off at some point, and lots of people start talking about it. Many of these people are not even using the technology. Some are checking it out for the first time. Some are ranting against it. A lot of this kind of talk has died down and Rails is maturing.

I am not going to predict anything about Rails. Who cares? We are seeing more projects coming online, and I have seen successful projects rolling out. When I do a new project, Rails is a serious contender, but sure it isn’t the only one.

Ok, one little prediction:

More live applications will be launched on Rails in 2008 than in 2007.

Dec 11

Rails, and how the opinion can keep back Rails EE

Java, Ruby, Tech 1 Comment »

Marcus Ahnve posted about Merb, and how it is “leaner and meaner than Rails”.

His core point:

I have used Rails on a daily basis for almost a year now, and before that I was a night time hangaround. While I am definitely a happier programmer using Rails than anything built on Java, I still feel that it can get better.

First of all I want more things to be plugins. And really, they should not be plugins at all but gems instead.

Why plugins? We use RSpec instead of Test/Unit, HAML instead of erb and are seriously looking into JQuery instead of Prototype. And of course, we are using Mercurial instead of Subversion. All of this is of course possible to use in Rails, but a lot of things are sort of made for the default choice, such as generators generating tests, and plugins having the -x switch for Subversion. And I am pretty sure that this is the way DHH wants it.

The part that interests me is “we use X instead of Y”. I get it. People have been doing Rails for quite awhile now, and as with everything, they see things they would like to do different. That PHP/ASP/JSP-like, ugly <% %> syntax is a drag. It makes me think that I will be putting code throughout the view god damn it! So, I will give HAML a try, or some other builder-based system, or write my own. Why not? With Ruby, surely I can put together a great templating system in about 10 lines of code.

The problem of course is one of the reasons that you probably jumped to Rails in the first place was due to the paradox of choice that you had in Java land. You sat down with Rails for the first time and had a sign of relief as you ran % rails mynewproject. Just like that, you had bypassed the weeks of work evaluating which combination of Java frameworks and tools that should be used on this project. You didn’t have to argue with The Architect about the merits of abstracting logging to a bizarre degree with commons-logging.

When you talk to Railsy folk you will already hear about various plugins that you should be using. If you aren’t careful, you will be in the same path as before, until you move on to Django, …

Oct 15

Ruby support in IntelliJ 7

IDE, Java, Ruby, Tech No Comments »

IntelliJ 7 has now shipped and I am most excited to see the non-Java support. If you take a peak at the Ruby features, it looks pretty good and thorough:

  • Smart, scope based JRuby-aware Ruby code completion
  • Automatic completion of built-in methods
  • Smart Ruby statements completion
  • Completion and automatic resolution in require and load calls
  • Ruby code syntax and error highlighting, with brace matching and folding
  • Code style support with automatic formatting, indentation and TODO marks
  • On-the-fly Ruby code analysis with quick-fixes
  • JRuby and Ruby-aware intention actions
  • Advanced Ruby code and project navigation
  • Ruby-aware structure view, quick structure popup
  • Go to Ruby class, file, symbol and declaration actions
  • Quick declaration view, context and method parameter info
  • Quick overriding of classes, modules and methods with active navigation gutters
  • Multiple ruby-aware refactorings
  • Ruby code usage search for local variables, method parameters, class fields and constants
  • Dedicated Ruby run configuration and quick script execution
  • JRuby support for running Ruby applications, with cross-resolution of classes between Ruby and Java
  • Unit testing support with quick tests launching for a specified method, class or set of tests
  • Stack trace analysis with one-click Ruby code navigation
  • Ruby code documentation lookup with hyperlinks and navigation
  • More than 50 Ruby and RSpec live templates
  • Shortcuts settings for rake tasks, generators, RSpec, etc

I like Textmate and all, but it is far from being IntelliJ. Textmate is fast, clean, and simple. IntelliJ is smart. Netbeans has done a great job with Ruby support, and it is fantastic to see IntelliJ put its hat in the ring. I am looking forward to putting it through its paces. As much as I like IntelliJ, I have to admit that sometimes I wish that I still have version 3 around…. which was lean and mean. Hopefully the performance improvements are real in v7.