Post software engineering nightmares!

Message Bookmarked
Bookmark Removed
Our shitty database front end has a number of places where input string length has no bound checking and overflows database fields into the next.

Jon Williams (ex machina), Friday, 28 February 2003 14:40 (twenty-two years ago)

VB6.

Dan Perry (Dan Perry), Friday, 28 February 2003 14:44 (twenty-two years ago)

vb

Ed (dali), Friday, 28 February 2003 14:45 (twenty-two years ago)

Point.

Dan Perry (Dan Perry), Friday, 28 February 2003 14:45 (twenty-two years ago)

VB6 ByRef ByVal nightmares suck!

I got a good VB one.... I had to maintain an application written using VBA and VB forms on top of Excel with something like 120 different forms. There was no good way to make each form subclass some base form class... .ugh

Jon Williams (ex machina), Friday, 28 February 2003 14:46 (twenty-two years ago)

i was trying for a pattern width of 28 the other day but Mylar punch-cards can only accomodate 24-stitch patterns!! do I have to find a standard guage machine somewhere and independently program each needle?? Grrrrr.....

Tracer Hand (tracerhand), Friday, 28 February 2003 14:53 (twenty-two years ago)

i once saw this, someone attempting to null terminate a string after strcpy()ing into it (in C) like this:

str1[strlen(str1)] = '';

(strlen gives the length of the string by finding the first '' character. the above therefore reads 'find the first '' and replace it with a '''.)

his excuse was that it was 4am when he wrote it.

we also have an isBoolean function which is very confusing (boolean isn't a Boolean, it's an int):

if (boolean == TRUE || boolean == FALSE) return TRUE;
return FALSE;

andy

koogs (koogs), Friday, 28 February 2003 15:02 (twenty-two years ago)

if (boolean == TRUE || boolean == FALSE) return TRUE;
return FALSE;

Best function EVAH!

Dan Perry (Dan Perry), Friday, 28 February 2003 15:04 (twenty-two years ago)

whoa...

I'm dealing with 40k lines of umcommented C written by ~5 programmers over the past 10 years with no Makefiles. No one ever though to #define the magic numbers used throughout the code (array sizes in databases, etc). It was originally Xenix code, ported to SCO and now Linux crap. Alignment issues all over the place too :(.

Jon Williams (ex machina), Friday, 28 February 2003 15:07 (twenty-two years ago)

how's about:

if ((*str > 96) && (*str < 123))
*str = *str - 32;

for magic number horribleness. and why bother rewriting tolower() anyway?

all the code here is in .h files and for each module there is one .c file that contains nothing but #includes of these files.

plenty of comments though. pity they don't always match the code...

koogs (koogs), Friday, 28 February 2003 15:23 (twenty-two years ago)

all the code here is in .h files and for each module there is one .c file that contains nothing but #includes of these files.

Someone needs killing.

Andrew Farrell (afarrell), Friday, 28 February 2003 15:29 (twenty-two years ago)

Here we run online shopping sites using a Free Software system called Interchange. It's absolutely *full* of undocumented "features", things that just don't do what the manual says, things that don't work and little syntax idiosyncracies that aren't mentioned anywhere. Trying to do any sort of extensive development with it just makes me go AAAAARGH!

caitlin (caitlin), Friday, 28 February 2003 15:42 (twenty-two years ago)


/*      Created: 02/02/93       Mich*/

#include <stdio.h>
#include <ctype.h>
#include <cbase/dtypes.h>
#include <cbase/dirio.h>
#include <cbase/escape.h>
#include <cbase/form.h>

/*VARIABLES ARE*/
float   v[40], yield, efficiency, cost;
short   i, wholenum2, wholenum3, wholenum1, wholenum;

