Yes, we can.

July 2, 2008 by dancingbunnies

In every job, on every continent, in any type of company, this holds true: almost everything can be done, the question is if there is the will, the stamina and the funding to get it done.

For now, let me narrow it down to what I know, and know well: software engineering (also known as The Sklll Formerly Known As Programming).

Ready?

When you talk to your customers, always keep in mind that they have been told by a licenced IT professional that something can not be done.

Which, of course, is bullshit.

Apart from pathological, fundamentally NP-incomplete problems, anything can be solved. Of course, explaining to the average program manager what NP-complete/incomplete means is left as an exercise for the reader. For the record, I am leasing certain windmills to practice on. Hands up, every CS acolyte who has tried to explain O() notation to a manager, forceable journeyman convert or plain incompetent. It just does not work.

So, we are left with a few premises:

  • Almost anything can be solved
  • Whether something can or can not be solved is not a decision to be left to those on the business/program management side of things.

That leaves it up to us, lowly code monkeys, to find a way to properly communicate the state of affairs to those who can not (rightfully, actually) be bothered by the why and the why not. I think programmers can do a much better job of communicating the possible and the impossible. I also think I have found, by trial and error, over the years, hiking a thousand miles each way, through sleet and snow, a way to do just that, and do it right.

The thing is to sell an attitude.

No, that’s not right.

The thing is to sell an attitude that can easily be taken as condescending, smug, self-congratulating and asinine.

Almost.

The thing is to sell an attitude that can easily be taken as condescending, smug, self-congratulating and asinine… without actuallly being condescending, smug, self-congratulatory or asinine. And I say this with love. I have seen sales pitches (as it were) for this exact same attitude go down faster than the Hindenburg on a crack binge.

What I aim to do here is give pointers for those that feel the way I do and do not know how to sell it. Here goes:

  • You are right.
  • That does not make you God.
  • Being an asshole never sold anything. Not even a 25 cent glass of lemonade.
  • People want you to be right. Be right. Allusions do not count.
  • You have to deliver. If you have to skunk it, skunk it…. but without anything to show, you are just blowing smoke. And stinky smoke at that.

To put it another way, if something is not going the way you want it to at your current place of employment:

  • Do better. Why would anyone listen to you unless you prove you have a better alternative?
  • No talk. No pontificating. “And then they…” should be banned from your vocabulary. Flip sides. You know what any manager, any manager at all, thinks when you say that? “Yeah they did, and…”? If you evoke that type of sentiment, you have already lost.

If this seems like “work”, or “too much”, or “pandering”, I pray you find a FOSS project that will pay you. If not, you are in trouble.

To get back to the original topic…

Yes, anything the ask you can be done. The question is how much effort, time and money it will take. The question to you, as a developer, is how you sell it. There is more to this story, but it will have to wait.

This turned out far more random than I thought. Oh well.

Anniversary I

June 5, 2008 by dancingbunnies

I just realized that I am coming up on the 25th anniversary of my first program.

The year: 1983.

The computer: Sinclair ZX-Spectrum. A cigar box with light-blue rubber keys with the feel of something that has been dead for weeks. The 16K version. Which I made my father (bless him, he bought computers before they became a remotely sane investment… depending on your viewpoint, he gave me purpose, or sealed my fate) expand to 48K for about $250. To put matters in perspective, the $89 CPU in the laptop I am typing this on right now has more than 10 times that amount in L2 cache alone. To give you even more perspective, this laptop has exactly 64 times as much RAM as that box did… at a fifth of the cost.

I programmed BASIC. I programmed Z80 assembler. It was fun. Of course, my father saw that, and got us….

 

The year: 1986

A WANG (no, it’s an actual brand, look it up) PC-AT 10MHz 80286 with EGA graphics (the color monitor was an upgrade from Hercules) and a 20MB hard drive. To see Intel crank out processors with more L3 cache than that entire hard drive…

This machine could take on the world. It was the shiz-nite. I remember getting WordPerfect 5.1 on five 5 1/4″, 1.2MB floppy disks and having to set aside a full 9MB of the available 20MB to get it installed. I also remember why: 5.1 had full-screen, WYSIWYG print preview. No, really. You could actually see the document on your screen the way it would print out. Insert picture is Alt-F9, 1, 1, 2. Why the hell do I remember these things, and not the name of my boss that I met yesterday?

My programming started in earnest on that over-priced, here’s our retarded custom keyboard beige turd. And to start, it was all about efficiency. I saw an ASK.EXE that you could use in batch files to display a message passed to it, reply to the Yes or No keys (okay, it was J or N, I’m a foreigner), and did all of this in… 8.5KB?

Hell no. That was just dumb.

I could do better. I got myself an 8086 assembly book, a MS-DOS Assembly programming book, and went to town:

C:\
C:\debug
a100

