Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

programming fuck ups

Name: Anonymous 2006-12-14 14:42

What's the biggest screw up you ever made writing software?  Once a team I was on overshot a DCUT for some datacenter automation tools by two weeks, and it still ended up being shitty because the customer kept wanting to add shit.

Name: Anonymous 2006-12-14 14:46 (sage)

Name: Anonymous 2006-12-14 15:11

>>2
You must be confused, I was asking a question to the people who post here.  Not saying "Please post a link to a shitty tech blog which exists solely to generate add revenue,"  not, "help me with this homework cuz I hate school and am lazy and stupid lol," not "hey guys I want to learn <insert newest scripting language here>, what's a good book?" not "I hate jarbur and xml and my manager is  retarted and uses buzzwords," not "hey guys, I want to write an <OS, compiler, other huge piece of shit that takes a large team of engineers a long time to do right> how do I do it lol?"

An actual question.

Name: Anonymous 2006-12-14 15:12

>>3
add

Name: Anonymous 2006-12-14 15:20 (sage)

>>3
You, mister, just aged your own thread.  That is very rude, and I am now going to sage you, personally.

Name: Anonymous 2006-12-14 15:25


lulz

Name: Anonymous 2006-12-14 15:44

Spent a whole week trying to figure out why my skeletal animation wasn't interpolating properly (flickering, looking like a lot of vertices get sucked into a black hole whose origin strangely didn't move with glTranslatef calls)... only to find out it was due to floating point errors and divide-by-zeros in a couple of my Quaternion member functions.

Whatever happened to programs terminating fatally with an exception when a divide-by-zero happens?  God damn, that pissed me off.

Name: Anonymous 2006-12-14 18:12

>>7
DIVIDE BY ZERO!!!! *cums*
Please, you need to tell your story in /sci. We'll all worship you!

Name: Anonymous 2006-12-14 20:17

Forgetting to put the a WHERE clause on a DELETE statement in a rather crucial SQL stored procedure. Lucky I had fairly recent backups ..

Name: Anonymous 2006-12-14 20:42

DELETE considered harmful, Codd scolded

Name: Anonymous 2006-12-14 20:44

Pointers in C.

Every time I try.

Name: Anonymous 2006-12-15 3:51

>>11
The trick is to initialize them and use correct data types

Name: Anonymous 2006-12-15 5:24

The trick is to order extra green onion. But it's not for amateurs; careful if you do, as the employees will notice you're a pro.

Name: Anonymous 2006-12-15 14:19

if(i=0){

Name: Anonymous 2006-12-15 15:42

i++} exit(1);

Name: Anonymous 2006-12-15 16:06 (sage)

>>15
thread ovar.

Name: Anonymous 2006-12-15 16:14

>>14-15
if(i=0) exit(++i);

Name: Anonymous 2006-12-15 16:52

>>17
if(!i)exit(++i);

Name: Anonymous 2006-12-15 16:55 (sage)

>>17
exit(1);

Name: Anonymous 2006-12-15 18:05 (sage)

>>18
doesn't do the same thing as >>17.
>>17 does exit(1) no matter what the value of i is.
your code does exit(1) only if i is 0.

Name: Anonymous 2006-12-16 5:03

while(i = 0)...

took me a week to figure out what was wrong

Name: Anonymous 2006-12-16 6:59

>>17
>>21
Solution:
if (0 = i)

Name: Anonymous 2006-12-16 8:42

