National programming styles explained

bridged with qdn.cafe
Igor Kovalenko

National programming styles explained

Post by Igor Kovalenko » Sat May 24, 2003 9:36 am

Here is an amusing text that I ran across. It was in russian, with no author
or title. Everyone at work liked it so much (the russians, anyway) that I
bothered to translate. The style of the original is preserved quite closely.

Dedicated to camz, who does not cease to bring the best out of me ;)
Thanks to Ian for the link to the text.

---

National programming styles explained

Any russian programmer will, after a couple minutes of reading some code,
jump and tell himself: rewrite the whole damned thing! Then he will have
some second thoughts about how long that would take, so he'll spend the rest
of the day convincing himself that it only appears to be a big task.
Naturally, it shoud work out just fine if he'll just sit down and do it. At
least the code will come out right and elegant. Next morning he's feeling
fresh and self-satisfied and reports to the management that it will only
take one day to rewrite that piece, no more. Yes, no more. Two, in the worst
case and if you adjust for all the risks. In the end, the management will
give him a week and he'll successfully complete it after 6 months... when
that piece will be seen by another russian programmer.

Meanwhile, in the four neighboring cubicles the work of chinese programmers
does not stop for a second. They manage to report to work before the russian
and leave after him, but do about 3 times less work. This quartet does not
write any code for a long time, they only maintain the code that was
originally written by an indian and since then rewritten twice by the
russians. This code does not just have bugs. That is their nest. The nest
continuously reproduces itself using the favorite chinese code reuse
technology called copy/paste. From there bugs spread out by means of static
variables and pointers passed into functions (since a chinese programmer
can't live with the inconvinience of not being able to modify outer scope
variables passed into his function by modules being rewritten by the
russian).

Recalling this function the russian usually loses the ability to speak
english for some time and switches to some mix of russian and chinese. He
wishes for a while already to rewrite the whole piece that is being worked
on by the chinese, but he lacks the time. The chinese have serious bugs
hanging on them, of which the management is aware and constantly hurries
them up. They hastily reassign the bugs to each other, since they know that
attempts to fix them will only lead to new ones that are even worse. And
they are right in that thought.

To figure out the order in which the static variables change their values
and how exactly that happens only one man in the company can - the indian
programmer. However, he is being in the state of meditation. So, when that
whole quartet will be let go during a layoff... and who else can they let
go? The russian haven't finished rewriting his piece yet and the indian -
being the main asset of the company - he rarely pays attention to the
project, but when he does - everyone realizes that nobody knows the
architecture quite like he does. So, getting back to the layoff... when the
chinese are gone, their code has two possible fates. The first - it will be
given to the russians and they will rewrite it. The second - it will be
given to a local, canadian programmer.

Oh, the canadian programmer is a special type. He will, like a knight
without a fear, thrust ahead without a minute of hesitation to fix the most
fearsome bug of the chinese code. That Bug lives there for three years and
the chinese have already reported four times (once each) to the management
that it has been fixed. But the Bug always returned, like the Batman. So,
the canadian will do what chinese did not dare to for all those three long
years. He will, using a debugger, catch the place where a static variable
gets assigned the value of 1 instead of the 0 that it is supposed to be and
in a decicive move will create another variable next to it with the right
value. The Bug will die in the unfair fight with the canadian programmer.
However that victory will have a heavy price.

Everything will break and stop working, including the piece just rewritten
by the russian. That will make the russian think about all this for whole
two days and then he'll come to the quite predictable conclusion that the
whole design was wrong to begin with and everything needs to be rewritten.
That will take a week. Two, at the most... The canadian will bravely go and
try to fix everything, but it will only make things worse, even though
nobody thought it could... This vain will pull the indian out of the state
of meditation and he will come up with a solution worthy a true genius - to
branch the code. According to his plan, they will now support two branches
of the code - one with the Bug but working, the other not working but
without the Bug. The russian, when he hears about the plan will break a
ruler against an edge of a table and call his wife a bitch at home, however
he won't argue at the meeting.

