topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 1:24 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How To Write Unmaintainable Code  (Read 9723 times)

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • View Profile
    • Donate to Member
How To Write Unmaintainable Code
« on: September 22, 2011, 05:39 AM »
I hadn't read this one before, but it is absolutely brilliant:

http://thc.org/root/phun/unmaintain.html

;D

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #1 on: September 22, 2011, 05:40 AM »
I saw the title and immediately thought about mouser coming out of the woodworks and talking about his coding "style" ;-)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #2 on: September 22, 2011, 06:09 AM »
That was very good. I skimmed a lot of it, but there are some real gems in there. :)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #3 on: September 22, 2011, 07:02 AM »
Great stuff.  ;D

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #4 on: September 22, 2011, 07:11 AM »
Blocked at work - will read later.

Luckily I do not need instructions - it comes naturally to me :D

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #5 on: September 22, 2011, 08:43 AM »
Luckily I do not need instructions - it comes naturally to me :D

Hahahahaha~!

Nice one! :)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #6 on: September 22, 2011, 09:45 AM »
You could always hire a certain someone I know. Lovely person to talk to. She handles web projects for her employer - who thinks she's a wizard. She's the living embodiment of the 'stream of consciousness' school of programming... :)


iphigenie

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,170
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #7 on: September 25, 2011, 03:17 AM »
You could always hire a certain someone I know. Lovely person to talk to. She handles web projects for her employer - who thinks she's a wizard. She's the living embodiment of the 'stream of consciousness' school of programming... :)

Actually that style worked pretty well for web programming for the longest time, since http is a)linear and b)amnesiac. The industry is full of people like that who managed quite well on the server side programming.
It's harder in our days of ajax, html5, rich interfaces in javascript, flash and silverlight etc.

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #8 on: September 25, 2011, 05:24 AM »
You could always hire a certain someone I know. Lovely person to talk to. She handles web projects for her employer - who thinks she's a wizard. She's the living embodiment of the 'stream of consciousness' school of programming... :)

Actually that style worked pretty well for web programming for the longest time, since http is a)linear and b)amnesiac. The industry is full of people like that who managed quite well on the server side programming.
It's harder in our days of ajax, html5, rich interfaces in javascript, flash and silverlight etc.

It can be extremely difficult sometimes when you're working with umpteen trillion different technologies.

In 1 portion of 1 project, this is what I need to deal with:

C#
VB.NET
ASP.NET
X/HTML
CSS
XML
TXT
HTTP
JavaScript
2 Frameworks
4 Components
1 Database
6 Projects
4 Web applications (3 are also projects)
? APIs... I don't feel like counting...

I'm sure I'm forgetting some things, but whatever. Point is, it takes a lot of effort to keep each section separate and clean and working well with every other part. It's easy to see why some things turn into complete disasters. (I've been taking my time to make certain that things are as maintainable as possible. e.g. TONS of comments in code with everything as atomic as possible.)

In some ways, you're kind of like a conductor when you're programming -- it's up to you to orchestrate everything and "make music".

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #9 on: September 27, 2011, 08:41 AM »
Iphigenie is perceptive as ever.  8) :Thmbsup:

The woman I was speaking of dates back to the "fly by the seat of your pants" era in web development; and built her reputation back when transparent 1-pixel gifs were considered a brilliant web hack. Unfortunately, she has not kept up with current best practices.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #10 on: September 28, 2011, 01:23 PM »
and built her reputation back when transparent 1-pixel gifs were considered a brilliant web hack.
What, why are you using past tense?
- carpe noctem

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #11 on: September 28, 2011, 01:35 PM »
and built her reputation back when transparent 1-pixel gifs were considered a brilliant web hack.
What, why are you using past tense?

Yeah. There is that.  :-\
But I was thinking more along the lines of it being clever rather than sneaky.
 ;D :Thmbsup:

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #12 on: September 28, 2011, 08:48 PM »
Utterly hilarious. What's also great about that piece is that it serves as a good reminder about annoying practices.

Spoiler
I should probably ashamed, but... I do like some of the "Hungarian notation" principles...  :-[ I find that, more often then not, it makes my code more readable in a simple text editor. Of course, more readable to me, hehe.


Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #13 on: September 28, 2011, 08:52 PM »
[Related to spoiler in previous post... ] Aaaaah. This just made me feel better. I love you guys  :-*

https://www.donation....msg244024#msg244024
« Last Edit: September 28, 2011, 08:56 PM by Armando, Reason: wrong link. »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #14 on: September 29, 2011, 04:33 AM »
From the source:

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
- Anonymous

:)

Thanks for sharing, Jibz!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #15 on: September 29, 2011, 09:45 AM »
^^^Would make a great "signature".

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: How To Write Unmaintainable Code
« Reply #16 on: September 30, 2011, 07:25 AM »
and built her reputation back when transparent 1-pixel gifs were considered a brilliant web hack.
What, why are you using past tense?

Hahahahahaha~! ;D

Nice one~!
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker