hawleyjr wrote:This isn't really a bug just fatigue. Occasionally I will make a change to code move the file to the server, test it, change the code again because it didn't work, move it to the server, test it..... And so on until I realize I was moving the wrong file to the server.
been there done that...
I've probably done that quite a few times. Now I just had apache+php installed in my comp
Not a coding thing, but the stupidest computer-related thing I've done...
About four years ago I was promoting one of my companies websites at the B'ham NEC. They'd set up loads of chairs and tables, and loads of computers were available, but not many people were coming round.
Anyway, I found a computer near the back and started posting on some forums, then downloaded IRC and started chatting.
Bloke on IRC wanted a game file downloaded but he couldn't get it from work, so I said I'd get it for him, and went onto warez.com and started the download, moving the pr0n pop-ups out of the way as I went.
Anyway, while the file was downloading, I noticed that one of the popups had been made so it was upside down and mirrored.
Intrigued, I started to decipher the text (the pictures looked the same, you just can't tell which way they should be up with pr0n).
When I'd finished reading, I looked up to see it there was a fire exit or somewhere I could go to have a smoke.
Me and a coworker was sitting alone after workhours, messing coding some tools that could help us in the future.
My coworker pops the question; "Btw, are you sure we are working on the dev-server?!".
I just had to reply "Oh NO!" just to see his reaction but gave myself away because I started laughing about 10sec's later when i saw him panic. Oh so fun. Joy, joy...
While laughing, I slowly started to review the code, just to note that we were indeed working on the master server! My pal of course didn't belive me this time as I made a fool out of him 1min before this.
So we had managed to replace all article descriptions (22.500 or so) with the words "End If", truncated the balance in store field to 0, removed all articles starting with '11%' among other horrible, horrible things.
Of course, there was a backup. But I had to make an embarrasing call to an superuser that could save us (that also was utterly unfriendly in his tone), and I can not explain the feeling when realizing we (ehm, read: I) made such an error.
I do however remeber screaming about 40 sentences where 90% where words not suitable for children and that I at one point where kneeling at the desk...
The day i came onto devnetwork asking for why my insert script was'nt working it was something like
[...]
affected rows was telling me it had inserted it had me stumped for hours, bech then told me i had'nt actually queried tha database, absolute proof, you should'nt spend 16+ hours solid coding.
Well... I think that whole post is a typo...
The most effective typo I ever did was one character long...
Not really a true typo. It was more like I didn't know any better but it surely had me feel stupid.
Here it was in the company's main server /etc/exim/exim.conf file:
kik has to be the most annoying typo of 'lol' if you are in a chat room or something. Also any random ones that you get when you are typing, and that of smileys... Typos on the whole just generally ammuse me and I like taking the <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> out of those that try and master typing and dont make any typos :p Typos show a true computerholic :p
Ha! Guess what I did! Not realising that MYSQL's TIMESTAMP updates not only on insert but also on UPDATE, I ran a batch update and lost a column of dates. I guess I learned the hard way why you don't use timestamps for dates you want to keep. My last database backup was two month ago too. Not sure what I'll do now. There's no way to get that data back, is there?
It is possible to use TIMESTAMP to store dates although possibly more error-prone compared to DATETIME (which also has a much larger range). You may have figured this out already but, from the manual:
The TIMESTAMP column type provides a type that you can use to automatically mark INSERT or UPDATE operations with the current date and time. If you have multiple TIMESTAMP columns, only the first one is updated automatically.
Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:
The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.)
You explicitly set the TIMESTAMP column to NULL.
TIMESTAMP columns other than the first may also be set to the current date and time. Just set the column to NULL or to NOW().
You can set any TIMESTAMP column to a value different from the current date and time by setting it explicitly to the desired value. This is true even for the first TIMESTAMP column. You can use this property if, for example, you want a TIMESTAMP to be set to the current date and time when you create a row, but not to be changed whenever the row is updated later:
Let MySQL set the column when the row is created. This will initialise it to the current date and time.
When you perform subsequent updates to other columns in the row, set the TIMESTAMP column explicitly to its current value.
On the other hand, you may find it just as easy to use a DATETIME column that you initialise to NOW() when the row is created and leave alone for subsequent updates.