When Upgrades Go Bad January 27th, 2008

There have been a number of 500 errors on a freelance site I'm on. For the first round of troubleshooting, I'm updating the web server. My favorite web servers are nginx and lighttpd, but this dedicated server has two legacy apps, both built around Apache.

My favorite platform is Debian Linux because updates are fast and painless. This legacy server runs gentoo.

Unfamiliar Operating System + Unfamiliar Software == Disaster

At 11:00 pm I ran the upgrade. When it came back up, I found my Rails app working wonderfully. For safety, I checked the legacy PHP apps, and they were down. Hard.

It's midnight. I estimate I have until 8:00 a.m. before I'm in deep trouble.

After much research, I learned Gentoo decided to upgrade me from Apache 2.0 to 2.2, and 2.2 breaks a lot of things. One of which is fastcgi, now replaced with fcgid. I haven't used fastcgi in a year, since Mongrel makes it irrelevant for Rails. Fcgid will require much hacking.

It's 1:00 a.m. It's clear I'm better off installing mod_php. You'd think it's as simple as "sudo emerge mod_php". Well mod_php has merged with the base php package. you enable mod_php with a flag in some file. I enable the flag.

I start the compile at 2:00 a.m. And wait. And wait.

You see, Gentoo's philosophy that everything should be compiled from source. So for two hours, php compiled, just so I could get mod_php.

It's a little past 4:00, and things are back. What have I learned?

Profanity December 17th, 2007

We just noticed our profanity filter bans the world "uncircumcised," but not "circumcised."

Merry Christmas!

How to Discourage Candidates November 26th, 2007

I present highlights of a post from Craig's List "gigs" section.

Happy Holidays!

Before you learn about this exciting opportunity, PLEASE DO NOT APPLY IF ANY OF THE FOLLOWING ARE TRUE:

"YOU IDIOT"

  • You do not have strong references. All references will be verified.

"We don't trust you."

  • You cannot pass a state and federal criminal background check. It is mandatory for this position.

"We REALLY don't trust you."

  • You do NOT live in Southern California or are unwilling to commute on the 405. We hate traffic just as much as you do.

"Life is a sequence of suffering."

  • You are NOT willing to be on-site. This is a full-time on site job.

Your manager will bug you every 10 minutes.

  • You are an off-shore firm hoping to get my business.

Notice "my."

You are a Linux-obsessed, PHP-loving, Ruby-on-Rails guru who is addicted to Apache fanatic.

No mention of Hitler?

