339 reputation
14
bio website etalabs.net
location
age
visits member for 3 years, 3 months
seen Jul 4 at 5:27

Jun
19
comment Why do most programming languages not nest block comments?
@ThePopMachine: I'm sure of what I stated, that regular has a defined formal meaning, not the meaning you're using, and that the "regular" in "regular expression" was chosen for this meaning. Being non-recursive is one result of its definition.
May
11
comment Is it okay to not completely understand code functionality?
I question the principle of abstraction you're citing, on the basis that, for a large portion of real-world code, the full interface contract is considerably larger than the implementation. In other words it often requires the mental ability to handle more complexity to deal with methods as black boxes than it would require to just look inside. This is not an argument against abstraction but an argument that complexity is something fundamental that can't be abstracted away, and that all software necessarily does collapse (in quality) under complexity.
Mar
29
awarded  Yearling
Feb
19
comment Why is it so difficult to fix buffer overflows?
What pmg said. The only reasons fixing buggy code is hard are (1) you're not familiar with the code to begin with, and (2) the person who wrote it is probably not competent, and therefore the code is really bad and hard to fix. :-)
Oct
26
comment Should I teach my students alloca?
C does not have constructors.
Oct
26
comment Should I teach my students alloca?
If it's a few KB and you're confident you have a few KB, you can just use T foo[5000]; or whatever.
Oct
25
comment Should I teach my students alloca?
The only "responsible" use of alloc is 100% equivalent to fixed-size automatic arrays, and less portable.
Oct
25
answered Should I teach my students alloca?
Sep
14
comment Recursion without factorial, Fibonacci numbers etc
@Zachary: Algorithms that can be implemented with tail recursion (like binary search) are in a fundamentally different space class than those which require real recursion (or your own state structures with equally expensive space requirements). I don't think it's beneficial for them to be taught together as if they're the same.
Sep
14
comment Recursion without factorial, Fibonacci numbers etc
Of course it should be noted that whenever you have the liberty to design your own tree structure, it's almost always better to keep pointers/references to parent/next sibling/etc. in the nodes so that you can iterate over the tree without recursion.
Sep
14
comment Recursion without factorial, Fibonacci numbers etc
@jk: Directories cannot be hard linked, so modulo some leaves that might appear in more than one location, and assuming you exclude symlinks, real world filesystems are trees.
Sep
14
comment Recursion without factorial, Fibonacci numbers etc
@dan04: Recursion is a horrible way to implement almost anything due to the possibility of stack overflow in most lanaguages.
Aug
28
comment Is the C programming language still used?
A basic working C compiler, as opposed to a useful optimizing one, is rather simple. See pcc or even tinycc for examples...
Aug
9
comment Philosophy behind Undefined Behavior
The C language could have been specified such that it always had to use byte-by-byte reads on systems with alignment restrictions, and such that it had to provide exception traps with well-defined behavior for invalid address accesses. But of course this all would have been incredibly costly (in code size, complexity, and performance) and would have offered no benefits whatsoever to sane, correct code.
Jul
29
answered Why did Git get so much hype? …while others don't?
Jul
10
comment Are first person comments distracting and unprofessional?
I would say it depends on whether you're writing the comment as you (the programmer) speaking or as if the code itself is speaking to the reader. :-)
Jul
4
answered How to convince my boss that quality is a good thing to have in code?
Jun
8
comment Why do most programming languages not nest block comments?
+1 for "easier to add a feature than to remove it".
Jun
8
comment Why do most programming languages not nest block comments?
It's not the "flavor". The word "regular" in regular expression inherently excludes recursion.
Jun
3
awarded  Commentator