Doesn't bug #4 eliminate supposed bugs #2 and #3? The intent for the author of the code would have produced bugs #2 & #3, however since that isn't the case, there are only really 3 bugs.
Either way, this rant doesn't really offer any insight on the programs context, and what the author should have done. Nothing to learn here folks.
PS - Can we stop using "epic fail" and other internet-fanboy like colloquialisms in our titles please?
Can we stop using "epic fail" and other internet-fanboy like colloquialisms in our titles please?
It's not our title. That is the title of the post. So for example, if Joel's next article is entitled "The Cat Pictures Were an Epic Win For Suzie's New Startup", then that's a completely valid HN submission title.
That the line has a bug where it doesn't do what the programmer (apparently) intended yet correcting it so it does would cause two other bugs to appear, makes it worse not better, I think.
Also the rant does say what the program should do - if it can't write to the folder, raise an exception and alert the user.
Also, whether there is something to learn depends on who you are and what you know, it's not an objective property of the information you're looking at.
PS - "epic fail" is very descriptive and fear-of-being-called-a-fanboy-peer-pressure shouldn't be what stops you from using it.
I disagree with the quintuple counting...it's not really an epic fail. It seems relatively minor to me. Consider this: if the program is running as a user that doesn't own that directory, it can't change the permissions on it. This dude is saying it's okay if the OS is giving the program the access to change the permissions on the directory, but it's not okay to use that power to write to a directory. "Imagine if it were My Documents" is silly- don't run the program as root...
In any case, the polite hacker thing to do would be to set the permissions back to what they used to be after you write the file. That's why they invented the variable name temp.
[+] [-] simianstyle|17 years ago|reply
Either way, this rant doesn't really offer any insight on the programs context, and what the author should have done. Nothing to learn here folks.
PS - Can we stop using "epic fail" and other internet-fanboy like colloquialisms in our titles please?
[+] [-] palish|17 years ago|reply
It's not our title. That is the title of the post. So for example, if Joel's next article is entitled "The Cat Pictures Were an Epic Win For Suzie's New Startup", then that's a completely valid HN submission title.
[+] [-] jodrellblank|17 years ago|reply
Also the rant does say what the program should do - if it can't write to the folder, raise an exception and alert the user.
Also, whether there is something to learn depends on who you are and what you know, it's not an objective property of the information you're looking at.
PS - "epic fail" is very descriptive and fear-of-being-called-a-fanboy-peer-pressure shouldn't be what stops you from using it.
[+] [-] mattmcknight|17 years ago|reply
In any case, the polite hacker thing to do would be to set the permissions back to what they used to be after you write the file. That's why they invented the variable name temp.
[+] [-] ojbyrne|17 years ago|reply
[+] [-] Hexstream|17 years ago|reply
[+] [-] alain94040|17 years ago|reply
Any volunteers?
[+] [-] BFalkner|17 years ago|reply
public string SomeProperty { get { SomeOtherProperty.Something = whatever; return someProperty; } }
[+] [-] dpeq|17 years ago|reply
[+] [-] cabalamat|17 years ago|reply