Do you have principles?

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 4450 Views - Last Post: 25 January 2011 - 10:39 AM Rate Topic: -----

#1 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Do you have principles?

Post icon  Posted 21 January 2011 - 02:22 PM

*
POPULAR

In programming, and in life, many of us have words that we try to live by. Recently, I learned of a quote by a man named Ralph Waldo Emerson. While he meant to apply it to life, it seems particularly true in the context of programmers. He said:

Ralph Waldo Emerson in the mid 1800s said:

As to methods there may be a million and then some, but principles are few. The man who grasps principles can successfully select his own methods. The man who tries methods, ignoring principles, is sure to have trouble.


Beautiful, yes? To me, this code explains that:(From Learning Python Programming)

atraub said:

You must know HOW to program before you can build something amazing. Just as you wouldn't try to build a car by welding together wreckage, you will be doomed for failure if you try to write software by piecing together other people's code [in lieu of learning the basics]. Code reuse is excellent, but this is not a substitute for real knowledge.


As a programmer, what are your guiding principles? Do you know of any quotes that express your style? These quotes don't have to be by philosophers or writers, they could be from celebrities, businessmen, or you! Take this as an opportunity to communicate some of your favorite quotes and how they can be applied to programming.

Is This A Good Question/Topic? 5
  • +

Replies To: Do you have principles?

#2 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Do you have principles?

Posted 21 January 2011 - 02:36 PM

Quote

If life gives you lemons then make lemonade.

I was given a computer (the lemon) then I made lemonade with web development. lol

This post has been edited by EnvXOwner: 21 January 2011 - 02:38 PM

Was This Post Helpful? 1
  • +
  • -

#3 torieLynn  Icon User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 5
  • Joined: 23-December 10

Re: Do you have principles?

Posted 21 January 2011 - 03:00 PM

I don't really have a quote but the one that atraub gave I felt really got to the truth about programming. Anyone can pull code off the web and sort of get it to work for them. As well as anyone can write code. If you don't understand the basics behind the code or even behind the language then your code will never be great.

This post has been edited by atraub: 21 January 2011 - 03:38 PM
Reason for edit:: Linked my name :)

Was This Post Helpful? 1
  • +
  • -

#4 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5846
  • View blog
  • Posts: 12,705
  • Joined: 16-October 07

Re: Do you have principles?

Posted 21 January 2011 - 03:15 PM

This one often comes to mind:

Quote

All problems in computer science can be solved by another level of indirection -- Butler Lampson
...except for the problem of too many layers of indirection. -- David Wheeler
-- http://en.wikipedia....straction_layer



Also, this one:

Quote

"640K ought to be enough for anybody." - Bill Gates, 1981


Bill's is more of a cautionary tale. He was entirely correct, in 1981. A few years after that, high end IBM computers came with 10MB ( yes, mega byte ) hard drives. How could you possibly fill that up, with programs that fit on one or two 360KB floppies? The moral is, never say you have enough storage, enough memory, enough speed, enough resources: you'll always be wrong, eventually.
Was This Post Helpful? 2
  • +
  • -

#5 xTorvos  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 271
  • Joined: 23-October 09

Re: Do you have principles?

Posted 21 January 2011 - 04:34 PM

Here is a site that has a lot of really good programmer quotes: http://www.devtopics...ramming-quotes/

One I really like is:

Quote

“That’s the thing about people who think they hate computers. What they really hate is lousy programmers.” -- Larry Niven


This tells me to never rely on the user's prowess or ability to use a computer and to always assume the worst (AKA exception handling, etc).
Was This Post Helpful? 0
  • +
  • -

#6 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Do you have principles?

Posted 21 January 2011 - 06:55 PM

I don't know if this is a quote but..

"Always assume the end user is an idiot"

From the link xTorvos just posted, these aren't bad

“Any fool can use a computer. Many do.”
(Ted Nelson)

“The function of good software is to make the complex appear to be simple.”
(Grady Booch)
Was This Post Helpful? 0
  • +
  • -

#7 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Do you have principles?

Posted 21 January 2011 - 08:26 PM

"In order to understand recursion, one must first understand recursion"
Was This Post Helpful? 1
  • +
  • -

#8 Hiram  Icon User is offline

  • D.I.C Head

Reputation: 69
  • View blog
  • Posts: 203
  • Joined: 02-June 09

Re: Do you have principles?

Posted 21 January 2011 - 09:58 PM

My favourite:

Quote

Always code as if the person who will maintain your code is a maniac serial killer who knows where you live.


Not sure who originally said this, but it's always entertained me. Haha.
Was This Post Helpful? 0
  • +
  • -

#9 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5846
  • View blog
  • Posts: 12,705
  • Joined: 16-October 07

Re: Do you have principles?

Posted 22 January 2011 - 06:25 AM

Some quotes made me think of this one:

Quote

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning.


Which led me here, containing a few more I might have added: http://en.wikiquote....iki/Programming


I think of this quote for most programs I play with:

Quote

Art is never finished, only abandoned.
-- Leonardo da Vinci


Which, I suppose has the programmer corollary:

Quote

There is no final version, only the released one.
-- Baavgai


Or something like that.

Modern users seem to accept the perpetual beta-ness of software. Would a truly final release be gamma? Or, better, omega? The mysteries of software versioning would perplex even the Ancient Greeks.

This post has been edited by baavgai: 22 January 2011 - 06:26 AM

Was This Post Helpful? 1
  • +
  • -

#10 smacdav  Icon User is offline

  • D.I.C Head

Reputation: 56
  • View blog
  • Posts: 177
  • Joined: 06-June 09

Re: Do you have principles?

Posted 22 January 2011 - 09:48 AM

View Postbaavgai, on 21 January 2011 - 03:15 PM, said:

...

Also, this one:

Quote

"640K ought to be enough for anybody." - Bill Gates, 1981


Bill's is more of a cautionary tale. He was entirely correct, in 1981. A few years after that, high end IBM computers came with 10MB ( yes, mega byte ) hard drives. How could you possibly fill that up, with programs that fit on one or two 360KB floppies? The moral is, never say you have enough storage, enough memory, enough speed, enough resources: you'll always be wrong, eventually.


Sorry, but Bill Gates never actually said that.http://en.wikiquote....s#Misattributed

I can't top any of the above quotes at this time, but I definitely agree with those about reusing code without understanding it and coding like the maintainer is a psycho who knows where you live. There have been a few times when I wished I knew where the person who wrote the original code lived.
Was This Post Helpful? 0
  • +
  • -

#11 SpeedisaVirus  Icon User is offline

  • Baller
  • member icon

Reputation: 114
  • View blog
  • Posts: 855
  • Joined: 06-October 08

Re: Do you have principles?

Posted 22 January 2011 - 09:56 AM

Yeah, that quote is easily the most abused/misattributed/misunderstood quote in computers.
Was This Post Helpful? 0
  • +
  • -

#12 Simown  Icon User is offline

  • Blue Sprat
  • member icon

Reputation: 319
  • View blog
  • Posts: 650
  • Joined: 20-May 10

Re: Do you have principles?

Posted 22 January 2011 - 10:15 AM

I always liked this:

Quote

"Walking on water and developing software from a specification are easy if both are frozen." -- Edward V Berard


It puts into perspective how hard developing software can be instead of just writing the code (which can be a task in itself!) Many people don't understand that specifications can change.. just like that!

This post has been edited by Simown: 22 January 2011 - 10:16 AM

Was This Post Helpful? 0
  • +
  • -

#13 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5846
  • View blog
  • Posts: 12,705
  • Joined: 16-October 07

Re: Do you have principles?

Posted 22 January 2011 - 10:53 AM

View Postsmacdav, on 22 January 2011 - 11:48 AM, said:

Sorry, but Bill Gates never actually said that.http://en.wikiquote....s#Misattributed


Bummer. I like my version better.

Curiously, the "I think there is a world market for about five computers" is also bunk. "Everything that can be invented has been invented," misquote. "There is no reason for any individual to have a computer in his home," bad context.

I was relying on Bill to keep up the failed furturist metaphor. Now I need to find something pithy to fill the void. One of these has got to be right. Right? Alas, real scientists always equivocate; they know better. :P

Aren't memes fun? The tenaciousness of a quote has far more to do with it's repeatability than authenticity. I always suspected the patent one was crap, but the five computers is practically gospel. I guess I didn't verify Bill because I honestly didn't care; it's the thought that counts.

I found a short one that does guide my thoughts. I might have to throw it in a sig or something. From the K of K&R:

Quote

Controlling complexity is the essence of computer programming.
-- Brian Kernighan

Was This Post Helpful? 0
  • +
  • -

#14 Simown  Icon User is offline

  • Blue Sprat
  • member icon

Reputation: 319
  • View blog
  • Posts: 650
  • Joined: 20-May 10

Re: Do you have principles?

Posted 23 January 2011 - 01:41 PM

A python "easter egg" perhaps?

>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!


As far as I know it comes with every python distribution, I only found out today though :sigh:
Was This Post Helpful? 1
  • +
  • -

#15 Nallo  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 163
  • View blog
  • Posts: 255
  • Joined: 19-July 09

Re: Do you have principles?

Posted 23 January 2011 - 02:53 PM

Before revealing my princple let me say:
As a hobby programmer I have no adversaries that spoil the fun of programming for me :-)
No deadlines. No project leader with a whip saying: "Get this damn thing right, asap!" or "your checkin broke the tests again". No programmer in my team checking in broken code giving lots of compile errors but nevertheless spending chinese new year in <insert your favorite backcountry location in china here> being completely unreachable for days.

So my (very personal) principle is:

Quote

Embrace bugs and errors. They help you learn.

I mean, if you cannot ride a horse, you are not going to blame the poor creature, are you? You got to learn to interact with it better.
If I cannot ski a slope, its not the binding, the shoes, the skis, it's me beeing unable to use my gear well.

That is what keeps me sane and humble (and sometimes from throwing my computer out of the window) :-)

This post has been edited by atraub: 23 January 2011 - 08:41 PM
Reason for edit:: Typo demons: I banish thee!

Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2