[identity profile] syberghost.livejournal.com posting in [community profile] techrecovery
Changed to remove the company-specific-ness:

This script gets called as follows:

FooScript 'datafile.data' 'datafile.control' ' /source/directory/'

Yes, that extraneous whitespace is passed to it, but that doesn't really
matter. The script these people wrote then looks like this:

=========
#!/bin/ksh

PARAMS=${1}
DATA_FILE=`echo $PARAMS|cut -f9 -d" "|tr -d '"'`
CONTROL_FILE=`echo $PARAMS|cut -f10 -d" "|tr -d '"'`
DIR=`echo $PARAMS|cut -f11 -d" "|tr -d '"'`
=========

And they claimed this crap WORKED on one server and not on another, that
the problem is we have ssh configured wrong. (Later on it tries to sftp
those files to other servers.) The guy who wrote this gets PAID TO
CODE.

Date: 2007-12-18 09:55 pm (UTC)
From: [identity profile] gholam.livejournal.com
Heh.

Heh

Just the other day, I get a call. Now, for a little background: Company A runs a business around a certain website. Company B builds said website for them. Company C (where I work) maintains the server rack that runs said website, both production and development servers. The three companies are located in different parts of Israel, the server rack is in NYC (company A does most of its business in USA/Canada and has a branch office in Manhattan).

Back to the call...

AAAAAH! THE WORLD IS OVER! DEVELOPMENT SERVER NO WORK! FIX NOW! FIVE PEOPLE CAN'T WRITE CODE!!!

...okay. Try to remote into server - it's not responding to RDP. Strange. Open up ESX console (it's all virtual machines) - the VM (Windows Server 2003) shows a grey screen (desktop background) and does not respond. Oh well, hard reboot. Loads fine, they resume working, then, 10 minutes later...

SERVER BREAK AGAIN! FIX! REINSTALL IIS! CAN'T WORK! FASTER FASTER FASTER!!!

Remote in. Check IIS. The website they're working on reports "Service unavailable". Hmmm. Event log shows w3wp.exe crashing multiple times, and then IIS disabling DefaultAppPool due to multiple crashes. Hmmm. Reboot IIS, reproduce the problem on their latest and greatest creation, check that the other sites are loading fine, report back to the devs that IIS seems to be fine, and their code seems to be... problematic.

NO! CODE IS FINE! NO BUGS HERE!! SAME CODE RUNNING FINE ON ANOTHER DEV SERVER!!! REINSTALL IIS NOW!!!

Grrr. Muck about IIS some more, take some crash dumps, call them back.

...oops. We found the bug. And by the way, same thing was happening on the other development server, thankyouverymuchforwastinganhour.

Gah.

Date: 2007-12-18 10:04 pm (UTC)
From: [identity profile] photosinensis.livejournal.com
Remind me not to patronize Company A. Anyone who chooses Windows for a server is out of their minds.

Date: 2007-12-18 10:08 pm (UTC)
From: [identity profile] gholam.livejournal.com
The number of people out of their minds shows no sign of reduced growth (http://news.netcraft.com/archives/web_server_survey.html) then.

Date: 2007-12-18 11:23 pm (UTC)
wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)
From: [personal profile] wibbble
That insanity is on the rise should not surprise anyone.

Date: 2007-12-19 01:21 pm (UTC)
From: [identity profile] spooforbrains.livejournal.com
Depends on what for. Surprisingly, many people active choose to code in ASP.Net / VB / c# / whatever. Now, why you'd chose that over any number of more suitable environment such as Java/JSP, Python, Perl, PHP or whatever is a whole other question ...

Date: 2007-12-18 10:07 pm (UTC)
From: [identity profile] margaretc.livejournal.com
Damn! I'm a sysadmin, not a coder, but I'd shoot anyone who wrote code like this. In ksh, even!

Date: 2007-12-18 11:10 pm (UTC)
From: [identity profile] catsidhe.livejournal.com
#!/bin/ksh ...



Well, there's your problem!

Date: 2007-12-19 02:40 pm (UTC)
From: [identity profile] knirirr.livejournal.com
Quite.
To my enormous delight, the scripts (including the installer) for the climate model I am responsible for setting up are written in ksh. Not only that, but they only work properly with one particular version of ksh.

Date: 2007-12-18 11:37 pm (UTC)
From: [identity profile] two-pi-r.livejournal.com
Once it gets complicated enough to use "cut" three times in a row, that's usually a sign it's outgrown the shell.

Date: 2007-12-19 03:18 am (UTC)
From: [identity profile] mogaribue.livejournal.com
Yeah, knowing little about the actual requirements, I'd vote for awk.

That being said, I've written some pretty heinous abominations of perl/awk/bash... but I don't expect anyone else to ever have to use them.

Date: 2007-12-19 07:55 am (UTC)
ext_8716: (Default)
From: [identity profile] trixtah.livejournal.com
Well, I personally can do simple Perl stuff, but I'm useless at shell commands - but hey, I started off as a Windows admin. And the Perl (or Python, I'm not religious) that would replace that mess would be much cleaner.

Date: 2007-12-19 03:22 pm (UTC)
From: [identity profile] jimbojones.livejournal.com
Yes to "the Perl would be much cleaner."

It boggles my mind how tenaciously some admins will cling to shell scripting crap that should have been moved to Perl long, long, looooooong ago. Frankly I'm headed to Perl the minute I need so much as a conditional branch, the hell with shell scripting anything more complicated than a simple string of commands.

Date: 2007-12-19 01:22 pm (UTC)
From: [identity profile] spooforbrains.livejournal.com
A possible submission for www.worsethanfailure.com ?

Profile

techrecovery: (Default)
Elitist Computer Nerd Posse

April 2017

S M T W T F S
      1
2345678
91011121314 15
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 19th, 2026 06:02 pm
Powered by Dreamwidth Studios