Reputation
2,962
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
15 30
Newest
 Good Answer
Impact
~149k people reached

1h
comment Is it okay to return the “wrong” HTTP status code in order to show a more user-friendly error page?
@jwenting Are you proposing subverting HTTP in exchange for (allegedly) increasing security? The same argument can be used like this: "don't follow any internet standards, because standards can be exploited by attackers."
2h
comment How to use the shell more professionally?
"How do I get good at using tool X?" "Read. Practice. Ask your coworkers." Seriously, this question is way too broad/opinion based. I recommend you ask something specific about a concrete problem you're facing with shell scripting.
1d
comment Unexpected IndexOutOfBoundsException
I took the liberty of improving this answer by pointing out there is a bug in the OP's code, which results in the out of bounds exception.
1d
revised Unexpected IndexOutOfBoundsException
added explanation of bug in OP's code
1d
revised Unexpected IndexOutOfBoundsException
changed title to correspond to actual question
Aug
28
comment Is there empirical evidence supporting Brook's Law (or a modification of it)?
@Mandrill I find it curious that nobody made the effort to research this, since it's one of the fundamental insights of software engineering. Anecdotes remain just that -- anecdotes. Research work that documented hundreds or thousands of cases where this purported law holds would go a long way. Research is very important for software engineering, otherwise we will remain in an age of cargo cult methodologies and processes :/
Aug
26
reviewed Approve Using private vs company devices for development at work
Aug
17
awarded  Good Answer
Aug
7
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
I think this answer isn't helpful. It complicates things way beyond the current level of understanding of the OP. It's clear the OP doesn't understand the basic execution model of a CPU + RAM, and how a compiler translates symbolic high-level source to an executable binary. Tagged memory, RTTI, Lisp, etc, is way beyond what the asker needs to know in my opinion, and will only confuse him/her more.
Aug
7
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@user16307 Try not to worry about C++ and C#. What these people are saying is way above your current understanding of how computers and compilers work. For the purposes of what you're trying to understand, the hardware does NOT know anything about types, char or int or whatever. When you told the compiler some variable was an int, it generated executable code to handle a memory location AS IF it were an int. The memory location itself contains no info about types; it's just that your program decided to treat it as an int. Forget everything else you heard about runtime type information.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis Jorg's answer is pretty good as well, and has my +1.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis I'd argue that the computer doesn't know. The compilers for C++, Java, etc. produce additional code to handle this information -- which again, I think it's a more advanced topic than what the OP is asking about -- but the hardware knows nothing of it. You have to keep track of this because the computer doesn't know how to do it; C++ (for example) merely generates code for this, so that you don't have to write it yourself. Compare this to writing assembly code. This is why I consider Ryan's answer the best for the kind of knowledge level I assume the OP to have.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis I don't think the OP is asking about the sort of things RTTI addresses. The OP is asking something way more basic: how does a computer "know" whether the contents of a register or a memory location is an int, or a char, or whatnot. And the answer is "the computer doesn't, but the compiler will generate code that treats the stored value differently according to the type at compile time."
Aug
6
comment Is type safety worth the trade-offs?
@MasonWheeler Agreed, that blog post is embarrassingly bad. The conclusions are also awful ("Java claims to be static, but it does this which isn't static, therefore static typing is no good"). Maybe there are better arguments out there, but this blog isn't one.
Aug
6
comment Is type safety worth the trade-offs?
The paper: Haskell vs ..., An Experiment in Software Prototyping Productivity - Paul Hudak and Mark P. Jones. It describes the results of an experiment ordered by ARPA and the US Navy.
Aug
6
comment Is type safety worth the trade-offs?
Your scenario of rapid prototyping is hinted to be wrong in Paul Hudak's paper about a US navy study which required to develop an AEGIS-like simulation in different languages, one of which was Haskell. It meets almost all your criteria: it was rapid prototyping, the requirements where ill-defined, and the cost of failure was near-zero (this being an extremely informal experiment). Haskell came out the winner in evey category: development time, exceeding the requirements, requiring fewer LOC, and producing the only working example among all contestants!
Aug
6
reviewed Approve How often should I/do you make commits?
Aug
6
comment Java difference between String a = null and String a = new String()
Agreed. But also, if the OP doesn't need to change s, they should initialize it once and make it final. No need to mess with null or empty Strings :)
Aug
6
comment Java difference between String a = null and String a = new String()
If at all possible, try to write something like final String x = "the string";. This way: a- x cannot be null, and b- x is guaranteed not to change its value during its scope, avoiding nasty surprises.
Aug
6
revised Is the benefit of the IO monad pattern for handling side effects purely academic?
added 154 characters in body