* Posts by Philip Perry

23 publicly visible posts • joined 20 Mar 2008

French cough in to filthy restaurants

Philip Perry
Paris Hilton

The best anecdote I've heard about travelling in Paris...

So this American guy was visiting Paris, and was lost. He walked up to a French guy and asked, very politely, where the louvre was.

"I don't speak English!" The Frenchman spat at him viciously.

Taken aback, the American repeated the question in French.

"I said I don't speak English!!!" the Frenchman yelled.

Official: Eee PC range to expand

Philip Perry
Jobs Halo

I bought a 701 when they first came out...

...It was a nice little thing, I got Java and NetBeans running on it, and it was what I needed for portable use. But the batteries only lasted 2 hours! I ended up buying a couple of Black and Decker portable power supplies for it (under 30 bucks each, providing AC for up to five hours each on a charge, although the EEE draws so much current they tend to shut down after five minutes to cool -- I've got to look into that).

If it had been any more than $299, I wouldn't have bought it.

What I'd like to see is a $500 laptop that runs Linux, has realistic specs, and lasts eight hours on a charge. Give me THAT, and I'll buy. More than one, probably.

Rich data: the dark side to Web 2.0 applications

Philip Perry

Minor correction...

When, in #3, I said "If you really MUST have an interactive website" I meant "If you really MUST have a website that is interactive without the traditional post-to-server, refresh page approach". Sorry about that.

Obviously everything's interactive these days; otherwise you wouldn't NEED server-side code. The problem with AJAX is that designers want websites to act like desktop applications, and vendors are lining up in agreement (because they want to rent you software as a service in perpetuity instead of sell you software once). My position is that it's all snake oil being foisted on you for selfish reasons and you're better off doing it the old way.

Sorry for being unclear.

Philip Perry
Paris Hilton

Web 2.0 is a Mega Fail -- this whole SUBJECT is dumb.

Hear me out.

The whole subject of "keeping code and data separate" is dumb. It's pushed by so-called "web developers" who seem never to have actually studied computer science. Real programmers do their coding on the server side, using OOP languages, and they know enough to use parameterized statements so SQL injection isn't a problem. TOY programmers learn HTML and JavaScript and buy some square glasses and a turtleneck, then go about propagating the walking abortion that is Web 2.0.

Listen, you want to know how to do a proper website? It's easy. I've been doing it for over ten years. Try this on for size:

1) All code belongs on the server side. Use an OOP language like Java or C#. Ideally, you should separate out your database-touching code on an app server behind an extra firewall (you want at least 3 tiers, plus the user's browser). If you're a tiny shop on a hosting service, and all you've got is the web tier and a database, you've got to make do with that. Pick a hosting service that uses Unix, it's generally a little safer. Your server side code should accept the user's inputs, then validate them (don't forget that part!), formulate a response and send an assembled web page back to the browser. This means the browser only sees static pages, which makes it friendlier to a wide variety of browsers and screen readers (for the blind) as well.

2) The ONLY thing you should put in the browser is the U.I. If you put ANY code in your web pages, and you really shouldn't because not everyone has JavaScript turned on, you should only include that which is necessary for proper rendering of content, plus maybe a client-side pre-validator to save the user some time if he screws up a form-entry field. If you want to save state, keep it in a session object on the server side -- don't put it in the client, where it can be altered by the user. KEEP IT SIMPLE. Don't get fancy! You're not running a TV show, you're serving something useful to the user. Focus on what your user is trying to do, and make it as easy as possible for him. Don't make him think.

3) If you really MUST have an interactive website, like for example, if you're doing a movie ad, do it in Flash, and have it only display static data you've staged in the browser. Flash is ideal for MOVIES, and MUSIC and GAMES. For everything else it's a complete waste of time and it locks out the blind and people with alternative browsers so it's not very socially friendly.

