naming-conventions

In a web app, is it wise to give log files ".txt" suffix?

I am building a logging mechanism in a web application. Being a Windows man, I tend to give files with textual content the .txt ending. The suffix is automatically registered to be opened in a text editor in any Windows environment, and is just a nice convention. The app is going to be redistributed, and running mostly on Linux, though...

Entity Framework naming conventions for many-to-many link tables

Hi, We are designing a SQL Server database with link tables for many-to-many relations. The question is are there any best practices for naming these kinds of tables for use with the entity framework? Let's say there's a table Customer and Address Then there is a link table between them, what do we call it? CustomerAddress ? Or some...

Easy one: "Posts" are to forums as ? are to chats

Im making a chat in rails. How do you call each "line item"? In a forum they are called posts. Thanks ...

Re-designing 37signals paths to be hosted under a single domain

37signals is a web app company. Some of their applications: basecamp, to manage projects highrise, to manage contacts backpack, like a wiki they use different domains for each application (basecamphq.com, highrisehq.com, etc) in basecamp, this is the address of a particular comment for a post in a project of my company (acme) https:...

How to host different applications without subdomains in Heroku?

I would like to have different applications under the same domain using Heroku. Because of the name of the domain, I would like to access the applications using folders (mydomain.com/app) instead of using subdomains (app.mydomain.com), is this possible? Thanks ...

Is it good practice to name variables differently when defining more than one function?

For example, in this simple function where fun1 takes as input two numbers, adds them together and passes them to function 2 for printing the output. var1_in is local to each function, so is it OK to use the name var1_in in both functions, or is it better practice to call them different things? fun1 <- function (var1_in, var2_in) { va...

Define a verbose name for an entire Django model

I want to create a model named Model. I'm pretty sure this isn't allowed, so I'm forced to use some other term for the model name. Let's say I call it Mdl. However from the user perspective, I want to still refer to the table as Model. Is there a way to define a verbose name for the entire model Mdl the same way you can for model fie...

Naming booleans

If I only want to check if something is impossible or not (i.e., I will not be using something like if(possible)), should I name the boolean notPossible and use if(notPossible) or should I name it possible and use if(!possible) instead? And just to be sure, if I also have to check for whether it is possible, I would name the boolean pos...

What are some Maven project naming conventions for web application module?

When creating a project with the webapp archetype in Maven, they subtly advise not putting any Java source in the webapp project by not including the "src/main/java" folder. What do you name your Maven projects? project-webapp for the project that contains the JSP, CSS, Images, etc. project for the project that contains domain specific...

why do java programmers like to name a variable 'clazz' ?

I've seen lots of codes have declaration like Class clazz , where does this originate from ? Is this some kind of convention ? I think 'clazz' is not even an English word , has no meaning at all , how can so many programmers name a wrong name coincidentally ? ...

What is the role/responsibility of a 'shell'?

Hi, I have been looking at the source code of the IronPython project and the Orchard CMS project. IronPython operates with a namespace called Microsoft.Scripting.Hosting.Shell (part of the DLR). The Orchard Project also operates with the concept of a 'shell' indirectly in various interfaces (IShellContainerFactory, IShellSettings). No...

How to avoid using the same identifier for Class Names and Property Names?

Here are a few example of classes and properties sharing the same identifier: public Coordinates Coordinates { get; set; } public Country Country { get; set; } public Article Article { get; set; } public Color Color { get; set; } public Address Address { get; set; } public Category Category { get; set; } This problem occurs more frequ...

What's the word for "Enable/Disable"?

When I want to comment code about control Enable/Disable and when I want to discuss with people about the control Enable/Disable, I really hope there is actually a word to it instead of typing or saying "Enable/Disable". Currently I use the word EnDisable, what is the real word of it? ...

What does X mean in EAX,EBX,ECX ... in assembly?

Google doesn't show the result, Anyone knows? ...

How are operators called which affect the first operand instead of 'return' something?

Hello, everyone! I'm talking about operators which not return a value but modify (overwrite) the first operand. Example in pseudo-code: add := return op1 + op2 increment := op1 = op1 + op2 Given this mapping schema: add -> increment subtract -> decrement What could possibly be the names for other operators? multiply, d...

yii model tbl_* createds TblUserController and tblUser View

I am trying to follow loosely I might add the blog tutorial It is probably because I am working of the svn trunk. I call the sql tables tbl_user tbl_role etc as described in the tutorial but the controller ends up to be TblUserController and the view folder is called tblUser tblRole. In the tutorial only the models take the table prefix...

Consultant "branding" problem

Where I work, we employ a consultant to do a considerable amount of work for us to hold us over until we can hire/train more staff. He has been working with us for quite a long time now, and he has always had this strange habit of leaving his initials on EVERYTHING he touches, as if its his sort of branding or advertising. And by everyth...

What should the name of this class be?

Naming classes is sometimes hard. What do you think name of the class should be? I originally created the class to use as a cache but can see its may have other uses. Example code to use the class. Dim cache = New NamePendingDictionary(Of String, Sample) Dim value = cache("a", Function() New Sample()) And here is the class that need...

Naming convention when casually referring to methods in Java

Is there a Java convention to refer to methods, static and otherwise, any specific one or the whole overload, etc? e.g. String.valueOf - referring to all overloads of static valueOf String.valueOf(char) - specific overload, formal parameter name omittable? String.split - looks like a static method, but actually an instance method M...

Object Naming without Hungarian?

Mostly because of reading this site, I'm trying to move away from Hungarian Notation. Or I guess the improper (system) Hungarian. I can figure out a better way to name most data types, but I don't know what to do with objects. What would be a good naming convention for objects? I use objRS for recordsets now. Would I just use rs? ...