I’ve been reading the RESTful Web Services book. I like it a lot. The only thing I don’t like is that there is too much Ruby in it. Ruby, please, go away. Might be a good scripting language, I don’t know, but to push Ruby or any typeless language for that matter as the way to do things, is just plainly irresponsible. Hey, I’ve been there. Done projects in Perl, Tcl, and Python. The 1st few weeks of the projects are highly productive. You are loving life. Then you find that you need to refactor. You need to search for usages of an object, oh, guess what, you’re screwed. Its funny to me to see that the people pushing these things are usually book writers, or get-in-get-out consultants.
Using a scripting language is like going to McDonalds. The food is quick and tastes great, but the time you spend on the toilet after just isn’t worth the whole experience. Yes, scripting gives you zero turn around development. But, if the industry is going to move to scripting, let’s rally around something type safe. How about Groovy? Sure, it has its typeless aspects, but it doesn’t stop you from doing pure type safe code. The mass of Java programmers out there can easily switch between it and Java. Or even better, improve Java (and Java EE for that matter) to make it closer to zero turn around. For example, adding the ability for schema changes in java.lang.instrument or even silly things like simplifying the package structure in Java EE.
Aug 30, 2007 @ 07:28:23
At last, someone talks about it loud!It seems these last years scripting development has become sort of Cool – I could never understand why! I strongly agree with your comments regarding type safety and re-use.
We have to note though that for sure Java could be a bit more flexible in order to bridge the gap of productivity or easy of use in order to take over the MacDonalds effect!
Anyway I glad someone wrote it..that it’s not so cool as they pretend to be!
Aug 30, 2007 @ 07:31:35
or even better, improve Java (and Java EE for that matter) to make it closer to zero turn around
Just to point out that it already exists a great alternative to Java : Scala (http://www.scala-lang.org/). It benefits from the state of the art on many computer research domains like compilation, type theroy, functionnal programming, etc. And it runs on top of the JVM.
Aug 30, 2007 @ 18:48:18
Thanks for sharing your MacDonalds experience Bill, I thought that was only me 😉
Sep 06, 2007 @ 14:07:27
We did a 60.000 line of Java project (a pretty low level networking software).
Just for fun, some ported it to Ruby.
Result: 15.000 lines of Ruby code and 400 lines of C Code for Performance.
The Ruby version was much smaller, easier to maintain and thanks to the 400 lines of C also faster.
dynamic languages are the future.
Claus
Sep 06, 2007 @ 16:04:11
Not against dynamic language, Claus, just against typeless languages. Also, need the tooling too, Java is just so mature here and barring a huge industry shift, Ruby ain’t ever gonna catch up. That’s why I think Groovy should be the way to go.
Sep 07, 2007 @ 02:08:34
Ruby isn’t typeless it is dynamically typed as opposed to Java which is statically typed. I suggest Ruby can catch up by piggybacking on the JVM and avoiding the prevalent Java design pattern of:
ThingLocator loc = ThingLocatorFactory.create(ThingLocatorFactory.CONFIG_CONSTANT);
ThingFactory factory = loc.locate(ThingFactory.CONFIG_CONSTANT);
Thing thing = factory.create(Thing.OTHER_CONSTANT, Thing.CONSTANT, null);
Okay a mild exaggeration.
Rails however does blow, particularly ActiveRecord which is flat stupid, a massive step backwards. I find it frustrating to hear RightIsWrong arguments revived and used to justify it or stupid 400x faster bla.
Ruby has its places. Check this out:
http://buni.org/viewvc/meldware/mail/mailtest/src/java/org/buni/meldware/mail/imap4/imap_fetch_bodystructure.rb?revision=1.2&view=markup
You’re telling me I should write a fat assed Java class for this? As for scripting = bad && ruby == scripting…well there is no reason that Ruby can’t be jitted and run on the JVM. Adobe JIT’d JavaScript (ECMAScript) and de-suckified it in the process…why not Ruby? I’m not sold that Java style static typing is the only way and we must be restricted to it to save ourselves from ourselves. Sure strong typing, but dynamic typing and a language meta-model is yummy too. While I’m not a big Web Services fan, binding to a dynamicly created Object is a pretty clean thing to do. In fact you secretly believe this too but don’t even realize it. WTF do you think the JBoss “Invocation” object is!!!! Proxy.create and all is really a workaround for Java not being able to create an object dynamically and your hashtable of arguments isn’t really all that JIT’ed either. In fact under the covers Adobe’s ActionScript interpreter maps Objects when dynamically created to a hashtable…(technically the hashtable and the contents are still jit’d but technically JRuby is jitted at that level).. In other words if dynamic typing is bad then JBossAS is bad too because JBossAS basically creates dynamic typing in Java.
Sep 07, 2007 @ 12:16:25
Semantics Andy. You get what i mean. (I hate it when people do this BTW. Justifying their arguments with more correct vocabulary is just gay)
Scripting isn’t bad. dynamically typed or typeless scripting is bad. As I said, the closer we can get Java to zero-turnaround the better, but not at the expense of static typing.
You sound so ridiculous sometimes Andy. I remember why we didn’t want you in dev(Edited: I’m just poking here Andy, sorry for the insult). java.lang.reflect.Proxy exists to provide a statcially typed interface over a generic construct. Exactly the opposite of what you are saying.
Sep 09, 2007 @ 04:35:43
No…you just don’t actually know what you’re talking about. You always argue with me and are batting a very poor average every time you do. Then you get personal and when you get personal you immediately try below the belt, make an ass out of yourself then later realize I was absolutely right. However, that’s why you’re bill burke and why EJB3 leaks memory 🙂
-Andy
Sep 11, 2007 @ 00:25:24
Blog slapped back with examples 🙂 : http://linuxintegrators.com/acoliver/code/2007/09/10/x-0336.html
Clueless, Unclear, or Both on Ruby? « Angry Bill
Sep 12, 2007 @ 01:24:49
The Tale of Two Cities: Red Hat & JBoss « rand($thoughts);
Sep 26, 2007 @ 05:22:25
Can’t I have an opinion? « Angry Bill
Sep 26, 2007 @ 09:49:50
Oct 01, 2007 @ 16:34:43
I want to see a project team of 14 developers working on a 5000 classes project with nearly 400 Oracle tables in Ruby. We are doing this in J2EE (with JBoss) and we are very happy. I do semantic code browsing a lot, search for uses, type hierarchies, renaming during refactoring etc. And I tell you, you are not gonna do this in Ruby – never.
Oct 16, 2007 @ 11:29:55
JEE development in the sense of turnaround it getting closer and closer to scripting languages. There is a commercial product JavaRebel that instantly reloads changes made to classes. So you can add/remove/change fields, methods,classes etc. and just hit reload in the browser or whatever outlet you are using. More information at http://www.zeroturnaround.com/javarebel/
JRuby and ActiveHibernate « Angry Bill
Dec 13, 2007 @ 17:02:25
Jan 09, 2008 @ 17:42:47
@Andy: “Ruby isn’t typeless.” Concerning references Ruby is typeless.
@Claus: “The Ruby version was much smaller, easier to maintain and thanks to the 400 lines of C also faster.”
I’m really interested in maintenance numbers for large dynamic language projects. Do you have numbers for
how much they did save compared to Java after 5 years?
Aug 04, 2009 @ 11:04:56
Isn’t that what writing tests are for?
I just finished a cunk of work that has these 12 features.
Upon user feedback 70% hat features 2,3 & want features 1,6 & 9 to work like this.
That works out nicely the people are what make this app, lets do it.
Code, code, code, run tests, oh shit a regression, code, code, code, test, test, test.
Nice we’ve done all the updates and it all works because we wrote tests and the tests cover most stuff that we can think. Lets release.
Oh crap it broke on this edge case. Write some tests, code, test, release…
How does the fact that ruby is dynamically typed have anything to do with anything?
The tools are there, if you don’t want to use them then there are risks….
Aug 04, 2009 @ 11:05:40
crap I just realised how old this post is – I’m not sure how I even got here – you can delete that post if you want 🙂