4) Whenever someone in your office starts talking about Ajax or Web 2.0, BITCH SLAP HIM. Explain that it's for his own good and you're only trying to help, then ask him if the feeling has passed. If he hasn't been cured yet, repeat as necessary.

The web is a mature medium, with many established, safe practices. Try adhering to what's been proven to work, and stop trying to change everything every couple of years!

Seriously.

Paris because... Well... She's cute, isn't she?

North Americans just don't steal handsets, apparently...

Philip Perry
Paris Hilton

@carlos -- don't mess with a NY granny!

Hey, Carlos: don't underestimate our grannies. They're quite a bit tougher than you think. The brick story was reported in the Journal News, which is quite reputable.

My OWN granny, who grew up in California during the Great Depression, was once married to a brutish creep. As family lore goes, one day the creep decided to slap her around. She beat the crap out of him! In fact, halfway through the brawl she threw him head-first down a tall, narrow staircase; he was lucky to live through it. Supposedly he was VERY polite to her from then on.

When she was 68, she had knuckles like ping-pong balls and would regularly engage in farmwork and restoration of old houses. She used to mind various family properties down in Virginia and the Southeast. I adored her; she was one of my favorite relatives. Sweet as honey to those who were kind to her, a hellion if anyone tried anything.

Speaking of hellions, the aforementioned creep once tried to intimidate my mother (another very sweet woman) in her kitchen. He grabbed her by the sink and tried to get her to have sex with him. She reached behind her to her knife drawer, pulled out a two foot butcher knife, and dug it into his groin -- not an actual stabbing, just more of a poking. She threw him out of the house, saying "You touch me again and I'll cut it off!!"

Us Yanks are very nice, sweet people, and we're lovely and polite. But don't annoy us; we have short tempers. :)

Paris, because I bet SHE knows about the grannies...

Philip Perry
Pirate

Why the U.S. Doesn't care about blacklisting...

Here in the U.S, if you lose your phone you go into the carrier's shop, get a new phone, and the old phone is disconnected from the network (when the new phone is activated, the old one is deactivated). So, why bother blacklisting it? Nobody cares.

The phones themselves are usually very cheap, as Eddie pointed out above. We get 'em for free with our plans, so who cares?

And as Wonderkid mentioned, there isn't as much casual "nicking" of phones in the U.S. because we're basically nuts and thrive on violence and chaos. I'm consistently astonished at the weird stuff "chavs" get away with over in England -- take "happy slapping" for instance, where teenagers run up to strangers and smack them in the head. But nobody attacks them! The victim just pouts!

If someone was to try that here in New York, they'd be beaten to within an inch of their lives. They might not even be able to flee, because a sufficiently pissed off New Yorker would throw a garbage can lid at 'em like a giant frisbee. GOD forbid you try happy slapping somewhere like Texas or Arizona... Everyone's packing heat down there, you'll get shot! At least New Yorkers -- USUALLY -- won't kill you!

I'm reminded of the story of a guy who tried to mug an old granny in the parking lot of a supermarket. He told her to give him her purse; she swung it at his head. He was knocked cold, and when the cops showed up, It turned out the old granny had kept two giant bricks in there! The mugger woke up in the ICU with a handcuff tying him to his bed and a massive concussion. The granny was treated like a hero in the newspaper the next day. I doubt that'd happen in England; your grannies are WAY too mannerly to go around bricking people in the head.

We Americans are pretty docile most of the time, but if you give us an excuse to go berserk, we won't put it to waste! :)

Google taunts 'losers' with secret Android code

Philip Perry
Unhappy

Android??? Meh.

I've lost interest in Android and the other mobile platforms it's competing with.

They're all gimmicks designed to lock you into a specific vendor, Google's included. None of them want to play fair with their users, so why even bother?

I've switched to running Java 6 on the EEE, where I get a FULL JDK/JRE and none of the limitations of so-called "mobile" java. Battery life isn't a concern because I got one of those portable power sources (essentially, a construction drill battery with an inverter) and I can go nine hours without plugging in -- PER power source, and I carry two.

