- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
It's not a question of "do it wrong once, then do it right" as much as it's a matter of sometimes (most times) you don't have the time or resources to get it done "right" but it has to get done somehow.
As I said I don't fault someone for doing something in a hacky or "wrong" manner if they're just learning or have insane pressure; what counts is understanding you're cutting the corners and make a point to find a better way - that alone puts you worlds above most so-called "professionals" that never learn any other way.
When I first started doing .NET I put all my code in the code-behind files, and did all my data access stuff inline with SqlConnection and SqlCommand. Then I learned to abstract it away using Table-Data Gateway, and now I'm learning to apply ORMs. The old crap I wrote was bad from a code perspective, but it was the only way to solve the problems I faced at the time, but because it didn't "feel" right I went on to find other, better ways of doing things.
Admin
Typically when you quote a word, such as you did with "build", you are quoting someone. Gore never claimed to "build" the internet.
Admin
Regardless, I'm quite sure Fred wasn't suggesting that you bill the client for a pilot system.
Admin
I for one can say I made horrible mistakes, but I made most of them when not doing programming in a professional context. My code is far from perfect, but total WTFs like a new table for every cart and GUID ids in the URLs etc, that's the kind of stuff I would do before I knew better, and definitely long before I started to take people's money for it. Of course, this is not the poster's fault but his manager, who should've known perfectly well that he was hiring someone without the skills to really do what he was doing.
Now that's not to say all programmers programming professionally should be really good, but there's a minimal level of competence where you can avoid the more severe WTFs.
Those pointing out the tired old "comp sci people can't program". Well duh, it's not called software engineering, is it? They should, however, know a lot about what they're doing, just not necessarily know how yet. That's an applied skill you must basically teach yourself, but at least you have lots of knowledge to base your decisions on. Assuming you even want to go into a programmer career as a comp sci graduate.
Admin
Admin
PS. Please forgive me my typos.
Admin
Admin
I, the uneducated moron, spend a lot of my time fixing the awful code my Computer Science graduate inferior makes.
As far as I can tell 3 years of CompSci at University just gives them lots of theoretical knowledge - which they utterly fail to implement - and fuck all practical experience.
And no, I do not just think he's doing it wrong, he is. I am collecting his code for submission here when I finally get pissed off and quit.
Admin
Admin
All those years of therapy... wasted...
Admin
I agree with your sentiment, but there is something wrong with WTF code that exposes security holes and lost data. Indeed, learning from you mistakes is admirable. Hopefully, you can go back and correct those mistakes as well.
Admin
Admin
Perhaps this will motivate me to post my own WTF, which is almost certainly even worse than I think it is.
A teaser:
vbscript asp, with a bit of javascript. uses visible form fields on a web page to pass data between pages no functions no spec sql injection is possible - yep source control - no
Oh yea, and successfully used and liked by the end users for years.
Admin
My first in production web app didn't suck that bad. My only wtf would be that I didn't know how to get the a new id from sql after an insert. Rather than doing a second query (Select max(id)) ... I just used a guid for the id's. That way I knew what it was before the insert. This only affected 1 table out of 10 (due to tha nature of the data) so I went with it.
Admin
Yes, and they all work for my company...
captcha: facilisi - couldn't be bothered to spell-check fallacy.
Admin
Google doesn't even seem to mind their javascript breaking their "featured results", why would you think they'd care about something that doesn't directly give them money, like the back button?
Admin
Well, it wasn't because of those IT monkeys we got the internet. This is more akin to monkeys and typewriters. Or monkeys and guns. The last is funnier.
Admin
Wait... which university did YOU go to? The ones I've gone to, and heard of, are no where near the caliber in which you mention. It's mostly: Here is a web page; here is Frontpage; ...; congrats, you get an A! Good luck!
Admin
Here comes the ARPA Net comments LOL
Admin
FTFY
Don't be so high and mighty; different strokes for different folks - everybody learns differently, and that should be respected. So long as you learn, you're not a fool. :)
Admin
Admin
Admin
My first proper development role was as a support developer - extending existing systems and fixing bugs in other systems. That got me looking at the kinds of programming errors make and got me seeing both good and bad code, as I'm doing my first serious development pieces, and while I won't say I've never written bad code, I'm pretty sure my worst code is better than the worst I've worked on, because the worst I've worked on just never worked. That place one developer left after a year and soon after we adopted a general approach to working on code he'd written - throw it out and start again. Maybe it should be required initial work experience - to work on other people's code for a while, good and bad.
Admin
Admin
Admin
Still, I have a hard time accepting a strategy of learning where the goal is to make mistakes, especially when the customer is paying for it and has to live with the results.
By all means, learn from your mistakes, but when faced with a new problem, you might see if anyone else has already tried to solve it or a similar problem. What issues did they encounter; what disasters can you avoid? You could save yourself a lot of time and headache.
Admin
I have a CS Degree and I have to generally agree with you. I'm a reasonable programmer with some natural ability and had already learnt to self teach before going to university. Unfortunately a few too many on the course I did had no such talent. Some were really talented, but some of those that weren't persisted. Even some of those who were talented did succumb to doctrine.
I despise those in the latter category who take everything taught to them at university as an absolute and a golden hammer. I've always appreciated that I will never know enough in any new programming endeavour, will have to continuously study/experiment/research and learn through my life to continue as a good programmer. People who come out of university and are convinced they know it all solely because of the certificate are just meh. Dismiss them.
Admin
So really, Gore forced taxpayers to "create" the internet. He still didn't "create" anything himself.
Admin
This is the point at which I actually heard the screeching sound of a record player being pulled off its track.
Admin
Guestbook plugin for an old PHP CMS (PHPNuke, I believe) which I wrote since there was no guestbook plugin available. SQL injections definitely possible (since someone nuked my own guestbook...) Code to sanitize and format BB-Code-like with stuff like str_replace instead of regex.
But the best part:
The first version had a TinyInt for the ID column (yeah, 1 mere byte - that will save space!)
Admin
Kind of off topic, but is anyone liking the ChangeVision meditating babe? There's someone like that at our local pizza place which I frequent just to chat her up a bit. Yeah, I'm a horny old goat.
Admin
Right. And the reason Gore deserved all the derision he received for this claim is that he was engaged in the typically ridiculous resume padding of politicians. What did he really do? He voted along with dozens of other senators to spend lots of other people's money on something that sounded cool, and for which he would not have suffered any personal consequences if it all turned out to be a grand waste of time and money.
Admin
You completely missed the point. The internet didn't come about because of yahoo jackwagons like this guy. It was the work of many talented and smart people such as Tim Berners-Lee, the legislation proposed by guys such as Al Gore. Jackwagons like this guy did nothing to help further the advancement of the internet.
Admin
So, Gore did his part in late 1991, and there were 300,000 users in 1990... how does that equate to the 1991 bill counting as "creating" the internet?
The first communication on ARPANET was sent on October 29, 1969 after being envisioned in 1962... Gore first took political office in 1976...
I've never understood how Gore gets credit for doing anything with the internet other than possibly spearheading approval of late-stage funding...
Admin
Wow. Wow, I say.
Close to ten years ago, I was asked to put together a web site for the continuing ed. department of a local university's college of business. It was my first real programming project, and I jumped in (by myself) with both feet, using PHP and MySQL.
Looking back, there was all sorts of obnoxious and ugly crap all throughout the code, and to this day I think of the lack of tests, lack of anything resembling real source control, and lack of input validation with a shudder. But in a subsequent job, a manager was asking if I had any experience with PHP, and after a lot of bashful hemming and hawing, I had to come clean: "I designed and built an online registration system for a college continuing ed. program using PHP and MySQL." And the manager rolled his eyes as if to say, "For chrissake, I'm worried about finding people who can spell PHP, and you have production code in the field?"
Which is all by way of saying, just because you know you've made lots of mistakes, it's no reason to sell short on your victories.
(And also: forget about exploiting those data validation bugs I left in there. That site has long since been retired.)
Admin
Admin
Admin
Seriously, when is the last time you calculated a derivative or integrated a continuous function? What purpose does that server the folks that are going to be writing BUSINESS software? If anything, it is much less useful than forcing them to take BUSINESS classes. Of course, everyone in school just wants to make video games; so they wouldn't realize that.
Admin
Oh, and I was the #1 student in my University level calculus class... and while calc is a pretty neat mental trick, I've never had occasion to use it, or for that matter, anything beyond 8th grade math. All that business with simplifying equations... nothing but useless mental masturbation; a total waste of time.
Admin
Admin
Hm, creating a separate table for each shopping cart and then iterating through them to find a non-existing cart ID ... I never think I made something that bad ... but I also had a small project where I threw an authentication code into the URL instead of having it as a cookie.
It was a home-cooked discussion forum. As far as I remember, I was pretty happy with this forum solution - but every now and then customers would complain to support; "I sent the link to the forum to a friend, and when he clicked at the link he got logged into the site as me!".
Well, that's one thing ... but here comes TRWTF. The support dept would of course report this as a bug. My response? Blame it on the customer ... "they should not do that!".
Admin
The most fascinating thing to me about stories like these is that the worst software isn't made by the totally clueless. It's written by people who know just enough to be dangerous. Most of this guy's problems were caused by naively trying to practice good data encapsulation and security, something someone with less theoretical knowledge wouldn't even bother attempting.
Admin
It's not over yet
Admin
Hah, pity the fools would ever need a "Confessions" category. I have NEVER made a bad program even though I have been programming for years!
I shall now return to my second-year-of-CS homework
Admin
I'm pretty sure I would have cut off my own fingers if I ever did something like this.
Admin
There are much better ways to learn than through mistakes: reading books, following examples, and becoming knowledgeable before you start writing the system.
Brian, how different is your site than the 3.14 billion other shopping sites out there? Shirley you could have found an example of how to do this the right way.
Admin
Lol.
Admin
Dear Brian,
In case you haven't noticed, this is a grown-up place. The fact that you insist on using mistakes to learn clearly shows that you are too young and too stupid to be writing websites.
Go away and grow up.
Sincerely, Bert Glanstron
Admin
It's the client's own fault if they knowingly hire someone incapable of doing the job. He didn't bullshit his way into anything, did he?
Admin
+1
I cannot think of anything I learnt about writing software at uni, that is applicable today. Not a single thing.