Jump to content

Recommended Posts

Posted

For me, it was this morning, when I realized I had forgotten one single method call, which ended up having it compile correctly...and the compiler optimizing out of the code two entire class files because they weren't referenced. And me spending almost an hour trying to debug the mess with print calls and my debug log not even initializing. :P

Yours?

Posted

My midterm project in advanced C++ would only run correctly on the 4th try. I mean you ran it 4 times in the dos prompt before it worked correctly. Very consistent on that, it somehow kept data between executions.

I did better than my friend though. His didn't look that much different than mine, yet his compiled into a win3.1 screen saver virus (which displayed exactly what the program was supposed to).

The programs were supposed to read in an image then do some manipulations and display the results...

Posted

In my intro to Python class I got bored and I accidentally made an infinite loop that wrote some testing text to a file.

The computer can write REALLY fast.

Posted

Oh, that reminds me of the time that I tried to make a prime generator which output a list into a .TXT. I must have missed a line somewhere because while it did that, it output each number checked into a new file, and only wrote in the ones that contained primes.

--

One of the people in my computing class tried to increase his odds of winning a bingo game my friend had made. So he INCREASED the range of possible numbers that could be picked from. Not really a programming error so much as an idiot.

Posted

Not being able to program outside of PHP and HTML at all!

Word of advice: never say you "program HTML" as bands of geeks will come out of the woodwork to bite your head off. Kinda funny to watch them go at it though. Google it so see what I mean.

My favorite screw up what when I was messing around with infinite loops in Batch using the CMD window of a Windows XP and coded something that opened new windows, then it got out of control and I was unable to stop it as it ate up all the memory on the system and I had to hard reset and pray I didn't just wreck a school computer. That program would launch them faster then I could kill them, also I only knew alt-tab and not alt-shift-tab.

Posted

Would have to be when i wrote about 7 hours of code and forgot to save.... a very stupid moment there for a stupidity moment.

When i spent 5 hours looking for a problem when all it was, was a freeken { out of place.

Posted

Working with CUDA C, and the GPU kept returning all of my arrays as quiet not-a-number instances. This was before I had a debugger that could work with the GPU, and took me forever to realize that it is an extremely low-level machine that doesn't detect overflow/division by zero instances. So every simple math operation had the potential to get nasty.

Posted

I got a new one.

I have been learning C# for the last several days and making a copy of battleship with XNA 4.0 to practice what I am learning. Everything was going great except I was running into problems initializing some arrays.

There were four arrays and they were supposed to hold the coordinates of the cells on the game board (two 16X16 grids). I haven't been able to figure out how to initialize a multi-dimensional array (they were 16X16) so I tried to make some loops that would do it for me.

I had a while loop for each array and in that while loop was a switch statement that would run another while loop and fill in the values. For some reason the index kept either going out of bounds or not doing the last row. I spent the last day and a half trying to figure out why, still don't know. This bit of the program was about 700 lines, I knew it was WAY bigger than it should be but couldn't see a better way to do it till just a little while ago.

I realized that I didn't need to store the coordinates of each cell, just one row each way. Now I have one less array, they are no longer multi-dimensional, and the code is only 50 lines long. It can be shorter still but I don't wanna mess with it anymore right now.

This was a good lesson for me.

Posted

Word of advice: never say you "program HTML" as bands of geeks will come out of the woodwork to bite your head off. Kinda funny to watch them go at it though. Google it so see what I mean.

Yeah, I know. But I'd look even sillier when I'd say I could only program PHP :(

Posted

the creators of EVE Online had a particaly nasty one, their startup file for their game was origionally BOOT.INI, but when they put in a script to delete the file for an update, it accidentally deleted the computers BOOT.INI. their startup file is now named STARTUP.INI

It wasn't that bad, everybody knows how to fix that right? :)

It only took me ten minutes to fix because I couldn't find my live cd, otherwise it would have taken just a minute or two.

C#...XNA...oh god, we've lost you. WE'VE LOST YOU. :-(

What's wrong with C# and XNA? I am still pretty ignorant about many programming topics since I am still learning basic stuff, can you help me by clearing this bit up?

I was having difficulties with certain concepts (pointers, and classes specifically) when I was learning with C++ that I am now understanding much better (classes anyway) since changing languages.

Also, the auto complete in Visual Studio is pretty nice, much better than doing everything in Notepad2.

Posted

Not so much a screwup as an unbreakable law of programming:

The first 90% of the code will take 90% of the time and 90% of the budget.

The remaining 10% of the code will take 90% of the time and 90% of the budget.

Posted

What's wrong with C# and XNA? I am still pretty ignorant about many programming topics since I am still learning basic stuff' date=' can you help me by clearing this bit up?[/quote']

XNA makes your game (or other program) have all kinds of obnoxious Microsoft dependencies that basically tells cross-platform compatibility (now or in the future) to play a game of hide and go fuck itself.

C#...I just think it looks silly. Pure opinion though.

TRUTH

Posted

Not so much a screwup as an unbreakable law of programming:

The first 90% of the code will take 90% of the time and 90% of the budget.

The remaining 10% of the code will take 90% of the time and 90% of the budget.

SO FREAKING TRUE!

My worst screwup was when I was first learning C++ and spent a whole day and part of my dignity looking like an idiot on a forum trying to debug a script that had a single equals sign in an if statement. Facepalm.

  • 2 weeks later...
Posted

My best one was probably when I was bored and trying to make a copy of minesweeper in java, I wound up declaring my buttons both at class level and at method level D:

Spent the next few hours searching all over the place trying to figure out why I was getting a nullpointer exception :(

Posted

my favorite was from many years ago when I was first learning to program. I was like, 10 or 11 and the only language I knew was BASIC. I had created some kind of program that has a prompt and asked for the user to type something in (can't remember the details). I was super proud of this and invited my best friend over to show it off to him. he took one look at it, hit enter, and caused it to scroll the prompt over and over forever, ruining my wonderful program. I was super pissed.

Posted

I'd have to say all the times when I've used = instead of ==

Especially when I don't notice it, and manage to break a switch statement without causing segfaulting or compiler errors, so I go blissfully unaware of it for ages.

Exactly my problem :P

Posted

Exactly my problem :P

My big one like that is accidentally placing << when i mean >> and vice versa. Not that bad, but it is annoying since i copy paste them as many times as I need them so I don't have to type them out every time. So I end up with a lot of those causing compilation to fail.

  • 3 weeks later...
Posted

My big one like that is accidentally placing << when i mean >> and vice versa. Not that bad, but it is annoying since i copy paste them as many times as I need them so I don't have to type them out every time. So I end up with a lot of those causing compilation to fail.

Copypasta errors are always the worst. Spent a good 30 minutes to trying to figure out what was wrong with my shiny new billboarding function. Turned out I was finding the camera direction with X,Y, and X.

Guest
This topic is now closed to further replies.
×
×
  • Create New...