Fortunately, all that does not affect the business much, since the product
sells anyway. So the management looks generally satisfied and does not cease
to remind everyone that they are selected as the best from the best. And
that we have proved our capability to release a product by releasing it from
time to time.

Unknown author
translated from russian

ed1k

Re: National programming styles explained

Post by ed1k » Sat May 24, 2003 7:03 pm

In article <band7g$cg$1@inn.qnx.com>, kovalenko@attbi.com says...
....
Thanks to Ian for the link to the text.
....
Where can I read this amuzing text in russian?
ed1k

Ian Zagorskih

Re: National programming styles explained

Post by Ian Zagorskih » Sun May 25, 2003 5:28 am

"ed1k" <ed1k@humber.bay> wrote in message
news:MPG.19399a3da02cf6099896ca@inn.qnx.com...
In article <band7g$cg$1@inn.qnx.com>, kovalenko@attbi.com says...
...
Thanks to Ian for the link to the text.
...
Where can I read this amuzing text in russian?
ed1k
man, you are the constant qnx.org.ru poster and do not read section
"Other->Read sitting !" ? :)

http://qnx.org.ru/forum/viewtopic.php?m ... um=7&start
=25 in the middle.

unfortunatelly, the author of this text is unknown, at least for me.

// wbr

ed1k

Re: National programming styles explained

Post by ed1k » Sun May 25, 2003 11:50 pm

In article <bapilj$bln$1@inn.qnx.com>, ianzag@megasignal.com says...
"ed1k" <ed1k@humber.bay> wrote in message
news:MPG.19399a3da02cf6099896ca@inn.qnx.com...
In article <band7g$cg$1@inn.qnx.com>, kovalenko@attbi.com says...
...
Thanks to Ian for the link to the text.
...
Where can I read this amuzing text in russian?
ed1k

man, you are the constant qnx.org.ru poster and do not read section
"Other->Read sitting !" ? :)
It's huge :) December 2002 tt was middle of my battle with Bell, I was w/out internet access :(
Thanks.
unfortunatelly, the author of this text is unknown, at least for me.
Maybe ZZZ knows?

ed1k.

Andrzej Kocon

Re: National programming styles explained

Post by Andrzej Kocon » Tue May 27, 2003 8:33 pm

On Sat, 24 May 2003 04:36:51 -0500, "Igor Kovalenko"
<kovalenko@attbi.com> wrote:
Here is an amusing text that I ran across. It was in russian, with no author
or title. Everyone at work liked it so much (the russians, anyway) that I
bothered to translate. The style of the original is preserved quite closely.

Dedicated to camz, who does not cease to bring the best out of me ;)
Thanks to Ian for the link to the text.

---

National programming styles explained
(...)
And here is the result:

http://www.monitortoday.com/News-2003/2 ... 26.11.html

Well, it was different in the past, but some schools
invariably place high in the rank, St. Petersburg Institute of Fine
Mechanics and Optics for example. Is fine mechanics and optics a
better background for a programmer than, say, mathematics?

ako

Igor Kovalenko

Re: National programming styles explained

Post by Igor Kovalenko » Wed May 28, 2003 7:35 am

"Andrzej Kocon" <ako@box43.gnet.pl> wrote in message
news:dbh7dvg47mug3rges6p3bkne0qmqbafipu@4ax.com...
On Sat, 24 May 2003 04:36:51 -0500, "Igor Kovalenko"
kovalenko@attbi.com> wrote:

Here is an amusing text that I ran across. It was in russian, with no
author
or title. Everyone at work liked it so much (the russians, anyway) that I
bothered to translate. The style of the original is preserved quite
closely.

Dedicated to camz, who does not cease to bring the best out of me ;)
Thanks to Ian for the link to the text.

---

National programming styles explained
(...)

And here is the result:

