19
votes
2answers
2k views

Should one always know what an API is doing just by looking at the code?

Recently I have been developing my own API and with that invested interest in API design I have been keenly interested how I can improve my API design. One aspect that has come up a couple times is ...
3
votes
1answer
248 views

When defining directory path, should a trailing slash be included?

Say I'm defining a directory and then including files from it. Is it better practice to do: define('PATH', 'C:/xampp/htdocs/includes/'); require PATH.'header.php; or: define('PATH', ...
0
votes
4answers
141 views

Naming: objectAction or actionObject?

The question, Stored procedure Naming conventions?, and Joel's excellent Making Wrong Code Look Wrong article come closest to addressing my question, but I'm looking for a more general set of criteria ...
2
votes
2answers
299 views

Choosing between words with different spellings for function names

A question has been bothering me for a while: when developing international projects, it is common sense to use English as the reference language since it is the language that the most people ...
0
votes
1answer
373 views

Is C# namespace should be Project-Name?

I am working with multiple websites (freelancer) and a good amount of them I write using C# MVC4. I created a very good boilerplace project that I plan to use on every next starting mvc4 application ...
28
votes
9answers
2k views

Is it considered poor practice to include a bug number in a method name for a temporary workaround?

My coworker who is a senior guy is blocking me on a code review because he wants me to name a method 'PerformSqlClient216147Workaround' because it's a workaround for some defect ###. Now, my method ...
2
votes
7answers
507 views

Should I refactor single letter variables for constructs like pointer/structure names?

And No, i am not referring to single variables in loops or exceptions. Lets say pointer/struct names in large c ,c++ programs . Are there any languages where this type of naming is acceptable or is ...
6
votes
2answers
225 views

Any recognized convention for repository changelogs?

We use TortoiseSVN, but we have no bug tracking system. I know, lame, but beyond my control. There were times when svn wasn't in daily use. Now I've had succeeded in pressing for using it regularly, ...
24
votes
17answers
3k views

Is it a good practice to name the returned variable “result”? [closed]

Is it a good practice to call the variable a method returns with a variable name result? For instance: public Zorglub calculate() { Zorglub result = [...] [...] return result; } Or ...
6
votes
5answers
639 views

What do you call different user roles in software design?

I'm just curious, I'm building a web app with a User model which has role-based permissions. I have the following roles: Visitor (anonymous user) ?? (logged-in user) Moderator Admin I'm having a ...