Archive for December, 2007

Thoughts on “Rails is a Ghetto”

Monday, December 31st, 2007

I won’t link to the article, but recently a very popular and well-respected member of the rails community wrote some scathing stuff about some members of the community, pretty much lambasting the entire RoR crowd in one fell swoop.

If this person’s blog had “Enterprise Java Architect” plastered across the top of it (and was not a well-known ruby contributor), then I’d probably be here ripping him to shreds. Actually, I’d probably be here just ignoring that kind of rant…

I’ve blogged before about the ability to take criticism well. Unfounded, meritless attacks are one thing. But if the criticism points out some flaws that are recognizable, I’m more than willing to take a good hard look. Won’t necessarily agree with the critics or feedback all the time, but it’s worth at least getting, to see how other people perceive you / your abilities / etc.

That’s how I would view this attack on some members of the community. He backs much of what he says up with IRC logs. Some of them, if true, are indeed astounding. i.e. the fact that a, how shall we say, major RoR operation had to restart their app server 400 times a day. Who knows if this was an exaggeration, or later turned out to be due to hardware failure (it happens).

On Consulting

It’s this persons right, but he basically called almost all of his consulting clients “morons” or some such. His reasoning was that he had a business degree as well, and obviously a high sense of self-worth & belief in his ideas, etc.

This person should clearly not be doing consulting. He made some pretty major mistakes, i.e.:

1. Not getting a percentage paid up front (i.e. minimum 30% of some X amount)

2. Kept working on projects even though he wasn’t getting paid (similar to #1)

3. Allowed his clients to pay him NET-30 (turned into NET-60)

You have to be pretty firm as a consultant or clients will try and walk all over you. On several occasions, I’ve had the opportunity to glance at client’s bank accounts just to ensure A) they had a viable balance, or B) they indeed were sending me a check via their bank’s check mailing system.

In these cases, I didn’t ask this but the clients offered this to me as an assurance that they were the real deal.

For every 1 paying client, you get 4-5 people who want you to work equity-only, so often the lines are blurry.

Do Most of Us Get it Wrong?

Statistically speaking, most of said rant author’s clients probably will fail. But at least these clients are taking chances by starting “some silly social network.” BTW - has he heard of silly social networks like Bebo who targeted the UK market (even while MySpce dominated here) and is now valued at hundreds of millions?

Or perhaps Digg, which was built by a php contractor for ~ $2,000 paid for out of Kevin Rose’s retirement savings. This ruby contributor (god bless his contributions, which my apps use daily) would probably have scoffed at Rose’s idea for “yet another” social bookmarking site.

Small sample sizes indeed, not scientifically indicative, but if all of these client ideas are stupid, then sites like Digg, Bebo, etc. would never have broken through.

Extraction of Sunk Labor Cost Value Through 60+ Hour Weeks

The rant author then goes on to post this gem, which I could finally get behind (company name removed so as to not run their name through the mud via hearsay):

Because ******** pays these people a salary that is fixed and considered a sunk cost. If they pay someone 60k/year and that person works 40 hours/week then they are paying them about $29/hour. If they convince this idiot to work 60 hours/week then they are basically paying the moron $19/hour. If they can push them to 80 hour/week then these idiots are actually making $14/hour. You can make $29/hour managing a fast food joint.

The further and harder ******* (or any consulting firm) pushes its employees the more money they make because then they charge the client for each fucking hour. Get it? If they push an employee to 60/week they not only reduce the cost of that employee but also increase the billable hours. Hell, even if they don’t charge for those hours they still make more money just by reducing costs.

Okay, but that could be said of any company that hires someone on salary but then pushes them to work so many more hours each week.

I’ve had occasion to work with people who seem to value hours spent in the office as opposed to actual productivity.

They basically come across as having the Jesus Complex, i.e. “they died in the office for our sins.”

Here were some of the things that were slightly annoying about this mentality:

1. You could, literally, get as much done in 20% of the time (or 5x as much for the day), but if you didn’t work 10 hours that day you still looked like a slacker.

2. Working from home is not allowed. Lord knows, people might *goof off* at home (or run errands) in between checking in code. Because no one ever surfs Google Reader, Digg or their favorite sites in the office.

3. Were not accustomed to using a Changeset viewer to see exactly what everyone is working on each day.

4. Changeset viewers would make it trivial, for example, to see if someone indeed produced many multiples of quality output as someone else.

5. Would spend 20+ hours setting up their favorite version control / ticket system, when Unfuddle and friends would be ready to go in 5 minutes worth of setup.

6. Would create new projects (not optimizations) that could take days to implement (not to mention maintain), when leasing an additional server @ $125 per month would solve the problem equally (if not better) as well.

