bzbetty


Comments:

C# HTML Helper Class

posted by bzbettybzbetty(0) 4 years, 2 months ago 0

More overhead maybe, but there has to be something said about using standard built in framework classes over rolling your own ones.

Reply

Implementing Generic Caching

posted by bzbettybzbetty(0) 4 years ago 0

Also commenting here since the original site is broken.
--------------------------

What's the advantage of using a constructor like that vs a static property that basically contains the same code, this would mean you wouldn't need to create an instance of the SafeCache class to use it (however minor that is) I do think it would make the syntax of using it a little cleaner

Would also mean you could type this instead no?
DropDownList1.DataSource = SafeCache<Widgets>.Object.WidgetIds;
DropDownList1.DataBind();

That said the Activator.CreateInstance might be more of a performance hit anyway.

Have you also thought about abstracting your caching strategy out a little? basically meaning you rely on HttpContext.Current.Cache existing, if you were using this in a BusinessLogic class that you wanted to unit test I'm guessing you'd either have to go to extra effort to get it working (create a HttpContext it could use), change it to not use the cache if HttpContext.Current is null, or use some form of dependency injection to replace the httpcontext implementation with another custom one (say a static hash table)

Reply

.NET Coding Standard & Code Review Points

posted by bzbettybzbetty(0) 3 years, 7 months ago 0

22. Please check your spelling, grammar and example code for correctness before submitting an article.

picking out a couple (but obviously not all)

#7. TryParse returns a bool for whether it succeeds, not a 0 value integer... it also fails if you pass null to it, so you don't actually need to check it first.
#17. Please learn how to use the "using" keyword
#23. The two samples have entirely different behaviour... oddly enough I'm presuming the one he said was bad to do is the one that will work correctly.

Reply

TFS Sucks, here is a list why

posted by bzbettybzbetty(0) 2 years, 8 months ago 0

@belorion, You seem to be talking about exclusive checkouts and not about whether a file is marked as read-only in your local file system. TFS handles multiple people editing files perfectly fine, but also allows you to setup certain file types that can only be checked out to one person at a time (Word files for example). That said why you'd keep word files in your source control repository is beyond me.

Reply

TFS Sucks, here is a list why

posted by bzbettybzbetty(0) 2 years, 7 months ago 0

@belorion, presumably to stop you editing files before checking them out? Admittedly requiring you to check files out can be a bit annoying (especially since other sourcecontrols don't require it) however with the added ability of exclusive checkouts (which are handy on occasion), the ability to see what others are working on (handy in teams with low communication) and potentially even seeing what you had checked out yourself in case of a hardware failure (not really that useful but I have needed to do it in the past) I find it worth the hassle, that said i don't often try edit a file in something that doesn't support TFS checkouts automatically.

What I really want is a list of change comments when I get latest =(

Reply