debugging - What's the toughest bug you ever found and fixed? - Stack Overflow
What's the toughest bug you ever found and fixed?
http://googleresearch.blogspot.ro/2006/06/extra-extra-read-all-about-it-nearly.html
int mid = low + ((high - low) / 2);
int mid = (low + high) >>> 1;
https://github.com/ValveSoftware/steam-for-linux/issues/3671
http://www.slashgear.com/steam-on-linux-bug-can-delete-all-users-files-16364945/
It only happens when you try to move the Steam directory, located at ~/.local/share/Steam by default, somewhere else, like on a more spacious storage device, and then try to symlink (like "create shortcut") it to the original location.
rm -rf "$STEAMROOT/"* could be evaluated as rm -rf "/"* if $STEAMROOT is empty
STEAMROOT="$(cd "${0%/*}" && echo $PWD)"
STEAMDATA="$STEAMROOT"
This probably returns as empty which mean: rm -rf "$STEAMROOT/"* is the same ass rm -rf "/"*.
Yeah, they kinda need a readlink in there.
STEAMROOT=$(readlink -nf "${0%/*}")
My Hardest Bug
This is a very common problem for buggy Java programs that have different versions of the same class on the classpath. The JVM will take the first instance of a class it finds on the classpath, so some orders of the classpath will work and others won't.
The solution is to eliminate any duplicate classes from the classpath and to enforce this in your build process. We use this Maven plugin to do it: https://github.com/ning/maven-duplicate-finder-plugin
My favorite technical interview question is to ask the candidate about the worst bug they ever wrote. I let them choose their own definition of "worst", and see if they choose something that was hard to debug, or caused a lot of trouble or was just something they thought was a dumb mistake.
Read full article from debugging - What's the toughest bug you ever found and fixed? - Stack Overflow
What's the toughest bug you ever found and fixed?
http://googleresearch.blogspot.ro/2006/06/extra-extra-read-all-about-it-nearly.html
int mid = low + ((high - low) / 2);
int mid = (low + high) >>> 1;
https://github.com/ValveSoftware/steam-for-linux/issues/3671
http://www.slashgear.com/steam-on-linux-bug-can-delete-all-users-files-16364945/
It only happens when you try to move the Steam directory, located at ~/.local/share/Steam by default, somewhere else, like on a more spacious storage device, and then try to symlink (like "create shortcut") it to the original location.
rm -rf "$STEAMROOT/"* could be evaluated as rm -rf "/"* if $STEAMROOT is empty
STEAMROOT="$(cd "${0%/*}" && echo $PWD)"
STEAMDATA="$STEAMROOT"
This probably returns as empty which mean: rm -rf "$STEAMROOT/"* is the same ass rm -rf "/"*.
Yeah, they kinda need a readlink in there.
STEAMROOT=$(readlink -nf "${0%/*}")
My Hardest Bug
This is a very common problem for buggy Java programs that have different versions of the same class on the classpath. The JVM will take the first instance of a class it finds on the classpath, so some orders of the classpath will work and others won't.
The solution is to eliminate any duplicate classes from the classpath and to enforce this in your build process. We use this Maven plugin to do it: https://github.com/ning/maven-duplicate-finder-plugin
My favorite technical interview question is to ask the candidate about the worst bug they ever wrote. I let them choose their own definition of "worst", and see if they choose something that was hard to debug, or caused a lot of trouble or was just something they thought was a dumb mistake.