This is not directed at anyone individually, but rather that kind of mentality that values “looking like you’re working hard” vs. actual quality output.

Under Pressure

I’ve had to deal with a pressure cooker situation before, where this statement from our rant author rang a bell:

I saw them pull passive aggressive shit like picking on a single employee high-school-nerd-vs-jock style until he conforms or quits.

In my case, I got the heat because of my speaking up about the diminishing (then negative) returns of pushing devs in 60, 70+ hour weeks. Then eventually walking out one evening when my feelings on the matter weren’t being heard.

If you’re treated like this, it probably is a good idea to just walk out or somehow or another assert your value. If you’re normally a rockstar but are farting along, checking in crap code, while you see your fellow devs checking Facebook stats every 5 minutes in between GReader sessions, then you know that nobody is really getting much done but is rather just putting in face time…

All in all, that experience was a learning one, and it was more about miscommunication, middlemen / managers, etc. than anything.

Rant Repercussions?

Will this developer’s rant have repercussions beyond the ruby world? Perhaps — this could end up all over Digg, programming.reddit.com, etc.

I say that’s great though. If the RoR community can’t take criticism, then it will never actually evolve or learn to take a good hard look at itself in the mirror.

33 Steps to Moving Abroad [Checklist]

Sunday, December 30th, 2007

beach.jpg

New post over up at On Web Apps: 33 Steps to Moving Abroad, more of a checklist than anything.

Some Leadership Lessons from Abraham Lincoln

Thursday, December 27th, 2007

New post up over at On Web Apps: 5 Leadership Lessons from Abraham Lincoln.

Twitter Scales Rails Past Alexa Rank #700

Wednesday, December 26th, 2007

I’ve already blogged about how you have a 99%+ chance of never needing to scale to this level, but if you do happen to have the next big Web 2.0 hit on your hands, rest assured that Twitter has now entered the Alexa Top 700 websites. disclaimer: Alexa stats are notoriously flaky but still hold much weight

Here are the Twitter stats on Compete.com: holding steady at 500k monthly uniques.

This Hack Not Properly Planned

Wednesday, December 26th, 2007

I’ve come across many coders who have not properly planned their Greatist Hits of programming, per se.

Sit across from a group of coders at your average meetup, and ask them if they write tests first for their fun “side project”:

Dev #1: Well, y’know, I kind of just develop the code (without tests) as I go.
Dev #2: If I had more time, y’know… I’d write tests, and stuff.

This mirrors my own tinkerings. I’m not saying there’s anything wrong with Test-Driven Development or that it’s in any way inferior to Cowboy Method (TM).

I’m just saying… a lot of hackers… hackers in the wild, do not tend to follow TDD when tinkering on their own fun projects.

I would add tests… but I might change this later, and then I’d have to change the tests, too.

Ah screw it. I’ll just code it up and get the darn thing working first…

A lot of these projects end up being the del.icio.uses, YouTubes and Scribds of the world.

Dealing with Annoying Techie Know-It-Alls… and oh, Merry Christmas!

Wednesday, December 26th, 2007

Just got another annoying criticism in the comments on this ThinkVitamin article about how to optimize your Ajax in Ruby on Rails.

What I Probably Should’ve Done

Taken a screencast of what loading conversations was like in Mailroom before my optimizations, and one afterwards. And then gone on to show how this was done.

That was basically the entire point of writing the article, yet of course you always get annoying blowhards piping in on how your code sucks in this way or that way. Like optimizing for another 5-20% speed improvement really matters when, literally, the user-noticeable lag is already down to 300 milliseconds or less. Okay, fine — your improvements would get it to 200 milliseconds as opposed to 250 milliseconds.

Never mind… like, y’know, building 80% of the features of GMail with just a team of 1 full-time backend developer and 1 part-time frontend developer.

The Big Trick

The big optimization trick that was used to reduce the noticeable lag time was having the HTML cached on the client side. When the user clicked on a conversation, basically one big “eval()” statement was called and the conversation was rendered. Making it fucking lightning fast.

I’ve told this story to a few developers, etc in the past who read about these optimizations on my resume or whatever, and they’re always like “oh…. that’s how.” Basically as if it’s cheating to actually do that.

Why I Love Those Cheesy “Making Money Online” Blogs

I love blogs like Shoemoney and Steve Pavlina because those guys have already “made it” and are simply sharing their wisdom (or talking about what they did to get where they are).

I’m sure Steve and Shoemoney get their fair share of trolls and critics, but it must feel damn good to post a screenshot of your monthly earnings that looks like:

shoe_sm.png

This, in not so many words, says to anyone who has achieved maybe 1/100th of that level of success:

Suck. My. Wang. (comma) Bitches.

:) Oh and merry christmas!

