DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 637 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

DamienG Subscribe to this feed
DamienG
Profile Kicked Submitted Comments Tags Friends Kicked By Friends Submitted By Friends


Comments:

Arg, doesn't DNK handle <a> tags yet!!

This is a known problem with this pattern and GC based systems under the name http://damieng.com/blog/2005/01/19/lapsedlistenersmemoryleaksinsubscriberpublisherscenarios lapsed listeners.

You can't always remove from the event mechanism if the objects are managed elsewhere and it doesn't provide a facility to do so - e.g. TreeView control.

Thankfully .NET 3.5 has a http://msdn2.microsoft.com/en-us/library/system.windows.weakeventmanager.aspx WeakEventManager class that can provide event services without this problem by keeping weak references to the listeners.

[)amien
posted by DamienG DamienG 9 months, 24 days ago

This is a known problem with this pattern and GC based systems under the name <a href="http://damieng.com/blog/2005/01/19/lapsedlistenersmemoryleaksinsubscriberpublisherscenarios">lapsed listeners</a>.

You can't always remove from the event mechanism if the objects are managed elsewhere and it doesn't provide a facility to do so - e.g. TreeView control.

Thankfully .NET 3.5 has a <a href="http://msdn2.microsoft.com/en-us/library/system.windows.weakeventmanager.aspx">WeakEventManager </a> class that can provide event services without this problem by keeping weak references to the listeners.

[)amien
posted by DamienG DamienG 9 months, 24 days ago

Also fails to encode attributes so could be opening up your site to HTML injection vulnerabilities.

[)amien
posted by DamienG DamienG 10 months ago

The URL on this is wrong...
posted by DamienG DamienG 1 year ago

You really need to switch comments on your blog...

[)amien
posted by DamienG DamienG 1 year ago

It's ASP.NET MVC.
posted by DamienG DamienG 1 year, 1 month ago

> The raw versus compressed is 56KB to 27KB.

This is exactly my point, you think you are saving 19KB but the reality is that after GZip compression those files are 13K and 11.5K respectively so you are actually saving only 1.5KB for all your efforts (and again, this is only for the initial hit of non-returning visitors).

Given such limited rewards and the risk that the compressed code could behave subtlety different the time would be better much spent optimizing those areas that measurement have shown to be problematic.

[)amien
posted by DamienG DamienG 1 year, 1 month ago

The point is that you are not saving 40KB because modern browsers and servers compress the file anyway - the actual savings will be a fraction of that size and more like 3-4K.

Yes, you can make this part of your build process but then you have to accept the fact your release build now contains effectively untested code.

In the case of this particular tool it would appear to completely mangle non-ASCII sequences such as currency symbols and accented characters leaving your released version to suddenly have problems displaying, parsing or validating financial values that worked perfectly during all the debug builds.

Sorry, but that risk really should only be taken when you know you have specific bandwidth problems and you can measure how your optimization is helping.

[)amien
posted by DamienG DamienG 1 year, 1 month ago

The space savings are marginal if you consider the fact the files are likely automatically Gzipped between client and browser http://damieng.com/blog/2007/11/27/shrinking-js-or-css-is-premature-optimization

[)amien
posted by DamienG DamienG 1 year, 1 month ago

If you need to be able to install on Windows x64 or simply want a less confusing installer then grab the MSI from http://damieng.com/blog/2007/11/08/windows-live-writer-on-windows-x64

[)amien
posted by DamienG DamienG 1 year, 2 months ago

Yeah sorry Random.Next isn't... but Stopwatch.Elapsed is ;-)

Perhaps it should be worded "Calling the member twice in succession produces different results with the exception of time-based activities"

[)amien
posted by DamienG DamienG 1 year, 2 months ago

"Calling the member twice in succession produces different results."

Not necessarily, DateTime.Now and Random.Next are examples of a valid propertys that produce different results when called in succession.

[)amien
posted by DamienG DamienG 1 year, 2 months ago

Hmm, Envy Code R is newer than Inconsolata :p

[)amien
posted by DamienG DamienG 1 year, 3 months ago

Does not include a Ribbon control however which is what most people will be expecting when they hear the words Office 2007 Controls.

[)amien
posted by DamienG DamienG 1 year, 4 months ago

I'm sure a brief summary of what it does would have been more informative than the history.
posted by DamienG DamienG 1 year, 5 months ago

Yeah that was be.

The best practice for using Enums is to not use them but consider subclasses, state or strategy patterns as recommended by Fowler in Refactoring.

[)amien
posted by DamienG DamienG 1 year, 6 months ago
 

Sponsored Link: www.carlist.ie

Search:

Ads by The Lounge