Wednesday, January 11, 2012

Objective-C language of the year 2011!

After just barely missing out 2 years in a row (first to Go and then to Python), Objective-C finally managed to snatch Tiobe's programming language of the year award for 2011. Yay!

Objective-C managed a jump of 3.91% to 6.92% in 2011, and is now only a percent or so shy of C++ (8.06%), which incidentally just got edged out by C# (8.78%). It also zoomed ahead of Python (3.22%), which squeaked by Objective-C just barely last year to take top honors, but has now fallen below PHP and Visual BASIC.

Ruby, Perl and JavaScript are in the 1-3% range.

As TIOBE doesn't appear to keep old posts around the above link is likely to go stale in about a month. Here is the table:

Position

Jan 2012

Position

Jan 2011

Delta in Position

Programming Language

Ratings

Jan 2012

Delta 

Jan 2011

Status

1

1

Same.gif

Java

17.479%

-0.29%

  A

2

2

Same.gif

C

16.976%

+1.15%

  A

3

6

Up.gifUp.gifUp.gif

C#

8.781%

+2.55%

  A

4

3

Down.gif

C++

8.063%

-0.72%

  A

5

8

Up.gifUp.gifUp.gif

Objective-C

6.919%

+3.91%

  A

6

4

Down.gifDown.gif

PHP

5.710%

-2.13%

  A

7

7

Same.gif

(Visual) Basic

4.531%

-1.34%

  A

8

5

Down.gifDown.gifDown.gif

Python

3.218%

-3.05%

  A

9

9

Same.gif

Perl

2.773%

-0.08%

  A

10

11

Up.gif

JavaScript

2.322%

+0.73%

  A

11

12

Up.gif

Delphi/Object Pascal

1.576%

+0.29%

  A

12

10

Down.gifDown.gif

Ruby

1.441%

-0.34%

  A

13

13

Same.gif

Lisp

1.111%

+0.00%

  A

14

14

Same.gif

Pascal

0.798%

-0.12%

  A

15

17

Up.gifUp.gif

Transact-SQL

0.772%

+0.01%

  A

16

24

Up.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gif

PL/SQL

0.709%

+0.15%

  A

17

20

Up.gifUp.gifUp.gif

Ada

0.634%

-0.05%

  B

18

39

Up.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gifUp.gif

Logo

0.632%

+0.29%

  B

19

25

Up.gifUp.gifUp.gifUp.gifUp.gifUp.gif

R

0.609%

+0.07%

  B

20

21

Up.gif

Lua

0.559%

-0.08%

  B

And the graph: Tpci trends January 2012

Convention over configuration is subclassing?

Having now played a little bit with Ruby on Rails, I am starting to wonder wether the much touted "convention over configuration" is really just a different implementation of subclassing. That is certainly what it felt like, and the Wikipedia article referenced states that "a developer only needs to specify unconventional aspects of the application."

Or perhaps slightly more accurately, both subclassing and convention over configuration would appear to be a form of programming by difference or "refinement".

Friday, December 9, 2011

Ruby (and Rails) scalability?

Recently I wrote about Node.jsperformance, comparing it to my (still non-public, sorry!) Objective-C based libµhttp wrapper and Apache on my main development machine of the time, a MacBook Pro.

Node.js did really well on tasks that have lots of concurrent requests that are mostly waiting, did OK on basic static serving tasks and not so well on compute-intensive tasks.

Having developed an interest in minimal web-servers, I wondered how Sinatra and, by association, Ruby on Rails would do.

For Sinatra I used the scanty blog engine and the basic "Hello World" example:


require 'sinatra'

get '/hi' do
  "Hello World!"
end

For Ruby on Rails, I used the blog tutorial "out of the box", invoking it with "rails s" to start the server. In addition I also had RoR just serving a static file instead of the database-backed blog. All this on my new dev machine, a 2011 MacBook Air with 1.8 GHz Intel Core i7 and 4 GB of DRAM. I also discovered that httperf is a much better benchmark program for my needs than ab. I used it with 100 requests per connection, a burst length of 100 and a sufficient number of connections to get stable results without taking all day.

Platform# requests/sec
Apache5884
Sinatra Hello World357
Ruby on Rails static page312
Sinatra scanty blog101
Ruby on Rails blog17
This seems really slow, even when doing virtually nothing, and absolutely abysmal when using the typical RoR setup, serving records from an SQL database via templates. I distinctly remember my G5 serving in the thousands of requests/s using WebObjects 6-7 years ago.

Is this considered normal or am I doing something wrong?

Thursday, July 21, 2011

The surprising thing about Objective-C...

Alex Payne, when asked "Are you surprised at the popularity of any current languages?" during the preview of emerging languages for OSCON 2011'semerging languages track:
Alex Payne: I'm constantly surprised at the popularity and success of Objective-C. Almost everyone I know tells the same story about Objective-C: they started learning it and they hated it. They thought it was the worst of C and the worst of dynamic languages. And then eventually, they learned to love it. Most of the time, that software works pretty darn well, so who am I to judge? I'm pleasantly surprised by the continued success of Objective-C, and I think it should be taken as a lesson for the language designers out there.
This is echoed by the the first (and as of this writing only) comment to the post:
Alasdair Allan [18 July 2011 10:09 AM] I certainly agree with Alex about Objective-C, when I was initially learning the language I deeply despised it. Now I love it, and think it's one of the more elegant and powerful of the (many) languages I know. Definitely a lesson to language designers, do what you think is right and ignore the crowds. If you are right people will grow to love your language, just as soon as they figure it out.
I actually liked Objective-C pretty much from the start, but then again at that time (1986) there simply wasn't anything close that I had access to, and writing an Objective-C pre-processor and runtime on my Amiga was simply more feasible than a C++ frontend or a complete Smalltalk VM.

Modifying the sentiment expressed slightly, I'd say that from a theoretical point of view, I hate Objective-C and think it's a bad joke, a trainwreck. However, from practical experience, I love it and find it's one of the most productive languages out there for actually building stuff. And no, it's not just about the frameworks, as I've used Objective-C in non-NeXT, non-Apple environments where we had to build most of our own frameworks.

So while I support Alasdair's comment, my lesson for language designers is that our theory appears to not be particularly good at predicting reality. In other words: our theory sucks has many research opportunities.