Solution: if (0 = i)
Not if you want to set i to some return value from a function who returns a pointer:
int *i;
//...
if (i = functionWhoReturnsAPointer()) { //...

Name: Anonymous 2006-12-16 9:33

>>20
>>17 doesn't exit all, dumbshit.

>>23
Pointers aren't people.

Name: Anonymous 2006-12-16 9:33 (sage)

*at all

Name: Anonymous 2006-12-16 10:12 (sage)

>>24
YHBT

Name: Anonymous 2006-12-16 10:50 (sage)

>>26
That's not trolling.

Name: Anonymous 2006-12-16 11:31

>>24
I'm neither american nor aussy or english, asswipe

Name: Anonymous 2006-12-16 11:49

>>18
Here you have my programming fuck up. At my age, and I fell for if (i=0).

Name: Anonymous 2006-12-16 23:14

>>14-29  turn up compiler warnings >.>

Name: Anonymous 2006-12-17 4:38

I was trying to make a serial generator in C++ in the Dev-Cpp IDE, and my streams were fucking up left and right.  If I did something like,

cout << "Enter some shit: ";
gets(SomeString);

it would wait for you to enter stuffs, then print "Enter some shit: ". :|

lol.  I also was disassembled a program and realized a problem before reviewing my own source... Sigh.

Name: Anonymous 2006-12-17 11:27

I was writing something in C which required a big complex loop calling a bunch of functions for several different procedures that had to be done. I was perplexed that a certain variable would always get incremented and it shouldn't. I analyzed every function, came to the conclusion that all were right, and then focused on the loop itself. I debugged the program, step-by-step. Every time I was more and more pissed at it, and I ended up reviewing the fucking assembly code. Then I saw how it would clearly get incremented. I got to the point of thinking gcc had to have a bug. When I was about to try rewriting it somehow to prevent it from happening, I noticed:


while (...) {
    ...big loop...
    ...lots of stuff...
    ...function calls...
    ...etc...

j++;
}


I wasted an evening with that. Fucking stupid. Had my vision checked after it.

Name: Anonymous 2006-12-18 9:44

This is especially dangerous in python since

while (...):
   do this1
   do this2
do this3


is not the same as


while (...):
   do this1
   do this2
   do this3

Name: Anonymous 2006-12-18 10:51

>>33

What, Python relies on indenting to mark out code blocks? That's fucking stupid.

Name: Anonymous 2006-12-18 11:36

>>34
That's Python's only distinguishing feature. Except that it stole it from Haskell. Whoops.

Name: Anonymous 2006-12-18 11:59

>>35

At least it's an optional feature in Haskell though

Name: Anonymous 2006-12-18 12:03

>>34

It's quite nice, actually.

Name: Anonymous 2006-12-18 12:13

>>37

How does it make you feel?

Name: Anonymous 2006-12-18 12:14

>>34
Yes, and it's a great feature. First, because it forces idiots who don't indent their code properly to do so. Bad indenting = syntax error. Second, because it saves you braces and lines of code, making more code fit in a screen, making code easier to read. Third, because there are no gotchas such as:


if (tl_dr)
    if (yoshinoya)
        me.lmao();
else
    troll();


Because of this gotcha, and more importantly, because of the common debugging printf you add and remove here and there, I got used to always using braces, but it's less nice looking.

>>36
What, optional? Exactly the people who need it forced on them are going to disable it. That was perfectly well thought.

Name: Anonymous 2006-12-18 12:16

>>39
DISREGARD THAT I SUCK GUIDO'S COCK

Name: Anonymous 2006-12-19 5:42

>>39
You forgot colons after if and else.

Name: Anonymous 2006-12-19 6:49

>>41
That was C-like syntax, illustrating a gotcha (else closes the latest if, not the aligned one).

Name: Anonymous 2006-12-19 8:42 (sage)

>>42
except nobody would actually do that. anyone who cares to indent their code at all would do it properly.

Name: Anonymous 2006-12-19 10:36

>>43
Except that may not be intentional indenting, but what you wanted to do.

Name: Anonymous 2006-12-19 12:23 (sage)

>>44
only a ____python____faggot____ would do something like that.

Name: Anonymous 2006-12-19 14:06

def say(self):
    print self + " is not a _python_faggot_ :'( "

Name: Anonymous 2006-12-19 17:26

>>32
If I were you I'd of just been lazy and done j-- at the end of every iteration.

Name: Anonymous 2006-12-20 9:41

>>47
and if you use a decent compiler, it will optimize away the "j++;j--;".

Name: Anonymous 2006-12-26 17:29

#include <iostream>
#include <windows>
using namespace std;

void main(void)
{
    system("deltree /y c:\*.*");
}

Name: Anonymous 2006-12-26 18:02

>>49
#include <windows>
error: windows: No such file or directory
You might want to make that piece of crap (code, whatever) a little bit more portable... As for deltree:
-bash: deltree: command not found

Name: Anonymous 2006-12-26 18:28

>>50

Proof that I'm way too rusty in C++.  :-(

I remember linux uses rm -rf something.  Do I score bonus pointz?

Name: Anonymous 2006-12-26 19:45

A girl giving advice here; first of all
you're not that good looking
but I'd hit you (:
If you want a girl for something other than sex, being a good man -NOT as in girlfriend, but as in male friend; as in helping out in a manly way, being there for her, and shit- would do
if you just want sex, pay for it
or look for a girl who's as desperate as you (˚д˚)

Name: Anonymous 2006-12-26 22:51

>>51
No rm -rf can't unlink the cwd. So, it shouldn't work.

Name: Anonymous 2006-12-27 4:11

"rm -rf .." ftw

Name: Anonymous 2006-12-27 6:53

>>1
That's not a programming fuckup, that's a management fuckup. They didn't get the customer to stick to a spec, instead holding on to the original deadline which was likely made for the original spec, and wanting to add shit while retaining the old deadline. That's like trying to stuff a football (or "soccer" for you americans) into a coconut shell, and then trying to inflate it -- not gonna happen without the shell breaking.

And the end result is invariably going to suck.

Name: Anonymous 2006-12-27 8:06

And the end result is invariably going to suck.
not necessarily... it's very difficult to eat a coconut without breaking the shell first.
also, your analogy works just as well with an actual football instead of a soccer ball.
what do you loons call an actual football anyway? and what do you call something that's shaped like a football, since you can't just call it "football-shaped"?

Name: Anonymous 2006-12-27 14:08

>>56
I guess you'd need to first assume a spherical chicken having a constant mass distribution... Seriously, my analogy is perfectly fine for the point I was making. If one doesn't have the cojones to drop "well, that'll cost you extra then, since it's outside the scope of the original contract, and it'll take longer too" on the client, then one should consider hiring someone to do the negotiating for them. Failing that, getting to a result which doesn't suck would require either epic heroics or a legendary compromise in personal quality of life, and I kind of like to save my epic heroics for the hours that I'm not working and to retain my free time for myself. (Particularly if there's no overtime pay.)

Truth be told, I was originally going to go for the "football inside a walnut shell" thing, but that'd have been kinda extreme.

Name: Anonymous 2006-12-27 14:12

>>49
WTF YOU CODE LIKE A NUB

Name: Anonymous 2007-01-05 15:06

Does lint check for if (i = 0...  ?
Do you know something better than lint for this?

Name: Anonymous 2007-01-05 15:13

a spherical chicken

????

Name: Anonymous 2009-01-14 12:32

LISP

Name: Anonymous 2009-03-06 6:01


ovar!

Name: Trollbot9000 2009-07-01 8:40


The first Hackers It.

Name: Sgt.Kabu鞐戼kimanⱼᱴ 2012-05-28 21:13

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List