(e-mail address removed) said:
Anyone who puts almost 1700 characters on a single line has a lot to
learn about writing good software.
Well, I counted not 1700, but around 117000 chars on that single line.
I consider this software riddle a great exercise for anybody who
thinks about starting a career in the software industry.
I already work in the software industry and my PHB usually uses the
following technique halfway between any two performance reviews:
* He asks me to create for him a small "Report" (in M$ Excel, of
course) with the latest sales figures, no more than a fifty lines or
so.
* He then takes that document with him, adding a couple of lines, not
many, the document would still be less than a houndred lines.
* Then, to sum up the document, he starts adding Excel formulas,
ridiculously complicated and nested, for example to find the text
between the 4th and the 5th "&"-character in a single cell "C60", he
would add:
=MID(C60, FIND("&",C60, FIND("&",C60, FIND("&",C60,
FIND("&",C60,1)+1)+1)+1), FIND("&",C60, FIND("&",C60, FIND("&",C60,
FIND("&",C60, FIND("&",C60,1)+1)+1)+1)+1) - FIND("&",C60,
FIND("&",C60, FIND("&",C60, FIND("&",C60,1)+1)+1)+1)+1)
* finally, to render the document unusable, he adds a couple of
=VLOOKUP() formulas with references to some external documents which
are held on an external server with a slow bitrate connection. So
whenever you move your mouse-pointer in explorere.exe anywhere near
the *.xls document (...and you don't have to open excel to feel the
experience...), your whole PC freezes up and you have to wait 20
minutes for the time-out or do the "Ctrl-Alt-Del".
* He saves the document on a floppy disk, gives me that floppy disks
and asks me to calculate the total sales figure. Of course, he does
not hesitate to point out that it's only a houndred lines, so this
should not be difficult.
Ok, I fall in that "Ctrl-Alt-Del" trap each and every time, I then
reboot my PC, disable my network connection and rename the *.xls into
*.txt format. I then, of course, have a text file the size of about of
100K, most of which are control characters, basically all in one
single line.
I used to open it up in wordpad.exe and use Ctrl-F to more or less
guess where the sales figures are, but I have got myself into PERL
recently and things are looking much better now.