Jump to content

  • Log In with Google      Sign In   
  • Create Account


Share your wisdom! Sage thoughts related to programming you've discovered over the years


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
43 replies to this topic

#1 irreversible   Crossbones+   -  Reputation: 1196

Posted 21 January 2013 - 11:39 PM

In every profession there are truisms that are as elusive as they get, but absolutely require you to come to terms with. Everyone discovers these with practice - some sooner and some later. With me, usually the latter tends to be the case smile.png. If something like this has happened to you, share your revelation and wisdom! The only thing you have to do with your thoughts is to put them in the form of a sage-sounding quotation so I can collect them in this post. Like this:

 

 

 

"The most difficult thing about game programming is not writing the code,

but understanding what the code is supposed to be doing."

 

                                                              - Irreversible, 2012

 

 

"Always code as if the guy who ends up maintaining your code

will be a violent psychopath who knows where you live."

                                                               

                                                                  -  John Woods, 1991

 

 

"You should never delete/delete[] what you new/new[]

because you should be using smart pointers anyway.

And if you can validly disagree with me, I'm not talking to you."

 

                                                                - Cornstalks, 2013

 

 

 

"Always document your code."

 

                                                         - alnite, 2013

 

 

"Understand a bug first, before fixing it."

 

                                                                  - Ashaman73, 2013
 
 

"I will always give the hardest tasks to the laziest worker, because then I'm sure,

that the most simple solution will be developed"

 

                                                    - Unknown
 

 

 

"Perfection is archieved not when there is nohgin more to add,

but when there is nothing left to take away"

 

                                                    - Unknown
 

 

 

“‘Warning’ is just a misspelling of ‘error’.”

 

                                                    - L. Spiro
 
 

“Keep It Simple, Stupid

                                                - zedz
 
 

"Care About Your Craft -

Why spend your life developing software unless you care about doing it well?"

 

"Remember the Big Picture - 

Don't get so engrossed in the details that you forget to check what's happening around you."

 

"Invest Regularly in Your Knowledge Portfolio - 

Make learning a habit."

 

"Eliminate Effects Between Unrelated Things - 

Design components that are self-contained. independent, and have a single, well-defined purpose."

 

"Fix the Problem, Not the Blame - 

It doesn't really matter whether the bug is your fault or someone else's –

it is still your problem, and it still needs to be fixed."

 

"Use Tracer Bullets to Find the Target - 

Tracer bullets let you home in on your target by trying things and seeing how close they land."

 
                                                                                       - The Pragmatic Programmer
 
"Programming is easy. All you have to do is to hit the right key in
the right order and the computer will run itself."
 
                                                  - Bach
 
 
"If you're going to be writing cryptographic code, and you're not sure
what you're doing, just put the keyboard away and ask someone
qualified to write it for you. For all our sakes."

 

                                                                                                                                                          - Bacterius, 2013

 

 

 

"Never write code if the underlying architecture is not written down on paper.

And if you think you have a decent architecture plan,

throw it in a bin and draw everything all over again."

 

                                                                      - Include4eto, 2013

 

 

 

 

"Whatever new language or paradigm doesn't kill you makes you stronger"
 

           -szecs, 2013

 

 

"The pinnacle of programming is mastering the remotes for your entertainment systems"

 

 

                                                                          -Stormynature, 2013

 

 

"Plans are Nothing; Planning is Everything"

 

                                                                            - Dwight D. Eisenhower

 

 

 

"Agile is Nothing without Planning, unless you like getting to crap fast"

 

                                                                    - NetGnome, 2013

 

 

 

"In time you will come to hate the users; might as well get ahead of the game on that..."

 

                                                        - phantom

 

 

 

"Damn it, copy & paste!!!"

 

                                                   - kseh

 

 

 

"Design patterns are descriptive, not prescriptive. Treating them as if it were the other

way around (in my experience) generally leads to over-engineering."

 

                                                                         - Oberon Command

 
 

"Make it work. Make it right. Then make it fast"

 

                                                                   - Kent Beck (?)

 

 

 

"The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!):

Don't do it yet."

 

                                                                            - Michael A. Jackson

 

 

 

"Everyone knows that debugging is twice as hard as writing a program in the first place.
So if you're as clever as you can be when you write it, you are by definition not smart enough to debug it"

 

                                                                                                - Brian Kernighan (paraphrased)

 

 

 

"Laziness is a virtue. A truly lazy programmer will do an immense amount of work just to avoid

doing a small amount of work over and over again. This is a Good Thing ™."

 

                                                                    - ChaosEngine 

 

"As with music, technical proficiency will only carry you so far. At some point you have to have a

connection with your users, and those who must maintain your code; never neglect

