Author Topic: Write Dumb Code  (Read 97 times)

rcjordan

  • I'm consulting the authorities on the subject
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6398
  • Debbie says...
    • View Profile
Write Dumb Code
« on: January 29, 2018, 03:05:17 PM »
https://matthewrocklin.com/blog//work/2018/01/27/write-dumb-code

goes along with our ancient 'creeping elegance' threads.

buckworks

  • Inner Core
  • Hero Member
  • *
  • Posts: 852
    • View Profile
Re: Write Dumb Code
« Reply #1 on: January 29, 2018, 03:22:42 PM »
Quote
We should use advanced techniques only when we are not smart enough to figure out how to use more common techniques

That one jumped off the page at me!

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 3624
    • View Profile
Re: Write Dumb Code
« Reply #2 on: January 29, 2018, 09:27:11 PM »
"Everything should be made as simply as possible, but not simpler." -- somebody before me

https://quoteinvestigator.com/2011/05/13/einstein-simple/

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 3624
    • View Profile
Re: Write Dumb Code
« Reply #3 on: January 29, 2018, 09:30:28 PM »
A corollary to this is the Joel Spolsky classic 2000 essay on how starting over on software is a common response to troubled software, but almost always the wrong response.

Quote
Netscape 6.0 is finally going into its first public beta. There never was a version 5.0. The last major release, version 4.0, was released almost three years ago. Three years is an awfully long time in the Internet world. During this time, Netscape sat by, helplessly, as their market share plummeted.

Itís a bit smarmy of me to criticize them for waiting so long between releases. They didnít do it on purpose, now, did they?

Well, yes. They did. They did it by making the single worst strategic mistake that any software company can make:

They decided to rewrite the code from scratch.

https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 3624
    • View Profile
Re: Write Dumb Code
« Reply #4 on: January 29, 2018, 09:31:58 PM »
And the awesome punchline, which is more a propos here (emphasis Spolsky's):

Quote
Thereís a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong. The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming:

Itís harder to read code than to write it.