Why are the arguments for substring functions mismatched?
In many languages, the substring function works like this:
What direction should I consider the offset when searching strings in reverse?
I’m making an indexOfReverse utility function in my C++ program, and I have caught a bit of a snag. Implementing the offset and maxOffset in my indexOf was very intuitive to me.. These start from the beginning of the string (+offset), and go forth to the end of the string (or maxOffset if given).
Should laying out a GUI graphically be considered “cheating?”
I have a friend who has a slightly greater amount of programming experience as me. We were talking about all the different programming technologies we use and Interface Builder came up in conversation.
Is there ever a reason to do all an object’s work in a constructor?
Let me preface this by saying this is not my code nor my coworkers’ code. Years ago when our company was smaller, we had some projects we needed done that we did not have the capacity for, so they were outsourced. Now, I have nothing against outsourcing or contractors in general, but the codebase they produced is a mass of WTFs. That being said, it does (mostly) work, so I suppose it’s in the top 10% of outsourced projects I’ve seen.
Generating different combinations from a list of muscles
Suppose we have a model of a human muscular system containing the following muscles each within a specific muscle group:
Programming language trends
Are there some statistics out there that show the approx. number of users that popular programming languages have and the rate this number increases over time?
Naming a “do X if needed” method
What is a good way to name a method that checks if X needs to be done, and does X it if necessary?
Use of versioned objects/data to handle program version compatibility?
Is there a common name for the practice of keeping a version number on your data, so that different versions of your program can identify, for example, “current”, “legacy”, and “too-old-to-deal-with” versions of the same type of object?
How could I avoid a distributed deadlock during a mutual connection between two nodes?
Suppose we have two peer nodes: the first node can send a connection request to the second one, but also the second one can send a connection request to the first one. How to avoid a double connection between the two nodes? To resolve this issue, it would be sufficient to make sequential the operations performed for creating inbound or outbound TCP connections.
What’s the next level of abstraction? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]