In the News:
Why Bing Is Gaining on Google
A triumph of creative headline writing. Bing soars from 7.2% to 8.2%. Google: 78%. Yo, Steve. When your competitor's name becomes a verb, they've solved the problem. If you don't want to take my word for it, google it.
Python v. Ruby:
Executive summary: two excellent modern, multi-paradigm languages with fiercely partisan fans who never tire of arguing for their personal choice. In the end, the one you prefer probably depends on where you stand on Tim Toady.
First, the basics. Both languages are interpreted, not compiled. Both are more than fast enough for business computing. Neither is strongly typed. Neither is more error prone than, for example, Java.
Both are object-oriented. Almost everything in Python is an object. Everything in Ruby is an object. (In Ruby, "2+2" is a notational convenience for "2.+(2)". That's an object "2" with a method "+" called with another "2" object as argument.)
Ruby's OO constructs are more Java-like. Python's object model struck me at first as chaos. You start with what in C++ or Java would be two instances of the "dog" class, "fido" and "rover" for example. If fido does tricks, you stick an array field to him: "fido.tricks = ["jump", "roll over", ...]. No need to extend any class, no problem that rover has no tricks.
Multi-paradigm means that unlike Java, you use OO coding when it works for you. You use other techniques and you don't force OO solutions on non-OO problems. For example, both support functional programming: the ability to pass code around and manipulate it as easily as other traditional languages handle strings.
Big difference: Rails. Ruby on Rails is the Ruby language with the Rails website framework. The Rails framework gets all the attention of the Ruby community. By contrast, Pythonistas are split among multiple frameworks, none enjoying the effort put into Rails. Rails JavaScript framework, Pythonistas argue, is based on Scriptaculous which is based on Prototype which has an enduring reputation for bad code.
Both languages work. Spectacular websites can be built successfully with either. Both will give you the same results as you could get with Java EE but with much less code, which will simplify maintenance. Would I recommend one or the other? For me, yes I would. For you? I would not. That's because I have a definite stand on Tim Toady.
Tim originated in Perl (which I recommend you avoid if at all possible). TMTOWTDI: There's More Than One Way To Do It. "Tim Toady" is the way it's pronounced. Ruby, which was designed as a better Perl, features Tim Toady. Pythonistas say, "There should be one, obvious way to do it."
I'd say more on this, but my Python just saw the Ruby code on my screen and slithered away looking very mad. I've got to find him before he swallows the kitten. (Why Ruby? SketchUp plugins can be written in the language of your choice, provided you choose Ruby. How can I explain that to my Python?)
Showing posts with label business news. Show all posts
Showing posts with label business news. Show all posts
Monday, August 3, 2009
Thursday, July 30, 2009
Embrace Chaos
Business News:
Bartz: "no bull---t". Ballmer: "no bull---t" Bartz and Ballmer with Business Week
SketchUp:
Rubies rule. I can say no more.
Crystal Ball:
"Martin, you've gotta come in here. I just lost another one of my best coders because we're a Java shop."
"Sure, Al. You know my rates?"
Fast forward to 8 A.M., next Tuesday. Al's conference room. CIO and his senior staff know they have a problem.
"Martin, we started as a Cobol shop. That worked pretty well until the Internet took off. So we went to Java. That was fine last century, but sticking with Java is costing us some of our best people. You know about these newer languages. What's happening?"
"You're a Java-only shop?"
"Pretty much."
"That means you don't have any databases?"
"Of course we've got databases. Too damn many if you ask me."
"OK, so you're a Java and SQL shop."
"I hadn't thought about it that way, but I guess that's right."
"And you're not yet on the Internet?"
"What the hell do you mean? Of course we're on the Internet."
"OK, so you're a Java and SQL and HTML shop."
"Yeah, that's true."
"But you've stayed away from dynamic web pages. Nothing 2.0 going on?"
"Martin, it's 2009. You know we're not stuck in the last century."
"Actually, I spent some time at your site. You're a Java and SQL and DHTML and CSS and JavaScript shop. Everyone understands that Java and JavaScript are entirely separate languages?"
All concur.
"Al, I'd say for starters that you are definitely NOT a Java-only shop. I bet if we looked at your B-2-B stuff there's some XML going on, too."
"Right"
"And you've got, maybe, a couple people looking at the iPhone?"
"Nothing definitive, but we're looking."
"You'll be doing Objective-C because the iPhone supports any language you choose, provided you choose Objective-C. There's a lot of that happening. I'm doing SketchUp extensions--any language I like provided I like Ruby. Built a cloud site around the Google chart API--Google's API is language neutral, but JavaScript is the only language that runs in most browsers."
"Martin, is it going to get better or worse?"
"Al, if you define 'better' as fewer languages, you're not going to like the future. If you define 'better' as more targeted, more capable, more domain-specific languages you'll be a happy camper. Embrace chaos. Give it a big hug."
"Any questions?"
Al looks around the room. No one cares to go first.
"Thanks, Martin. 'Embrace chaos.' I've got a question. How in hell am I supposed to go to the board and tell them that we're embracing chaos?"
"That, Al, is where you make the best use of high-priced, authoritative consultants. And while I'm being completely self-serving, you may want me to teach a management-level class on object models. Compared to Java, Python's model seems like chaos. Compared to Java and Python, JavaScript's prototypal inheritance is from a different universe."
"Al, I could use a short break. Then we can talk about a tactical plan. Maybe someone can think of a more marketable version of 'embrace chaos'."
Bartz: "no bull---t". Ballmer: "no bull---t" Bartz and Ballmer with Business Week
SketchUp:
Rubies rule. I can say no more.
Crystal Ball:
"Martin, you've gotta come in here. I just lost another one of my best coders because we're a Java shop."
"Sure, Al. You know my rates?"
Fast forward to 8 A.M., next Tuesday. Al's conference room. CIO and his senior staff know they have a problem.
"Martin, we started as a Cobol shop. That worked pretty well until the Internet took off. So we went to Java. That was fine last century, but sticking with Java is costing us some of our best people. You know about these newer languages. What's happening?"
"You're a Java-only shop?"
"Pretty much."
"That means you don't have any databases?"
"Of course we've got databases. Too damn many if you ask me."
"OK, so you're a Java and SQL shop."
"I hadn't thought about it that way, but I guess that's right."
"And you're not yet on the Internet?"
"What the hell do you mean? Of course we're on the Internet."
"OK, so you're a Java and SQL and HTML shop."
"Yeah, that's true."
"But you've stayed away from dynamic web pages. Nothing 2.0 going on?"
"Martin, it's 2009. You know we're not stuck in the last century."
"Actually, I spent some time at your site. You're a Java and SQL and DHTML and CSS and JavaScript shop. Everyone understands that Java and JavaScript are entirely separate languages?"
All concur.
"Al, I'd say for starters that you are definitely NOT a Java-only shop. I bet if we looked at your B-2-B stuff there's some XML going on, too."
"Right"
"And you've got, maybe, a couple people looking at the iPhone?"
"Nothing definitive, but we're looking."
"You'll be doing Objective-C because the iPhone supports any language you choose, provided you choose Objective-C. There's a lot of that happening. I'm doing SketchUp extensions--any language I like provided I like Ruby. Built a cloud site around the Google chart API--Google's API is language neutral, but JavaScript is the only language that runs in most browsers."
"Martin, is it going to get better or worse?"
"Al, if you define 'better' as fewer languages, you're not going to like the future. If you define 'better' as more targeted, more capable, more domain-specific languages you'll be a happy camper. Embrace chaos. Give it a big hug."
"Any questions?"
Al looks around the room. No one cares to go first.
"Thanks, Martin. 'Embrace chaos.' I've got a question. How in hell am I supposed to go to the board and tell them that we're embracing chaos?"
"That, Al, is where you make the best use of high-priced, authoritative consultants. And while I'm being completely self-serving, you may want me to teach a management-level class on object models. Compared to Java, Python's model seems like chaos. Compared to Java and Python, JavaScript's prototypal inheritance is from a different universe."
"Al, I could use a short break. Then we can talk about a tactical plan. Maybe someone can think of a more marketable version of 'embrace chaos'."
Subscribe to:
Posts (Atom)
