Sep
9
awarded  Editor
Sep
9
revised Why is the worst case for this function O(n^2)?
fix the notation
Sep
8
suggested approved edit on Why is the worst case for this function O(n^2)?
Aug
29
comment What's the difference between a variable and a memory location?
There's an implicit assumption here that everyone reading those pictures will know your intent that the hexadecimal number under the box is a memory address, and that the a, 0x23453. nil etc. stuff inside them are the values. That might seem obvious to you, but I wouldn't be comfortable giving decisive answers to those questions without seeing how those fields are defined. There's really no way of knowing if a in the second image is a character, a string (if they're any different), or the name of a variable. If it is a string, then is nil also a string? Or a "null" value?
Jan
21
comment Why is C/C++ main argv declared as “char* argv[]” rather than just “char* argv”?
@JerryCoffin, one might also point out that even if the actual arguments were contiguous in memory, they can have arbitrary lengths, so one would still need distinct pointers for each of them to be able to access argv[i] without scanning through all the previous ones.
2018
Sep
26
comment Is there any technical reason why, in programming, the default date format is YYYYMMDD and not something else?
@pipe, well, the sequence number of a DNS zone is a 32-bit integer, which must be increased when the zone changes. While it could be just a plain number, a common idiom is to use numbers like 2018092601... Then there are some curious definitions of magic numbers in described in feature_test_macros(7), like having _POSIX_C_SOURCE > 200809L means that features from POSIX.1-2008 are supported...
Sep
26
comment Is there any technical reason why, in programming, the default date format is YYYYMMDD and not something else?
@ZacFaragher, I'm sure we'll have plenty of time to implement that later, no need to rush, right...?
Jan
31
comment Does comparing equality of float numbers mislead junior developers even if no rounding error occurs in my case?
You may also want to consider rounding instead of flooring in the assignments, depending on what you want. If the division is supposed to give an integer result, floor might give surprises if you stumble upon numbers where the division happens to be slightly off.
2017
Sep
27
comment Why are bit masks called “masks” and what purpose do they serve?
@BlackJack, a grayscale image might have floating point alpha values or such, but a proper binary black-or-white image can't really use more than one bit.
Apr
25
comment Can “sub-linear” still be a straight line?
@FabioTurati, note that the original plot was logarithmic on both axes (log-log). On a lin-log plot it would be the exponential that looks like a straight line.
Mar
22
awarded  Supporter
Mar
22
awarded  Autobiographer