Reputation
13,596
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
4 37 60
Newest
 Quorum
Impact
~280k people reached

Aug
22
comment When to use absolute path?
The practice is still common. Any time you use hardcoded paths you can't place the file where it suits you. There are many legit reasons the (many different) conventions won't always suit everyone.
Aug
18
comment Is it okay to return the “wrong” HTTP status code in order to show a more user-friendly error page?
I've never seen those called flash anything. There is definitely an Adobe Flash haters club though.
Aug
18
comment Unit Testing without DI
Why don't you use constructor injection? That gives you 90% of the DI benefits for virtually no work.
Aug
18
comment Is it okay to return the “wrong” HTTP status code in order to show a more user-friendly error page?
Whatever you do, ditch the flash.
Aug
18
comment Using a distributed system as an alternative to disk storage
While not using RAM over network, which is slow, there are insanely expensive machines out there that use RAM to temporarily store data when it is collected faster than can be written to disk, which is a situation usually encountered in scientific endeavors. Check out en.wikipedia.org/wiki/Worldwide_LHC_Computing_Grid
Aug
17
comment the right way to generate my Django model/db_table
If you are making a simple app from scratch, define your models and have django deal with it for you. That's one of the primary reasons to be using django in the first place.
Aug
17
comment the right way to generate my Django model/db_table
Why are you reimplementing a database on top of an existing database?
Aug
13
comment Do mocks violate the Open/Closed principle?
"In other words, a test should fail if the method doesn't work, but not because the implementation changed", this is not always true. There are plenty of circumstances where you should change both your implementation and your tests.
Aug
11
comment C# Implementation of Perl MD5->Digest method
What happens if you hex->bin the output?
Aug
10
comment Null values handling in big scale applications
letting the runtime throw an exception doesn't mean you can't catch it. But a null reference exception is one of those things that's almost always an unexpected error, which is not going to be something the user will be able to do anything about. Furthurmore, since a null reference is an invalid situation the overwhelming majority of the time, all the time spent putting in useless redundant messages is time you can't spend doing things that are actually useful.
Aug
10
comment Null values handling in big scale applications
If null is not valid, then don't even bother checking for it, and let the NullReferenceException happen on its own. Otherwise you'll have tons of code throwing that which the runtime will do for you anyway.
Aug
10
comment Does function pointer have the same expressive power as function as parameter?
Essentially, you just have a lot less input from the compiler making sure you're passing the right thing to the right place.
Aug
7
comment How to scale a C# server application
For what benefit? There are other much more useful skills to have before addressing a vague concept of 'scaling'.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@user16307: the answer is "it's complicated". I think you should try writing some assembly programs, as that will really teach you how the computer, as a machine, actually does things.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@CharlesE.Grant: exactly. See what happens if you have a printf() call but mix the data types with your format specifiers.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@user16307: dont think about stuff regarding exe files, that will just confuse you more. You need to walk before you run.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@JörgWMittag: indeed. I thought about mentioning a buffer overflow as an example but decided it would just make things more confusing.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@user16307: The code in the program will tell the computer to fetch that address then to display it according to whatever encoding is being used. Whether that data in the memory location is an ASCII character or complete garbage, the computer is not concerned about. Something else was responsible for setting up that memory address to have the expected values in it. I think it might benefit you to try some assembly programming.
Aug
5
answered Are data type declarators like “int” and “char” stored in RAM when a C program executes?
Jul
31
comment Understanding factories
Use factories when you are unable to know at compile-time what Type you need. Otherwise, just use new.