1,550 reputation
410
bio website
location
age
visits member for 3 years, 6 months
seen Aug 25 '13 at 9:46

Jun
10
awarded  Nice Answer
Dec
31
awarded  Yearling
Jun
11
answered Should I use parentheses in logical statements even where not necessary?
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@Frerich Raabe: BTW, I'm not trying to "convince" you. You asked for pros and cons, and that's it. By all means, go ahead and research this idea, if you really want. A lot of success stories came from people who didn't listen to the frogs (stopsinning.net/frogs.htm). Oh well, a lot of failure stories as well, because they ignored the knowledge and experience from the past. But that's life.
Feb
13
revised Is it plausible to use a filesystem-based configuration format rather than an INI file?
added 196 characters in body
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@Frerich Raabe: "Not relevant in practice, I think." Mmhh, famous last words. ;) Wait a moment, there is one more point, I'm editing...
Feb
13
revised Is it plausible to use a filesystem-based configuration format rather than an INI file?
edited body
Feb
13
answered Is it plausible to use a filesystem-based configuration format rather than an INI file?
Feb
9
revised What's a good way to explain the need for pointing to a pointer?
added 428 characters in body
Feb
9
answered What's a good way to explain the need for pointing to a pointer?
Jan
16
comment How can I avoid mistakes using the same variable name again?
@missingno: Who needs legs when we have wheelchairs? Who needs proven principles of good software engineering when we have linters and debuggers? The names are far too general and tell absolutely nothing about the intention and the functionality -- even to the OP six weeks from having written it. What is _mail($email) doing? It's as good as _do_something($with_this) So what's wrong with _send_mail($to_addr)?
Dec
31
awarded  Yearling
Dec
31
comment How do I prevent unknowningly duplicating code?
Now you get specific, a bit late in the discussion... @Spoike already asked you for concrete examples, they may have made your point clear right from the beginning. I've just commented two of your what-if scenarios: What if something is changed? (Answer: Handle it with all consequences.) What if you forget something? (Answer: Document it.) In fact, I'm fine with your point 3 and found myself in this situation, though rarely, not "very often".
Dec
30
comment How do I prevent unknowningly duplicating code?
A simple one-line comment may do miracles here: // Common functionality of modules Foo and Bar. So you don't forget that Bar is also affected when you change this common functionality for Foo. Yes, I know, when later module Baz uses it, too, you may forget to update the comment. But seriously, if you need such significant changes on a regular base, then you better keep your documentation up to date, else you're doing something fundamentally wrong in your software development process.
Dec
30
comment How do I prevent unknowningly duplicating code?
Code safe against changes is a silver bullet. You can't foresee any possible change, so you can't make your code safe against all of these. When you change something, then you have to revisit each and every place where this something is used, to check if it still works as intended. I'm always amazed when someone asks "What happens when this or that is changed?", no matter for what. Well, either you handle the change completely and everywhere with all consequences, or you close your eyes, pray and hope. I prefer the former.
Dec
28
comment How do I prevent unknowningly duplicating code?
Related: programmers.stackexchange.com/questions/34354/…
Dec
22
answered How to handle timezone for dates?
Dec
16
awarded  Announcer
Nov
17
awarded  Nice Answer
Nov
17
comment Why are exceptions considered better than explicit error testing?
This is a possibility, but it is dangerous. A file can "disappear" at any moment, e.g. when it is on a network share with an unstable network connection. It can disappear before exists(), between exists() and open(), or in the middle of the read operation. After the read, the file may be corrupted. It may contain lines in invalid format. It may fail a checksum test. It's not done with a simple exists(). Shouldn't all these cases lead to the same reaction? Ask the user "Config file not found or unreadable. Load another file or start with default config?"