Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
Being on PHP DN, I assume we are all PHP programmers or at least a programmer of some nature. Starting out in PHP I had problems like any n00b would.
I didn't know $_GET from $_POST from a hole in the ground.
I'd always separate my arrays ($SQL = "", $QUERY =, $ARRAY =), not wrong, but definately a lot more typing.
I'd check my page to make sure it went right even after little commands like echo "hi";
But I'm interested in your big screwups .
I'll go first:
My biggest screw up came about a month and a half ago. I wrote a script that would pick out users whos accounts had no pictures, and then delete them and their directory from the server and database. But, something went awry in the script and I deleted EVERY PICTURE on the server. Almost 2 GB of pics! D'oh! Lesson learned: keep backups.
6 years ago, i was the admin of a server, and was kicked off the system when i was installing ipchains and the default deny all rule Luckily it was a server of me and some friends, no boss to complain )
Nah but seriously, I can't think of anything right now but I'm sure something will come to me shortly. I certainly havent caused damage using PHP by mkistake (I have however had cockups mistypin a linux command - BIG STYLE).
i have never really written a program that would cause a computer to blow up, but the worst i ever did was overwriting 200 rows in a database by uploading the old version
Deemo wrote:i have never really written a program that would cause a computer to blow up, but the worst i ever did was overwriting 200 rows in a database by uploading the old version
lots of typing after that happened
I've done that before, but with many years worth of data - luckily I have a cool host that performs backups regularly.
My biggest problem is similar to those, mistaken deletes in the DB. Never via PHP alwasy by command-line direction connection to the DB. DELETE FROM foo; instead of DELETE FROM bar;.... Luckily it was on a test server and only took about an hour to reload that data..... Still I've made a habit of turning off auto-commit now and not doing manual db manipulation late at night....
I've never had any major howlers with PHP. However a few years back I wrote a little Perl util to go through some 6000+ files grepping out some of the data. Unfortunately, I had piped the data in the wrong direction and ended up with 6000+ empty files.
The first major screwup: When I started progging I made a palm handheld version of 'the sims' called 'the bums' I spent a good 6 months on it. Never backed up. Not once. Needless to say, i lost it all. Lesson learned!
Second majour screwup: I used fopen("blah", 'w') instead of fopen("blah", 'r') on my entire reviews folder on http://www.acdrifter.com. Luckily my friend who does the content was online so he was able to upload the reviews in a few seconds. But still, I was quite worried.
Todd_Z wrote:The first major screwup: When I started progging I made a palm handheld version of 'the sims' called 'the bums' I spent a good 6 months on it. Never backed up. Not once. Needless to say, i lost it all. Lesson learned!
Second majour screwup: I used fopen("blah", 'w') instead of fopen("blah", '<span style='color:blue' title='ignorance is bliss'>are</span>') on my entire reviews folder on http://www.acdrifter.com. Luckily my friend who does the content was online so he was able to upload the reviews in a few seconds. But still, I was quite worried.
the aolbonics filter strikes again... Of course, given your avatar, I almost expected to be "arrrrrghh" instead
My very first week on my current job, I was working on a database. I had to delete an entry so I thought I'd have some fun and re-write it to say "Whoops, I did a bad bad thing".
In hindsight that wasn't too smart because I forgot a little thing called a "where" clause in my query. So, for about 3 hours until we got the backups, every entry in this particular database said "Whoops, I did a bad bad thing".
Fortunately it was summer so people were just light-hearted about it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
My biggest screw up is the same as pickle's except with a delete, yep 70,000 rows gone because of no where clause, luckily had a backup from the previous day already on the server and all I had to do was open up putty.