7,913 reputation
11536
bio website
location
age
visits member for 3 years, 4 months
seen 14 hours ago

1d
comment Should temporary code be put under version control and how?
@Vorac: That was more a philosophical comment than anything else.
1d
comment Should temporary code be put under version control and how?
All code is temporary.
Jul
23
comment Omitting “destructors” in C is taking YAGNI too far?
@glampert nails it; I'd add that you should make the expected-infinite lifetime clean in the create function's documentation.
Jul
22
comment How should I remember what I was doing and why on a project 3 months back?
TODOs in the code are excellent, but you have to be diligent about putting them there, even for teeny little things. Having a todo target in your makefile that dumps them out is also useful.
Jul
22
awarded  Nice Answer
Jul
20
comment Why use getters only as opposed to marking things final?
Think about what happens when you didiscover that the field "x" that you made public and final actually has to be non-final or, worse, has to be changed so that the correct value has to be calculated when someone asks for it.
Jul
17
revised Is there a standard for naming the parts of a file path?
added 25 characters in body
Jul
17
comment Is there a standard for naming the parts of a file path?
Your definition of absolute paths is specific to operating systems that have the notion of multiple filesystem roots (e.g., Windows drive letters). Even in those environments, /path/to will be taken as relative to the default root. And AFAIK, Windows would interpret //SERVER/Share/path/to/file.zip the same way if passed to open(2) because remote volumes have to be mapped to a root (i.e., a drive letter).
Jul
17
revised Is there a standard for naming the parts of a file path?
added 62 characters in body
Jul
17
answered Is there a standard for naming the parts of a file path?
Jul
11
comment Why can't C arrays have 0 length?
If you have any pointer at all and it points to something of nonzero size, that wouldn't make the pointer point at nothing. It would point at the wrong thing because the thing at that location becomes an array of size one.
Jul
9
comment Value of passing by reference
The only real danger is in calling a function and not understanding what it's going to do with the arguments.
Jul
8
comment Pointer indexing
@Vality: Please read the addendum and cite a section.
Jul
8
comment Pointer indexing
@PeteKirkham: I disagree. See the addendum to my answer.
Jul
8
revised Pointer indexing
added 1821 characters in body
Jul
8
answered Pointer indexing
Jul
7
comment Is reading+modifying existing code better than making your own?
Bob Frankston, who co-created VisiCalc, once said that reusing pieces of code is like picking off sentences from other people's stories and trying to make a magazine article: it might make your point, but not very well. I'd also add that just because code is open source or in GitHub or Google Code doesn't mean it's good code; I've seen plenty from all of those sources that has a high WTF/minute rate.
Jul
4
comment Is Haskell appropriate for Signal Processing, Communication Systems and Information Theory?
Haskell might be great for signal processing, but there's also the practical matter of whether it's worth rewriting the plethora of well-proven libraries that do DSP and the underlying math functions. Many of those libraries are written in FORTRAN or C, which makes them accessible from pretty much anywhere else.
Jul
4
comment Why isn't testing a language a supported feature at the syntax level?
Having done a little bit of work in Eiffel and being an extensive user of assertions, my experience has been that anything you can do that's contractual in nature helps to ferret out a lot of bugs.
Jul
3
comment Cross Platform Compilation of C++ .exe
Is there any reason you can't build binaries for everything yourself and distribute those? VMs make it a lot easier and cheaper than it used to be.