The heck with these guys. Google's run by elitist swine, anyway. Who needs 'em?

US dominates tech R&D

Philip Perry
Jobs Horns

@Gene, John, and Robert

Many technologists suffer from an innate tendency to compare their intelligence to that of the people around them and assume that they're inferior and stupid. After all, those people tend to have pesky minds of their own, and don't always agree with a technologist's obviously brilliant and superior point of view. It MUST be stupidity, right? He couldn't be... WRONG...

And when someone else makes a gaffe (like accidentally suffering a memory leak in Java, where garbage collection has a mind of its own, perchance?) it's easy to snipe at them and point the finger. "LOOK!" a sysadmin might say. "His code has a memory leak! He's obviously incompetent! Fire 'im!" When the sysadmin's boss tells him to STFU and get back to work, the sysadmin writes it off by saying the boss is an idiot. Of COURSE! It can't be that the sysadmin is being a psycho about something that can be fixed in a short debugging session.

Maybe -- just MAYBE -- the answer is to accept that you, individually, are not the be-all, end-all of technology. It could be that people choose different career tracks based on their preferences, not their ability or lack thereof. It might surprise you, GENE, to realize that there are 300 million Americans and you've only worked with a few, so generalizations are likely to fail. And John, you might be humbled to realize that developers' jobs are to write and debug code, NOT work on server-side issues outside of their purview.

I'm sure that when your next memory leak comes up, if you ask NICELY, your developers will be happy to throw their code on the debugger and track it down for you.

Here's an idea:

How about we all just do our jobs, treat our colleages with respect, and develop a little healthy humility, hmm?

And Robert? There's a bit of irony in your post. I leave its detection as an exercise for the reader.

Frameworks and the danger of a grand design

Philip Perry
Boffin

Well... You can't do OOP without building a framework.

Any good object-oriented project will contain at least a semblance of a framework... It'll offer a hierarchy of objects that perform specific types of tasks usable by other programmers.

For example, if you're building an online service, you'll probably create some kind of account object that handles everything related to a given user, right? And once you've built it, you shouldn't have to rebuild it every time you want to do something new with that data. You might create a child class that extends it a bit. But why duplicate your work over and over again? Do it once, correctly, and reuse it.

I think what the author is getting at is that people are pattern-happy these days, and new grads seem to think they've got to re-implement Struts every time they put up a web page.

I knew a guy like that. Here's a true story:

I once worked on a document tracking system. It would have used .Net, with web services on a middleware server providing database access, and most of the ASP.Net user interfaces were derived from abstract classes I built as a sort of interface prototype. Lots of functionality was built into the base classes, so all the individual UIs had to do was implement what was unique to them. It was nice and clean, and used inheritance and polymorphism to simplify the maintenance I anticipated happening in the future.

Due to some very weird and unfair bullshit going on in my office at the time, the whole project got handed off to a bunch of consultants.

The first consultant wanted to use a framework based on COM+, even though the transport mechanism he wanted to use was going to be deprecated by Microsoft. Because MY code was pure web services and ASP.Net based, he didn't know how to convert it to his framework, and told my boss that my code was good, but he didn't understand it. It would all have to be rewritten. So he took all the code that related to business processes and scrapped my UI and web services, and started rewriting.

Shortly after, another consultant defeated the first consultant in mortal combat (basically, made him look dumb in a meeting) and HE decided to do the whole thing using Struts. But he didn't want to download Struts; he wanted to write his own version ON OUR DIME. The bosses thought he was brilliant and gave him the go-ahead. I had a short and hostile argument with him in which he told me that "page controller" was no good (despite my approach being the Microsoft-standard one) and that he would use "front controller" (i.e. a Java-like approach). I told him he was an idiot; he told me I was one. He won.

He worked on it for a year and a half, and just before I left the company, he sent out an email claiming that his framework "wasn't working out" and that they were going to download some port of Struts for .Net and try to recode for that.

