2,884 reputation
2922
bio website
location Chicago, IL
age 26
visits member for 2 years, 10 months
seen 49 mins ago

Sep
20
comment Multiple attribution in Python, JS, …?
@EduardFlorinescu I didn't start with C, but it's the oldest (programming) language I've learned. Interesting.
Sep
20
comment Multiple attribution in Python, JS, …?
I can't think of a language that doesn't support chained assignment... It's existed seemingly forever.
Sep
20
comment Multiple attribution in Python, JS, …?
Actually, the version in the question is typically called "chained assignment".
Sep
19
comment Copy-and-Pasted Test Code: How Bad is This?
Also, what language is this? You may have something available that's just not popping into mind, that would allow reuse (like first class functions). On the other hand, test cases are supposed to be kept simple, to keep it less likely they have bugs themselves...
Sep
19
comment How can I really master a programming language?
@GlenPeterson ...Actually, I just copied pasted without paying much attention to the sentence being "off". The +1 was indeed for the intent behind it. =P
Sep
19
comment How can I really master a programming language?
+1 solely for the final sentence: Every technique you use to learn brings and additional perspective to your understanding.
Sep
19
comment How can I really master a programming language?
However, you do have to make sure you're not repeating the same 10 hours 1000 times...
Sep
14
comment Has “Not everyone can be a programmer” been studied?
@dmbarbour Read the paper more closely. They weren't seeing whether or not questions like my example were answered correctly, they were asking multiple similar ones, and seeing if the students were able to come up with a mental model and apply it consistently, even if that model was wrong. If all of such questions ended up with "x = 1 and y is unknown", that student would fall in the "able to program" group, while if some were answered like that and others as "x and y both = 1", their model is inconsistent - that student would fall in the "unable to program" group.
Sep
12
answered Programming languages with a Lisp-like syntax extension mechanism
Sep
11
comment How to Be a Software Engineer?
@Code-Guru Chaos can be invigorating. The key is to keep some level of control over it.
Sep
11
comment What am I missing about PHP?
@AndrewLatham I have to agree. The author tends to misunderstand even the simplest things about PHP. Once upon a time, automatically promoting integers to floats/doubles was considered evil - now it's fairly commonplace. PHP and Perl both go a step further and not only make no distinction between integers/doubles (they're just numbers), but they also don't make much distinction between numbers and strings - both languages will convert to the appropriate type depending on what you try to do with the variable. This is the source of many problems that author has.
Sep
11
comment What are the arguments against parsing the Cthulhu way?
+1 for having the co-worker do the split version... The OP was the one tasked with creating it, so he's the one who's most likely going to have to support it - not the co-worker. Just suggesting it to him on top of his other work could be enough to get him off your back.
Sep
10
comment Using “Context-based” CSS Class Names
However, even with generic elements, you should still take a moment to think about it: grid_half is better than half, for example.
Sep
7
comment Is deserializing complex objects instead of creating them a good idea, in test setup?
Welcome to the lovely world of fixtures. They get out of date so easily, yet are so common...
Sep
7
comment Why does Javascript use JSON.stringify instead of JSON.serialize?
@ChaseFlorell is correct - with regards to Javascript, JSON is a subset of valid Javascript objects. See my answer for a simple example: All valid JSON is a valid Javascript object/hash, but not all Javascript object/hashes are valid JSON. It's even in the name - JSON stands for "JavaScript Object Notation".
Sep
7
answered Why does Javascript use JSON.stringify instead of JSON.serialize?
Sep
7
comment Review before or after code commit, which is better?
+1, this works even better when each developer doesn't have their own branch, but when you use feature branches instead. We commit bugfixes directly to trunk, since they're usually small, but features go onto their own branch, get many commits, then can be reviewed before being merged to trunk.
Sep
6
comment if you were asked to answer to the question “ what is the difference between the English language and a programming language” how you will respond?
@Caleb That site exists because it's not well-defined - if English vocabulary was well-defined, a dictionary would be sufficient and the site would not exist.
Sep
6
comment What are some good examples of using pass by name?
eval() is just about as insecure as you can get. Unless you have a language in mind that can sandbox the eval'd statement (which would then mean it's nowhere near as flexible), which you really need to indicate.
Sep
6
comment Which language came first with parallel assignment?
@YannisRizos It's called "destructuring assignment" in Javascript, and is far from cross-browser - you can't rely on it unless Firefox is all you want to support..