Reputation
8,956
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
19 48
Impact
~406k people reached

Nov
23
comment Is it normal for a programmer to not have 100% clarity over their own code at times?
If the "five dimensional array" is merely a map from a 4-tuple or a 5-tuple to a strategy, the author could have used a hash table or a helper lookup function. However, if the author spends most of the time coding the mechanics of initializing the array (nested for-loops), then the actual "algorithm insight" is going to be drowned in the pile of "mechanical code". Programmers seek to keep the latter kind of noise separate. Thus, good programmers must know how to write libraries primarily to house those mechanical code.
Nov
17
comment When do you use float and when do you use double
I endorse this answer with one additional advice: When one is operating with RGB values for display, it is acceptable to use float (and occasionally half-precision) because neither the human eye, the display, or the color system has that many bits of precision. This advice is applicable for say OpenGL etc. This additional advice does not apply to medical images, which have more strict precision requirements.
Nov
15
comment Why do code-bases in n-tier development have an equal amount of, if not more, JavaScript code now?
Because mobile has more network infrastructure in between and therefore highly affected by latency? A high latency means one must make fewer round-trips to the server-side (say, per second), and therefore more of the computation must happen client-side. That in turn motivates more computational power on the client-side.
Nov
12
answered Real AI in a compiled language
Nov
12
comment Concurrent Processes - Monitors and Reader/Writers
By "the code that enforces ..." (the code that implements monitor), I refer to the code responsible for: registering with the condition variable; blocking the thread (either by spinning or putting the thread to sleep or by switching to another unblocked task or somehow invoking the OS to do the same), and reviving (continuing) the execution once the mutex is grabbed.
Nov
12
comment Concurrent Processes - Monitors and Reader/Writers
You need a clearer (and a bit more formal) definition of what "monitor" refers to. Not the concept itself, but whether "monitor" refers to the code that enforces exclusivity of some other code, or the code that is being protected (enjoying the guarantee of exclusivity) thanks to the monitor. Thus, your question is as much a word question as a computer science concept question.
Nov
10
comment Can every language be compiled? And can every language be interpreted?
@wannik: See "all swans are white" fallacy, in Falsifiability
Nov
10
comment Can every language be compiled? And can every language be interpreted?
Some language features such as dynamic code generation (often confused with reflection; no, they're different) cannot be statically compiled.
Nov
10
comment Can every language be compiled? And can every language be interpreted?
Machine-code binaries can be executed in an emulator. The best known example is QEMU, because it is able to run binaries compiled for one CPU architecture on top of a different CPU architecture - a clear sign that the original machine code is not executed in its original form. Whether total CPU emulation shall count as "interpreted", "binary-translated" or "dynamically executed" is up to you.
Nov
10
comment Can every language be compiled? And can every language be interpreted?
Assuming that by "compiled language" you refer to "a mode of program execution by compiling the source code into the machine code for use with the target CPU's architecture, and then executed there", there are several sub-categories: AOT (ahead-of-time), JIT (just-in-time), or IL (intermediate language). Statically-compiled binaries may be yet another one, but some may consider it to be same as AOT.
Nov
10
comment Can every language be compiled? And can every language be interpreted?
First of all, most "useful and sensible" questions can be rendered nonsense or unprovable by qualifying with the word "every".
Nov
9
comment Is it bad to feel guilty using lots of libraries?
Questions about personal feelings is somewhat out-of-topic on Programmers.StackExchange. If this is about occupational psychology please seek professional help. (If this is a medical emergency please hang up and dial the emergency number.)
Nov
9
comment Is it bad to feel guilty using lots of libraries?
Have you received a request from someone else (either a more experienced developer, team lead, or anyone who knows your work) that you use less libraries? Have your app faced a bottleneck due to heavy use of libraries? (e.g. breakage or bugs due to a low-quality library; copyright or licensing issues; lawsuits or legal threats; app being rejected due to use of certain libraries, etc)
Nov
2
comment Testing non-central features
If the software is sold as a commercial product, the software vendor has to invest in quality control measures up to a reasonable economic limit. Failure to do so makes the software vendor liable for defective products or "unfit for purpose". Usually this means the software vendor will be ordered by the court to offer refunds to their customers, even if the software license precludes this possibility. At minimum a software vendor must maintain a bug-tracker. (Disclaimer: I am not a lawyer.)
Oct
28
comment Does modular programming affect computation time?
To all commenters above: a very useful rule-of-thumb is the ratio of "CPU overhead per invoke" divided by "useful CPU computation per invoke". (Replace "CPU" by whatever metric, and "invoke" by whatever spooky interactions at a distance.) Keep this ratio in check (0.1 percent to 1 percent) and then you can focus entirely on code usability / maintainability / serviceability / 1337ability .
Oct
24
comment Would forcing developers to fix at 3 AM the build they broke undermine motivation?
One should remember this is similar to the Monkey mob mentality experiment, which in the long run will result in counterproductive cult-like tendencies unless counteracted by other good engineering measures such as stringent code review and proving broken code with intrusive unit testing.
Oct
24
comment Would forcing developers to fix at 3 AM the build they broke undermine motivation?
As discussed, the effect of preventing check-ins late in the office hours might actually be the intended effect. Basically, a developer would be forced to review stuff written the day before. Assuming good sleep, a developer may be able to see new defects in their own code. Some large companies can buy stability however they want, even if they have to pay the productivity cost of discouraging check-ins for one-eighth of a day.
Oct
24
comment Would forcing developers to fix at 3 AM the build they broke undermine motivation?
This explains why a sane user of CI would configure most of the stuff to run during office hours? (Alternatively, you can make your office hour begin at 3 AM.)
Oct
24
comment Domain knowledge vs Programming
One cannot rise to the rank of solution architect (not one that can move freely from industries to industries as portrayed in this answer) through technical excellence alone. Or else one would fall into the illusion of "Senior Fellows of the Software Engineering Institute(s)" which is closer to a theoretician than to a software developer. Finally, without domain knowledge (along with a passion for the domain), even a technical leader will not be able to offer a viable product vision to move a company forward. Such leader can still move the company toward technical excellence (internal quality)
Oct
24
comment Domain knowledge vs Programming
Both domain knowledge and technical knowledge can become obsolete, but domain knowledge in general has a longer useful shelf life (unless it's about a twilight industry). The ability to acquire new knowledge is a prominent marker of a "rising star". Business owners can identify those who acquire domain knowledge quickly (because they are themselves well-versed in it), but will leave the evaluations of technical knowledge to among the technical leaders themselves. Because of this disconnect, business owners can be quite easily glossing over the value of technical knowledge.