If I'd have been left alone, the project would have been done in two months. It ultimately took almost two years.

Maybe that's what the author was talking about?

Japanese customs reunited with lost dope

Philip Perry
Paris Hilton

Clarification -- I was responding to the guys who...

... were discussing why civilized people shouldn't visit third world countries and islamic dictatorships. I should have been clearer.

I wasn't trying to say Japan isn't part of the "first world". Although now, I don't think I'd use it as a connection on my way somewhere else!!!

Yikes.

Philip Perry
Paris Hilton

The lesson to be learned here is...

DON'T TRAVEL.

If you're from the first world, STAY IN IT. The rest of the planet has gone officially bonkers. It simply isn't safe "over there" anymore, and if you think it is you're deluding yourself.

I'm reminded of Paul Bowles' "The Sheltering Sky", and the doomed couple who flattered themselves that they were "travellers, not tourists". They thought they could meld in anywhere just by wanting to. They were wrong.

As for the U.S. being a bad idea for foreigners to visit due to the horrible airport security and whatnot, well, you've got us there. But listen; I'm from New York. Most of us Americans are very reasonable, civilized people, and it's still a great place to live and/or visit if you can get past the trolls who run the airports. Wait until late in 2009; with a more moderate government in place, there's an excellent chance all this insanity will be successfully treated and you'll be able to come hang out with us again.

Paris, because she wouldn't go NEAR Dubai.

Five misunderstood Vista features

Philip Perry
Pirate

@Darryl -- BINGO! The NERVE of them!

The NERVE of them to release an operating system that offers VIRTUALLY NOTHING USEFUL THAT WASN'T IN XP, which doesn't support paid-for hardware and software, and which is such a horrible resource hog that you have to buy whole new machines just to RUN it, and which THEN runs BADLY...

It's a MUGGING, Darryl. It's a freaking MUGGING. It's a company deciding that they aren't making enough money, and releasing yet another rehashed copy of the same old leftovers, with a little poison thrown in. If they were a restaurant, they'd be up on charges.

The NERVE is RIGHT! Glad we're on the same page, bro!

Philip Perry
Boffin

The power of the hierarchial directory tree

Some guys have been saying that they can't store their files sensibly the first time around, so they need search. That's bull. The guy who said "I know where my files are" had it right the first time.

The problem here is that many people take a lazy approach, and keep everything in a single directory (or a very small set of directories). Once you start doing that, before too long it's totally unmanageable without search, and it's too difficult to go back and fix it, so you keep using the flawed search-based approach.

Here's how to get it right the first time:

FILES:

Starting from a single directory, like "My Documents" in Windows, create some generic subdirectories like "work related", "family related", "personal", "information", and "amusements". Then, create subdirectories under these directories to categorize your files. Under "family" for instance, you might have "photos" and under "photos", "Christmas 2007". Or under "information" you might have "security" and "firewall setup" and a set of firewall scripts. And so on.

If you set it up correctly the first time, and train yourself to save your files in a sensible location the FIRST time around, you'll never have to use search at ALL.

EMAIL:

First, create email folders similar to the ones you created for files. Then, create a "whitelist". This is a set of mail processing rules that automatically sort your email by subject or sender address, and put it in a sensible folder based on where it's coming from. For example, if you work at fubar corporation, and your work email ends with fubar.com, send all emails from fubar.com to your work-related folder. Mail from your supervisor can go in the "oh shit" folder, and so on.

All email that isn't pre-sorted by the rules you've set up is automatically moved to the trash. Now all you have to do is scan your trash pail once a day for anything that looks interesting. Got a thousand spam emails? Right click and "empty trash". No more bayesian filtering! No more BS. Just a nice, clean inbox.

It's not hard, guys. Really. It just takes a little bit of work up-front.

Philip Perry
Paris Hilton

Why I'll never use Vista.

