ECN Electrical Forum - Discussion Forums for Electricians, Inspectors and Related Professionals
ECN Shout Chat
Shout Box
Recent Posts
Changing a Bulb
by gfretwell. 07/14/18 03:12 PM
Tray cable?
by gfretwell. 07/11/18 10:18 PM
Eaton Heavy Duty 30A and 60A Safety Switches
by Admin. 07/11/18 09:49 PM
ORTOVOX Recalls Avalanche Transceivers
by Admin. 07/11/18 09:44 PM
Tingle off the water spigot
by gfretwell. 07/08/18 12:58 PM
New in the Gallery:
Plug terminals
Housebilding DIY wiring
Who's Online Now
1 registered members (gfretwell), 13 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Previous Thread
Next Thread
Print Thread
Rate Thread
Horror shows. #132294
09/03/05 07:07 AM
09/03/05 07:07 AM
J
jooles  Offline OP
Member
Joined: Sep 2004
Posts: 93
brussels, belgium
There are in the electrical forums plenty of pictures and examples given to show how existing installations have been wired ranging from bad and untidy to downright lethal.

I wonder if people in here also have similar anecdotes and examples of really awful systems, nightmare programming, or other computer stuff? What made me think of this was the Mainframe thread and that sample I copied up of the worst-written PL/I code in the world -- but that example has been doing the rounds for years, now.

Tools for Electricians:
Re: Horror shows. #132295
09/03/05 11:59 AM
09/03/05 11:59 AM
T
trollog  Offline
Member
Joined: Oct 2004
Posts: 276
San Diego California USA
Hehe.. worthy topic. I'll keep my eyes open...

Re: Horror shows. #132296
09/03/05 12:08 PM
09/03/05 12:08 PM
T
trollog  Offline
Member
Joined: Oct 2004
Posts: 276
San Diego California USA
Ok this is a bit contrived, so it doesn't really keep with the spirit of the post, but it is fun to run this as a cronjob every hour on someone's unsuspecting computer..

#!/bin/bash
eject /dev/cdrom
sleep 5
eject -t /dev/cdrom

[Linked Image]

or..


cat /bin/ls | /bin/login

(don't try this at home kids!)

Re: Horror shows. #132297
09/03/05 12:11 PM
09/03/05 12:11 PM
T
trollog  Offline
Member
Joined: Oct 2004
Posts: 276
San Diego California USA
Have you heard of the obfuscated C contest, for writing the worst, working, C code possible? There is also an obfuscated perl contest somewhere..
http://www0.us.ioccc.org/main.html

Re: Horror shows. #132298
09/03/05 12:45 PM
09/03/05 12:45 PM
J
jooles  Offline OP
Member
Joined: Sep 2004
Posts: 93
brussels, belgium
At college I used to like sending ASCII 0x07 to certain people's /dev/ttyxx at infrequent intervals, just to keep them wondering (it just made their terminal do a beep, apparently for no reason)

The IOCCC is fantastic [Linked Image]

What's more I actually *use* the AG anagram generator, because it's a good way to cheat when you get a very tricky one in a crossword puzzle and even after staring at it for ages it won't come.

I don't think it was ever an entrant in the IOCCC, but did you ever see Duff's device?

Here it is, and it always makes me smile.

send(to, from, count)
register short *to, *from;
register count;
{
register n=(count+7)/8;
switch(count%8){
case 0: do{ *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
}while(--n>0);
}
}


(I've tried a couple of things but I can't get the code to display with proper indentation, which is a shame, because apparently the forum software strips out leading spaces and it ignores tabs too.)

Notice that do { ... } while() loop *intertwined* in the ladder of case statements [Linked Image] It's a beauty, eh?

Here's the article about it that Tomm Duff wrote.
http://www.lysator.liu.se/c/duffs-device.html

[edited to try to fix indentation, unsuccessfully...]

[This message has been edited by jooles (edited 09-03-2005).]

[This message has been edited by jooles (edited 09-03-2005).]

[This message has been edited by jooles (edited 09-03-2005).]

Re: Horror shows. #132299
09/03/05 06:26 PM
09/03/05 06:26 PM
G
gfretwell  Online Content

Member
Joined: Jul 2004
Posts: 9,242
Estero,Fl,usa
I looked on the IAEI site and I can't find them but some years ago I submitted pictures of the horrors you can find under a computer room floor.
They showed up in the magazine twice. The basic problem is with FMC whips to Russell Stoll receptacles. Nobody really makes a suitable connector so the head pulls off, leaving the conductors exposed. These are 60-100a 3p so it can get exciting when one shorts out. I also had some where the FMC came untwisted.
Personally I preferred SO cord but the code made that go away in the 70s. At least there was a suitable connector.
I also had one where they tried to cram 8 #4s in a 1900 box, spliced with red wirenuts. Needless to say it didn't have a cover on it. You couldn't pack those wires in with a sledge hammer.


Greg Fretwell
Re: Horror shows. #132300
09/03/05 06:34 PM
09/03/05 06:34 PM
G
gfretwell  Online Content

Member
Joined: Jul 2004
Posts: 9,242
Estero,Fl,usa
Any of you folks do 360/370 assembler?
There is a back door that still existed far up into the VSE releases using the STIXIT command. I don't know if they ever fixed it. It gives you access to the GP regs and the current PSW, from a batch partition. Those are the keys to the kingdom.

Hint: buried deep in the "I/O and supervisor macros" book there is a descrition of what the unspecified "work area" has in it.
I found it because I wanted to write something that used that big red "interrupt" switch on a 360/370 console. I never abused it but I understand a kid at Montgomery College "owned" their system for a day. I think he got all "A"s that semester.


Greg Fretwell

Featured:

2017 Master Electrician Exam Preparation Combos
2017 NEC Electrician
Exam Prep Combos:
Master / Journeyman

 

Member Spotlight
Vlado
Vlado
Croatia
Posts: 28
Joined: February 2011
Show All Member Profiles 
Top Posters(30 Days)
Admin 5
Popular Topics(Views)
248,123 Are you busy
185,581 Re: Forum
174,903 Need opinion
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Release build 20180101)
Page Time: 0.041s Queries: 14 (0.016s) Memory: 0.9865 MB (Peak: 1.1393 MB) Zlib enabled. Server Time: 2018-07-19 06:10:22 UTC