Three guidelines that make sense when handling files and paths.
- Never Use Backslash in File Paths
- Don’t use File.pathSeparator
- Converting slashes from the user
Three guidelines that make sense when handling files and paths.
I collect nuggets of wisdom on various topics. Recently I have been going over the topic of Agile software development; what really matters? Below is a list of 26 key principles to guide an agile software development team. Continue reading
Programmers often make the mistake of assuming that an exception being caught will be an exception that they have seen during testing. Programmers often underestimate the large variety of exceptions that might occur. Based on this misunderstanding, programmers will make poor assumptions about what exceptional situation might be occurring, and then jump to an invalid conclusion about the problem the code has encountered, and as a result produce a poor, inaccurate error message. This can easily be avoided if you understand proper usage of exceptions. Continue reading
Guideline #14 is “Never Catch and Continue” referring to the bad habit of catching an exception and then continuing processing as if nothing ever happened. I ran across some particularly bad examples in the example code at one of the Apache projects. This is an example of what NOT to do. Continue reading
In the last post, I clarified the Purpose of Error Reporting is to give user/administrators information to solve the problem that they have encountered. This post outlines a way to gather the best information together for that error message. Continue reading
Error messages are part of every user experience, but too often these messages are poor, cryptic, and insulting. Too often programmers do a half-hearted attempt at writing error messages, mostly because they mistakenly assume that users will never see them. Too often programmers misunderstand the potential that results from writing correct error message. Error messages can be the key to usability. Error messages can help train users, and guide administrator. All you have to do is understand the purpose of error reporting. Continue reading
I wrote up these cheat notes about 10 years ago, and I still use them today. Just a short, brief, introductory instructions to using the CVS source management system. Essentials that you need to get started. Continue reading
You know the problem: you write a method for one purpose and give it a name. Later, it become useful for something else, or maybe you change it slightly to accommodate another use, or maybe some names change elsewhere making the current name obsolete. You have all seen code where someone says that the name “is historical” or traditional. This post is to say with conviction that that history is NOT interesting, and get rid of it. Get a good IDE and change those names to be correct. Continue reading