First of all, I'm not totally anti Microsoft. At work I use Windows XP and Windows Server 2003 (and happily I might add). At home I use Windows XP Home Edition to play video games. So don't take this as an anti-Microsoft screed; it's just my opinion as a random IT nerd.

I will never -- NEVER -- use Windows Vista. Here are my well-considered reasons:

First of all, I think that Microsoft thought they could blow kisses at computer manufacturers by deliberately building in ridiculously resource-intensive services that are difficult for naive users to disable. There's absolutely NO NEED WHATSOEVER for a modern operating system to be this resource-hungry. The only motivation I can imagine for it is some kind of sweetheart deal with hardware manufacturers. They're obviously CAPABLE of writing a fast operating system; look at Windows Server 2008. They just chose NOT to. It was a business decision, and I loathe them for it.

On that basis alone, Vista is crap. But a second point can be made that it doesn't support many drivers, hardware, and software applications that users have paid good money for. Once you upgrade, you're hosed, and you have to re-purchase a lot of your software and peripherals. Again, I loathe them for this.

Third, alternative operating systems exist that achieve most or all of Vista's goals without being resource-hungry. Linux, for example, will even run on old 586'es with 128MB of ram. I've gotten Slackware 9 to run on a 386 with 16mb of ram and a monochrome LCD (although forget about running KDE -- maybe FluxBox)! My cute little Asus EEE PC, with 512 MB ram and only a couple gig of disk, runs Linux like a champ. There's a model that runs XP just fine, too. So, what exactly is Microsoft's excuse for screwing up Vista so badly? On this basis, I'd avoid it just because it's so EMBARRASSING.

Honestly, I don't know what they were thinking. Perhaps they assumed people would just have to swallow their bitter pill?

Paris because... Well... Who needs a reason? What a fox.

Taser rolls out taser-on-a-roll, new military zapbomb deal

Philip Perry
Happy

TRUE STORY: My religious door to door experience

Ok, back when I was in college, I spent a year or so in Phoenix, Arizona, where it can get up to 120 degrees in July. So I was living in Tempe, and dating a rather pretty, sexually open minded older woman, and one Saturday morning we were relaxing after a LOT of sex when the doorbell to my apartment rang.

I got up stark naked, very sweaty from the heat, and holding a small towel over my groin, answered the door. It was two Mormon missionaries, about 18, who wanted to tell me all about Jesus and Joseph Smith. They were dressed identically in black pants and button down white shirts. I was about a head taller than they were, and about a hundred pounds heavier, with tattoos all over the place.

I opened the door, looked them up and down, and yelled back into the apartment "Babe! The virgins are here! We can do the sacrifice! Guys! Come in! Come in!" They took off, and I didn't see them anymore after that.

Good times.

Philip Perry
Dead Vulture

Shotguns in U.S. Military

Well, I was in the Marines back in the first gulf war days, in a "Special Operations Capable" unit (MEUSOC). We were an amphibious raid unit that used Zodiacs and modified Boston Whalers. Our Scout Swimmers were all equipped with pump-action 12-ga shotguns. Nobody said anything to us about any prohibition, but then we were kind of a weird unit.

Also, we were told about 40mm shotgun shells for the M203. You heard me right; a 40mm shotgun shell. Although I think instead of lead shot it fired steel shrapnel. They never issued us any; I think they knew we'd do something stupid with 'em, like skeet off the fantail of our ship with dishes stolen from the mess hall...

Still! Think how much fun THAT would have been to shoot! "Sarge, didja get 'im?" "I dunno! All I can see is a huge grease spot!"

Hafta Man and the threat to agile design

Philip Perry
Paris Hilton

How to handle hafta

It's called a "compatibility layer", kids.

Think of it this way. You have the Ugly API, covered in warts, black as pitch and sin, controlled by some other group you have no control over.

