Click here to Skip to main content
15,117,318 members

Comments by SledgeHammer01 (Top 40 by date)

SledgeHammer01 6-Dec-11 10:47am View
   
Deleted
Reason for my vote of 1
Horrible idea. The Linq way is MUCH slower.
SledgeHammer01 1-Oct-11 14:17pm View
   
Deleted
Reason for my vote of 1
Too overly complicated. Just use INotifyPropertyChanged. Its the standard .NET observer interface.
SledgeHammer01 5-Apr-11 10:40am View
   
Deleted
Reason for my vote of 1
*NEVER* use GetPixel / SetPixel in a loop. Those functions are VERY slow. Access the bytes directly.
SledgeHammer01 3-Apr-11 16:41pm View
   
Deleted
Reason for my vote of 1
Really lame. Just a copy of GOF. Abraham became 1st president? lol.
SledgeHammer01 31-Mar-11 11:05am View
   
Deleted
Reason for my vote of 1
XAML supports string formating directly. No need for a converter.
SledgeHammer01 21-Jan-11 14:43pm View
   
Deleted
I gave him a 1 because this is a terrible idea.

1) it makes your executable super big
2) if you need to fix something in the COM DLL, you need to ship the COM DLL and the EXE although its one huge chunk of crap
3) dropping DLLs at runtime is super ghetto and generating the wrapper at runtime is expensive
SledgeHammer01 20-Jan-11 16:09pm View
   
Deleted
Reason for my vote of 1
I don't get it. Why would you do this instead of just adding a project reference to the COM object? A C# wrapper is already created that way.
SledgeHammer01 18-Jan-11 19:52pm View
   
Deleted
Reason for my vote of 3
Methods 1,2,3 and 4 are complete crap and should never be used. What if google.com is down? What if your network blocks it for some reason? etc. Method 5 is the proper way.
SledgeHammer01 12-Jan-11 10:55am View
   
Deleted
Reason for my vote of 1
c&ping code from MSDN is not a tip.
SledgeHammer01 10-Jan-11 15:45pm View
   
Deleted
Reason for my vote of 1
Lots of errors. For instance, in .NET 4.0, the CollectionChanged and PropertyChanged *DO* have the NonSerialized attribute.
SledgeHammer01 7-Jan-11 15:39pm View
   
Deleted
Reason for my vote of 1
There is already a built in mechanism for debugging bindings. PresentationTraceSources.TraceLevel.
SledgeHammer01 6-Jan-11 22:08pm View
   
Deleted
Reason for my vote of 1
not a tip
SledgeHammer01 29-Dec-10 15:32pm View
   
Deleted
Reason for my vote of 1
Whats with people creating DataTables on the fly lately? This is the 3rd time I've seen this recently... what a stupid (and expensive) way to do things.
SledgeHammer01 28-Dec-10 16:02pm View
   
Deleted
Reason for my vote of 1
Not the way to fix SQL injection... not at ALL.
SledgeHammer01 23-Dec-10 11:11am View
   
Deleted
Reason for my vote of 2
copy and paste from MSDN
SledgeHammer01 12-Dec-10 22:00pm View
   
Deleted
Reason for my vote of 1
Major Lolz... worst code I have ever seen on here. Your object is to go through the names of the values in an enum, so you go through a DataTable?? Lolz.

Why not just:

foreach(string s in Enum.GetNames(typeof(Colors)))
{ Console.WriteLine(s);
}
SledgeHammer01 7-Dec-10 1:02am View
   
Deleted
@pasztorpisti: Fair enough. That is something I did not think about :). I have revised my vote.
SledgeHammer01 6-Dec-10 20:17pm View
   
Deleted
Reason for my vote of 1
What the heck? Why not just bool bSuccess = Int32.TryParse(s, out num);?
SledgeHammer01 6-Dec-10 20:13pm View
   
Deleted
Reason for my vote of 1
SledgeHammer01 6-Dec-10 19:38pm View
   