Would You Bet $100,000,000 On Your Programming Language

Sunday, December 23rd, 2007

That’s what James Hague asks here.

For that kind of money, I’d be willing to learn any programming language in the world.

Assembly?

MOV   AX,1234H
MOV   BX,5678H
PUSH  AX
PUSH  BX
POP   AX
POP   BX

No problem. (Took an ASM class in college — it was actually quite fun.)

Lisp?

(defun sqrt-iter (guess x)
  (if (good-enough-p guess x)
      guess
      (sqrt-iter (improve guess x) x)))

(defun improve (guess x)
  (mean (list guess (/ x guess))))

I’ve actually tinkered with Scheme/Lisp, but never got far enough down the rabbit hole to understand why Paul Graham and the Lisp brigade are so excited about it.

C++?

#include 
#include 

using namespace std;

main()
{
   vector vI1Matrix(3,0);
   vector< vector > vI2Matrix(4, vI1Matrix);
   vector< vector< vector > > vI3Matrix(5, vI2Matrix);
   …
}

Once you get past the pointer arithmetic and annoying compiler errors, C++ doesn’t seem too bad. Not to digress, but I’ve never met a CS problem I couldn’t tackle without the use of pointers. While I understand their power, it reminds me a bit too much of Lotus spending eighteen months to rewrite 1-2-3 so that it could fit into 640K of RAM (by the time it shipped, most computers had 2-4MB of RAM).

So, What Programming Language Would I Use if $100,000,000 Was on the Line?

Java — combined with any other optimizations from languages like C/C++ as necessary, and nice extras like JRuby, etc.

James goes on to ask:

And if a hundred million dollars changes your approach to getting things done in a quick and reliable fashion, then why isn’t it your standard approach?

Let’s run the numbers. If your typical consulting gig is $10,000 — then a 100-mil project is worth what… 10,000 times that?

If your annual salary is $100,000 then $100 million is still 1000 times that amount.

Just like you wouldn’t build mission critical NASA software using your new favorite toy programming languages — it also makes no sense to overoptimize and write your fun Web 2.0 application in Assembly, or Java, for that matter.

Is Waterboarding Torture?

Saturday, December 22nd, 2007

This thread leaves little doubt in my mind.

There goes my idea of setting up a “Waterboarding Stand” and offering to waterboard passers-by for $10 a pop. (If it’s not torture… it couldn’t be *that* bad now could it? :))

LinkedIn Hack: Update Your Profile for a Rankings Bump

Tuesday, December 18th, 2007

LinkedIn incorporates the last date/time you updated your profile into its search rankings somehow.

This is a bit like how MySpace results work, by default, they show people who have recently logged in or changed their profile.

This simple algorithm works out really well — people normally update their profile only when they’re starting to look for a new job or have already found one.

Even if you have nothing new to add — try updating your LinkedIn profile just for the fun of it, and you’ll soon be inundated with requests for connecting or business offers.

Amazon SimpleDB Had Such Potential

Monday, December 17th, 2007

Uncov says it better than I could.

I’m hoping SimpleDB is just the first step towards Amazon ComplexDB.

Scaling at the database is one of the last “hard problems” in scaling your application.

The Real Problem

Scaling your database for the typical app, honestly, isn’t all that hard. That is — if you know the basics of databases and are using a sane system like MySQL, PostgreSQL or are some kind of SQL Server rockstar.

By the time your database needs to scale beyond 1 big server, your app is probably successful enough that you can afford to bring in a real DBA to architect a nice N-server architecture, or just figure it out yourself through a little trial and error.

Also with the rise of memcached, databases across the world are being hit less and less often as memcached fills in for this role. Facebook has something like 200+ machines just running memcached (written May 2007, it’s probably morel iike 300+ now).

Why Amazon ComplexDB (Infinitely Scalable MySQL) Would be Tricky

When I first heard about SimpleDB, it was perplexing as to why they didn’t simply offer a MySQL instance that was “infinitely scalable.” One of the huge problems with Amazon EC2 for production webapps is that you either have to A) connect to a remote database (and face the latency of connecting across datacenters to hit the DB), or B) use a local EC2 server as a database and risk complete loss of data. (when EC2 servers go down, your data goes POOF!)

The reason why Amazon can’t just simply offer “infinitely scalable MySQL”:

Not all apps require the same level of reads vs. writes. If your app is very read-heavy, then you can use 1 master and a bunch of slaves.

If your app is very write-intensive, you may have to resort to sharding your data into multiple databases. Some apps face no alternative, but the idea of sharding data seems really, really messy. It’s one area where simply plugging in “Amazon ComplexDB” (if it existed) could be a really nice alternative.


You are currently browsing the Shanti’s Dispatches weblog archives for December, 2007.

Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz