5 Replies - 1081 Views - Last Post: 27 December 2010 - 10:58 AM

#1 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

The discouragement thread

Posted 25 December 2010 - 07:03 AM

There are so many useful recommendation threads on this site, but a discouragement thread can be just as useful for fellow Dream In Coders.

For example, many people on this site discourage the use of Netbeans' GUI builder because the code is hard to maintain and doesn't teach you how to make a GUI.

Another one is to not copy and paste code and if you must use the code, write it out line by line so that you're forced to understand what is going on.

So anyone other programming related discouragements you'd care to share? :)

This post has been edited by DivideByZero: 25 December 2010 - 02:38 PM


Is This A Good Question/Topic? 3
  • +

Replies To: The discouragement thread

#2 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1256
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

Re: The discouragement thread

Posted 25 December 2010 - 11:54 AM

those are still all recommendations. They just affirm the negative.
Was This Post Helpful? 1
  • +
  • -

#3 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: The discouragement thread

Posted 25 December 2010 - 12:04 PM

lol, very true


but I get the jist of what DivideByZero is saying... maybe if you could give a little more direction on it.



Because anti-recommend really isn't a word. We can say 'anti' basically means the opposite of recommend. So an antonym for recommendation.

discouragements

yeah I like that one.

and in that case you can say:

I discourage beginners from using the Netbeans GUI authoring tool, for blah blah blah reasons.

I discourage beginners from copying and pasting code, and instead do blah blah blah.




damn it, I failed, this was all a recommendation to DivideByZero.

This post has been edited by lordofduct: 25 December 2010 - 12:18 PM

Was This Post Helpful? 1
  • +
  • -

#4 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2872
  • View blog
  • Posts: 11,031
  • Joined: 15-July 08

Re: The discouragement thread

Posted 25 December 2010 - 12:06 PM

Posted Image
Was This Post Helpful? 1
  • +
  • -

#5 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

Re: The discouragement thread

Posted 25 December 2010 - 02:38 PM

View Postlordofduct, on 25 December 2010 - 11:04 AM, said:

lol, very true


but I get the jist of what DivideByZero is saying... maybe if you could give a little more direction on it.



Because anti-recommend really isn't a word. We can say 'anti' basically means the opposite of recommend. So an antonym for recommendation.

discouragements

yeah I like that one.

and in that case you can say:

I discourage beginners from using the Netbeans GUI authoring tool, for blah blah blah reasons.

I discourage beginners from copying and pasting code, and instead do blah blah blah.




damn it, I failed, this was all a recommendation to DivideByZero.

Noted, and edited :)

Oh and a few others from the book I'm reading at the moment:

Don't optimise your code before the program works.

Avoid duplicating code, if you need to have the same thing more than once, put it in a function and call it when you need to.

Don't declare all variables at the beginning of your program. Aim for short life span with variables, this means create them near where you're going to use them so that they are not in the program for longer than they need to be.

This post has been edited by DivideByZero: 26 December 2010 - 06:25 AM

Was This Post Helpful? 0
  • +
  • -

#6 mojo666  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 352
  • View blog
  • Posts: 771
  • Joined: 27-June 09

Re: The discouragement thread

Posted 27 December 2010 - 10:58 AM

Avoid using commands/operators/library functions if you do not have some understanding of how it executes. This is particularly true of operations that seem quite miraculous for a computer to pull off. That usually means that it is an expensive operation. Here are a few specific examples.

XLT's */ operator. This operator searches the entire XML document looking for matches to the path that follows it. Many people only understand that it "finds matches to the path that follows it" and are unaware of that first part. When one of our programmers discovered this operator, she through context to the wind and put this operator in front of every path. Combined with poorly redundant case statements, her code ended up searching the entire file hundreds (possibly upwards of 1000) of times ....then the customer sent a 6MB file...and complained after 2 hours that the data was not uploaded.

.Net's string remove. This one was my bad. Our tool cannot handle foreign characters sent from our foreign partners, so I made a simple loop that goes through the file character by character and if it is out of a certain ansii range, I remove it. Again, they sent a really large file and after half an hour we had to kill the process and I had to debug and ultimately implement my own remove function. Every time you remove a character, .Net needs to move all the characters left one space to keep the string continuous. So everytime a character was removed, .net performed on average ~13MB/2 worth of operations.

This post has been edited by mojo666: 27 December 2010 - 10:59 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1