Jan 4 2008

Ruby on Rails Radioactive Fallout

Rails has been getting a lot of flack lately, instead of the usual hype. Zed Shaw, author of Mongrel, recently blew his top off against the Ruby on Rails community leaders and said that Rails is a ghetto. Zed is getting a lot of attention from this explosive rant but this is not the first time a prominent developer/blogger has spoken out against the Rails framework and it’s leadership. Before Zed went AWOL on the Rails community, Derek Sivers of CD Baby switched back to PHP after working with Rails for two years without releasing a product. Perhaps the first notable negative article regarding Rails’ performance was a five question interview with Twitter developer Alex Payne. Since then there has been many more potty mouthed articles against Rails and its infallible dear leader, better known by his initials DHH, such as Imploding Rails, Jesus DHH, and the Uncle Ben Principle, 10 Areas Where Rails Fails, Ruby, Rails and RSpec burned a day off my lifespan, and How to ruin a Rails project.

So why all the Rails bashing? Most Rubyist and Railist will brush off and dismiss such comments as coming from Java playa hatin’ developers, but this is not the case, these articles are written from the perspective of fellow Ruby on Rails hackers, developers, and contributers. The experience of these Ruby on Rails developers remind me of the testimonials of people that escaped from a Peoples Temple cult; they been to the other side and it is not as green as it was portrayed, especially if you do not adhere without question to the opinionated papal bull-shit of the core Rails church leaders. I think some of the comments that Rails nay sayers are trying to address is that the Rails community is itself falling into the trap of eating it own dogma. But I am not a Rails heretic, so instead of paraphrasing, let me quote some of the most interesting remarks from the aforementioned articles.

Any discussion about Rails with ultimately lead to it’s performance.

Running on Rails has forced us to deal with scaling issues – issues that any growing site eventually contends with – far sooner than I think we would on another framework.
Five Question Inverview

None of these scaling approaches are as fun and easy as developing for Rails. All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise.
Five Question Inverview

Consider that Rails is the Love Child of Web 2.0 and Disillusioned Web 1.0 Developers, whole shops and corporate departments are adopting Rails as a way to push their applications into production more rapidly – what happens when they try to scale these apps and get “Twitter’d”?
Imploding Rails

The main Rails application that DHH created required restarting ~400 times/day. That’s a production application that can’t stay up for more than 4 minutes on average.
Rails is a ghetto

The greatest thing about Ruby on Rails is neither Ruby nor Rails, the best aspect of Rails is that it questioned the ‘best practices’ (or worst nightmares) of the current state of web development with its philosophy of Convention over Configuration and Don’t Repeat Yourself principle. Ruby and Rails is not the next best thing, it is just the missing link to the next best programming language and framework, or at least this is the logic of some PHP developers…

Is there anything Rails can do, that PHP CAN’T do? The answer is no.
7 reasons I switched back to PHP

Rails was an amazing teacher. I loved it’s “do exactly as I say” paint-by-numbers framework that taught me some great guidelines. … But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!
7 reasons I switched back to PHP

Zed’s great rant opus against the Rails elite provided insight from an insider’s point of view, although he complains as he was an outsider. Zed did not mince words and especially goes nuclear against ThoughtWorks and Dave Thomas.

This is exactly what makes Rails a ghetto. A bunch of half-trained former PHP morons who never bother to sit down and really learn the computer science they were too good to study in college.
Rails is a ghetto

They [Rails community] were all a bunch of little ghetto fabulous princesses trying to make it in this tiny little Rails world and not enough brains between them all to make it happen.
Rails is a ghetto

When you combine stupid businesses with stupid people using a stupid framework based on a big fat fucking lie on a shitty platform you get the perfect storm of dumbfuck where a man like me can’t find work.
Rails is a ghetto

Sorry guys, but having a 1:4 code:test ratio is not focusing on code quality. It’s focusing on test quality.
Rails is a ghetto

He [Dave Thomas] basically had full access to the code and the people who wrote Rails and a direct line to DHH and still couldn’t write a decent book on writing a Rails application.
Rails is a ghetto

Technorati Tags: , , , , , , , , ,


Jan 3 2008

Perforce Admin

Recently I had to do some light Perforce administrative management tasks, such as creating new users and setting up their privileges. If you like to create a new user just invoke the following Perforce command from the command line.

p4 user -f username

If you try to connect to Perforce with the new user you might get a warning message that reads something like: Access for user ‘username’ has not been enabled by ‘p4 protect’. You need to explicitly give the user permissions or add the new user to a group that has the corresponding permissions. To add a user to a group simply execute something like the following command as the Perforce administrator.

p4 group groupname

You would replace groupname with the correct name of your group. The above command will open your default Perforce editor, most likely Notepad, with the group description, you can simply add the new user in the users list. The user will inherit the permission from the group.

You could have also giving the user permissions by editing the Perforce protect file. To edit the p4 protect file simply execute the following command as the super user.

p4 protect

Technorati Tags: , , ,


Jan 2 2008

Debugging Users and Invisible Characters

As a developer working for a startup with live software in the field, I often have to problem solve some interesting and out of the box bugs. One recent bug was related to changes to the Daylight Standard Time and Sun’s Java Timezone Updater, which is far from the control of my code. The Timezone Updater is a simple Java application that can be run as follows.

"c:\Program Files\Java\jre1.5.0_10\bin\java" -jar tzupdater.jar -f -bc

After documenting, testing, and validating the process of running the Timezone Updater from the command prompt we had our sales engineer upgrade the all of our clients’ JRE with the current timezone data. After some time we had reports that some clients had a problem running the above command, they where getting the following Java error.

Exception in thread "main" java.lang.NoClassDefFoundError: ûjar

It seemed that Java could not find a class named ujar (notice that funny hat over the u). Our sales engineer, with the aid of a software engineer, spent all day going back and forth with the client. As you might have guessed, updating the timezone data worked for our engineers but at the client site they consistently got the above error. After a long email thread full of instructions, screen shots, and frustration I was pull in.

I too was unable to reproduce the error until I considered the error. The only clue in the above error is the funny character u. After some time it occurred to me that the -jar had been corrupted into ujar. But what would distort the dash? Word. The instructions to run the Java Timezone Updater where written and sent in Outlook and cut and pasted from Outlook. Outlook uses Word as the default mail editor and Word has the awful tendency of distorting plain old ASCII text into special characters at will, try typing :) in Word.

This bug was not obvious to our client’s IT personnel, our front line sales engineer, and an experienced software engineer. Having code working on the developer’s machine is not a valid solution, software needs to work at the client’s site too!

One lesson that most developers don’t learn is to debug outside the debugger. As an engineer there are times you need to trouble shoot, problem solve, and debug not just your software from the comforts of your favorite IDE but the whole software stack, network, hardware, user’s environment, and even the user himself.

Every problem, issue, and bug experienced by the end user directly and indirectly with your software eventually needs to be implicitly and explicitly dealt with by your software development team. Bugs that are on the fringes of the code base are the most difficult to solve, that is why each member a software development team needs to take full ownership of the whole code base, and every known issue.

Technorati Tags: , , , , , ,


Dec 11 2007

TechKnow Year In Review 2007

It is that time of year where we reflect on the accomplishments of the passing year and look forward to the one to come. Here is a window into the past year in technology through this year’s popular posts on TechKnow Juixe.

Top 5 Top Lists

Software Development

Java

JavaScript

Ruby

Ruby Shoes

Ruby on Rails Plugins

Windows Tips

Mac OS X Tips

Year In Review

Seasons Greetings

Technorati Tags: , , , , , , , , , , , ,


Dec 7 2007

Windows Explorer Custom Shortcuts