main(argc, argv)
int     argc;
char    *argv[];
{
        if (argc < 7)
        {
                printf("Execute as yield $BLANKWIDTH $BLANKLENGTH 
$SHEETWIDTH $SHEETLENGTH $THICKNESS $PRICE\n");
                return;
        }

        i = 1;
        while (i < 7)
                v[i++] = atoreal(*++argv);
        i = 7;
        while ( i < 38)
        {
                v[i] = 0;
                i++;
        }

        v[7] = v[1] + v[5];
        v[8] = v[2] + v[5];
        v[9] = v[3]/v[7];
        wholenum = v[9];
        v[10] = v[9] - wholenum;
        v[11] = v[10] * v[7];
        if (v[11] > v[8])
                v[12] = v[11]/v[8];
        v[13] = v[4]/v[8];
        wholenum = v[13];
        v[14] = v[13] - wholenum;
        v[15] = v[14] * v[8];
        if (v[15] > v[7])
                v[16] = v[15]/v[7];
        v[17] = v[3]/v[8];
        wholenum = v[17];
        v[18] = v[17] - wholenum;
        v[19] = v[18] * v[8];
        if (v[19] > v[7])
                v[20] = v[19]/v[7];
        v[21] = v[4]/v[7];
        wholenum = v[21];
        v[22] = v[21] - wholenum;
        v[23] = v[22] * v[7];
        if (v[23] > v[8])
                v[24] = v[23]/v[8];
        wholenum = v[9];
        wholenum1 = v[13];
        v[25] = wholenum*wholenum1;
        wholenum1 = v[17];
        if (v[12] != 0)
        {
                wholenum = v[12];
                v[26] = wholenum * wholenum1;
        }
        else if (v[16] != 0)
        {
                wholenum = v[16];
                v[26] = wholenum * wholenum1;
        }
        v[27] = v[25] + v[26];
        wholenum = v[21];
        v[28] = wholenum1 * wholenum;
        wholenum1 = v[13];
        if (v[20] != 0)
        {
                wholenum = v[20];
                v[29] = wholenum * wholenum1;
        }
        else if (v[24] != 0)
        {
                wholenum = v[24];
                v[29] = wholenum * wholenum1;
        }
        v[30] = v[28] + v[29];
        if (v[27] > v[30])
                v[31] = v[27];
        else
                v[31] = v[30];
        yield = v[31];
        v[32] = v[3] * v[4];
        v[33] = v[31] * v[1] * v[2];
        v[34] = v[33]/v[32];
        efficiency = v[34]*100;

        v[35] = v[32]/144;
        v[36] = v[35] * v[6];
        v[37] = v[36]/v[31];
        cost = v[37];

/*
        i = 1;
        while ( i < 38)
        {
                printf("v[%d] = %s\n", i, realtoa(v[i]));
                i++;
        }
*/
        printf("Blank Width = %.3f\n", v[1]);
        printf("Blank Length = %.3f\n", v[2]);
        printf("Sheet Width = %.3f\n", v[3]);
        printf("Sheet Length = %.3f\n", v[4]);
        printf("Saw Blade Cut Thickness = %.3f\n", v[5]);
        printf("Square Foot Price/Sheet =%.3f\n\n", v[6]);
        printf("Yield = %.0f\n", yield);
        printf("Efficiency = %.3f\n", efficiency);
        printf("Cost per piece = %.3f\n\n", cost);
        if (v[31] == v[27])
        {
                wholenum1 = v[16];
                wholenum = v[17];
                wholenum2 = v[12];
                wholenum3 = v[21];
                if (wholenum1 != 0 && wholenum != 0)
                {
                        printf("Cut %d, %.2f inch strips from %.2f inch 
length.\n", wholenum1, v[1], v[4]);
                        printf("Cross cut %d, %.2f inch pieces from these 
strips.\n", wholenum, v[2]);
                }
                else if (wholenum2 != 0 && wholenum3 != 0)
                {
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum2, v[2], v[3]);
                        printf("Cross cut %d, %.2f inch pieces from these 
strips.\n", wholenum3, v[1]);
                }
                wholenum = v[9];
                printf("Cut %d, %.2f inch strips from %.2f inch width.\n", 
wholenum, v[1], v[3]);
                wholenum = v[13];
                printf("Cut %d, %.2f inch pieces from %.2f inch 
length.\n\n", wholenum, v[2], v[4]);
        }
        else if (v[31] == v[30])
        {
                wholenum1 = v[24];
                wholenum = v[9];
                wholenum2 = v[20];
                wholenum3 = v[13];
                if (wholenum1 != 0 && wholenum != 0)
                {
                        printf("Cut %d, %.2f inch strips from %.2f inch 
length.\n", wholenum1, v[2], v[4]);
                        printf("Cross cut %d, %.2f inch pieces from these 
strips.\n", wholenum, v[1]);
                        wholenum = v[17];
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum, v[2], v[3]);
                        wholenum = v[13];
                        printf("Cut %d, %.2f inch pieces from %.2f inch 
length.\n\n", wholenum, v[1], v[4]);
                }
                else if (wholenum2 != 0 && wholenum3 != 0)
                {
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum2, v[1], v[3]);
                        printf("Cross cut %d, %.2f inch pieces from these 
strips.\n", wholenum3, v[2]);
                        wholenum = v[17];
                        wholenum = v[17];
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum, v[2], v[3]);
                        wholenum = v[21];
                        printf("Cut %d, %.2f inch pieces from %.2f inch 
length.\n\n", wholenum, v[1], v[4]);
                }
                else if (wholenum1 == 0 || wholenum == 0)
                {
                        wholenum = v[17];
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum, v[2], v[3]);
                        wholenum = v[21];
                        printf("Cut %d, %.2f inch pieces from %.2f inch 
length.\n\n", wholenum, v[1], v[4]);
                }
                else if (wholenum2 == 0 && wholenum3 == 0)
                {
                        wholenum = v[17];
                        printf("Cut %d, %.2f inch strips from %.2f inch 
width.\n", wholenum, v[2], v[3]);
                        wholenum = v[21];
                        printf("Cut %d, %.2f inch pieces from %.2f inch 
length.\n\n", wholenum, v[1], v[4]);
                }
        }

}

Jon Williams (ex machina), Friday, 28 February 2003 15:43 (twenty-two years ago)

Execute as yield $BLANKWIDTH $BLANKLENGTH $SHEETWIDTH $SHEETLENGTH $THICKNESS $PRICE

Do you work for Wernham & Hogg?

Andrew Farrell (afarrell), Friday, 28 February 2003 15:48 (twenty-two years ago)


while (i < 7)
v[i++] = atoreal(*++argv);
i = 7;

This is a great "programmers laugh like loons, non-programmers stare at them" moment.

Andrew Farrell (afarrell), Friday, 28 February 2003 15:50 (twenty-two years ago)


v[9] = v[3]/v[7];
wholenum = v[9];
v[10] = v[9] - wholenum;
v[11] = v[10] * v[7];

... you are thinking of the number 6!

Andrew Farrell (afarrell), Friday, 28 February 2003 15:52 (twenty-two years ago)

This is a joke, right?

cprek (cprek), Friday, 28 February 2003 15:52 (twenty-two years ago)

Pointer arithmetic goons kill me:

SessionRequest.iName[0] = NULL;
const OLECHAR* polechPath = oleszServerName;
int nBufSize = sizeof( SessionRequest.iName );
for( const WCHAR* pwchPosDot = polechPath + wcslen(polechPath) - 1;
*pwchPosDot != L'.' && pwchPosDot != polechPath;
pwchPosDot-- );
if( *pwchPosDot == L'.' )
{
for( const WCHAR* pwchPosSlash = pwchPosDot - 1;
*pwchPosSlash != L'\\' && pwchPosSlash != polechPath;
pwchPosSlash-- );
if( *pwchPosSlash == L'\\' && (pwchPosDot - pwchPosSlash) <= nBufSize )
{
pwchPosSlash++;
// Copy over the substring
for( char* pchPos = SessionRequest.iName; pwchPosSlash != pwchPosDot;
*(pchPos++) = (char) *(pwchPosSlash++) );
*pchPos = NULL;
}
}

RickyT (RickyT), Friday, 28 February 2003 15:54 (twenty-two years ago)

now imagine 40,000 lines of that stuff, most with db connectivity.

THIS CODE WAS MADE BY A MATH GRAD STUDENT

Jon Williams (ex machina), Friday, 28 February 2003 15:54 (twenty-two years ago)

Say no more. All the code I've gotten from math grad students has been equally undecipherable and non-flexible.

cprek (cprek), Friday, 28 February 2003 15:58 (twenty-two years ago)

More reasons to love my job in an internet startup: There is no part of the code for which I can't find the guy who wrote it. Apart from the guy who quit, and we were rewriting his code while he was here.

Andrew Farrell (afarrell), Friday, 28 February 2003 15:58 (twenty-two years ago)

Hey! I was a math grad student once!. And the code from just after there is unreadable, so fair enough.

Andrew Farrell (afarrell), Friday, 28 February 2003 15:59 (twenty-two years ago)

I think math students think of programs like integration/derivation or a proof... something that you take the fastest/best method to do, not considering that the parameters will change....

Does anyone see what i am getting at?

Jon Williams (ex machina), Friday, 28 February 2003 16:00 (twenty-two years ago)

"clearly this code should scale well for large values of two", haha.

I see exactly what you're getting at. It's the same as the joke about the engineer/physicist/mathematician in a fire, where the punchline is the mathematician wakes up, lights a match, puts it out, says "clearly there exists a proof" and goes back to sleep.

Andrew Farrell (afarrell), Friday, 28 February 2003 16:02 (twenty-two years ago)

Well, yeah. Math grad students are going for efficiency, but so are software engineers. Maybe is more of a cultural/speaking in your own language/finite parameters is all I know kind of thing.

You're wrong Andrew. Enjoy it while you can, but this is a historically persistent problem in software engineering. There will always be times when you have to work with someone else's old incompetence.

cprek (cprek), Friday, 28 February 2003 16:03 (twenty-two years ago)

You're wrong Andrew.

Er, about which bit?

Andrew Farrell (afarrell), Friday, 28 February 2003 16:06 (twenty-two years ago)

Their definition of good code:

it works when i wrote it

Jon Williams (ex machina), Friday, 28 February 2003 16:07 (twenty-two years ago)

Er, what I meant Andrew was that most programmers have to deal with old indecipherable code. You're lucky that you've got all the same people with you, but that's an exception and not the rule. I phrased it badly.

cprek (cprek), Friday, 28 February 2003 16:15 (twenty-two years ago)

awful code written in high level languages is much better than in C

Jon Williams (ex machina), Friday, 28 February 2003 16:18 (twenty-two years ago)

If it's about reasons to love my job, I'm well aware that this is a temporary situation. The company I was in after I was a maths grad grew from 10 people to 1000 while I was there, so I both came into contact with other people's bad code, and gave some back, some of which is probably still being maintained. Both of these make me a better programmer, possibly the second more than the first, catholic guilt being still a stronger motivator than self-interest!

But it's the transitory nature of this that makes me love my job. Like sand in the wind...

Andrew Farrell (afarrell), Friday, 28 February 2003 16:19 (twenty-two years ago)

haha. the catholic guilt approach to best programming practices.

beautiful.

cprek (cprek), Friday, 28 February 2003 16:31 (twenty-two years ago)

The above examples enrage me, because the perpetrators are employed, and I'm not and know so so much better.

donut bitch (donut), Friday, 28 February 2003 17:54 (twenty-two years ago)

Microsoft ActiveSync. Disaster.

Colin Saunders (csaunders), Friday, 28 February 2003 18:42 (twenty-two years ago)

ActiveSync?

Jon Williams (ex machina), Friday, 28 February 2003 18:46 (twenty-two years ago)

Wow *blink*

This entire thread is as good as Greek to me. Though some of the lines of code make interesting visual patters if you scroll past them fast.

I'm Passing Open Windows (Ms Laura), Friday, 28 February 2003 20:30 (twenty-two years ago)

It's basically an "I'm a total geek and proud" thread. I'm astonished by it, and I can understand pretty much all of it. (I'm a programmer myself, though obviously I keep fairly quiet about it mostly: I talk about this stuff enough at work, and it's pretty boring there.)

Martin Skidmore (Martin Skidmore), Friday, 28 February 2003 21:08 (twenty-two years ago)

Hmmmm...so I could be a faux geek and cut and paste obscure commands and everyone would immediately see through the act?

I'm Passing Open Windows (Ms Laura), Friday, 28 February 2003 21:24 (twenty-two years ago)

ActiveSync is the synchronization engine for MSFT's PocketPC (fka Palm Sized PC and the, RIP, Handheld PC) OS. I worked on the Microsoft Money ActiveSync provider. I literally had nightmares after working on this for months. I caught pnemonia in the middle of the project, and one night, in a 103 degree (F) fever induced delirium Coleridge would be proud of, dreamt of little entries and accounts and payees and balances sync'ing back and forth between device and PC, only some were dropping on the floor, I running around with a bucket trying to catch them and put them back in the pipe.

Colin Saunders (csaunders), Friday, 28 February 2003 21:34 (twenty-two years ago)

You couldn't pull it off, Laura, any more than you could sit between Mark and Toby and pretend to be a mathematician.

Martin Skidmore (Martin Skidmore), Friday, 28 February 2003 21:36 (twenty-two years ago)

That code above reads like it was machine-optimized by a stupid machine.

Sterling Clover (s_clover), Friday, 28 February 2003 21:49 (twenty-two years ago)

hahahahah thanks for the support.... worst program i have had to maintain ever!

Jon Williams (ex machina), Saturday, 1 March 2003 07:39 (twenty-two years ago)

jesus, don't you people have testers?

electric sound of jim (electricsound), Saturday, 1 March 2003 07:40 (twenty-two years ago)

Oh, I'm sure that code works. It's just vile.

RickyT (RickyT), Saturday, 1 March 2003 11:11 (twenty-two years ago)

back to the original question: VB.NET no contest.

rex jr., Saturday, 1 March 2003 13:26 (twenty-two years ago)

one year passes...
private int evalMess(Mess msg) {

if (msg.getA()!=null && msg.getB()!=null && msg.getC()!=null && msg.getD()==null)
return 15;

if (msg.getA()!=null && msg.getB()!=null && msg.getC()==null && msg.getD()!=null)
return 14;

if (msg.getA()!=null && msg.getB()!=null && msg.getC()==null && msg.getD()==null)
return 13;

if (msg.getA()!=null && msg.getB()!=null && msg.getC()!=null && msg.getD()!=null)
return 16;

if (msg.getA()!=null && msg.getB()==null && msg.getC()!=null && msg.getD()!=null)
return 12;

// 11 more just like the above here...

return 0;
}

sigh

koogs (koogs), Wednesday, 25 August 2004 07:21 (twenty-one years ago)

Oh dear. That is shocking.

Ricardo (RickyT), Wednesday, 25 August 2004 07:26 (twenty-one years ago)

i especially like the way 16 is between 13 and 12.

koogs (koogs), Wednesday, 25 August 2004 07:41 (twenty-one years ago)

I still can't work out why someone would have written it like that. Unless they were trying to annoy me, obv.

Ricardo (RickyT), Wednesday, 25 August 2004 07:52 (twenty-one years ago)

I don't even know if I can go into the horrible mayhem I've been going through with my current project. It's a billing and accounting system written by two fools in two weeks with no experience. There's little-to-no documentation and absolutely no logging or accounting trail. Millions of dollars of business revenue are riding on it, and I'm the only maintainer/developer.

Andrew (enneff), Wednesday, 25 August 2004 08:53 (twenty-one years ago)

Sorry, I'm still reeling from the thing koogs posted.

Also, am I reading this right; all 16 possibilities are represented and it STILL caps off with a "return 0;"?

VengaDan Perry (Dan Perry), Wednesday, 25 August 2004 13:19 (twenty-one years ago)

ha, yes, 17 states out of 4 binary bits. that's some going.

he actually seemed pleased about it when i queried him because he'd put the more likely scenarios first in the list...

koogs (koogs), Wednesday, 25 August 2004 13:34 (twenty-one years ago)

argh

VengaDan Perry (Dan Perry), Wednesday, 25 August 2004 13:42 (twenty-one years ago)

Hang on, this person is still working with you? Can you not get him sacked for sheer idiocy?

Ricardo (RickyT), Wednesday, 25 August 2004 13:46 (twenty-one years ago)

ok, another one. i must stress that this one is NOTHING to do with us.

we asked some company to set us up an account so we could download their data from their website. a day later we tried to access it given the username and password we'd supplied and got the following ColdFusion error in the browser window:
---
An error occurred while evaluating the expression:

(#username# is "blah1") or (#url.username# is "blah2") or (#url.username# is "blah3") or (#url.username# is "blah4") or (#url.username# is "blah5") or (#url.username# is "blah6") or (#url.username# is "blah8") or (#url.username# is "blah8")

Error near line 10, column 228.
---

(names have been changed to protect the stupid)

but it gets better than that. we tried again using the right case and got:
---
An error occurred while evaluating the expression:

(#url.password# is "password1") or (#url.password# is "password2") or (#url.password# is "password3") or (#url.password# is "password4") or (#url.password# is "password1") or (#url.password# is "password6") or (#url.password# is "password7")

Error near line 18, column 203.
---

(again, i've changed the passwords. they were in plaintext. one was 12345678. it also doesn't seem to be checking name/password pairs - any password would work with any name)

koogs (koogs), Monday, 6 September 2004 11:38 (twenty-one years ago)

hahaha! nice.

we do a lot of stuff with vb.net. it's not so bad. better than it's predecessors, that's for dang sure.

i've dealt a lot with no boundary checking and sql injection fun, etc etc. we've had some folks put passwords in their javascript code. awesome shit.

a lot of rapid prototypers (and that's pretty much my specialty over the last couple years) code awfully. elegance is left for the rewrite. it's about convincing code demons to wash your car and take the client to the golf course.

i've inherited some prototype code to reorganize and honestly, some hacks never EVER become pretty. some libraries are used in ways no one ever imagined they'd be used. when i was in school there was this guy who was probably one of the smarter guys in the dept for the last several years and he wrote some crazy imaging/computer vision software for the navy and one of the main professors. after he left, 5 separate, very intelligent people got their hands on that code and only one of them ever made very much sense of it. i saw some of the code cause i did sysadmin work for the dept and got to stare at everybody's problems... it was just nasty. it was like ~40K lines spread out in the most bizarre fashion.

evidentally, i was told later by an elder who was good buddies with him... he had just broke up with his fiancee. he rarely slept. he was addicted to dexedrine. etc. must forget about girlfriend... CODE OR DIE! with imaginary bees chasing his ass.

it showed.
m.

msp (msp), Tuesday, 7 September 2004 05:19 (twenty-one years ago)

two months pass...
FCUK

Spinning Down Alone You Spin Alive (ex machina), Sunday, 7 November 2004 01:06 (twenty years ago)

two weeks pass...
else if (v[31] == v[30])
{
wholenum1 = v[24];
wholenum = v[9];
wholenum2 = v[20];
wholenum3 = v[13];
if (wholenum1 != 0 && wholenum != 0)
{

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGH

wetmink (wetmink), Sunday, 21 November 2004 23:23 (twenty years ago)

just seen a php page that includes a lot of javascript containing lots of functions like the following:

function html_closeHref()
{
  // DESCRIPTION
  // Creates the HTML for the closing of an Href
  // PARAMS
  // None

  html_write('</a>');
}

where html_write() is:

function html_write(response)
{
  // DESCRIPTION
  // Writes the HTML
  // PARAMS
  // None

  // alert(response);
  document.write(response);
}

when did just writing </a> in a flat html file go out of fashion?

there's a whole tree of included functions, hundreds of lines of code, functions calling functions calling functions that dynamically writes html to do something that doesn't need to be done. taken him ages to write and us an whole afternoon to try and decipher.

anon_andrews, Friday, 26 November 2004 18:38 (twenty years ago)

That's hilarious. I shall now create a function called writeFullStopAtEndOfPost, so that I can just type that instead of that damn key with a dot on it. The advantage is that if anyone ever changed the standard ending punctuation mark for sentences, I will only have to alter this one function instead of learn to use a new key.

Martin Skidmore (Martin Skidmore), Friday, 26 November 2004 19:17 (twenty years ago)

one month passes...
IN AGOL 68 THE BEHAVIOR OF A BEGIN END BLOCK DEPNDS ON WHETHER THE INTERNAL EXPRESSIONS ARE SEPARATED BY SEMICOLONS OR COMMAS. IN THE FORMER CASE WE HAVE THE USUAL SEQUENTIAL SEMANTICS. IN THE LATTER CASE WE HAVE EITHER NONDETERMINISTIC OR CONCURRENT SEMANTICS DEPEDNING ON WHETHER BEGIN IS PRECEDED BY THE KEYWORD PAR

Doesn't this sound like a great way to confuse new programmers, shoot yourself in the foot and make code unpastable....

LSD ARISTOCAT (ex machina), Wednesday, 19 January 2005 05:22 (twenty years ago)

i'm already suffering a pre software engineering nightmare from last night, because of my job interview this morning. I have to go through another one tonight for my 5 hour job interview tomorrow. Ugh. :(

donut christ (donut), Wednesday, 19 January 2005 05:26 (twenty years ago)

software dev interviews these days are like finals week, except you don't find out when the finals are until just days before.

donut christ (donut), Wednesday, 19 January 2005 05:27 (twenty years ago)

and then you have to work there

LSD ARISTOCAT (ex machina), Wednesday, 19 January 2005 05:28 (twenty years ago)

this thread gets me all hot and bothered.

caitlin oh no (caitxa1), Wednesday, 19 January 2005 05:34 (twenty years ago)

the working there part is fine compared to the interviews. nothing makes me more depressed and anxious than job interviews.

donut christ (donut), Wednesday, 19 January 2005 05:35 (twenty years ago)

omg, i can't believe i worked on that code

LSD ARISTOCAT (ex machina), Wednesday, 19 January 2005 05:36 (twenty years ago)

I'm gonna have nightmares just from reading that sample you provided, Jon.

Ken L (Ken L), Wednesday, 19 January 2005 05:40 (twenty years ago)

At least he commented his code!

"/*VARIABLES ARE*/"


haha

LSD ARISTOCAT (ex machina), Wednesday, 19 January 2005 05:44 (twenty years ago)

two months pass...
ha, website comes back to bite me in the arse...

they now want me to take the dynamically generated but fundamentally flat html pages written in some frankenstein php / javascript way and get it to send events to a java JMS message queue. would take me half the time to recode the entire thing (3 pages!) from scratch in jsp but they'd rather i spend time writing code that i know will be thrown away in a month.

anon_andrews (koogs), Friday, 15 April 2005 09:37 (twenty years ago)

I understand that a lot of people like python and it's really handy and all, but FFS, logical control through indentation? Are the programmers still wearing flares?

Andrew Farrell (afarrell), Friday, 15 April 2005 09:44 (twenty years ago)

if it'd stop the people here mixing spaces and tabs (with tab spacing set randomly to 4 and 8 and, occasionally, 3 spaces) then i'm all for it...

koogs (koogs), Friday, 15 April 2005 10:06 (twenty years ago)

Are the programmers still wearing flares?

Well, it *was* invented in the Netherlands...

caitlin (caitlin), Friday, 15 April 2005 10:15 (twenty years ago)

I actually quite like the indentation thing. Like Andy says, it stops people misxing tabs and spaces and forces them to stick to a standard format.

RickyT (RickyT), Friday, 15 April 2005 10:45 (twenty years ago)

I have just read upthread and noticed that Jon was programming in Algol 68! WTF? I thought that was effectively stillborn, precisely because of syntactic nightmares like the one he pointed out.

RickyT (RickyT), Friday, 15 April 2005 10:54 (twenty years ago)

My wild guess RickyT.

Mr Noodles (Mr Noodles), Friday, 15 April 2005 12:22 (twenty years ago)

Aha.

RickyT (RickyT), Friday, 15 April 2005 17:12 (twenty years ago)

Noodles, OTM! But I took it ages ago. I was looking up information on Algol for my parallelism class
http://www.cs.rochester.edu/courses/descriptions/458.html

Open your eyes; you can fly! (ex machina), Friday, 15 April 2005 19:01 (twenty years ago)

seven months pass...
I'm going to cut the balls off of the next person who checks in a file that was only marginally changed, yet ran it through some dumb-ass IDE formatter to "fix" the tabs, whitespace and brackets.

Keith C (lync0), Wednesday, 7 December 2005 15:36 (nineteen years ago)

(i do that all the time. because the people here don't understand indenting and how it effects legibility (and, therefore, maintainability). i try to do it as a standalone change before doing any code changes though)

koogs (koogs), Wednesday, 7 December 2005 15:41 (nineteen years ago)

Thanks for reviving this. I love that program I posted upthread.

GET EQUIPPED WITH BUBBLE LEAD (ex machina), Wednesday, 7 December 2005 15:49 (nineteen years ago)

death to you

xpost

Keith C (lync0), Wednesday, 7 December 2005 15:50 (nineteen years ago)

I know there's exceptions where you really need to clean up a file that doesn't have any kind of methodology of indenting or whatever, but taking an existing file that is indented & legible in a standard editor (VI, emacs) and formatting so *your* shitty IDE can read it and then checking it in is totally unacceptable.

Keith C (lync0), Wednesday, 7 December 2005 15:52 (nineteen years ago)

When i was still working on hspice circuits, I ran everything thru pico. 8 years of using pine to do email will do that to ya.

kingfish trampycakes (kingfish 2.0), Wednesday, 7 December 2005 16:04 (nineteen years ago)

Much as I hate to read that crap, I am on Keith C's side on this.

TS: setting tabstop to 4 or leaving it at 8 and finding other ways to do a half-tab?

I wonder what *Mich* has been up to the past 12 years?

k/l (Ken L), Wednesday, 7 December 2005 16:07 (nineteen years ago)

oh no, religious war, oh no!

some of the code here makes my eyes bleed. nobody else seems to mind. but then i do write code with the visible whitespace flag in the editor turned on. (once wrote a patch for vim that added space to the listchars option because it bugged me that it wasn't there)

/* vim: set ai ts=4 tw=4: */

koogs (koogs), Wednesday, 7 December 2005 16:39 (nineteen years ago)

At the very least, if you are going to make formatting changes, you should never combine them with substantive changes. Checking out a file, making formatting changes only, and checking it back in with a comment indicating that's what you did, is annoying, but acceptable. Checking out a file, making extensive formatting changes and also a few small substantive edits, and then checking it back in, is a royal pain in the ass to anyone who comes after you to try and figure out what you did. (I suppose this could be solved by having a diff tool that ignores whitespace.)

o. nate (onate), Wednesday, 7 December 2005 16:44 (nineteen years ago)

Diff tools that don't ignore whitespace suck Satan's pussy.

Dan (Grrrrrr) Perry (Dan Perry), Wednesday, 7 December 2005 16:48 (nineteen years ago)

/* vim: set ai ts=4 tw=4: */
Those are my settings :D
Diff tools that don't ignore whitespace suck Satan's pussy.

I've been using a great visual diff tool for windows: Araxis Merge. It lets you click on blocks to merge.

It bugs me a little because I was merging two sibling versions of an XML file and it stopped making sense -- matching child nodes with different patterns, etc.

GET EQUIPPED WITH BUBBLE LEAD (ex machina), Wednesday, 7 December 2005 17:11 (nineteen years ago)

two months pass...
Ok, I was looking at Mirra as a backup solution for our developer workstations but I really need OS X support. Anyone know a fairly simple turnkey solution, like a hardware box, for network backups from a bunch of machines. Ideally, I'd prefer not to beam the entire dataset but use some sort of rsync protocol to just push the diffs. Also, I'd like to maintain several version sets, ideally stored just using the diffs. Any ideas?

A BOLD QUAHOG (ex machina), Thursday, 16 February 2006 20:00 (nineteen years ago)

one year passes...

system we've been working on went live this morning. development environment = one server. live system = 4 servers clustered together. yeah, that'll work.

koogs, Thursday, 14 June 2007 11:54 (eighteen years ago)

I am getting cancellation errors when I take the difference to two very close, very large numbers. Floating point arithmetic is a bitch. As a result my galaxy models look like ass.

caek, Thursday, 14 June 2007 12:20 (eighteen years ago)

Hah, I'm leaving my position as a software test lead TOMORROW to take time off and be a goof off. Begone software engineering nightmares! No more triages at 11 PM! No more video conferences with India at 6 AM! yay!

Except that my dog demands to still be fed, so I will be back at work shortly at a startup so that he can continue to eat Eukanuba and be a spoiled fuzzbutt.

lyra, Thursday, 14 June 2007 23:33 (eighteen years ago)

two weeks pass...

scheduled task, runs every hour. uses oracle sysdate to work out what to do (only process records modified in the previous hour). the machine with the oracle instance on it is 25 minutes slow so only stuff timed to run in the last 35 minutes of any hour actually works correctly.

koogs, Friday, 29 June 2007 14:06 (eighteen years ago)

hahahahahaha wow

HI DERE, Friday, 29 June 2007 14:35 (eighteen years ago)

annoyed with myself for not seeing it earlier and annoyed with the sysadmin people for not doing anything about it when i asked them to on the 6th june. grrr.

still, bigger logical errors elsewhere - have rows holding aggregated sums of similar rows in different table and other rows (with null device id) holding sums of these first (device specific) rows. only part of table is updated at any one time. can't know whether summed row contains half-computed new total (which i need to add to) or the old total (which i need to delete). gah.

koogs, Friday, 29 June 2007 15:05 (eighteen years ago)

four months pass...

nationwide product launch tomorrow at 5am(!) so why am i sat here trying to decipher someone else's java and trying to learn enough plsql to understand someone else's stored procedures in order to optimise something that is already adequate?

and why does it insist on compiling 2053 source files every single time when i've only modified one of them?

koogs, Wednesday, 31 October 2007 08:30 (seventeen years ago)

four weeks pass...

rewrite my code introducing bugs and then go on holiday leaving me to fix them why don'tcha?

koogs, Wednesday, 28 November 2007 10:56 (seventeen years ago)

My life has gotten less interesting.

Catsupppppppppppppp dude 茄蕃, Thursday, 29 November 2007 08:40 (seventeen years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.