Buckwheat, I

March 10, 2009

I have, in a fit of "what am I going to do with this blog" mania, decided that I will review my current bathroom reading: "In Search of Anti-Semitism", by no other than William F. Buckley.

I know, I am about 16 years late to this party, but I’m reading it, I’m outraged, and I’m a darned-well tellin’. Sue me. I’m doing it.

For the record, I am using the Continuum print, soft-back, (c) 1992. If you don’t have this particular issue, the page numbers are quite likely to be a figment of your imagination.

Let’s start.

C# to C++ productivity #2

August 19, 2008

Case 2: “What’s in an error message?”

So you upgrade libraries.

With C#, odds are that you will receive a few dire warnings along the lines of “please don’t use this method anymore; we were smoking crack when we designed it and we’d prefer you not using it. Oh, sure. it’ll keep on working, just… please don’t, okay?”

Now try switching a project from the STLport library to the Microsoft/Dinkumware STL library. After changing all “std::hash_map” references to “stdext::hash_map”, all of a sudden you are faced with a new slew of errors. In “xhash”. What the hell? I didn’t write xhash, it’s a standard header for the standard template library. What’s it for? Why, for crying out loud, do I have to even care what the fark xhash even is? But sure, fine. C++ is the power language, so it must know something I do not. Let us examine what the problem in xhash is. Ah, no problem. “less() does not evaluate to a function, or a () dereference”. Or some such shit. And after that, have fun with ::rebind, and how comparers are different, and…

Wait.

Why the hell do I have to worry about this?

How is this helping me?

What short-bus committee designed this travesty?

This is why C++ productivity is a joke. It’s not a good one, and the joke is on you.

I love C++. Its power is without equal. Template meta-programming has not even the semblance of an equal in any other language. But really, if this was a car race:

  • FORTRAN is a Model T. Sure, it’ll work, but it’s about as efficient as a cheese grater is for whittling wood, and how much fun is hand-cranking the sucker for every menial trip?
  • C is a muscle car. Straightforward, powerful. Have fun spending the time fueling the sucker.
  • C++ is a rocket car. Which comes in parts. Without a manual.
  • C# is a Toyota Camry. It is not the fastest, not the most powerful, but it works, it works well, it works efficiently.

In this race (which as always is “Getting The Damned App Out The Door”), guess who wins. The rocket car, of course!

Well, as soon as you figure out how to put the damned thing together.

In the end, in a long-distance (i.e. large project) race between these, who would you bet on?

To put it another way: nobody cares how fast you can go, if you can never actually get around to going that fast.

C# to C++ productivity #1

August 18, 2008

Case 1: “What is in a string?”

You hit a break point in your code. You want to know what is in a string. You hover over the variable name in the IDE. What do you want to see?

“This is the string you wanted to see”

vs.

“std::stlp_string <std::w_char, std::char_traits>”

I have seen both today. Guess whence productivity?

Yes, we can.

July 2, 2008

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

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

Obama

Screws of fury

May 9, 2008

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

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

I’ll take the middle one.

image

No, I don’t make these up.

I wish I made it up

May 9, 2008

image


Follow

Get every new post delivered to your Inbox.