Reputation
10,420
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 22 43
Impact
~226k people reached

Jul
25
comment Is DJGPP in use anymore?
Probably nobody, but that answer may not be helpful if your project is still being built for and used on old systems. The people to ask are the project's user community.
Jul
23
comment C++ Iterators: Best practice to represent end of range - Last or Beyond-last?
@1v0: Some of the STL containers provide a back() method that returns a direct reference to the last element in the set. If you need something that returns an iterator, add a method whose name doesn't conflict with method names in existing containers (e.g., last() or final()) but returns prev(endIt).
Jul
11
comment How to design a relational database for user following other users?
@karanratnaparkhi: Don't start trying to do optimizations until you can point at something being a problem. Design your schema to take advantage of the database's features and let it do its job. The people who wrote most of the big commercial and open source RDBMSes are very good at what they do.
Jul
11
comment long (or bizarre) file paths
@BasileStarynkevitch: Whatever ultimately operates on files (kernel or what have you) is what determines the valid length/content of paths. The fact that the password file's format limits home directories to not having newlines is really only germane to things that have to deal with that file. Not coding to handle valid is like having one of those "this should never happen" comments in your source and having it happen. Because eventually, it will.
Jul
11
comment long (or bizarre) file paths
@BasileStarynkevitch: That doesn't change the fact that a path with a newline is, as far as the kernel is concerned, valid. The fact that scripts trip over it in the password file is a problem that exists entirely in userland.
Jul
11
answered long (or bizarre) file paths
Jul
8
comment Strategy for fixing signed/unsigned warnings
@jww: That kind of thing on the part of some of my sloppier colleagues means more job security for you and yours. :-) Seriously, if you're already under the hood, this is a good time to get in and straighten some of that out.
Jul
8
answered Strategy for fixing signed/unsigned warnings
Jul
8
comment Strategy for fixing signed/unsigned warnings
Can you clarify whether or not you're at liberty to change the API and the code in the callers? Or is the goal here 100% compatibility with existing code?
Jul
8
comment What does the “t” in int32_t signify?
For what standard C doesn't reserve ending in _t, POSIX reserves the rest.
Jul
7
comment Security and sanitizing user-input with limited control over 'output' targets
Management's requirement can be met by routing all incoming messages to the bit bucket. Not helpful in spirit, but it does meet the letter.
Jul
2
comment Good idea to include test logs in software repository?
Further, if a comitted version of the code fails a test that was committed with it, you should be able to retrieve and build that version, run the test again and get the exact same failure.
Jun
22
comment Simple and clean way of comparing three numbers
C's qsort(3) deals just fine with KVPs by using a caller-provided comparator function. There's not reason that couldn't be done here if the function needs to be resuable.
Jun
17
comment Is there something peculiar to Matlab or Mathworks that supports so much “undocumented” code?
The code may in fact be documented at MATLAB HQ but tagged in such a way that things that aren't supposed to be visible to the rest of the world are scrubbed out on the way to a release.
Jun
12
comment Alternatives to Request For Comments
Your argument falls apart at "not quickly." Very little of what's in the RFCs is simple, and it's unreasonable to expect that all of it should be simple enough for anyone without a firm grip on the background material to sit down and write a protocol stack. If you think the RFCs are hard to get through, I invite you to spend a few hours spelunking in the 3GPP Specifications for a bit of perspective.
Jun
12
comment Alternatives to Request For Comments
Nobody's forcing anything down anybody's throat. As JacquesB pointed out, the RFC process doesn't usually start until a protocol is in use in the real world. In other words, the creation of an RFC is driven by adoption, not the other way around. The process has worked very well for decades, and if it isn't broken, there's no reason to fix it.
Jun
12
comment Why do programs use call stacks, if nested function calls can be inlined?
@MSalters: Code structured to depend on LTO sacrifices inlining entirely on toolchains that don't support it. In situations where 100% of the code will be built in an LTO-enabled world 100% of the time, then by all means go for it. There is lots of code in the world where that guarantee can't be made, and putting inline-able functions in headers allows essentially-identical optimization on the largest possible number of toolchains in a standards-compliant way.
Jun
12
comment Why do programs use call stacks, if nested function calls can be inlined?
C and C++ allow public functions and methods to be inlined by declaring them in the header included by callers. Whether or not this is a good thing to do depends on your willingness to trade having to recompile everything (vs. just installing new dynamic libraries) for the benefits of the extra optimization. Implementations of languages that do JIT compilation could, in theory, do it as well.
Jun
4
comment Why do we use the word “sprint”?
@Snowman: You're working my side of the street. Quit it! :-)
May
29
awarded  Autobiographer