940 reputation
511
bio website
location
age
visits member for 3 years, 6 months
seen 2 hours ago

Oct
19
comment Why did the ISO 8601 committee choose Monday as the first day of the week?
Sunday is part of the weekend. It wouldn't make much sense for the week*end* to be at the beginning, would it? (only partly serious)
Oct
2
comment Is it possible for a good programmer to have never used version control?
@Jaydee: The only binary files I can think of (other than output files) are .dfm files, and Delphi supports saving those as text instead; it's a setting somewhere. (last time I used it was back with Delphi 5 though, which is over a decade old, so this is probably out of date :P)
Aug
20
comment How many types of programming languages are there?
So according to my activity log I downvoted this on August 2nd, but I frankly can't even remember seeing this question before, and don't see anything wrong with this answer right now. I've removed my downvote. Something fishy going on? (maybe just something went wrong in my brain)
Jun
15
comment Can I do a git merge entirely remotely?
You seem to be implying that pulling down both branches will involve a lot of data transfer or effort, but that isn't actually true -- the stable branch and the work branch contain the same commits. If you have a copy of the work branch then the only extra data you need to have a copy of the stable branch is the sha1 hash of its tip. And if you don't have the work branch, then how can you make any sensible edits to the repository contents?
Jun
3
comment Can a language support something like “Retry/Fix”?
@crucifiedsoul: Because this involves multiple levels of the call stack. A single level of the call stack may not have all the context necessary to fully resolve an exceptional situation. Detecting an error often requires low level details which a high level function lacks, while selecting an appropriate response to an error often requires application specific logic which a low level function should not include -- therefore, the low level function must be able to communicate the exceptional situation up the stack (and possibly continue execution after the error is resolved).
May
18
comment Why do some open source projects do not accept pull requests, but emailing patch files only
@CrazyEddie: github sends (or can send) an email to project maintainers when a pull request is submitted. That email contains the pull request description, plus list of commits and changed files. Obviously you have to be online to receive that email and grab the commits, but that's true for patch emails too.
Apr
28
comment Which hashing algorithm is best for uniqueness and speed?
@IanBoyd: City Hash "too large to be used in practice"? Can you explain? Nothing forces you to use the whole 64-bit result. Also, it doesn't require SSE 4.2 for normal City Hash. There is an (incompatible) variant, CityHashCrc, which requires SSE 4.2 and produces a longer hash, but you can ignore that if it's inappropriate for your needs.
Mar
30
comment Using EC2 instance as main development platform
@GrandmasterB: No monthly fee? You mean electricity doesn't cost money where you live? And maintenance of your home server takes you zero time?
Mar
8
comment Is Functional Programming possible in Java?
@ThorbjørnRavnAndersen: What makes you think that "functional programing" is defined by "lazy evaluation"? It seems an odd example to pick...
Mar
5
comment How do you update copyright notices?
What's the point in putting a year in the copyright notice if that year has no relation to the content which the copyright notice attaches to?
Feb
26
comment Do job postings exaggerate their requirements?
Programmers love to think that programming is somehow fundamentally different to other intellectual jobs. But it isn't. Experience does correlate with skill in programming, though of course it's not a perfect correlation because there are other factors at work too. And do you really think that lawyers and doctors are all the same? That they all work equally hard and have equal aptitude and the number of years they've spent on the job is the only thing that differentiates them?
Feb
24
comment Password hashing and support to your user
I would also note that revealing plain-text passwords that users have set (in fact, storing passwords in plain-text at all) is, in my opinion, hugely worse than giving customer support the ability to directly change user passwords.
Feb
24
comment Password hashing and support to your user
I agree that this is a big security hole. And I agree that it may be the most appropriate solution. It does however seem incredibly silly for customer support to have to temporarily change the customer's email address to reset that user's password: if you're going to let customer support reset passwords, just let them do it directly.
Dec
15
comment What does CR mean in version numbers?
Interesting. I've only ever seen "release candidate" before, never "candidate release".
Sep
19
comment Functions with side-effects in Delphi/Pascal
Odd, then, that the SysUtils.DeleteFile function in Delphi returns a boolean in exactly the way that the OP suggests. And clearly the System.Random function can't be much use if it returns the same value every time.
Sep
19
comment Functions with side-effects in Delphi/Pascal
let us continue this discussion in chat
Sep
19
comment Functions with side-effects in Delphi/Pascal
@JohnFisher: I have no problem with DeleteFile throwing an exception on failure. My argument was with your attempt to somehow enforce a distinction between an exceptional and non-exceptional failure, without some application-specific rules (clearly such rules are easy to think of, for example "failure because the file doesn't exist is non-exceptional and can be ignored; failure because you have incorrect file permissions is exceptional and should be reported to the user", but equally clearly, those rules do not belong at the level of a DeleteFile library function itself)
Sep
19
comment Functions with side-effects in Delphi/Pascal
@John Fisher: Whether failure to delete a file is exceptional depends on the context. I believe a better suggestion is to have two functions: TryDeleteFile that returns a success/failure value, and DeleteFile which returns nothing but throws an exception on failure. Then you can use whichever is appropriate in the context, which is not something that is known by those functions.
Sep
19
comment Functions with side-effects in Delphi/Pascal
This is usually a bad idea: now you have two code paths (if CanDeleteFile returns false, and if DeleteFile throws an exception) for one logical situation (the file could not be deleted). And you must handle the possible exception from DeleteFile, because your application is running concurrently with other applications that can modify the file-system (for example, another application could rename the file between your call to CanDeleteFile and DeleteFile).
Jun
29
comment Why do game developers prefer Windows?
@Marcelo: Most gamers have abandoned PC gaming and gone to xbox or playstation.