Deleted
Reason for my vote of 2
Wouldn't LoadLibrary() and GetProcessAddress() do the same thing? Seems like an overkill solution when the Windows API already has a way to do this.
SledgeHammer01 2-Dec-10 11:15am View
   
Deleted
Reason for my vote of 1
If "using System;" was removed, its because it wasn't being used. No need to have it there just for the heck of it.
SledgeHammer01 24-Nov-10 19:21pm View
   
Deleted
Reason for my vote of 2
Why do this in code? This should be done in XAML.
SledgeHammer01 22-Nov-10 15:48pm View
   
Deleted
Reason for my vote of 2
Nothing new here. Just about every MVVM library out there has a view locator or uses MEF.
SledgeHammer01 11-Nov-10 11:18am View
   
Deleted
Reason for my vote of 2
Using 'var' unnecessarily is a bad practice. Akin to people who litter code with the 'this' keyword. Var has its uses, but lazyness is not one of them.
SledgeHammer01 10-Nov-10 19:50pm View
   
Deleted
Reason for my vote of 2
You should have used Dictionary < string, List < string > > to do this. What you've done here breaks a lot of the properties of a dictionary.
SledgeHammer01 28-Oct-10 2:13am View
   
Deleted
Reason for my vote of 1
Quite possibly the worst idea ever.

1) spreading syntax across header files is horrible and unmaintainable.

2) if your class _declaration_ is really so big that it needs to be split across files, you should focus more on proper OOP design rather then silly tricks like this.
SledgeHammer01 22-Oct-10 16:09pm View
   
Deleted
Reason for my vote of 1
I gave you a 1 because your example about common mistakes has a mistake about 1,000,000x bigger then 3 string concats (which is just a super minor memory optimization). SQL Injection. NEVER EVER EVER EVER format SQL strings like this. By passing in a name formated like:

' DROP TABLE EmployeeTable;

I can delete your entire database.
SledgeHammer01 22-May-10 19:32pm View
   
Deleted
Awesome. I googled ObservableDictionary and the Dr. WPF link came up #1. Actually, I googled it about 6 months ago. Much easier to find then this tip. Your tip is basically to have somebody search CodeProject vs. googling "ObservableDictionary". Not a tip at all.

@Wes: Thanks for the feedback. You are the schmuck for your rudeness.
SledgeHammer01 22-May-10 14:08pm View
   
Deleted
Reason for my vote of 1
useless without numbers
SledgeHammer01 22-May-10 14:08pm View
   
Deleted
Reason for my vote of 1
useless without numbers
SledgeHammer01 22-May-10 14:08pm View
   
Deleted
Reason for my vote of 1
useless without numbers
SledgeHammer01 22-May-10 14:08pm View
   
Deleted
Reason for my vote of 1
useless without numbers.
SledgeHammer01 22-May-10 14:06pm View
   
Deleted
Reason for my vote of 1
not really a tip
SledgeHammer01 22-May-10 14:05pm View
   
Deleted
Reason for my vote of 1
This is a programming site.
SledgeHammer01 22-May-10 14:04pm View
   
Deleted
Reason for my vote of 1
links are not tips
SledgeHammer01 21-May-10 11:13am View
   
Deleted
Reason for my vote of 1
enough with these lame links
SledgeHammer01 20-May-10 11:13am View
   
Deleted
Reason for my vote of 1
more lame links?
SledgeHammer01 19-May-10 11:12am View
   
Deleted
Reason for my vote of 1
Never change a private member using reflection!
SledgeHammer01 18-May-10 22:04pm View
   
Deleted
Reason for my vote of 1
This is useless. No cmd line params, no threading, no nothing. Just a while loop and hardcoding. Completely useless.
SledgeHammer01 9-May-10 21:12pm View
   
Deleted
Subclassing the scrollbar at runtime? Really? This is WPF, not MFC. You should modify the control template.