Reputation
59,359
Next tag badge:
187/100 score
18/20 answers
Badges
12 176 258
Newest
 Enlightened
Impact
~2.0m people reached

Jun
28
comment Do higher resolution laptop displays matter for programmers?
Forget about resolution; if you're trying to do development in an IDE on a 13" screen, there's your problem right there.
Jun
28
answered Do higher resolution laptop displays matter for programmers?
Jun
28
comment Understanding hand written lexers
@stijn: Well, I'll agree, I've never written a C lexer. But I wrote one for Pascal. It took about 2 hours to write, including the keyword table, and part of a third to test and debug. There was only one tricky case: if you see a digit, then a dot, you need to look ahead one character to resolve whether it's a float literal (1.3) or a range (1..5). And that was pretty much it.
Jun
27
answered Understanding hand written lexers
Jun
27
comment Technology/Techniques to prevent offensive images on a website
+1. This is really the only answer. What you need is a flag/"report offensive content" mechanism, not a filtering algorithm.
Jun
24
awarded  Nice Answer
Jun
21
comment My software is hosted on a “bad” website. Can I do anything about it?
Putting a self-check inside the EXE is difficult: the code of the self-check changes the hash of the EXE.
Jun
20
comment Using submitted code in a commercial product
Nowhere near legal advice, but it's almost certainly what a lawyer with experience in the area would tell you. I've seen open-source projects run up against this issue, and the general consensus is that you either make sure to explicitly get permission from the contributors to use it under other licensing terms--and reject any submission where they say no--or you can only stick to the one license.
Jun
20
answered Fastest way to set up a JSON server on my local machine
Jun
20
comment Why are so many languages passed by value?
Also, not sure about early Pascal, but in modern Pascal (Delphi, etc) you can pass a large object such as an array by reference but keep it immutable by using the const keyword on the parameter.
Jun
20
comment Why are so many languages passed by value?
+1. This is the only answer I've seen on here so far that actually answers the question and makes sense and does not use it as a transparent excuse for a pro-FP rant.
Jun
20
comment Why are so many languages passed by value?
"If you need multiple return values, don't simulate them, just use a language which supports them." This is a bit of a strange thing to say. It's basically saying "if your language can do everything you need, but one feature that you'll probably need in less than 1% of your code--but you still will need it for that 1%--can't be done in a particularly clean way, then your language isn't good enough for your project and you should rewrite the whole thing in another language." Sorry, but that's just plain ridiculous.
Jun
20
comment Why are so many languages passed by value?
Maybe it's just that my background is different, but I have no idea what sort of "very subtle unintended side effects that are very difficult to next to impossible to trace down" you're talking about. I'm used to Pascal, where by-value is the default but by-reference can be used by explicitly marking the parameter, (basically the same model as C#,) and I've never had that cause problems for me. I can see how it would be problematic in "ancient VB" where by-ref is the default, but when by-ref is opt-in, it makes you think about it while you're writing it.
Jun
20
comment Why are so many languages passed by value?
Actually, in C you can't pass by reference. You can pass a pointer by value, which is very similar to pass-by-reference, but not the same thing. In C++, though, you can pass by reference.
Jun
19
answered The Apache License, v2.0: Copyright License vs Patent License
Jun
18
comment Are there Negative Impact of opensource on commercial environment?
A viral license such as GPL is not necessary to ensure that future modifications to the code must have their source released. If that's what you want, publish it under MPL instead. GPL's viral nature means that anything else that touches this code in any way must also have its source released. It's not about protecting the code in question, it's about pushing an anti-proprietary-code ideology.
Jun
18
comment C# Dev - I've tried Lisps, but I don't get it
"Code as data" is a very bad idea, and I'm glad that more languages haven't picked it up. Just look at SQL. Every time you see in the news about some site getting hacked and divulging millions of users' private information due to a SQL injection attack, it's because some programmer failed to properly separate code from data.
Jun
18
comment C# Dev - I've tried Lisps, but I don't get it
@Ken: "I'd like to see how you'd write AND or OR as a function." Umm... I'd like to see why you would want to, given that they're both intrinsic operators on every language worth their salt. And if you really need an OR function, (for a reduce/fold operation, for example,) it's trivial to write a function that takes two parameters and applies the OR operator in pretty much any language. So what need is there for macros?
Jun
15
comment Is 100% code coverage a pipe dream?
Why are you worrying about this, when the underlying assumption--that 100% (or any other number) automated test coverage will magically make your code better--is a pipe dream itself?
Jun
14
comment Stored Procedures a bad practice at one of worlds largest IT software consulting firms?
I've never understood the "ties you to a certain DB" argument. How often do you take your program and migrate it to an entirely different database?