We are a Microsoft shop (ASP, SQL, .NET, ASPX, C#, IIS, etc.) and are looking for Senior-level web-based application developers

Microsoft owns SQL?

This is not a development team lead position; this job opening is for an individual contributor who works as a team player.

You have no say.

All development tasks will be assigned and approved by your supervisor.

This is his company.

Our clients are:

  • Inc 500, Fortune 1000, and Russell Global 2000 firms

Did you know JC Penny is on the Fortune 500? Seriously.

  • Financial Services, Healthcare, Government contractors, etc.

"Help us help them fuck you."

Some of our benefits include:

  • Full medical, dental, and vision
  • 401k, AFLAC, Life insurance, Long term disability, and more

Like Google!

  • Ping pong & foosball tables on site.

Like Google!

  • No stock options – it’s not the dot com days anymore!

Oh.

  • Walking distance to very large mall, Movie Theater, dining, bowling, and more.

"We are conveniently located in a renovated Panda Express."

  • Access to the MSDN, TechNet, and Action Pack libraries to build your own lab at home, work, in one of our datacenters, etc.

But there's no such thing as free software, Hitler.

Requirements

  • At least 5 years of solid experience with database-driven web development using Active Server Pages, SQL Server, and IIS.
  • Responsible team player with strong client-facing interpersonal skills.
  • Demonstrated excellence at working effectively with all levels of staff, clients and other personnel
  • Attention to detail a must.
  • Strong follow-up skills. This is critical.
  • Effective verbal and written communication skills and the ability to interact professionally with a diverse group of people.
  • Displays strong listening, writing, presentation, speaking, and meeting mechanics skills.
  • Expert -level knowledge of Classic ASP and HTML.
  • Expert -level knowledge of T-SQL programming. Must know stored procedures, functions, views, triggers, and more.
  • Intermediate knowledge of .NET architecture.
  • Intermediate knowledge of SQL Server 2005 Reporting Services.
  • Intermediate knowledge of IIS 5 or greater.
  • Intermediate knowledge of Windows Server 2003.
  • Intermediate knowledge of XML, XSL, and XSL-T.
  • Intermediate knowledge of VB 6.
  • Intermediate knowledge of Web Services. Must have previously integrated web applications with back-end systems via published APIs and web services.
  • Must have developed software in a shared development environment before.
  • Must be familiar with all aspects of the Software Development Lifecycle – dev, test, staging, etc.
  • Must be familiar with how to use the Microsoft Office suite (2003 or newer).
  • Must be very familiar with the Visual Studio IDE and integrated version control software.
  • Must be very familiar with SQL Enterprise Manager, Profiler, Query Analyzer, and SQL Management Studio (2005).
  • Strong understanding of Object Oriented architecture and best practices.
  • Firm understanding and experience with structured development processes and methodologies (agile, RUP, iterative, waterfall, etc)
  • Strong analytical and problem solving skills.
  • Recent Microsoft certifications. Your MCP number will be used to verify status.
  • Strong, positive references from past clients/employers.

Good luck with that. I knew a "Senior Engineer" who couldn't write valid HTML.

Salary: I thought you might be wondering that. Let’s just say it’s over 80k.

Hahahahahahhahahaha.

That idiot Senior Engineer drove a Mercedes SLK.

It's hard to find a developer with 5 years of experience and all those qualifications, but impossible to find one who will put up with a douche-bag so cheap they won't pay $25 to post to the jobs section.

The Next Level of Disorganization September 25th, 2007

It's easy to wrong code, but it takes creativity to put the code in the wrong location.

Pop quiz: What goes in a Rails app's tmp/ directory? Let's see:

The pattern is transient files. There are a suite of rake tasks for nuking them. You might as well keep the directory out of subversion.

Today I glance at the commit log, and there are two .rb files. Someone is using tmp as a scratch directory.

So, where should scratch files go? Trick question. Keep it out of subversion.

I'll stick with Rails September 23rd, 2007

Derek Sivers is pretty cool. He sponsored Hackfest back in January, so he paid for my trip to RailsConf. And he just seems like a nice guy.

So I view his switch back from Rails to PHP with an open mind. This wasn't a surprise to me. As far back as May, I'd heard murmerings about his decision to drop Rails. Now the story may get traction. So here's my respectful take.

A Language is more than its output.

1 - “IS THERE ANYTHING RAILS/RUBY CAN DO THAT PHP CAN’T DO? … (thinking)… NO.”

For 2 years, I thought Rails is genius, PHP is shit. Rails is powerful, PHP is crap. I was nearly killing my company in the name of blindly insisting Rails was the answer to all questions, timeframes be damned. But when I took a real emotionless non-prejudiced look at it, I realized the language didn’t matter that much. Ruby is prettier. Rails has nice shortcuts. But no big shortcuts I can’t code-up myself in a day if needed. Looked at from a real practical point of view, I could do anything in PHP, and there were many business reasons to do so.

As far as page output, no. For that matter, you could write your site in .Net, Smalltalk, or Assembly.

As far as high level design patterns, no, you can do what Rails does in any object oriented language. What you absolutely, positivily cannot do is alter the language itself to suite your app. Please show me a language as maliable as Ruby.

People say, "Syntax is syntax. Grow up."

In Ruby, I don't have to comment anymore. I can jump to any method, no matter how old, and instantly know what's going on. That's maintainability. That's productivity.

Yes, you can implement some of Ruby's features in another language, but it's always a hack. How about mixing in modules? .tos ? methodmissing ? Passing blocks? Whether or not you like ActiveRecord, its automatic mapping of columns to getters/setters is swashbuckling.

Most people use Ruby like any other scripting language, but there's so much more potential.

And that time you spent recreating a shortcut could have been spent on a new one.

Legacy Always Sucks

2 - OUR ENTIRE COMPANY’S STUFF WAS IN PHP: DON’T UNDERESTIMATE INTEGRATION

By the old plan (ditching all PHP and doing it all in Rails), there was going to be this One Big Day, where our entire Intranet, Storefront, Members’ Login Area, and dozens of cron shell scripts were ALL going to have to change. 85 employees re-trained. All customers and clients calling up furious that One Big Day, with questions about the new system. Instead, I was able to slowly gut the ugly PHP and replace it with beautiful PHP. Launch in stages. No big re-training.

I think this point applies whether the language is Ruby or Python or Erlang. If your entire site is based on one monolothic app, it's insane to switch it over all at once. Mind you, I've done that.

Avoid Overkill

3 - DON’T WANT WHAT I DON’T NEED

I admire the hell out of the Rails core gang that actually understand every line inside Rails itself. But I don’t. And I’m sure I will never use 90% of it. With my little self-made system, every line is only what’s absolutely necessary. That makes me extremely happy and comfortable.

This is a valid point. If you don't like frameworks, you shouldn't use Rails. Ditto for CakePHP or Django.

The Scaling Red Herring

4 - IT’S SMALL AND FAST

One little 2U LAMP server is serving up a ton of cdbaby.com traffic damn fast with hardly any load.

Writing bare bones apps does require less hardware. If your argument is your impact on the environment, I agree, but if your argument is saving money, servers are cheaper than developers.

And while it's easy to write slow Ruby code, it's easy to speed it up when it becomes an issue.

Everything looks like a nail

5 - IT’S BUILT TO MY TASTES

I don’t need to adapt my ways to Rails. I tell PHP exactly what I want to do, the way I want to do it, and it doesn’t complain. I was having to hack-up Rails with all kinds of plugins and mods to get it to be the multi-lingual integration to our existing 95-table database. My new code was made just for me. The most efficient possible code to work with our exact needs.

This is a valid argument. When you use Rails, you agree to the Rails philosophy. This philosophy is perfect for most web apps, but not 100%.

"You keeping using those words..."

6 - I LOVE SQL

Speaking of tastes: tiny but important thing : I love SQL. I dream in queries. I think in tables. I was always fighting against Rails and its migrations hiding my beloved SQL from me.

This statement makes zero sense. Migrations are a thin wrapper to your SQL, and it's easy to drop into SQL when using ActiveRecord. You could write your entire app using pure SQL.

The Telephone Game

7 - PROGRAMMING LANGUAGES ARE LIKE GIRLFRIENDS: THE NEW ONE IS BETTER BECAUSE YOU ARE BETTER

Rails was an amazing teacher. I loved it’s “do exactly as I say” paint-by-numbers framework that taught me some great guidelines. I love Ruby for making me really understand OOP. God, Ruby is so beautiful. I love you, Ruby. 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! You look back at your old ugly PHP code, compared to your new beautiful Ruby code, and think, “God that PHP is ugly!” But don’t forget you wrote that PHP years ago and are unfairly discriminating against it now. It’s not the language (entirely). It’s you, dude. You’re better now. Give yourself some credit.

Rails didn't teach you. It was Rails' creators. Rails is at the forefront of innovation, and I believe the best minds have or will switch. That leaves everyone else playing catch up. Like the telephone game, the message loses meaning when it comes second hand.

Dinosaurs September 17th, 2007

Don't browse slashdot below +5, or you'll come across this:

Read the documentation and tutorials of Rails. Read the opinions people leave on various forums. You'll notice something frequently recurring: they keep talking about "magic" and "magical features" (literally).

Rails became popular since the MVC architecture it enforces allows you to feel you're using a "more professional" paradigm for developing web applications, and lots of newcomers were attracted by the promise for "worry free development" that Rails promotes.

In fact, Rails has very little real world usage. Trying to adapt it to an existing database schema can make you cry, and their entire "convention over configuration" idea falls completely.

Lots of the "magic" it does, like Active Record and routing / route generation, add significant overhead to each page request, for the sake of abstracting and keeping things flexible that don't need to be flexible in the first place (especially with modern refactoring tools found in modern IDE-s).

RoR is and WILL remain a niche, since there are already too many attempts at people employing it for large sites with very poor results.

It's a popular fact that the official site of Rails itself runs on PHP [rubyonrails.org], to which the excuse is that RoR is "for web apps and not for web sites"... which of course is a very poor excuse when the difference between both nowadays is only superficial.

What I like about Rails is that it resulted in a huge movement towards MVC in plenty of other languages and frameworks.

What I don't like is that those same languages don't try to apply MVC in a smart, efficient, light and performant way, but just rip Rails' features one by one, with routes and all.

People assume Rails and "web MVC" are the same thing, but they are not. A lot of the architecture in Rails is poorly conceived, and takes huge amount of resources to run abstractions of questionable use in real world application.

I suppose this will auto-correct itself as the "Rails fad" passes, but one thing's for certain: after Rails, web development will never be the same.

All these posts seem to come from the same playbook.

Break it down

...lots of newcomers were attracted by the promise for "worry free development" that Rails promotes.

Its sensible defaults do cut down worries, but its staying power is productivity and happiness.

In fact, Rails has very little real world usage.

In June, we relaunched yellowpages.com, becoming one of the world's largest sites on Rails.

Trying to adapt it to an existing database schema can make you cry, and their entire "convention over configuration" idea falls completely.

You can easily override Rails' naming conventions. If it's an uphill battle, your app is either too niche, or just poorly designed.

Lots of the "magic" it does, like Active Record and routing / route generation, add significant overhead to each page request, for the sake of abstracting and keeping things flexible that don't need to be flexible in the first place (especially with modern refactoring tools found in modern IDE-s).

Flexible routing generation makes RESTful architectures easy, and it's a godsend for SEO.

IDEs are overrated.

RoR is and WILL remain a niche, since there are already too many attempts at people employing it for large sites with very poor results.

Since the relaunch, yellowpages.com been breaking its traffic records.

It's a popular fact that the official site of Rails itself runs on PHP, to which the excuse is that RoR is "for web apps and not for web sites"... which of course is a very poor excuse when the difference between both nowadays is only superficial.

rubyonrails.org could be written entirely in flat HTML. However, the Official Rails Blog runs on Rails.

What I don't like is that those same languages don't try to apply MVC in a smart, efficient, light and performant way, but just rip Rails' features one by one, with routes and all.

Because Rails is at the forefront of innovation.

People assume Rails and "web MVC" are the same thing, but they are not. A lot of the architecture in Rails is poorly conceived, and takes huge amount of resources to run abstractions of questionable use in real world application.

Servers are cheaper than developers.

I suppose this will auto-correct itself as the "Rails fad" passes, but one thing's for certain: after Rails, web development will never be the same.

Yes. Those who don't evolve will die.