Reputation
1,774
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 17 25
Newest
 Nice Answer
Impact
~19k people reached

Jan
30
comment Querying Results from End of the table
Ordinary tables do not have an order. There is no "start" or "end", they're just bags of rows.
Jan
25
revised Should we avoid language features that C++ has but Java doesn't to increase maintainability?
Shorten title, capitalization, whitespace, typo fixes
Jan
25
suggested approved edit on Should we avoid language features that C++ has but Java doesn't to increase maintainability?
Jan
11
comment What is the significance of database host name while configuring database?
"does that mean this terminology is confusing?" - no it's not. Looks like an English issue more than anything else. The database host name is the name of the host that has the database. That's all, there's no magic or confusion. "localhost" is just a special name designating the current server.
Dec
28
comment Store Android file to cloud and compare on application installed
Think about it: you're worried that someone modified your app. If someone did, does it make sense to trust the (modified) app to verify itself?
Dec
27
revised If I need to use a piece of memory throughout the lifespan of my program, is it really necessary to free it right before program termination?
Add a missing verb, and some breathing space.
Dec
27
suggested approved edit on If I need to use a piece of memory throughout the lifespan of my program, is it really necessary to free it right before program termination?
Dec
26
comment Doesn't “always initialize variables” lead to important bugs being hidden?
@Abyx: that doesn't change anything. Either buffer contains valid data or it doesn't. What indicates whether it does or not is bytes_read. In the code you posted, if you don't initialize byes_read you have no way to know if it does or not. So your code is buggy. If you do initialize it, you do know, hence your bug is just calling use regardless.
Dec
26
comment Doesn't “always initialize variables” lead to important bugs being hidden?
@Abyx: even if it's a third party, if it doesn't deal with a buffer starting with \0 it is buggy. If it is documented not to deal with that, your calling code is buggy. If you fix your calling code to check for bytes_read==0 before calling use, then you're back to where you started: your code is buggy if you don't initialize bytes_read, safe if you do. (Usually functions are supposed to fill their out-parameters even in case of an error: not really. Quite often the outputs are either left alone or undefined.)
Dec
26
comment Doesn't “always initialize variables” lead to important bugs being hidden?
Your second bug isn't a bug in the code you posted but a bug in use if it reads more than the first byte of buffer. That bug is unrelated to bytes_read being initialized or not. Another unrelated potential bug is in your design, not passing in the validated length of buffer to use, limiting it to zero-terminated inputs.
Dec
21
comment Using a “strong” type system in the real world, say, for large-scale web-apps?
(Change the language hint in your post form <!-- language: lang-hs --> to <!-- language-all: lang-hs --> and you won't get the problem with the '[list] thingy.)
Dec
9
revised Is “string literal” always the same as “hard-coded string”?
Capital and question mark in title, remove quotes around "specific"
Dec
9
suggested approved edit on Is “string literal” always the same as “hard-coded string”?
Sep
26
comment Why some compilers do not synthesize the move operations at all per this paragraph in C++ Primer 5th?
It's not "some" compilers, its all of them (at least those that attempt to be conforming).
Sep
8
revised Is it good to define a variable inside a loop?
Capitalization, punctuation, small fixes
Sep
8
suggested approved edit on Is it good to define a variable inside a loop?
Sep
7
comment Where should the database and mail parameters be stored in a Symfony2 app?
What makes you think environment variables are more secure than files with proper permissions?
Jul
12
comment Modular programming practices
I just looked at 3 header files randomly and they contained classes, enums, templates, namespaces... Also only needing one generator doesn't argue against (or for) making a class for it.
May
13
comment What are the benefits of a device driver when I can access the I/O registers directly?
If that ~100 lines of mostly boring C code scare you, don't look at the "real" part of any real device driver (i.e. the part that actually talks to the device and "just" reads/writes to the IO ports or whatever). The articles shows you just the scaffolding which should take you a couple hours max to get right. A full device driver is probably in the man-years of dev for interesting devices.
May
6
reviewed No Action Needed Intersection of geometric entities