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

Kick Spy!, Kick Zeitgeist and Kick Widgets

15
kicks
published 4 months ago, submitted by shaharyr 4 months ago

dev102.com — Have you ever tried using the "Using" statement with a method and not a class? Why not take the "Using" statement and make it more useful. The Dispose method we want to be called does not have to Dispose of stuff, it can do anything we want!

Add a comment 10 comments | category: | Views: 485 | Get KickIt image code
tags: | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
The title alone shows a fundamental lack of understanding of what is going on.

I wish DNK had a downmod so I could downmod this.

using is not on a method or a class, it happens on an instance of an object which implements idisposable.
posted by evarlast 4 months ago
I agree with evarlast ! We seriously need an downkick button.
posted by Setsuko Setsuko 4 months ago
The solution presented is an interesting idea, worth kicking. But the title is misleading and I agree, shows misunderstanding.
posted by JudahGabriel JudahGabriel 4 months ago
Why are you'all acting like assholes?

It is just a title for crying out loud. What's important is the demonstration of the using block without the need for an explicit variable.
posted by grauenwolf 4 months ago
I don't agree with you Grauenwolf. The demonstration of the using block without a variable is NOT obvious and I do not think that it's the intent of the post.

I also do not think that these guys are being assholes. I think they're spot on.
posted by TheColonial TheColonial 4 months ago
Although this site is seemingly modeled after Digg (minus the downmod), I certainly wouldn't want Digg-like content popping up, let alone Digg-like comments.

I choose not to kick this article for the same reasons already mentioned. Also, I think using IDisposable for something other than disposing is an inconsistent pattern. He is just creating a meta-language within C# by bending the rules. There's plenty of blogs out there that discourage this practice and I agree with them.
posted by spoulson 4 months ago
If it doesn't suit your fancy, just don't kick it. ;)
posted by charris charris 4 months ago
DotNetKicks: .NET links, "community driven"

I doubt a real community will just passively stand by when some article that just isn't correct makes it to the frontpage of their beloved site. In my humble opinion, whenever an article that endorses bad coding makes it to the frontpage, a community is responsible for pointing out the reason why this should be avoided. If anyone here seriously thinks that by simply ignoring such an article, your community will grow and people inside the community will learn from their mistakes, then I guess my whole idea of what DNK stands for just got smashed to bits. Being called an ***hole for doing so is even worse.

I'd love to see your face when the following conversation takes place at your office in a few months from now.

- You: What's this? It's not a good idea to use the IDisposable interface for anything else than disposing stuff.
- New guy: I've read somewhere that it is a great way to make your code more readable and it simplifies development.
- You: What ? Where ?
- New guy: It was on my DNK feed.
- You: Oh yeah, right, I remember that article, but... I didn't kick it so you should've figured it was bad coding.
- New guy: ...

GG
Peace out.
posted by Setsuko Setsuko 4 months ago
@Setsuko - since DNK is open source, I'm sure Gavin would appreciate it if you'd like to code down-mod functionality into DNK. Short of that, it is a community website that allows the users to kick .Net related articles they _think_ are good. Moderators (such as myself) are discouraged from deleting posts that are basically on-topic.
posted by powerrush powerrush 4 months ago
Let me just further my comment by saying in -no- way do I feel this is a good practice.

@Setsuko
I agree, floating to the front page can make it seem as if this practice is actually accepted, and that really disturbs me. But I would hope most would actually reason on what they read, instead of blindly believing this is a good practice. Besides, that type of conversation happens regardless of DNK down kicks, right? ;)

I really just like this kind of aggregation with positive kicking because it shows me what's actually 'interesting' to read regarding .NET amongst a plethora of blogs now. I'm a big boy, so I can figure out if it's good for me or not.
posted by charris charris 3 months, 24 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge