Author Topic: Top 5 Common .NET mistakes ...  (Read 3257 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Top 5 Common .NET mistakes ...
« on: February 09, 2010, 03:02:01 AM »

http://amazedsaint.blogspot.com/2010/02/top-5-common-programming-mistakes-net.html

I wet myself laughing when I opened this page
... then I read it  :-o
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8729
  • AKA Daniel
Re: Top 5 Common .NET mistakes ...
« Reply #1 on: February 09, 2010, 04:46:39 AM »
whats it say... uncle mao blocked it  :|

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Top 5 Common .NET mistakes ...
« Reply #2 on: February 09, 2010, 05:02:06 AM »
frizbeeee ...
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

sinc

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #3 on: February 09, 2010, 10:24:04 AM »
Can you get to this site?  It looks like most (maybe all) of the items were extracted from this list:

http://stackoverflow.com/questions/380819/common-programming-mistakes-for-net-developers-to-avoid

JCTER

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #4 on: February 09, 2010, 10:28:52 AM »
ugh.

Reading stuff like that makes me feel like I'll never understand wtf goes on in a .NET program.  I should abstain from reading that stuff.

Draftek

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #5 on: February 09, 2010, 01:15:13 PM »
That's WPF - Windows Presentation Foundation....

MickD

  • King Gator
  • Posts: 3638
  • (x-in)->[process]->(y-out) ... simples!
Re: Top 5 Common .NET mistakes ...
« Reply #6 on: February 09, 2010, 04:08:01 PM »
 :lmao:
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

uncoolperson

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #7 on: February 09, 2010, 10:30:32 PM »
whats it say... uncle mao blocked it  :|

It's for your own good

Viktor

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #8 on: February 11, 2010, 09:54:44 PM »
Hmmm, so regarding the unhooking of events and we're talking about wpf here:
Suppose I have a stackpanel and I fill it with 20 controls, each control I hook to an event. Then I clear the stackpanel (Stackpanel.children.clear), do I need to unhook the events prior to clearing?

I talked to a .net developer (professional I suppose) a while ago regarding this and he said that garbage collector would pick them up and would automatically unhook them. Is this different with C# and VB? I have noticed that after running my application on 1000 drawings of varying sizes that memory of acad.exe goes from 200mb to 500mb. But I was also collecting a ton of data from each file and was thinking that the data (which exported out to a 30mb xml file) and all the linq operations drained that ram.

Its not a big deal to remove the handlers, but after he told me that I never bothered to remove them.

Thanks,
Viktor.

Viktor

  • Guest
Re: Top 5 Common .NET mistakes ...
« Reply #9 on: February 11, 2010, 10:22:22 PM »
I just did a simple test of my own, basically added a button for system.gc.collect, and a button that clears and fills a stackpanel with a 1000 control. It made no difference if I removed handlers or not, as soon as pressing the gc button, memory would clear back out to beginning. So, are there scenarios where this works and where it doesnt?