As a software developer you often need to navigate from directory to directory, from your documentation to your build directory. Using Windows Explorer you can create shortcuts to jump from directory to directory. In Windows Explorer you can add the path to a folder in the Favorites menu. When you add a new folder as a favorite you will be asked to give it a name. Lets say you add the path to the documentations folder and gave it the name Docs. To jump to this location you can hit Alt+A+D. The D in the key shortcut is from the first letter of the name of you gave the favorite location. If you have also saved the path to your source as a Windows Explorer favorite with the name of Source, you can use Alt+A+S to jump to that location.

Windows Explorer


Dec 3 2007

Favorite Programming Quotes 2007

Here is a list of great programming quotes from my readings over the last year. It is interesting to note that most of my reading material this year has been from blogs. There are just a great amount of programmer bloggers writing a lot of informative tutorials on every programming language, paradigm shift, and framework under the sun.

in my experience, one of the most significant problems in software development is assuming. If you assume a method will passed the right parameter value, the method will fail.
— Paul M. Duvall
Continuous Integration

Programming languages are like girlfriends: The new one is better because *you* are better.
— Derek Sivers
7 reasons I switched back to PHP after 2 years on Rails

The sooner we start coding fewer frameworks and more programs the sooner we’ll become better programmers.
— Warped Java Guy
Elementary Java Solutions

Starting a startup is hard, but having a 9 to 5 job is hard too, and in some ways a worse kind of hard.
— Paul Graham
The Future of Web Startups

In essence, let the market design the product.
— Paul Graham
The Future of Web Startups

A startup now can be just a pair of 22 year old guys. A company like that can move much more easily than one with 10 people, half of whom have kids.
— Paul Graham
The Future of Web Startups

Startups almost never get it right the first time. Much more commonly you launch something, and no one cares. Don’t assume when this happens that you’ve failed. That’s normal for startups. But don’t sit around doing nothing. Iterate.
— Paul Graham
How Not to Die

The key to performance is elegance, not battalions of special cases.
— Jon Bentley and Doug McIlroy

You’ll spend far more time babysitting old technologies than implementing new ones.
— Jason Hiner
IT Dirty Secrets

To Iterate is Human, to Recurse, Divine.
— James O. Coplien

No one hates software more than software developers.
— Jeff Atwood
Hanselminutes Podcast 74

I was a C++ programmer before I started designing Ruby. I programmed in C++ exclusively for two or three years. And after two years of C++ programming, it still surprised me.
— Matz
The Philosophy of Ruby

Good architecture is necessary to give programs enough structure to be able to grow large without collapsing into a puddle of confusion.
— Douglas Crockford
The Elements of JavaScript Style

Programming is difficult. At its core, it is about managing complexity. Computer programs are the most complex things that humans make. Quality is illusive and elusive.
— Douglas Crockford
The Elements of JavaScript Style

Code reuse is the Holy Grail of Software Engineering.
— Douglas Crockford
The Elements of JavaScript Style

The structure of software systems tend to reflect the structure of the organization that produce them.
— Douglas Crockford
The Elements of JavaScript Style

The definition of Hell is working with dates in Java, JDBC, and Oracle. Every single one of them screw it up.
— Dick Wall
CommunityOne 2007: Lunch with the Java Posse

Suppose you went back to Ada Lovelace and asked her the difference between a script and a program. She’d probably look at you funny, then say something like: Well, a script is what you give the actors, but a program is what you give the audience.
— Larry Wall
Programming is Hard, Let’s Go Scripting…

I went to school to learn how to program software applications, which inevitably have bug defects. There was no course at my university on testing, debugging, profiling, or optimization. These things you have to learn on your own, usually in a tight deadline.
— Juixe TechKnow

To most Java developers, Ruby/Rails is like a mistress. Ruby/Rails is young, new, and exciting; but eventually we go back to old faithful, dependable, and employable Java with some new tricks and idioms and we are the better programmer for it.
— Juixe TechKnow

You might as well pay your customers 50K because they are just your QA.
— Juixe TechKnow