wask.com
q

If you don’t know what that means, you’re young, and I envy you.

Suffice it to say, it is scary that I still remember what

mov ah, 9h
int 21h

…means. Long story short, I duplicated all of the C-based ASK.EXE in my DEBUG-based ASK.COM. Thirty-farking-four bytes. Hah.

I sent it in to the local hobby-computing magazine (RAM), and it got published. Of course, I managed to lose our copy. If you have one, please contact me.

At the same time, of course, like everyone else, I experimented with GW-BASIC. Easy to learn, easy to get frustrated with. It felt like a toy, and I treated it as such. Play, play, ignore.

Then I was challenged. My favorite magazine at the time (think “Scientific American For Teens”) had a computer section, which for the longest time (read: since ZX81 days) was a “Best One Liner” type deal. It then changed from “One Liner” to “Super Liner”, with the requirement being “the best thing you can do in 50 lines”. Sign of the times: submissions were for the PC, for the Amiga, for the Atari ST… thinking back to those days when most had not figured out the obvious winner is amazing to me.

So. Super Liner. 50 lines. Like programming. Getting bored. Then it hit me (as it seems to hit every programmer at one time or another):

TETRIS.

Hell yeah. Just write Tetris in 50 lines.

(to be continued)

Booyah

June 4, 2008 by dancingbunnies

Obama

Screws of fury

May 9, 2008 by dancingbunnies

The next time you sit down in a public bathroom, the kind that has multiple, erm, outlets… look around you. Odds are that the stall has been assembled of lowest-bidder fantasy-wood, covered with lowest-bid, I’ve-had-every-grain-of-creativity-burnt-out-of-my-soul veneer. Odds are, it will be some type of off-white (called something spectacularly creative which, in the end, means, off-motherfucking-white), or something gray (I don’t even know what the marketing droids come up with for these, nor do I wish to know).

Now, look at the fittings. I mean the metal bits that hold the sub-standard plastic/wood slabs together.

Notice anything odd?

Look at the screws.

Odds are, you are looking at a phenomenon that, as far as I know, did not exist a decade ago. I speak of the type of screws that only allow for tightening by conventional screwdrivers. To put it another way, screws that cannot be loosened by a normal screwdriver.

If you do not know what I am talking about, you have never seen them and I hereby suggest you go and spend your time on something more productive than reading this post, since it talks of things that do not apply to you. Go play with your dog, write a novel, mow the lawn. Go forth, in short.

Still here?

So you have seen them. Someone sat down, produced the blueprint and caused to be produced this (I could be wrong here, but this is the sentiment it provokes in me) most passive-aggressive odds-and-ends bit of hardware: the screw that goes in but does not come out.

What is the motivation behind this? No, seriously, think about this. Why, over a stunningly short span, have all new developments chosen this type of screw? To me, it implies that these screws are being used for a reason. Obviously, they are using these puppies because people were taking bathroom stalls apart.

Which, of course, leads to the next question:

Who the flying fuck takes bathroom stalls apart?

Where, pray tell, is this roving band of people taking public bathroom stalls apart (doing so, for that matter, in some way, unbeknownst to people actually using them at the time)? Is there a Bathroom Stall Parts Mafia that I have been previously unaware of?

Christ on a crutch, what is going on here? Am I missing something?

Fun with spam

May 9, 2008 by dancingbunnies

I am torn. Is this pedophilia or a bed-wetting fetish?

image

No, I am not making these up.

Fun with spam

May 9, 2008 by dancingbunnies

I’ll take the middle one.

image

No, I don’t make these up.

I wish I made it up

May 9, 2008 by dancingbunnies

image

The social

May 9, 2008 by dancingbunnies

I went through my older posts today, and was reminded of the Facebook kerfuffle that even had luminaries like Robert Scoble* & Rodney Rumford engage the points I put forth (and Dare Obesanjo do a concern-troll boo-hoo drive-by, without contributing anything of value either way).

I feel spectacularly vindicated.

I said it then, and I’ll say it now: Facebook is not a paradigm shift.

What was the biggest Facebook issue in the past year? People should not be allowed to play Scrabble on it. No, really. I could care less one way or the other, and there might be an interesting legal dust-up over this, not to mention a “change-it-just-enough-to-not-get-sued” campaign on the part of the developers… but in the end, it is all vindicating my basic points:

  • Nobody cares.
  • Scrabble is your biggest draw?
  • Who the hell is sufficiently boring to play Scrabble online?
  • How is this better than, oh, Yahoo! Games?
  • Nobody cares.
  • How many people do you know on Facebook? I’m at a grand total of 0.
  • What does Facebook do that I cannot do through e-mail, MySpace and IM?
  • Nobody cares.
  • Where’s the there?
  • Why should I be on Facebook (or Twitter, for that matter)?
  • What does it do for me?
  • Nobody cares.

