Go Back   Customers Suck! > Community > Check it out!

Reply
 
Thread Tools Display Modes

Ha ha ha ha! "How To Write Unmaintainable Code"
  #1  
Old 05-07-2018, 02:27 PM
mjr's Avatar
mjr mjr is offline
Store Manager
 
Join Date: Jan 2013
Location: 127.0.0.1
Posts: 982
Default Ha ha ha ha! "How To Write Unmaintainable Code"

I'm only about 3 or 4 pages into this, and I've already snickered a few times...

https://www.se.rit.edu/~tabeec/RIT_4...ble%20Code.pdf
__________________
Skilled programmers aren't cheap. Cheap programmers aren't skilled.
Reply With Quote

  #2  
Old 05-09-2018, 07:44 AM
Racket_Man's Avatar
Racket_Man Racket_Man is offline
stressed out broke pizza guy
 
Join Date: Jul 2006
Location: In the land of Green and Gold eating Pepperoni with an UZI
Posts: 3,027
Default

Hell I don't need to read the whole article. I lived the life of a "maintenance" programmer way back when there were some limitations on even source code size back when single letter variable names (used for more than one purpose) and switches were used more than once using GOTO's instedad of a sub-routine (passing values back and forth) and creating comments or documentation or flowcharting was considered being a wussy.

IBM punch card style ridged column based RPG COBOL FORTRAN and throw in some mainframe JCL to surround said source code

OR

in the IBM S/36 world OCL surrounding said not free form single letter reuseable variable and switches Source code

3000 lines of WTF is this shit show spaggetti code.

I wrote one particularly big long complex program using various language "tricks" to solve some variable name problems . HELL my internal comments/docs had more llines than the actual code as I explained in DETAIL how stuff worked and what I did and how I did it. I am willing to bet if I were to get a hold of that source code to day 25 years later I would be able to decipher and understand it.
__________________
I'm lost without a paddle and headed up SH*T creek.
-- Life Sucks Then You Die.


"I'll believe corp. are people when Texas executes one."
Reply With Quote

  #3  
Old 05-10-2018, 02:33 PM
mjr's Avatar
mjr mjr is offline
Store Manager
 
Join Date: Jan 2013
Location: 127.0.0.1
Posts: 982
Default

Yeah, but this one is bad (in an amusing way)...

It's got things in it like "name a function something completely different than what it actually does".

Misspell function names on purpose, so a Save() method might turn into Saave() or Saev() or Sav()

Obfuscate where possible.

Things like that.

The author says he wrote it kind of tongue-in-cheek, because he wrote articles on how to write maintainable code, and no one read them.
__________________
Skilled programmers aren't cheap. Cheap programmers aren't skilled.
Reply With Quote

  #4  
Old 05-17-2018, 10:38 PM
Nunavut Pants's Avatar
Nunavut Pants Nunavut Pants is offline
Warning: He thinks he's funny.
 
Join Date: Nov 2015
Posts: 753
Default

Step 1: Write it in the Perl language... That s**t is write-only code, I swear!!!
Reply With Quote

  #5  
Old 05-24-2018, 05:30 PM
Deserted's Avatar
Deserted Deserted is offline
Darwin and Murphy are my gods.
 
Join Date: Oct 2008
Location: Suicidal Self-Resurrecting Burning Bird City
Posts: 1,024
Default

Write-only: You must be thinking of TECO, where literally any string can be a valid program. The Jargon File has an example of sorting in TECO. (APL is even worse; Wikipedia has Conway's Game of Life in APL2, and it literally looks like line noise to me.)
__________________
Fool me once, shame on you. Fool me twice, you speak with the Fraud department. -- CrazedClerkthe2nd
OW! Rolled my eyes too hard, saw my brain. -- Seanette
she seems to top me in crazy, and I'm enough crazy for my family. -- Cooper
Yes, I am evil. What's your point? -- Jester
Reply With Quote

  #6  
Old Today, 11:26 AM
Mental_Mouse Mental_Mouse is offline
Assistant Manager
 
Join Date: Jan 2016
Posts: 296
Default

Quote:
Quoth Deserted View Post
Write-only: You must be thinking of TECO, where literally any string can be a valid program. The Jargon File has an example of sorting in TECO. (APL is even worse; Wikipedia has Conway's Game of Life in APL2, and it literally looks like line noise to me.)
The old-timers in Unix had a party game with TECO: Type your name in and see what it does.

The big thing about APL was just that they extended the character set (to hell and gone) to include all the mathematical operators for arrays and the like. Back in college, one of my professors had an ASCII version that was much more readable. (You still needed to understand the math, though.)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:48 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.