your social empathy in the pursuit to be a better technician."

 

                                                                  - ApochPiQ

 

 

 

"Throw away prototype code."

 

                                                                         - way2lazy2care

 
 

"That "quick temporary hack" WILL end up in the final game..."

 

                                                               - phantom

 
 

"It will be fixed in the patch is an empty promissory note"

 

                                                                      - Stormynature

 

 

 

 

 

 

 


Edited by irreversible, 23 January 2013 - 12:04 AM.


Sponsor:

#2 Cornstalks   Crossbones+   -  Reputation: 6966

Posted 22 January 2013 - 12:12 AM

"Always code as if the guy who ends up maintaining your code

will be a violent psychopath who knows where you live."

-  John Woods, 1991

 

(note that this quote gets attirbuted to a lot of people and I'm only like 5% sure John Woods was the original speaker)

 

Not mine, but there's a few people I wish I could beat this into...

 

As for my own:

 

"You should never delete/delete[] what you new/new[]

because you should be using smart pointers anyway.

And if you can validly disagree with me, I'm not talking to you."

- Cornstalks, 2013


Edited by Cornstalks, 22 January 2013 - 12:22 AM.

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#3 alnite   Crossbones+   -  Reputation: 2038

Posted 22 January 2013 - 12:17 AM

"Always document your code."

 

- alnite, 2013

 

 

If you don't understand why, you will sooner or later.



#4 Ashaman73   Crossbones+   -  Reputation: 6684

Posted 22 January 2013 - 12:25 AM

"Understand a bug first, before fixing it."

 

"Keep it simple and stupid."

 

"Hunt down a crash immediately before its tracks disappears."

 

"I will always give the hardest tasks to the laziest worker, because then I'm sure, that the most simple solution will be developed" (not from me)

 

"Perfection is archieved not when there is nohgin more to add, but when there is nothing left to take away" (not from me)


Edited by Ashaman73, 22 January 2013 - 12:26 AM.


#5 L. Spiro   Crossbones+   -  Reputation: 12200

Posted 22 January 2013 - 12:30 AM

“‘Warning’ is just a misspelling of ‘error’.”  Me.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#6 zedz   Members   -  Reputation: 291

Posted 22 January 2013 - 01:26 AM

KISS

 

Dont over complicate stuff by making generic solutions

eg do this

if ( actor == tank ) {

 do this & that

}

 

and not this

if ( actor == has tracks ) {

 do this

}

 

if ( actor == has a turrent ) {

 do this

}



#7 Felix Ungman   Members   -  Reputation: 893

Posted 22 January 2013 - 01:48 AM

To paraphrase Bach, "Programming is easy. All you have to do is to hit the right key in the right order and the computer will run itself."


openwar  - the real-time tactical war-game platform


#8 JonathanJ1990   Members   -  Reputation: 166

Posted 22 January 2013 - 03:39 AM

one of my senior Programmers gave the team a copy of some Truisms from " The Pragmatic Programmer" which Helped me tremendously. a few of my favorites were:

 

Care About Your Craft - Why spend your life developing software unless you care about doing it well?

 

Remember the Big Picture - Don't get so engrossed in the details that you forget to check what's happening around you.

 

Invest Regularly in Your Knowledge Portfolio - Make learning a habit.

 

Eliminate Effects Between Unrelated Things - Design components that are self-contained. independent, and have a single, well-defined purpose.

 

Fix the Problem, Not the Blame - It doesn't really matter whether the bug is your fault or someone else's – it is still your problem, and it still needs to be fixed.

 

Use Tracer Bullets to Find the Target - Tracer bullets let you home in on your target by trying things and seeing how close they land.

 

The first three may seem obvious but to me the programmers i know who are working after college  understand and  work according to  these ideas, the ones who didn't and don't aren't.  The last three have personally grown more valuable to me over the course of my career. Having code that's independent of each other leads to fewer Errors " The ways this can break are limited because this only does X, Y, And Z" , it has made debugging substantially easier to me.  Fixing problems and not blame is huge too , when a team constantly throws blame around instead of fixing issues it causes distrust issues and still someone has to go back and fix the code, why not cut out the middleman(frustration) and fix the code right away avoiding unnecessary drama ? Lastly using Trace Bullets  is always an effective Debug Means it let's you see what your system is actually doing versus what it is REALLY doing. 

 

Here's a link to some other  pragmatic programmer truisms just in case anyone's interested: http://www.codinghorror.com/blog/2004/10/a-pragmatic-quick-reference.html



#9 L. Spiro   Crossbones+   -  Reputation: 12200

Posted 22 January 2013 - 03:53 AM

Here's a link to some other  pragmatic programmer truisms just in case anyone's interested: http://www.codinghorror.com/blog/2004/10/a-pragmatic-quick-reference.html
Don't Live with Broken Windows
Windows 7 crashes so often for me I can’t watch a single episode of Tiny Tunes.
Windows XP crashes so often I can barely get in one episode of MacGyver.

I don’t live with broken Windows by choice. It just happened.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#10 Bacterius   Crossbones+   -  Reputation: 8134

Posted 22 January 2013 - 06:00 AM

"If you're going to be writing cryptographic code, and you're not sure what you're doing,

just put the keyboard away and ask someone qualified to write it for you. For all our sakes."

 

                                                                                                 - Bacterius, 2013

 

Or, really, the more general statement - if your code is going to be used in situations where it failing could have very real consequences, don't write the code if you cannot assume said consequences. Seriously, the Dunning-Kruger effect is omnipresent in the field of programming, and not taking it into account is a recipe for disaster. See the recent utter failure of the Mega file sharing website's launch - the developer had no clue what he was doing, and the result is painfully obvious and predictable.


Edited by Bacterius, 22 January 2013 - 08:00 AM.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#11 include4eto   Members   -  Reputation: 103

Posted 22 January 2013 - 06:37 AM

"Never write code if the underlying architecture is not written down on paper.

And if you think you have a decent architecture plan,

throw it in a bin and draw everything all over again."

                                                            -Include4eto, 2013

 

It sounds a little generic and overused but after you've had to refactor several projects and subsequently write them from the ground up, you'll think twice before coding the idea that sounded awesome in your head.



#12 szecs   Members   -  Reputation: 2092

Posted 22 January 2013 - 10:49 AM

"Whatever new language or paradigm doesn't kill you makes you stronger"
 

-szecs, 2013


Edited by szecs, 22 January 2013 - 10:50 AM.


#13 Stormynature   Crossbones+   -  Reputation: 2661

Posted 22 January 2013 - 11:06 AM

The pinnacle of programming is mastering the remotes for your entertainment systems

 

 

                                                                            -Stormynature, 2013



#14 Net Gnome   Members   -  Reputation: 769

Posted 22 January 2013 - 11:13 AM

It sounds a little generic and overused but after you've had to refactor several projects and subsequently write them from the ground up, you'll think twice before coding the idea that sounded awesome in your head.

 

 

right on! My first ACB ran seeemingly well, until i realized it had a core architecture flaw. Some replanning, and now its 200 times faster and now manages my behavior forest for my game AI smile.png

 

Which leads me to one of my favorite quotes:

 

"Plans are Nothing; Planning is Everything"

 

         -Dwight D. Eisenhower

 

and a personal favorite corilary of mine:

 

"Agile is Nothing without Planning, unless you like getting to crap fast"

 

-NetGnome, 2013


Edited by Net Gnome, 22 January 2013 - 11:15 AM.


#15 phantom   Moderators   -  Reputation: 6785

Posted 22 January 2013 - 11:21 AM

"In time you will come to hate the users; might as well get ahead of the game on that..."

A rule which everyone should be following; "Trust in the Rob, the Rob is good..." based on the recent trend of I suggest something, this is dismissed in favour of another idea, 2 months later it has been refactored to what I first suggested... dry.png

#16 kseh   Crossbones+   -  Reputation: 1826

Posted 22 January 2013 - 12:41 PM

Damn it, copy & paste!!!

 

me.



#17 Oberon_Command   Crossbones+   -  Reputation: 1794

Posted 22 January 2013 - 12:58 PM

Design patterns are descriptive, not prescriptive. Treating them as if it were the other way around (in my experience) generally leads to over-engineering.

#18 ChaosEngine   Crossbones+   -  Reputation: 2131

Posted 22 January 2013 - 02:35 PM

A few on optimisation:

"Make it work. Make it right. Then make it fast"

- Kent Beck (I think)

 

"The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet." 

— Michael A. Jackson

 

On debugging:

 

"Everyone knows that debugging is twice as hard as writing a program in the first place.
So if you're as clever as you can be when you write it, you are by definition not smart enough to debug it"

 

- Brian Kernighan

(paraphrased, because I'm too lazy to find the exact quote)

and on that note....

 

 

"Laziness is a virtue. A truly lazy programmer will do an immense amount of work just to avoid doing a small amount of work over and over again. This is a Good Thing ™."

- ChaosEngine 


if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#19 ApochPiQ   Moderators   -  Reputation: 14247

Posted 22 January 2013 - 02:54 PM

As with music, technical proficiency will only carry you so far. At some point you have to have a connection with your users, and those who must maintain your code; never neglect your social empathy in the pursuit to be a better technician.

#20 way2lazy2care   Members   -  Reputation: 782

Posted 22 January 2013 - 02:59 PM

Throw away prototype code.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS