|
Role:
Head developer
Stinky was 22 year old youngster who thought he was a Visual Basic
god and as a god, he communicated with other mortals around him only
because he had a good heart. He used every opportunity to emphasize
that he was born to be a developer and that he tried almost every
technology that could come on your mind. C, Unix, HTML, Visual Basic -
you name it. When Bojan once mentioned that he was familiar with web
and HTML for quiet some time, more precisely from 1994 when he bought
his first modem and Mosaic browser, Stinky replied with patronizing
smile on his face: "Wow, why so late? I started to program HTML and
web in 1990." That meant he started with HTML when he was twelve years
old and three years before the first release of WWW standard.
Degree? Certificate? Nooooooo - Brainbench!
Stinky never came farther from high school. Unlike most programmers
who started their education with mathematics and programming oriented
high school, Stinky finished Geological and Mining high school, where
he has definitely never learned basic principles of mathematics, logic and
structured programming. He has also never tried to study computer
science, the logical choice of most programming oriented high school
graduates. He would explain that by saying he was too smart and
talented to waste his time there and that you could become a great
programmer just by experience. Do we have to tell you how many books
on programming Stinky read in his life?
Besides ignoring studying and books, Stinky also has never pursued
any official developer certificate, for example MCSD. However, he
proudly mentioned to everybody that he was one of the top ten Croatian
Visual Basic developers on
Brainbench site.
The anecdote that best reveals how little Stinky knew about the
programming started when he asked Bojan to help him solve the
following problem:
| |
"I have the function that returns Boolean value. Well, I would
like to call that function and store the opposite value in some
variable. I could code like this
If
Function()=true
Then variable =
false Else variable =
true.
but I have a feeling that it can be even simpler than that. Can you tell
me how?" |
After Bojan recovered from shock of realizing Stinky didn't know
basics of Logical Algebra, he replied that it was enough to put
variable = Not Function(). Stinky went to
check it out and after few minutes he
cheerfully shouted: "It works!". Bartol was a witness to whole scene and few
moments later he said to Bojan "You see, my friend, to hell
with your education, your degree in computer science and the tons of
books you read. You don't need any of that to be a champ developer
like Stinky. Just learn copy-paste method, remember all the
properties of Janus Gridex and ActiveBar control, and the world is
yours."
There is no hygiene exam on Brainbench
Stinky got his nickname when it became obvious that the prime source
of the unbearable stench that spread through the office wasn't just
Stinky's spaghetti code but the author himself. The Visual Basic god
didn't care much about taking showers, using deodorants or changing
clothes regularly. What surprised Bojan and Bartol even more was the
fact that he has lived with his girlfriend for quite some time. "How
can she tolerate that smell, my wife would kill me if I forgot to take
shower and went to work.", Bojan wondered. "Maybe she lost the sense
of smelling or maybe she also has such terrible odour, so they are
compatible", Bartol added. Bojan will always remember the day when
he realized how terrible Stinky's odour is. It was hot summer day and
since Dodoni didn't find it necessary to invest in air conditioner,
the poor developers used fans to cool themselves. One of those fans
was pointed towards Bojan. At some moment Stinky stood up from his
chair and approached Bojan because he wanted to discuss some
programming issues. Unfortunately for Bojan, he stood directly in
front of running fan and while he was joyfully explaining his problem,
Bojan was practically choking of the unbelievable stench coming from
his colleague. It was worse than everything he experienced before.
The other anecdote that also proves how little Stinky cared about the
hygiene was told by Bartol. One morning he went to toilet hoping to
unload big burden from his body. Although the Dodoni bathroom was
always in bad condition, he was still very shocked when he entered.
Namely, one of
his colleagues forgot to flush the toilet and he could see the big
brown "Mr. Kinky" and the pile of used toilet papers inside the toilet
seat. When he summoned all his colleagues and asked who was
responsible for such inconsiderate act, Stinky just responded: "Oops,
sorry. I was in a hurry."
Stinky code convention or "Monkey banging randomly on the keyboard
would write a better code" Since this site is mostly about the
development and not the hygiene, we will also say few words about the
Stinky's style of coding and his working habits. Simply put, Stinky's
programming could be best described as vulgar, heroic, code-like-hell
Visual Basic copy-paste programming, without following any established
standard or good programming practice.
He loved to use global variables, short and cryptic type names (e.g.
instead of rstCustomers or rstProjects he just wrote trs), "magic"
numeric and string constants, huge structures, massive hard coded SQL
queries spanning tens of lines of code, two characters indentation
instead of standard four and so on. Is it necessary to explain how
anybody
who had to maintain that horror felt? When speaking of his
programming style, Stinky used to say that he hated classes because they
were unnecessary complex and inefficient. Instead, he used structures
whenever possible. He also didn't think that COM components were any
good. To quote the master: "Well, at the beginning we tried COM
components, especially Patrik was agile about that, but we encountered
many problems with that compatibility stuff, new version of the
application didn't work with old version of components or vice versa.
So, to make things simpler, I just threw away all that component stuff
and put everything into one exe file. Since then we haven't got
similar problems. Who needs COM anyway?"
When Bojan heard that, he was shocked. It didn't occur to Visual Basic
god that maybe he didn't understand at all what binary
compatibility
meant and why application crashed in the first place. He also resisted
the temptation to ask Stinky about the IDL, GUIDs and other COM
related stuff
so familiar to C++ developers. He knew that Stinky wouldn't show that he didn't have a
clue about that but would rather say "Yes, of course I know about all
that, but it's not important at the moment."
In fact, Stinky and
his followers practiced totally wrong way of solving problems. Instead
of trying to better understand the problem and learning what they
didn't know, they would just solve the problem in fast and familiar
way, although it was obvious that it was wrong and that one day they
or some other person would have trouble maintaining such a solution.
The main reason for such behaviour was because they didn't want to
show that there were things they didn't understand and they thought
that the only good solution was a fast solution.
In Stinky's
vocabulary "code reuse" was interpreted as "copy-paste". Senka Lukavic
once said for him that he was programming only with three keys on the
keyboard - Ctrl, C and V (shortcuts for copy/paste commands in most
editors). She was also very annoyed by this programming style because she had to debug Stinky's garbage on many
occasions.
To make things worse, his copy-paste abilities weren't limited just to
source code. He also used the same technique for
all other application elements. For instance, if he had to develop a new form in
VB application, he would just copy one of the existing forms and adapt
it. He didn't care if he copied 90% of the same functionality together
with user interface elements and produced the maintenance nightmare.
Why would he care? He usually delegated debugging and maintenance of
his code to losers like Senka who didn't come to the top 10 on
Brainbench. In fact, instead of complaining they should have been
grateful for the privilege to debug and correct his majesty's shitty
code. Speed, speed and only speed
The only
criteria Stinky used when evaluating some person's programming abilities
was how fast he could produce a code. The quality and readability of
the code didn't matter, just make it quick so application could meet
schedule. Nearly every project in Dodoni started with impossible
schedule and Zakro and Erich forced people to forget about the
anything else but to deliver on time. Many of them resisted such
pressure and insisted on at least some level of planning and quality
control, which made them unpopular in Erich's and Zakro's eyes. On the
contrary, Stinky happily accepted such a policy and it made him de
facto a head developer in Dodoni, although he didn't bear an official
title. Still, he was the only person to sit in the same room with Zakro
and he was the one Zakro trusted the most and whom he consulted when
making estimates and planning for future projects.
The sad truth is that even such crazy code-like-hell and speed-only
strategy didn't result in meeting deadlines. Besides from getting the
product late, clients were also complaining because they've
gotten unstable and buggy application that crashed much too often to
be normally used in production. After few such deliveries, some of the
projects were cancelled and Dodoni lost some of the perspective
clients. It was obviously not a problem to Erich, as long as he could pull his
connections and find new accounts, or better to say, new opportunities
to undermine his reputation. We wouldn't
like to end a story about Stinky without mentioning his business ethics and morale. Let's quote Bartol: "One day
Stinky and me were the only people in the office and he confided me
his working philosophy. I don't know why, he probably thought I
couldn't wait to learn from him. Anyway, he said that his motto was -
I do the job right if I am paid adequately. In other words, if he gets
bigger salary, he would try harder and pay more attention to quality.
If he is not satisfied with his wage, he would just do it
quick-and-dirty and produce the garbage without any regret."
Although Stinky had more than solid salary regarding his talent and
skills (900 EURO was nice amount in Croatian IT at that time), he
thought he was significantly underpaid and that Dodoni should better
honour his remarkable talent. Few months before quitting Dodoni, he
put his desperate thoughts into action and demanded a 100% salary
increase, but even Zakro and Erich weren't that stupid to believe he
is worth so much and they denied his request.
Examples for "coding horror"
collection In time Bojan realized that
Stinky picked his programming style from Patrik. At the time when
Stinky came to Dodoni, Patrik was already very demoralized and
programmed mostly quick-and-dirty shortcuts, but Stinky knew so little
about programming that he thought it was the only way how to develop
applications. As he started to copy more and more code segments from
Patrik's modules, he dug himself deeper into dirty, monolithic,
copy-paste VB mud. Although on many occasions Bojan tried to show
Stinky there are better solutions and software architectures than one
he currently used, like for example
Engine-Class-Collection,
it didn't come to Stinky's mind. He always ignored such suggestions
and continued to develop in wrong way, mostly because he thought he
was too smart to listen to other people's advice.
Among many shitty code snippets created by Stinky, there was one that
Bojan particularly remembered and that haunted him for a long time. It
was an ASP module that Stinky wrote for DAMP 2 web application,
Bojan's first big project in Dodoni. The code in that module was like
a rotten apple put in the basket with other fresh apples. It was ugly,
dirty and so different from other ASP modules that Bojan wrote. After
thinking for a while, Bojan realized he had no choice but to delete it
and write it again, if he wanted to preserve the quality and his good
reputation. That "coding horror", to quote Steve McConnell in his
classic Code complete,
had constructs like this one:
| |
for x = -1
to c
if trs.EOF =
true or x > 100
then
exit for
end if
c = c + 1
(some business action)
next |
Bojan studied this part for a long time trying
to understand what was Stinky intention when he wrote that code.
Finally, he realized that Stinky went through the recordset and for
each record performed the same business action. When he asked the
author why he hadn't used simple and standard Do-until loop instead of
this totally confusing and illogical for loop, in which he incremented
the loop counter in the body of the loop, Stinky cheerfully replied,
using his irritating, high pitch, fairy-like voice: "Well, I wanted to
experiment a little and see if I could achieve the same without using
Do loop. It is boring to program the same way all the time. That
'for-loopy' seemed like a real refreshment to me."
"Yes, deleting that horror was also a refreshment to me", Bojan
thought and ended the conversation in hope he would preserve his
mental health and sanity by not arguing with Stinky. There was no
point in explaining to him why his solution was bad, especially in
terms of quality and ease of maintenance, because Stinky found nothing
wrong in writing unreadable code, for at least two reasons:
- If you write the code that is hard to read
and comprehend, you become very important to your organization
because you are the only one who can maintain that crap
- You are better programmer if you write more
complex code. Those who cannot understand it or need to spend much
time on it are losers.
Stinky wasn't the only person in Dodoni who
followed that philosophy. Besides Zakro, his role model, there was
another person who had much in common with Stinky, not just the same
smoking habits. His name was Tihomil Nikotinovic Maddog.
|