Fog Creek Software
Discussion Board




A simple programmer's joy


You spend two weeks building a metadata infrastructure while the client paces and bangs on your door bugging you for progress. Then you spend another week building the UI, again being pestered about what's taking so long.

After it goes beta, the client sends you a list of requested changes. Since it's metadata-driven, the changes take a grand total of twenty minutes to fix.

It's firm fixed price, so I talked them through making the changes themselves (through the metadata UI I'd also built)

"Whoa, it's that simple?"
"No, it's that easy to do because I spent three weeks making it that easy to do"
"Oh wow... thanks! That's cool!"

ahhhhh.....

Philo

Philo
Monday, June 02, 2003

But did they pay, and did the check clear?

Mitch & Murray (from downtown)
Monday, June 02, 2003

"Whoa, it's that simple?"
"No, it's that easy to do because I spent three weeks making it that easy to do"

There's an old saying about writing:

"The easier it is to READ, the harder it was to WRITE".

Corollary:  the reader often comments "that must have been easy to write, because it was very easy to read " <g>

Clay
Monday, June 02, 2003

> "The easier it is to READ, the harder it was to WRITE".

So true so true...

www.MarkTAW.com
Monday, June 02, 2003

Heh:
"Simplicity will cost you"

Philo

Philo
Tuesday, June 03, 2003

Well, you've wasted the oportunity for a nice fat maintenance contract.

Realist
Tuesday, June 03, 2003

whoops - opportunity.

Realist
Tuesday, June 03, 2003

LOL!

You're absolutely right. Foot.shoot()

But it *is* a really cool application...

Philo

Philo
Tuesday, June 03, 2003

Philo,

Could you please give more details if possible regarding your application.

Prakash S
Tuesday, June 03, 2003

It's a fairly simple reporting-type tool that provides for companies sharing pricing programs.

The original spec had a set of categories and fields, each field having html text in it. I abstracted it out to a categories table, a fields table, a fielddata table, and a programs table:

Cats  1---M  Fields 1--M FieldData M--1 Programs

Since both editing and display are driven from this, then if you want a new field, you just add a line to the Fields table and it's there in the editing form and the display. (Right now display is just HTML; next job is adding PDF's)

The really nice thing about this is that implementing search was very++ easy - just had to set full text searching on one field of one table. Right now I'm setting up a component that will show all the fields that have changed since the user's last login (again, a pretty simple query)

*Implementing* a metadata solution is very, very painful. But once it's set up, new features often practically write themselves.

Philo

Philo
Tuesday, June 03, 2003

> "The easier it is to READ, the harder it was to WRITE".

I've just printed that and hung it in the wall.

Ros
Tuesday, June 03, 2003

This is a good lesson for all walks of life, not just programming: just because something looks easy doesn't mean it is. Golfers make a 100 yard chip shot landing four feet from the hole look simple, and if you don't know anything about golf you might say, "I can do that!" and never even get close. It's an awful lot of work to make it look that easy. Men comfortable with playground hoops watch the WNBA and say, "Me and my buddies could beat them." Yeah, just try.

Or to be more relevant and bring up a prejudice I find many programmers to have: good managers make their job look easy because they're non-intrusive. But then programmers say, "I don't need a manager, the one I have hardly does anything," strike out on their own and find out that, gosh, it can be a lot of work.

Chris Winters
Tuesday, June 03, 2003

> Golfers make a 100 yard chip shot landing four feet from
> the hole look simple,

This is one of the signs of the good professionals. When you watch Steve Vai playing guitar, you say "Boy, that looks really easy. He's not even breaking a sweat". And the truth is, it's easy... for him. Because he spent eons practicing and honing his skills.

Then, you've got the "couch guitar players", goin' "Boy, he messed up that chord here!", and "did you listen to his arpeggio? Sounded awful!", etc. And then you, (not so) innocently ask "How would you do it?", and you get silence, and a I-don't-wanna-talk-to-you-again look :)

The prejudice you mention is everywhere. Reminds me a line from "Baker Street":

You used to say that it was so easy
You used to say that it was so easy
But you're tryin', you're tryin' now
--
"Suravye ninto manshima taishite (Peace favor your sword)" (Shienaran salute)
"Life is a dream from which we all must wake before we can dream again" (Amys, Aiel Wise One)

Paulo Caetano
Tuesday, June 03, 2003

"I believe that Hirschfeld's devotion to line comes from yet a more fundamental aesthetic - his respect for absolute simplicity. One day soon after we first met, I asked: "Sometimes you do a drawing inspired by a complex play with elaborate scenery, extravagant costumes, and a cast of thousands - yet the drawing is simple. Other times the play is simple with a straightforward set, and costumes that are street clothes - yet the drawing is complicated. Is it that when you have the time you do a complex drawing and when you're rushed you do a simple one ?"

"No," he replied. "When I'm rushed I do a complicated drawing. When I have the time, I do a simple one."

http://www.alhirschfeld.com/bios/hirschfeld.html

Leonardo Herrera
Tuesday, June 03, 2003

This sounds like a thin client / sql server app?  I did express my dislikes to these types of things especially with RAD tools like VB in the "Don't define the interface in the Database" thread.  It sounds like you are storing HTML in your database... IMO that's ok,  as long you avoid storing RAD tool generated metadata in a database.

Did you write a tool so that you don't have to wade through your metadata to modify it?  IMO this is the downfall of these systems.  No tools are written and the person who wrote the app is no where to be found.  (Don't mean to sound so critical.)

Anyway, I'm glad it worked out for you.

Dave B.
Tuesday, June 03, 2003

Congrats Philo!!  I had a similar experience last week.  We demoed our first 3 phases of work to the client via WebX demo.  The clients response...."That is 99% of what we wanted and envisioned.  You are doing a great job".  I almost cried :)

shiggins
Tuesday, June 03, 2003

PS.  The we is me.  I have a bad habit of referring to myself as we to make it seem like there is a team of developers.  Ooops.

shiggins
Tuesday, June 03, 2003

If we'd been pair programming, no way in hell I'd let you get away with that design.

just some dude
Tuesday, June 03, 2003

Just had the walkthrough with the final client (I'm a sub, so I answer to the prime contractor, and he/we answer to the paying client)

Every "what about..?" or "can we...?" question asked was already handled by the framework and tools in place. They are *very* happy and *very* impressed with what we've delivered, and it should net us follow-on work on another project worth 5x the value of this website contract.

And BTW, once the major development was done and we were in the bug fix and "make sure all the specs are covered" phase, the metadata design made fixes exceptionally easy.

So - investing time and effort into a solid, extensible design has seriously paid off.

Philo

Philo
Tuesday, June 03, 2003

Dave - the HTML is in the database because that's client-editable data. Think of a newsletter-style web application where the code takes care of organizing and displaying newsletters, but the user will be editing the content.
We're using a RichTextBox HTML/Javascript component that gives the end user a WYSIWYG editing box, including a formatting toolbar.

Then we simply store whatever they type in the database, and spew it out for display.

We started with the richtextbox in one specific area of the website, but they liked it so much they requested to have those style editing controls *everywhere*.

Philo

Philo
Tuesday, June 03, 2003

justsomedude -

Why?

shiggins
Tuesday, June 03, 2003

Just Some Dude -
You wouldn't like the design because you want maintenance to be really difficult? Or because you want implementation of tools and searching to take ten times as long?

During the walkthrough, the client asked about adding a field to the form. This means changing:
1) The edit form
2) The archiving engine
3) The display form
4) The search engine
5) A Program Summary page
6) The "What's New" page

Oh no, wait - it means adding a single line in the Fields grid in the "Form Maintenance" page. 30 seconds to accomplish, and all the changes have already been tested.

Philo

Philo
Tuesday, June 03, 2003

Kudos on building a truly elegant solution and making your clkient happy all at once.  The time and opportunity to do that comes along far too seldom in this world of "now, now now!"

This reminds me of an anecdote I heard years ago:

A woman attended a performance by a master pianist.  After the performance, she approached the pianist and exclaimed "You sounded wonderful!  Why, I'd give my life to be able to play like that!"

To which the pianist responded "Madam, I HAVE given my life to play like that."

Norrick
Tuesday, June 03, 2003

I wrote a meta data driven application a few years ago, complete with an administration module to manage the meta data. I'd have to say it was the most satisfying application I ever wrote, probably my 'best' work.

Three weeks after I delivered the software the company was swallowed by a multinational and my application ended up on a CD in a dusty drawer somewhere.

Realist
Wednesday, June 04, 2003

Philo - I've been looking around for a good rich text box implemented in javascript just as you describe - do you have a reference for the component you used?

Konrad
Wednesday, June 04, 2003

There is an interview with the authors of 'The Pragmatic Programmer' in whcih 'metadata driven programming' is discussed.

The interview is done by another Joel's type of guy -- making interviews, articles hoping it would lead people to buy his/her software product/services. (Try google pragmatic programmer metadata)

OT: Once again it just indicates how bad and immature our profession is. The customer should not be surprised by the elegant result. It should be the rule, not exception.

Rick Tang
Wednesday, June 04, 2003

Konrad:
http://www.richtextbox.com/

However, it's an asp.net component...

Philo

Philo
Wednesday, June 04, 2003

Thanks for the info Philo, is this not a slight departure from CAMEL:-)

Prakash S
Thursday, June 05, 2003

Oh yeah - I was still working this job parttime while at Camel; it was the only thing keeping me sane - go to work, sit in meetings for six hours, deal with management setbacks for the other two hours, then come home and actually get some work done.

Philo

Philo
Thursday, June 05, 2003

*  Recent Topics

*  Fog Creek Home