http://www.monitortoday.com/News-2003/2 ... 26.11.html
Hmm. Somehow I think this did not make any headlines in the NA ;)
Well, it was different in the past, but some schools
invariably place high in the rank, St. Petersburg Institute of Fine
Mechanics and Optics for example. Is fine mechanics and optics a
better background for a programmer than, say, mathematics?
I don't think the is the reason. One strong believe that I have is, it is
not as important what you are taught. It is important how you're taught. If
you're actually taught to *think* in the process of tutoring, you can think
of almost anything in your area of expertise afterwards. On the contrary, if
the tutoring is designed in the 'cooking recipe' style then you're wasting
your time. At best you'll be a walking recipe book, at worst you'll forget
everything soon as you leave the school. So it is the quality of teachers,
not the speciality what makes certain schools better than others.

I am witnessing first hand now how for example algebra is being taught to my
daughter in the school. Instead of manipulating formulas/equations in the
generic form, they teach them to plug in all known numbers at the earliest
possibility to reduce number of 'evil letters' and operate with numbers.
They are not taught how to come up with equations to new problems - instead
a teacher shows them a recipe how to solve every particular kind and then
they are taught to follow the recipe in 'step by step' process. And at the
end they usually have to pick from 'multiple choices' for an answer. This
does incredible harm to their abstract thinking and ability to generalize
problems. However judging by what other folks tell me, this appears to be
common way to teach algebra in US schools ;( And this is an 'advanced' class
(those who did not qualify go to 'pre-algebra' which is really a proud name
for good old arithmetics).

Perhaps I am generalizing too much here, but somehow it coincides with
Berkeley programming team placing behind Poland, Russia, China, Slovakia,
Germany, Japan, Ukraine and Argentina.

What I think happens is, here kids are very much accustomed to the notion
that they are (and therefore their education system) 'the best' in the world
and that everyone is a 'great achiever'. To support the illusion the bar in
the lower school grades is lowered, so that nobody feels 'dumb'. I can't
speak for other countries, but the way it worked in Russia in my days - the
bar was high and you either make it or not. Folks who weren't good enough
usually did not go to 'high-school', they'd leave after 'junior-high' and go
for some 3-year 'professional school' that trained blue-collars in variety
of specializations.

I have yet to see what happens in high school. I've heard the bar is raised
there. However I'm afraid that the harm done in the middle grades can't be
undone easily later.

Then of course, who cares about this? As long as americans manage to keep
management positions to themselves and let imported labor do the work they
are fine. They just have to come up with a solution to the problem of the
lack of sufficient number of management positions to accomodate US
population. Maybe they'll start exporting them, lol ;)

Cheers,
-- igor

Mario Charest

Re: National programming styles explained

Post by Mario Charest » Wed May 28, 2003 12:37 pm

I am witnessing first hand now how for example algebra is being taught to
my
daughter in the school. Instead of manipulating formulas/equations in the
generic form, they teach them to plug in all known numbers at the earliest
possibility to reduce number of 'evil letters' and operate with numbers.
They are not taught how to come up with equations to new problems -
instead
a teacher shows them a recipe how to solve every particular kind and then
they are taught to follow the recipe in 'step by step' process. And at the
end they usually have to pick from 'multiple choices' for an answer. This
does incredible harm to their abstract thinking and ability to generalize
problems. However judging by what other folks tell me, this appears to be
common way to teach algebra in US schools ;( And this is an 'advanced'
class
(those who did not qualify go to 'pre-algebra' which is really a proud
name
for good old arithmetics).
Personnaly I'm rather frustrated by the kind of education I got and the one
my kids are getting. Seems like I was/they are just feed with data without
being given the knowledge to actually understand what the data they are feed
actually comes from.

The French language is very complex to write (at least to me). It's full of
rules that don't seems to make any sense at all and that you need to learn
by heart. However these rules all have a reason to be there and I was never
though what they were. Of course I'm old enough to go and seek this
information myself but I have no interest.

My sister teaches math in high school, and she took some steps to find a
different way of teach math. She found a math teacher who's promoting a new
way of teach math. A method that target the thinking process rather then
just memorizing. Example: most people know that 7 power 2 = 49, 7 power 1
= 7 and I know that 7 power 0 = 1 but after talking with my sister realize I
did not understand why 7 power 0 = 1, until she explains it to me. I was
tough that 7 power 3 is 7 * 7 * 7 but that is not what 7 power 3 really
represents. It represents a difference between the number of quotien and
divider: hence 7 power 3 is:

7 * 7 * 7 * 7
------------- = 49
7


The quotien has 4 variables while the divider has 1; thus it's 7 power 3;

So 7 power 0 can be represents:

7
- = 1
7

ed1k

Re: National programming styles explained

Post by ed1k » Thu May 29, 2003 2:10 am

In article <bb1nj1$j0o$1@inn.qnx.com>, kovalenko@attbi.com says...
...
they are taught to follow the recipe in 'step by step' process. And at the
end they usually have to pick from 'multiple choices' for an answer. This
does incredible harm to their abstract thinking and ability to generalize
problems...
Ah, you also noticed it :) Abstract thinking is a dangerous thing, is not it? Abstractly speaking?
It differs humans from animals at one point. Do they [govt] need it? :D
BTW, it was a lot of work for teachers to check everyone's way of thinking, not just compare with a
chart of answers. Do you think teachers want to work even harder than they do?
...
speak for other countries, but the way it worked in Russia in my days - the
bar was high and you either make it or not. Folks who weren't good enough
...
Unfortunately, it doesn't work so good anymore, in Ukraine at least. I decided to leave that country
when they decide to destroy the educational system. Also upbringing of self-esteem and other
american crap takes place in Ukrainian schools. It's gonna to be more compatible with others
countries (read American) educational system. Just someone wants the kids to be taught in Ukrainian
school and the ability of smooth jump to continue education in some University abroad (it is so
prestigious :)) Rest of people suffer.
... As long as americans manage to keep
management positions to themselves and let imported labor do the work they
are fine...
That's exactly correct. Labourer doesn't have to pick up one from 'multiple choices' often. But it's
typical task for top-level manager, of course, if company can afford few labourer to generate
independently solutions for same problem to make those 'choices' :o)
Maybe they'll start exporting them, lol ;)
They already do it! I know quite a few in Ukraine. One my friend works for american company in
Kiev (it isn't thru-internet menegement).

Cheers,
Eduard.

Richard Kramer

Re: National programming styles explained

Post by Richard Kramer » Thu May 29, 2003 9:09 pm

Igor Kovalenko wrote:
[snip]
I don't think the is the reason. One strong believe that I have is, it is
not as important what you are taught. It is important how you're taught. If
you're actually taught to *think* in the process of tutoring, you can think
of almost anything in your area of expertise afterwards. On the contrary, if
the tutoring is designed in the 'cooking recipe' style then you're wasting
your time. At best you'll be a walking recipe book, at worst you'll forget
everything soon as you leave the school. So it is the quality of teachers,
not the speciality what makes certain schools better than others.

I am witnessing first hand now how for example algebra is being taught to my
daughter in the school. Instead of manipulating formulas/equations in the
generic form, they teach them to plug in all known numbers at the earliest
possibility to reduce number of 'evil letters' and operate with numbers.
They are not taught how to come up with equations to new problems - instead
a teacher shows them a recipe how to solve every particular kind and then
they are taught to follow the recipe in 'step by step' process. And at the
end they usually have to pick from 'multiple choices' for an answer. This
does incredible harm to their abstract thinking and ability to generalize
problems. However judging by what other folks tell me, this appears to be
common way to teach algebra in US schools ;( And this is an 'advanced' class
(those who did not qualify go to 'pre-algebra' which is really a proud name
for good old arithmetics).

Perhaps I am generalizing too much here, but somehow it coincides with
Berkeley programming team placing behind Poland, Russia, China, Slovakia,
Germany, Japan, Ukraine and Argentina.

What I think happens is, here kids are very much accustomed to the notion
that they are (and therefore their education system) 'the best' in the world
and that everyone is a 'great achiever'. To support the illusion the bar in
the lower school grades is lowered, so that nobody feels 'dumb'. I can't
speak for other countries, but the way it worked in Russia in my days - the
bar was high and you either make it or not. Folks who weren't good enough
usually did not go to 'high-school', they'd leave after 'junior-high' and go
for some 3-year 'professional school' that trained blue-collars in variety
of specializations.

I have yet to see what happens in high school. I've heard the bar is raised
there. However I'm afraid that the harm done in the middle grades can't be
undone easily later.

High school is not much different as far as I can tell from my
daughter's recent experience in a "well-rated" Maryland high school.
Her text books are inane - too many pictures, errors and fluff which
distract from the subject matter. Even the math books are full of color
pictures ...

There is a saying, "Ignorance is bliss." [from an old Russian saying?]
The power of this is easily seen daily in the contented nature of our
citizens. Except when the media make a big deal about events such as the
Beltway Sniper a year ago, or SARS. Nevertheless, a bit more ignorance
should fix that.

Richard
Then of course, who cares about this? As long as americans manage to keep
management positions to themselves and let imported labor do the work they
are fine. They just have to come up with a solution to the problem of the
lack of sufficient number of management positions to accomodate US
population. Maybe they'll start exporting them, lol ;)

Cheers,
-- igor


Andrzej Kocon

Re: National programming styles explained

Post by Andrzej Kocon » Fri May 30, 2003 8:24 pm

OK, the question wasn't quite serious (in fact, I suspect that
they have a regular CS department). As for generalizations, it might
be more complicated than that. Certain schools may simply be more
interested in this particular contest (or in any contest at all for
that matter) than the others, certain (smart) students may be more
interested in their carreer, etc. In 2002, MIT was the second,
Stanford the 5th (the history of the contest is at
http://icpc.baylor.edu/past/default.htm).

I know the US education system is one of your favourites
(hardly surprising given that your daughter is in their hands), and I
share many of your points. However, I'd prefer not to dive in for fear
of sinking, and content myself with pointing (once again) to this:
www.cs.utexas.edu/users/EWD/ewd12xx/EWD1209.PDF
("Why American CS seems incurable").

One thing: there is also something that might be called a
national style when it comes to US bashing. We have had the full
spectrum recently...

ako

Igor Kovalenko

Re: National programming styles explained

Post by Igor Kovalenko » Sat May 31, 2003 7:19 am

"Andrzej Kocon" <ako@box43.gnet.pl> wrote in message
news:veffdvkmc9ph94qmq98edktvorhhpvrlqm@4ax.com...
OK, the question wasn't quite serious (in fact, I suspect that
they have a regular CS department). As for generalizations, it might
be more complicated than that. Certain schools may simply be more
interested in this particular contest (or in any contest at all for
that matter) than the others, certain (smart) students may be more
interested in their carreer, etc. In 2002, MIT was the second,
Stanford the 5th (the history of the contest is at
http://icpc.baylor.edu/past/default.htm).
Yes, a generalization based merely on such contests is probably invalid.
However most of the programming work here is done by immigrants indeed.
I know the US education system is one of your favourites
(hardly surprising given that your daughter is in their hands), and I
share many of your points. However, I'd prefer not to dive in for fear
of sinking, and content myself with pointing (once again) to this:
www.cs.utexas.edu/users/EWD/ewd12xx/EWD1209.PDF
("Why American CS seems incurable").
Hahaha, Dykstra is excellent! Programming is so easy, "even a Republican can
do it" :)

I guess this answers why they import programmers. Don't blame universities,
blame the industry that likes 'engineering' approach to software
development. That by the way is starting to change slowly. All the fuss
about agile methods is not just a coincidence I think. Some lessons have
been learned and perhaps eventually software development practices in the
industry will evolve into something that has its own face and maturity,
after being a poor extrapolation of general engineering for decades.

Dykstra does not however answer why US industry is egg-head-antagonistic in
the first place. I also have doubts that becoming 'a-mathematical' society
is really a conscious goal that US education system has (if there's even any
level of system-wide consciousness in it). Dykstra just mentions this is a
'cruel twist' of history but provides no insight into that phenomenon. Not
surprizing either, since any dip into this area will pull into into very
unfriendly waters rather quickly. Just try starting to analyize publicly why
something is not right with the american society and see what happens.
One thing: there is also something that might be called a
national style when it comes to US bashing. We have had the full
spectrum recently...
Soon as you open your mouth, you're 'bashing'. It's not like americans don't
have a sense of humor. They do, just not toward themselves (as a society).
Which is a usual sign of immaturity. So yes, I said it - I think this
society is immature. It is understandable, given its rather short history
and a bizzare fluke of history that allowed them to become practically
uncontested 'superpower' in the last 50 years. To put this into an analogy,
such society reminds very much of a rich spoiled teenager. No wonder they
don't want to bother with math then. Who would want to... And what spoiled
teenager would not be antagonistic to the eggheads...

But enough 'bashing'. Let the teenager grow up ;)

-- igor

Andrzej Kocon

Re: National programming styles explained

Post by Andrzej Kocon » Sat May 31, 2003 9:59 pm

On Sat, 31 May 2003 02:19:58 -0500, "Igor Kovalenko"
<kovalenko@attbi.com> wrote:
(...)

One thing: there is also something that might be called a
national style when it comes to US bashing. We have had the full
spectrum recently...

Soon as you open your mouth, you're 'bashing'. It's not like americans don't
have a sense of humor. They do, just not toward themselves (as a society).
Which is a usual sign of immaturity. So yes, I said it - I think this
society is immature. It is understandable, given its rather short history
and a bizzare fluke of history that allowed them to become practically
uncontested 'superpower' in the last 50 years. To put this into an analogy,
such society reminds very much of a rich spoiled teenager. No wonder they
don't want to bother with math then. Who would want to... And what spoiled
teenager would not be antagonistic to the eggheads...

But enough 'bashing'. Let the teenager grow up ;)

