Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts

Monday, October 13, 2008

I'm not sure if this depresses me or not...

Nanite is a Ruby thing. Apparently its new
Nanite is a new way of thinking about building cloud ready web applications. Having a scalable message queueing backend with all the discovery and dynamic load based dispatch that Nanite has is a very scalable way to construct web application backends.


Now to naive old me it sounds like something not really as good as Jini. Its difference appears to be that it dispatches work to "least loaded nodes" rather than a Jini/Javaspaces approach which would have workers determine who was the least loaded and then retrieve the work from the pool based on when they complete their previous task.

Having a scalable message queueing backends isn't new nor is it unusual to use these to do load-balancing. Some people have moved beyond this for cloud computing.

They say that those who don't learn from history are doomed to repeat it, it IT I think we can add the phrase "poorly".

I'm not that depressed because at least it is using a messaging infrastructure for the dispatch and not using a database as a sync point or something else strange. It would be nice though if the number of times we see "new" technologies that were not as complete as those we used in production 8 years ago was less than the number we see that are clearly better. Currently it appears to be 10 "old/new" inventions to every 1 new invention.... at best.

Now maybe I'm wrong about nanite (which would be nice) and it really is better than all of these older technologies and is a brand new way to think about the cloud, it can't just be an agent/dispatcher pattern can it? If it helps people great, if they learn from some of the other projects that have done this sort of thing before then super great, if we get some genuinely new advances around work distribution then fantastic. I just wish projects would not start with the assumption that they are re-defining how people work in a given area without reference to what they have improved upon.


Technorati Tags: ,

Sunday, May 11, 2008

Green IT - save the characters

Around JavaOne there was a lot of buzz around Java becoming a bit bloated. Now I've argued for a long time (including in the dreadful JavaSE 6 group) that Java should have a basic core and then architects should be able to decide on the extensions they want for their project. So the issue with Java isn't the bloat, its the process by which the JCP and (from experience) the Sun JavaSE team want to add more "features" into the language.

But the thing I really don't get is the obsession with the "new" languages on using the character saving, comprehension limiting syntax of C. Back in the wild and crazy 80s the focus on language design was as much on the syntax of the language as it was on the semantics and function of the language. In the 21st century we seem to have abandoned that strategy in favour of a "lets just use similar syntax" approach.

Take Scala


/* Defines a new method 'sort' for array objects */
object implicits extends Application {
implicit def arrayWrapper[A](x: Array[A]) =
new {
def sort(p: (A, A) => Boolean) = {
util.Sorting.stableSort(x, p); x
}
}
val x = Array(2, 3, 1, 4)
println("x = "+ x.sort((x: Int, y: Int) => x < y))
}


(stolen from the scala site)

What is this some sort of Green IT campaign based around the idea that characters are in short supply and should be rationed? This is the homepage example of the language.

# The Greeter class

class Greeter

  def initialize(name)


    @name = name.capitalize

  end

 

  def salute


    puts "Hello #{@name}!"

  end

end

 

# Create a new object


g = Greeter.new("world")

 

# Output "Hello World!"

g.salute


From the Ruby homepage.

Seriously do these really represent the sort of syntax that will help more people adopt the language and make support of the programmes developed in that language easier? My money is on no.

Here in lies the problem as pointed out by Jim Waldo (via DanC).

there is still the worry that engineers who aren’t producing code are not doing anything useful.

And this is where I think the focus on a limited syntax comes from. Its the certifiably insane idea that the time taken typing in characters is the sort of time that needs to be reduced. The reality is that it is the time taken to read someone else's code that is the primary problem especially in larger systems. The focus on limited syntax and on saving a couple of characters is nonsensical in a world where the number of developers is increasing and the complexity of systems is increasing at pace. It also isn't the sort of approach that helps in making sure that the code from the majority of developers is of a reasonable quality and can be easily maintained by other majority developers.

Scala won't be Java 3, Ruby won't be the next Java. Java might have problems but solving them by having an even more obfuscated syntax is not the way to make the languages an operational rather than a blogsphere success.

Unfortunately part of the problem is the lack of professionalism and engineering in IT which means that there is a huge body of opinion that rates the quality of a language based on how few characters it takes them to write the code, not on how many minutes or hours it takes someone else to understand them.



Technorati Tags: , ,