- 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
Hey, at least they HAD a test environment. Some people are forced to go straight to production!
Sincerely,
Gene Simmons
Admin
<font size="2">Wow. Just... wow.
</font>
Admin
Heh, so not only can people see what the development details are before they're implemented, they can see exactly how it was implemented even after the fact?
Admin
hahahahaa
Admin
Wow. That [unfortunately] sounds a lot like the way my company did things a couple years ago in our old test env.[:O]
Admin
Adobe Indesign is probably used to read or write PDF files.
Ragz
Admin
Brillant
Admin
That would have been better. It would have been clear what code you're developing against. In this monstrosity, you're still developing on the production server ... you just don't know which code is test and which is production, and which is not used at all.
Admin
So the submitter of this story worked with the person/people responsible for this?
Are we to assume that the submitter stepped in at some point once learning about this piece of work with the correct, mind-numbigly obvious solution to having seperate environments for the app?
Admin
When I first started out, on my very first project I was doing something like this. For about five minutes. Then I stopped, pondered what I was doing and what the implications of it could be a bit further down the line.
Not nice.
Admin
The way things were going, I was ready to read that there were multiple folders in the Inetpub directory:
<FONT face="Courier New" size=1>wwwroot
wwwroot2
test_wwwroot
test_wwwroot2</FONT>
and so on.
Admin
My guess is that the developer, when confronted with this, had his/her mind implode. In the resulting chaos, multiple personalities arose, giving rise to the one that could tollerate the garbage and collect the paycheck, and the other personality that was blissfully unawares, think that it had quit after only three days of torturous maintenance work.
Admin
These goggles are complete bull****.
Admin
It could be much worse. Imagine what would happen if this guy knew about XML.
Admin
Okay. Not externalizing the connection strings is seriously stupid. (I once spoke to a guy whose job was to make web sites, who was replacing a bunch of Perl DBI calls to an msql database, with Perl DBI calls to a MySQL database.... once on every page of his site. Without the use of a find-and-replace, even. Sad.)
Not having a seperate environmnet for testing.... seriously stupid. For simple systems, we're talking maybe a pair of db commands to recreate the whole thing from scratch, so there's no excuse for using the same database for production that you do in development.
But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.
People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.
(Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)
Admin
That is how my predecessor handled versioning. Except, it was more like www_2002, www_2003, www_dev. Also, there were similar directories on the local development machine (same directory names but different files in them) . I ended up creating a new directory and downloading all the files to start over.
Admin
No, it did not. Sorry, I am too jaded.
Good name choice. It rhymes with "destruction".
You want what on a Friday? My creativity has failed me.
I would say the sheer mass of bogosity. Nice to have a chauffeur though.
Sincerely,
Gene Wirchenko
Admin
Were your projects big enough that the benefit of SCM would be seen by students?
One way to ensure that a tool is never used is to push its use in inappropriate situations. For example, using recursion to calculate factorials is a horrible way to introduce recursion.
Teacher: Well, recursion is useful sometimes.
Student: When?
Teacher: Well, they are too complicated to get into at this level.
Student: So why would I want to use this tool when I supposedly can not understand the cases when it would be used?
Teacher: <no satisfactory answer>
Sincerely,
Gene Wirchenko
Admin
Not too easy of a battle -- the original programmer was the *star* programmer at the organization and didn't believe in such things. When he was finally forced into using source control, his exact words were "this is the stupidest waste of time ever."
Admin
At least you knew that your testing was taking place in a true representation of the production environment, and who on here has never done a bit of coding directly into the live?
Admin
I'm considering walking off of *my* job, just because I heard that!
P.S. Hey, boss! Just kidding! [:D]
Admin
This just cracked me up. Too true.
Admin
Nope.... I (or anyone else who did at my company) would get fired instantly.
Admin
Star programmer, n.
A coder who you can't write about without liberal use of the * key.
Admin
I've been racking my brain trying to find a worse method than this. But I just can't.
Admin
Ooh, this reminds me of how I was taught recursion, believe it or not by a brilliant teacher in high school. We had a basic paint style program where basically you could draw rectangles and lines. We had to implement Undo. Now, in general a particular operation in our program doesn't have a natural undo because when you drawing over something you lose information.
We were completely at a loss. I think our teacher let us fiddle with it for about a day, trying to figure it out, before revealing the mysteries of stacks and recursion. Just reset to the initial state, traverse the operation history stack, and redo everything on the way back up. I never forgot it.
Admin
I'm the submitter. I was the low man on the totem pole at my old job, and the developer responsible for this monstrosity was the star developer of the team. He always had things done on time (or early!), and management loved him for it. I could scream about it until I was blue in the face, but I'm automatically overruled.
Oh, plus he was in charge of the entire project, and I only found out about it after he'd left the company. I know everyone will disagree with me here, but after it was already in such bad shape, I thought it was pointless to set up a solid test environment. So much was hardcoded (such as locations of files in the filesystem) that there was still a risk of harming the production system even from a test environment.
Admin
Possibly not. But that never stopped my professors from approaching a topic before.
More seriously: we had a software engineering class at one point which was about some of the "softer issues" of the discipline, including ethical implications of our trade. We also did a course on "non imperative programming languages," (including Lisp, ML, and Prolog), and I suspect that no student of the course expected to do any work with any of those languages again.
Besides which, I suspect that SCM would come in handy the very first time you had a group programming project. But that's as may be.
Admin
I've had to deal with clients and their HTML sites where, over the years, everytime they'd misspell a filename in a link and get a 404 error (say, they linked to contat.htm instead of contact.htm) they'd just copy contact.htm and name it contat.htm. The htm vs html extensions were never consistant so there were a lot of duplicates.
But test tables and columns in a RDB?
While Eskimos have over 200 words for snow, ITs should really have a few hundred for types of pain induced by viewing really bad code...I am at a loss to describe this sensation.
Admin
I suggest you take off and nuke the entire program from orbit. It's the only way to be sure.
Admin
My head hurts from reading that. Can something actually be more confusing?
Admin
I can certianly understand how hard that battle is; i guess it makes you question the organization if that kind of developer is the star :D
Admin
Those who can, DO! Those that can't, TEACH!
American teachers stink, they get into the business because they want the summers off!
Admin
You can use recursion for factorial in many languages in a non-horrible way. Just make it tail recursive and it is on par in performance with a loop, plus since it is purely functional with no state carried around in mutable variables, it is easier to verify the correctness of the code. There are plenty of reasons to use a mathematical function to teach recursion and the benefits of looking at things in terms of only functions (recursive or not), and not procedural, state-carrying loops.
Admin
and I thought that the guys who write
if (something)
or
if(something)
or
if (Something)
doSomethingElse
was bad
Admin
Reminds me of a company I used to work for. They had a web-based asset-management system which - from the outside - looked pretty neat. It generated PDFs on the fly, had a Flash module to input text so you could preview the formatting and generally seemed like the next-level application my current employer was unwilling to develop. Oh, how youthfully wrong I was proven to be.
I should have been worried when on my first day they told me they kept register_globals ON. But this wasn't nearly the worst of it.
For starters, no-one had told the lead programmer ("application architect") about OO. Consequently, every page featured numerous $q = mysql_query("whatever"); while (false !== ($row = mysql_result_row($q))) etc. calls (it's in PHP). As if that wasn't bad enough, no-one apparently told him about result objects or even the remote possibility that one can use named keys. Lots of references to $row[anynumber] ensued.
Okay - bad, but whatever. To make matters worse, all projects ran on the same server, under the same domain, using the same database. Consequently, whenever a specific client request warranted a new column in the database, it needed to be the rightmost column, "otherwise the numbering goes sour". That mystified me until I noticed the numbered column references all over the place.
To make matters worse, most of the PHP code was embedded in HTML (and this was really ugly Dreamweaver-HTML, but whatever). So, you had <?php if (condition) { ?> ... lots of HTML ... <?php } ?> type of code.
Worse still, numbers were used as identifiers not only throughout the database results, but throughout the entire code. I'm talking <?php if ($customer == 19 or $customer == 42) { ?> ...lots of HTML etc.
Like I said, these guys didn't know about objects, apparently. So every PDF creation function would be a wrapper of the native PDF function with loads of arguments, and the first line invariably contained anywhere between 15 and 30 global declarations. This is not to mention all the request-variables which were invisible due to register_globals.
To top it all off, they had no test environment and no version management. All development was done directly on the live server. I noticed a number of files in each directory starting with a dot, and asked whether they were hidden for a reason. No, they weren't hidden, the dot was there to ensure they showed up topmost in an alphabetical order, since they were files commonly changed. Aaah!
Severely depressed and alcoholic by now, I asked the manager why they'd decided to offer me only 80% of their usual starting-salary (I'd gone along with that since it was still a lot more than I was making at the time). They told me they thought I lacked experience...
Needless to say, I quit within the month and never took another job without seeing at least some of the code produced at a company beforehand...
Admin
He, what about a staging environment. Not to actualy use it, but it would be fun having it....
And then configure the page to use in XML! like test_pages.xml and prod_pages.xml. That way you can start using the testpages easely in your production configuration. Fun!!
Too bad they didn't exploit webservices and XML/XSL. That would leave a good reason for refactoring the whole thing.
Does each file count in the SLOC metrics! Would be a good idea for 'Moon' Microsystems.
Admin
<FONT face=Georgia>Another display of management choosing the wrong side of the old "Quality vs. Speed" argument.</FONT>
Admin
Wow. Sounds like someone got detention again.
I think that the whole point of this forum is that "those that can't, DO anyway, but very badly".
I know a lot of teachers, and at least 90% of them had "summers off" as a primary motivator ... but then again, what other draws are there? Low pay? Spending your whole day with rude, ungrateful children? Trying to figure out which of your charges are armed and/or on drugs? Dealing with the petty politics that come with any government job?
Oh yeah, baby, sign me up!
Admin
That sounds like a good idea, but how do you go about asking to see some of their code at, say, an interview?
Admin
At my university the students are introduced to version control when they have their first software project in a team of 4-6 students (usually during their third year). In the basic programming courses the teacher is using just microemacs and javac, just to make sure that everybody learns the basics of compiling code. I'm not sure, but near the end of the course they might mention about better programs for writing code (Eclipse etc.).
Admin
Oh, that's easy. Let me look at your code, and you can look at mine. In my experience since, you only need to see snippets to identify common but oh-so important practices like coherent style, proper indenting, thought-through variable, function and class naming etc.
Companies one wants to work for tend to applaud this stance, companies you don't deny it. And there's a few in between who reluctantly let you see a few lines of their horrible code and you never return their calls. Sure kept me out of trouble since then!
Admin
Hm, more like neither management nor development knowing what the heck they're talking about. Also common, but even sadder...
Admin
When they ask "Do you have any questions?" (they always do) you respond "Yes - can I see a sample of the existing code I'd be working with?"
That was tough.
Admin
I would get fired instantly for NOT doing that - no respect for the development process around here.
Admin
I deal with this exact kind of WTFness. To add to it, I can't complain too much because my direct supervisor created it all. And the excuse is always "There was a deadline". Anyone who can deliver ahead of schedule is a *. And too bad for the poor sod who has to maintain it, on a deadline.
Admin
That's right - don't be squaemish about it. Good companies will applaud your seriousness and devotion; bad companies will refuse to let you see it. Either way, you'll know enough ;)
Admin
Tis the second coming! I can see it in the file/database naming glossalalia found today in the daily wtf! There is no power, except that which can be found in God, God_1, and God_2 (Father, Holy Ghost, and Son, which is also Development, Stage and Production). Do not employ God_backup (SATAN!), and do not be lead astray by the false prophets G_test (Fred Phelps). Repent! And thou shalt not be overwritten.
Remember to duck and cover during the rapture.
POPE
Imma steal someone else's sig:
And the geek shall inherit from IEarth.
Admin
It sucks, but if you DO deliver on time and under budget, quality is of no concern at most shops. Sad fact. I think Jeft has blogged about this recently
It's hard to ignore that around bonus time, too. If you do iterative development you can try to push for cleanup releases, if you can. My last place was really idiotic: they wanted architectual brilliance yet requirements were never really gathered in a formal fashion and there was zero change control, other than having someone babysit the source control server.
Admin
Also a surefire way of reducing time and money budgets...
Could not this whole WTF (and I agree it IS a WTF) been controlled by some attention to naming conventions and and the use of test domains and environments instead of test files?
Thats the way I do it.
Oh - and a decent Configuration Management (whatta WTF name for source code management) system and a firm code migration policy.
_sigh_ - I know I am asking waaay too much.