-- igor
Sorry for the register, I meant criticism, or even simply
analysis. Really, they (US) can be so infuriating that it sometimes
take years to end up with a shrug, or unemotional judgement. This is
where the 'national styles' may be observed, and I'm sure you would
appreciate mine had my hypertension allowed it. Do they serve melissa
here?

I wouldn't count on the teenager to grow up, and I'm not sure
I'd like him to, as long as the overall result is... err... tolerable.
That's their way, take it or leave it. (Even some of them are 'leaving
it': many desperates are trying home tuition as an alternative, for
example). Are other societies really that mature?

To end on a positive: I remember a conversation between
Brodsky and his friend:

- Have you noticed that we drink less here?
- There would be nobody to blame for...

ako

Dmitry Alexeyev

Re: National programming styles explained

Post by Dmitry Alexeyev » Mon Jun 02, 2003 11:17 am

Ian Zagorskih wrote:
Where can I read this amuzing text in russian?
ed1k


man, you are the constant qnx.org.ru poster and do not read section
"Other->Read sitting !" ? :)
Wow! You caught Igor reading qor?! Great job ;)

Rgds,
Dmitry

Ian Zagorskih

Re: National programming styles explained

Post by Ian Zagorskih » Mon Jun 02, 2003 3:30 pm

"Dmitry Alexeyev" <dmi@home.> wrote in message
news:bbfadt$7f3$1@inn.qnx.com...
Ian Zagorskih wrote:

Where can I read this amuzing text in russian?
ed1k


man, you are the constant qnx.org.ru poster and do not read section
"Other->Read sitting !" ? :)

Wow! You caught Igor reading qor?! Great job ;)
hm... i know what is it for example QoS. but qor ? maybe QoR as a Quality of
Reading ? how's it ? :)

// wbr

Guest

Re: National programming styles explained

Post by Guest » Mon Jun 02, 2003 5:55 pm

Ian Zagorskih <ianzag@megasignal.com> wrote:
man, you are the constant qnx.org.ru poster and do not read section
"Other->Read sitting !" ? :)

Wow! You caught Igor reading qor?! Great job ;)


hm... i know what is it for example QoS. but qor ? maybe QoR as a Quality of
Reading ? how's it ? :)
man, you are the constant qnx.org.ru poster and you don't know
qnx.org.ru (qor) ?

:)

Post Reply

Return to “qdn.cafe”