Then you have your new project. You want to build your project as perfectly as possible, but you've ALSO got to work with the Ugly API, and you can't ruffle the feathers of the group that owns it.

What do you do?

You write your software the way you WANT to, with exactly the interface you think is best.

THEN, you pick the most irritating member of your team and you make him write a compatibility layer between the Ugly API and your beautiful API. You must pick the annoying one because he's going to be having meetings with the Ugly API team and you want to get at least some karmic revenge out of the deal.

Whenever you have to interact with the Ugly API, you use the compatibility layer.

When you interact with better APIs, you can use better approaches.

THAT'S how you do it. :)

Paris, because she'd put a bodyguard (or three) between herself and a hideous pub-goer, which is similar in spirit.

Backlash starts against 'sexy' databases

Philip Perry
Paris Hilton

I still think RDBMS' would be easier to work with.

@jim a:

I dunno... I can't imagine it being too hard to normalize an object structure like that for a relational database. I've got to believe it'd be easier to do it the DB way than the pure object way... Tables and SQL are so much simpler in my opinion.

It wouldn't take THAT much code. Would it? Most of the plumbing would be in an abstract base class, written once and forgotten. All your child classes would have to implement would be abstract methods that set up SQL and parameters, right? Plus you can do wicked voodoo with stored procedures. How would you do that in an ORM setup?

I still don't get the problem non-RDBMS' are supposed to solve. What's hard? What can't be done in SQL?

Question-mark Paris, because she's confused too. :)

Philip Perry
Paris Hilton

Org Charts in SQL

So I assume you're not talking about creating a visual org chart, because that's the kind of thing that would be easier to mock up in Visio...

What I assume you're talking about is storing an org chart in a database so people can use an application to look up Joe's supervisor, or to dig up all groups with less than 10 members whose manager is at a certain level and which are connected to a specific department...

Operational stuff, right?

Well... Let's say that each employee record has a foreign key to his direct supervisor, a foreign key to his workgroup, and a foreign key to his department. Of course, he'd also have a foreign key to a job code (supervisor, programmer, tech support, clerical weenie, etc). This would make it easier to filter employees when searching.

Let's also say that departments have a foreign key to the department they're contained in, as well as a foreign key to the location they're housed at.

Let's say that workgroups have foreign keys to the departments they belong to.

Now... What if you wanted to find workgroups with less than 10 members who are in the Hoboken, NJ location in the HR department? You'd select workgroups whose location is Hoboken and whose department is HR, where the count of employees that foreign key to that workgroup is less than 10 and greater than zero (if they don't have at least one person, they're defunct, right?).

Then, since you'd be doing this in a Java object, you'd have an ArrayList of Workgroup objects, so you could have each one fetch a list of Employee.objects and their associated Supervisor object. Each object would contain its own query code and SQL. All very self-contained and tidy.

If you wanted to write out a huge report so some graphic designer could visio you up a nice chart, you could query ALL locations, ALL departments, and ALL workgroups, but you'd probably want to do only one at a time, generate text, and clear out the objects, so your PCs memory wouldn't burst into flames in a spectacular technological hari kari.

I guess I'm just not seeing the difficulty. What are you trying to do that is difficult in SQL? What's the hard/impossible part?

Philip Perry
Paris Hilton

Sorry if my previous post came across a bit "aggro"...

My apologies to any "Uneducated wannabes whose first programming languages were HTML and JavaScript" or "half-wits promoted from the secretarial pool to webmaster back in the dot-bomb days" my previous post may have offended. I'm sure you're all very nice people. Just not really on top of the RDBMS question.

The bottom line, for me, is this:

Do you want to have your referential integrity and scalability supported automatically by a powerful system that just works (an RDBMS)?

Or do you want to have to completely reinvent all those levels of data management so you can use flat files or XML, all so you can evade having to write a little SQL, which isn't even difficult?

In my view all these "RDBMS is teh Sux0r" people are saying that instead of learning to drive a car, they want to hop everywhere on a pogo stick, falling over and bashing their unmentionables on it every time something unexpected happens.