There have been no moneymakers, no new penetrating apps, no new killer apps, just molasses-like expansion into the original demographic.

Yawn. And then? Who is making money? Off of what? And how?

You know what a paradigm shift is? Microsoft allowing XNA games on Live Arcade. It’s a game-changer. It truly changes the rules of the game. That does not necessarily mean good will come of it, but it does change things. It allows people to do things that were impossible before… in the case of XNA games on XBLA, it’s “hello 15,000,000 users… download the demo of my well-reviewed-by-peers game that will cost you nothing to try and, hey, pick it, $8 to download”. If I were, oh, PopCap, I’d be freaking out. And not in a good way.

 

Speaking of nostalgia: I would KILL for the issue of Kijk (somewhere between 1991 and 1994, I know it was a June issue) that has my original 50-line GW-BASIC version of Tetris in it… heck, even a scan of the relevant page. Anyone helping me to obtain that issue will have an unlimited tab the next time I visit The Netherlands. Oh, Nico Baaijens… where art thou?

 

* Dude, change your font. Times New Roman makes the baby Jesus cry. I’ll write the CSS for you if need be, if only to stop my eyes from bleeding.

Normalization I

May 9, 2008 by dancingbunnies

I’ve wanted to write a somewhat seminal treatise on my views on normalization for quite a while now, and have so far failed to start one because, well, it seemed that there was too much to say on the subject for just one post.

Faugh on that. It’s been bubbling in my mind for far too long, and frankly, with me grokking WCF and WPF aside from fixing bugs for 9 hours a day, I need the room in my head. So here goes.

Ground rules:

  • If you feel the need to name an entity or table anything along the lines of “Entity”, or “Object”, or “Property”, you are going too far. Take a deep breath. You are building a data model, modeling a reality. You are not modeling a model that can model the world. Such a model is called an RDBMS, and it is the system you are using to do this modeling.
  • If you feel the need to append a number to any table, database or field, you are not going far enough. A number signals duplication, duplication signals that you are modeling a list within a single table, and that signals that you need to create another entity.
  • Unless forced to, every entity should be an actual “thing”. If you cannot describe to the layperson what is stored in a table in under two minutes, you might be going off the deep end.
  • The model makes the rules. One way or the other (be it through non-nullable fields, check constraints, unique constraints, triggers or flying Oreo monitoring cookies), the data model makes sure that there is no way to fart on reality.

For the record, let me throw in my rules for database nomenclature for completeness:

  • No type prefixes, ever.  No tblWidget, Widget.
  • Table names that describe an entity are the generic, shortest term for that entity. Singular. No SalesPeople, no People, Person.
  • Many-to-many relationship tables are named for their component parts.
  • Every table has one primary key. A single field, named for the table with ID appended. Compound keys do not exist. If you think they do, please move along.

Now, these are neat rules, you say. How would you actually go about modeling something real-world?

Well, let’s tackle the rules on a real-world problem, shall we? I will update the above rules with new things that strike me as we go along.

Let us tackle what WinFS proposed: generic contact management.

Very well, let’s begin. First question: our base tables. Do we start with a Contact table? Sounds good, nice and generic, does it not? Sure, but… what is a Contact? I don’t know about you, but I don’t know any Contacts. What I know is businesses and people. Which, by the rules I stated above, gets reduced to Company and Person. So, here we go.

Company
    CompanyID
    Name
    …

Person
    PersonID
    Name
    …

Yikes. Road bump #1. I have written extensively before on how bad just modeling a name can get. Well, let’s punt that puppy for now. It is a sub-problem that we can tackle later. For now, allow me to say “Name” where I mean “the 10 fields that comprise a full name” for now. Incidentally, the temptation for “Contact” should be curbed once you consider the non-communal properties between the two. Call me pedantic, but it’ll be a cold day in hell before I put a BirthDate field in a Company table. Or, for that matter, in a Contact table and have it be blank half the time. It forces enforcement out to the business layer, and that’s a no-no. Hence the above “the model makes the rules” rule. The business layer enforces business rules, the model enforces reality. The differences can be subtle at times, and only experience gives a good feel. Still, here’s the rule of thumb: the model should enforce that anything retrieved is something that can actually happen.

Here are some considerations:

  • People do not have a “business address”. They work for a Company, which has an address. It seems we might want to model a relationship there.
  • There are different addresses for both types. Physical, mailing, booty call — there are simply differing types for differing purposes for
  • How do you model “work phone”? It doesn’t really belong to the person. It doesn’t belong to the company. It belongs to the relationship between a person and a company. You could call such a relationship “CompanyPerson”, “PersonCompany”, or if you want to be a bit more a propos on the matter, “Employment”. Still, no matter what the actual name, that’s where it rightfully goes.
  • Things can get seriously silly, especially if you want to keep history. For example, let me pick the most simple, the most basic, the most immutable of all properties a person can have: gender. Now consider sex-change surgery. About the most immutable property, it turns out, is date of birth.

Feedback is welcome. I am serious about modeling this, and modeling it for keeps.

Ah, Rodney… NOW I understand Facebook!

May 8, 2008 by dancingbunnies

I check in on Facebook every now and then. I am sure that someday, somehow, it’ll cease being a waste of time. I know, because Robert Scoble told me so.

But today, I feel enlightened. Rodney, as it were, slapped me in the face with the truth:

image

Yes, that is an actual screen-shot. I fired up my trusty Live Writer right away, because this is just precious. Now, let me go see what the thing actually does

Hot interim live-blogging action: why do these applications, vying for your attention and mine, make it so fucking hard to figure out what they actually do? Oh, wait. That in and of itself might be a hint.

More hot live-blogging LiveCopter 27 action: there is no actual page within clicking distance on Facebook explaining what the magical BitchSlap! applet does. Forgive me, but why the flying fuck would anyone care at this point?

We are now truly entering into the special realm of futility previously monopolized (in my world) by Expander. Now, this one is exquisitely meta. You add this application to your application suite on Facebook, a mildly viral site that intends to aggregate your life, and bother your friends and acquaintances sufficiently for them to join just to shut you up — and then, presumably, move on to do the same to theirs. In a social sense, the online equivalent of a mild, communicable itch: annoying, but tolerable. This application’s entire premise is for you to bother people that you know with A) an invitation to install the mother (of course), which will B) automagically share your network with theirs, and vice versa… the benefit, for some reason, being that you get to be in touch with people that you know but don’t know to get a hold of, but are able to get a hold of through your friends. This is assuming that I want to talk to friends of my friends… which, excepting some spectacularly fortuitous exceptions to the rule I am doing a pathetic job of formulating…

DOES NOT HAPPEN. 

Look, I watched Serendipity and I hated it the first time — I do not need a warmed-over Internet version of same. So what, specifically, is wrong with apps like Expander? Well, mainly: it is being viral for being viral’s sake, and it pisses me off. It makes several asinine assumptions:

  • I have a pressing need to talk to someone
  • I am unable to get in touch with anyone I want to talk to
  • I am sufficiently retarded to be unable to stay in touch with those I want to stay in touch with
  • No, really, I have no other means whatsoever to get in touch with these people

It’s a basic, blatant grasp to go for the “I need to be popular” gland, and this is a spectacular example of there being No There There. For the record, I would have never gone trolling for this, but hey — every time I log on to Facebook, I see the activity of my friends. The problem is that 2 out of the 3 friends I have on Facebook are professionals in the Web 2.0 field, and as such do a lot of adding and removing applications. Hence the entire premise of this post — and so much baffled head-shaking my neck is now the best-exercised part of my body. And I do wish I were kidding. For most of the writing, the applications, the content, and by extension and (hello, root cause), the people in the 2.0 ecosphere, my thought bubble reads: “Okay. And? Great. So? Fan-mother-fucking-tabulous. The point is?” Even doing the exquisitely basic research required to write a presumptuous post such as this one becomes exhausting.

Now, in the preceding paragraph, note “2 out of 3″. I am very much a social leper, but I am not that bad. Yet. It’s simply that whomever you bring Facebook up with… doesn’t care. 28,000,000 people started a profile? Talk to blogspot. No, really — you should.

Anyway, I have been trying to avoid the term for weeks now, but I’m done with avoiding it. I have challenged the luminaries in the field, and I have gotten respect from them all (well, with the exception of Dare Obesanjo) — but, as expected and somewhat luminous — no actual public discussion.

So fine… the term is “fluff”, and it abounds. I think the basic point is still lost on people inside the 2.0 echo chamber. The 1.0 bubble seemed based on the premise that people would much prefer to spend their money on things they do not need online than they do at the store. Delusion intensified to the point where the meme became that people would actually prefer replacing their real shopping with online shopping. That worked really well… until the first time an actual customer had to deal with the actual jack-ass that is the average UPS delivery guy. This is worth losing the instant gratification of carrying the actual item home over?

People can already share their pictures. They can already chat. They can already search for their old classmates (hint: it’s called Google). The there is not there.

The ground-swell revolution will not happen, because you are offering people things they already have. You are, in a sense, trying to sell people pet food online rather than in a brick-and-mortar store. You are selling evolution, and that means you have to be better, more convenient, free and (very, very important on the modern Internet) free of annoyance. Your mousetrap had better be free, have self-extending legs, an infra-red homing device to find the darned critters, fire-and-forget poisoned dart killing system and it had better take its kill out to the trash by itself — or, if so programmed, bury it under the designated fruit tree to aid in fertilization.

Yes, the bar is that high. Deal with it.