3,253 reputation
1424
bio website blueraja.com/blog
location
age
visits member for 4 years, 4 months
seen May 20 at 21:26

Jul
9
comment Is there value denoting a key as “Primary”?
@Mason: There is still an advantage to using a separate auto-incrementing key in that case, for some databases; many databases use clustered primary indices either by default (SQL Server, Sybase) or always (MySQL with InnoDB or XtraDB), which keep the values stored in primary-index order. In that case, you'll want to always be inserting at the end of the table. Otherwise, your inserts will be scattered around, which will cause both inserts and selects (due to fragmentation) to be slower.
Jul
9
comment Is there value denoting a key as “Primary”?
"It is not about implementations such as MySQL which automatically perform clustered index voodoo behind the scenes on primary keys" - FYI that is actually a feature specific to InnoDB(/XtraDB), not MySQL in general.
Jul
9
comment Can compilers and interpreters have bugs, and what can we (as users) do to deal with them?
See Can compiler optimization introduce bugs?
Jul
3
comment Why do most programming languages only support returning a single value from a function?
...I never claimed that tuples couldn't be used for other things. But arguing that "Python does not support multiple return values, it supports tuples" is simply being extremely pointlessly pedantic. This is still a correct answer.
Jul
2
comment Why do most programming languages only support returning a single value from a function?
@Lego: I don't see a distinction - a tuple is by definition multiple values. What would you consider "multiple return values," if not this?
Jul
2
revised Why do most programming languages only support returning a single value from a function?
added 86 characters in body
Jul
2
answered Why do most programming languages only support returning a single value from a function?
Jul
2
comment Why do most programming languages only support returning a single value from a function?
...You could easily define a calling convention for returning multiple values from a function, in nearly the same way you can define a calling convention for passing multiple values to a function. This is not an answer. -1
Jun
27
comment Documenting mathematical logic in code
Not to toot my own horn, but here is one example: meta.stackexchange.com/a/49787/141513 The idea is to write it so that someone who looks at it can understand what it does, even if they don't understand the math behind it. Good function-/variable-names and a simple comment or two are usually enough to do that.
Jun
18
revised How can I salvage my internship?
That is what the edit summaries are for
Jun
18
suggested approved edit on How can I salvage my internship?
May
22
revised A programming language that allows you to define new limits for simple types
he took my suggestion, but completely broke his code in doing so....
May
22
suggested approved edit on A programming language that allows you to define new limits for simple types
May
21
comment A programming language that allows you to define new limits for simple types
Just FYI: public virtual int Min { get; private set; } is a nice trick that would shorten your code significantly
May
14
awarded  Cleanup
May
14
revised Did the developers of Java consciously abandon RAII?
rolled back to a previous revision
May
14
revised Did the developers of Java consciously abandon RAII?
added 37 characters in body
May
9
revised Did the developers of Java consciously abandon RAII?
added 20 characters in body
May
9
comment Why is there no 'finally' construct in C++?
See also Did the developers of Java conciously abandon RAII?
Apr
30
comment Where did the convention of naming command line arguments as 'argv' come from?
Representing a string of characters as a vector is way older than BCPL (see, for instance, any old book on the theory of computation). In fact, the concept is probably older than the word "string" (as a sequence of characters) itself..