Philip Perry
Paris Hilton

Educated programmers use RDBMS...

...Uneducated wannabes whose first programming languages were HTML and JavaScript (remember all those half-wits promoted from the secretarial pool to "webmaster" back in the dot-bomb days?) don't UNDERSTAND why RDMBS' are useful. They fall for whatever snake oil their vendor is pushing at a given moment.

Look at Mr. B's comment, for example. I think the most telling phrase in it is this one:

"I'm OO coding, WTF do I need to normalise me objects to store them and de-normalise when retrieving them" [sic]

This is typical of the mindset that pursues a stripping down, a DUMBING down, of all software related tools so that everyone in the peanut gallery can call themselves an "architect". It's not that this person is too lazy to write a line of SQL. It's much worse than that. It's that he actually doesn't understand why it's good or even useful.

With regards to his "point", I would answer that if he knew how to do OO PROPERLY, he'd have designed a normalized schema based on the actual entities he was working with, and his objects would have been based on the same entities, so he'd have had a very nice match between the two. There would be no NEED for normalization or de-normalization, because he would be thinking in terms of real-world entities and their interactions and designing his system around them.

When properly designed, an RDBMS is an asset to a software project. It provides data normalization, consistency, extensibility, transaction support, and a consistent interface based on the SQL language, which has been very stable for many years.

We're even using them as data stores in desktop software now. Look at Apache's Derby project, which evolved into Sun's JavaDB. It's a real-live full-power relational database that can be embedded in your Java software. And it's free.

Relational databases are still very important and relevant -- to those who know enough to understand why.

Paris, because (look at the glasses!) even SHE uses an RDBMS.

BOFH: The London Underground vending machine conspiracy

Philip Perry
Pirate

Time for a true story!

So, back in college, I studied Physics under a wonderful guy who was teaching as a sideline (his main job was as a research scientist for a large local company). He told me this tale (paraphrased since it was a few years ago):

"So I was giving a speech about careers in Physics at a high school in central Michigan, and I had some free time before the event. I was relaxing in the main hallway when a bunch of A/V club types wheeled a huge dolly covered in speakers and electronics into a corner. While I watched, they set up their gear and pointed the speakers at the school principal's office, way off down the hallway."

"They plugged in their gear and started fiddling with it. It didn't make any noise, but it seemed to be vibrating like hell. Far off down the hall, the windows of the principal's office seemed to be rumbling, almost shaking. One of the kids said 'yeah, yeah, that's it!'. I tried to get closer to see what they were doing, but they gave me a weird look and hustled off down the hallway."

"I forgot about it until the next morning, when there was an article in the local paper about how every single window in the high school had been shattered the previous night. The only clue the police had was a white van driving around the neighborhood, but nobody had seen anyone doing anything, and there was no evidence about how the windows were broken."

"I wish I'd talked to them! Man I'd like to build one!"

He was my favorite professor. Best! Physics! Teacher! Ever!

Sweet, sweet smell of comments in code?

Philip Perry
Alert

Comments are as important as code.

I work in I.T. in a state government agency in the United States. Most of my projects have business rules that are determined by regulations; these can be very dense and hard to follow. Once a software project is complete, it may not be touched for some time, and the next programmer who works on it may not know the regulations that apply. If I didn't comment all my code in great detail, there's no WAY anyone would be able to maintain it. Here's a sample:

// On submission of a new set of filed schedules,

// you MUST set the "submitted" and "amended"

// booleans. Schedules may be edited or deleted

// by the user until they have been submitted.

// They may be amended after they have been

// submitted but NOT after they have been

// amended at least once. All submitted or

// amended schedules must be frozen for

// historical purposes. Don't screw this up or

// we'll dangle you in the lawyer's cage!

If I didn't comment my code, I think my boss would throw me down the stairs... We ALL read BOFH regularly. :)