naming

Is it ok to use dashes in Python files when trying to import them?

Basically when I have a python file like: python-code.py and use: import (python-code) the interpreter gives me syntax error. Any ideas on how to fix it? Are dashes illegal in python file names? ...

How verbose should names be for Model-View-ViewModel (MVVM) classes and instances?

In general, I prefer to be verbose with .NET class and instance names, but some times (to quote Mike Woodhouse): Over-verbosity tends to conceal syntax, and syntax is important. The first place I felt like I really strayed into the over-verbosity regime is upon implementing the Model-View-ViewModel (MVVM) pattern in Silverlight and...

How can I safely write to a given file path in Cocoa, adding a numeric suffix if necessary?

We want to write to "foo.txt" in a given directory. If "foo.txt" already exists, we want to write to "foo-1.txt", and so on. There are a few code snippets around that try and answer this question, but none are quite satisfactory. E.g. this solution at CocoaDev uses NSFileManager to test if a path exists to create a safe path. However, t...

What are the pros/cons of using "www"?

Duplicate: Should I default my website to www.foo or not? To be quite honest, I'm ignorant as to what the differences between "http://example.com" and "http://www.example.com" are. I typically always use the shorter version, without the "www," just for the sake of the length. But I know (think) that there can be cookie conflicts...

Correct terminology for streaming a file into bytes and back

I have the below methods: public static byte[] ConvertFileToBytes(string filePath) { var fInfo = new FileInfo(filePath); var numBytes = fInfo.Length; var dLen = Convert.ToDouble(fInfo.Length / 1000000); var fStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); var br = new B...

Efficient PHP auto-loading and naming strategies

Like most web developers these days, I'm thoroughly enjoying the benefits of solid MVC architecture for web apps and sites. When doing MVC with PHP, autoloading obviously comes in extremely handy. I've become a fan of spl_autoload_register over simply defining a single __autoload() function, as this is obviously more flexible if you ar...

Word for "settings"

Context (example): In windows explorer in "Folder Options" there is a section called "Advanced Settings" where "settings" is a set of pairs (name : value), e.g. "Do not cache thumbnails" : On "Hidden files and folders" : "Do not show hidden files and folders" What is a correct name for each of those pairs? Is it "setting"? Questi...

What resources do you use to help you decide upon useful names for your classes and methods?

With the exception of this site, what resources are out there that I don't know about for naming of things in your code? We all know that a good name can really focus your understanding of something and aid communication within a team. How do you do it? I'm not talking about naming conventions or what types of names are good or bad. ...

iPhone Application Name Availability

Is there a way to check whether an iphone application name is available to use? Would a search on iTunes and checking to see if there is an existing application already out there be indicative that an iphone application name is available to use or not? ...

Graph taxonomy

Hey, Knowing an edge is defined by both initial and final vertices, How do you call edges coming from and to a vertex ? For now, I name those incoming and outgoing. Thanks. ...

suggestions wanted: what to name a class that represents a real-life "event"

I need to define a class that represents a real-life event -- like a "movie premier", "party", etc. I will be creating a set of DB objects to store the data for each event and define relationships with other data we have (e.g. venue, people, etc.). The word "event" has different meaning in the context of software, so I'd like to name th...

terminology for temporarily diverting data from a stream

It's hard to search for something when you don't know what it's called. I am buffering a stream of data points with a sort of switchable buffer (imagine a garden hose with a valve): in one state ("true"), I let the data points through to their eventual consumer. In the other state ("false"), I retain those data points in a queue until I...

Naming enum types

If you have a set of related words (e.g. Row & Column or On & Off), how do you find the collective word that describes those words? Specifically, how do you name an enum? If I have "Red", "Green" and "Blue", a sensible enum name might be "Color". Values of "On" and "Off" might have a sensible enum name of "Power". But how do I name t...

Thinking about naming of utility classes in java

I am looking for naming guidlines for non functional (utility) extensions of the common classes. In C# I used to use some of this: 1) ListExtensions, too long but with extension methods ListExtensions never appears. Usage is just. var productList = new List(); productList.MyExtendedMehod(); 2) ListHelpers. This was in old C# 2.0 era,...

.NET: Common programming-keywords dictionary

On episode #162 of Hanselminutes they were talking about PowerShell, but more importantly around 04:50 they mentioned that PowerShell used something called The Common Engineering Criteria to have a standard on which words to use when developing new modules for it. I cannot find any concrete dictionary on recommended words through this p...

Why are x86 registers named the way they are?

For example, the accumulator is named EAX and, while the instruction pointer is called IP. I also know that there are bytes called CL and DH. I know there must be a convention to all of the names, but what is it? ...

Why don't files and directories have separate namespaces?

Files and directories could have different namespaces, and still be used to identify specific files, because a file and directory with the same name can be distinguished by being different kinds of things. Primitive field and reference fields could also have different namespaces (in Java), because if a primitive and a reference field ha...

Naming a New Assembly for Application Front End

Hi there, Im after some suggestions for naming a new assembly. The project is a multi-tier rich client app using WPF and we've got good names for all the assemblies (data and business layers) except for the front end. The assembly in question holds the actual user interface and classes for data binding. We want it to be something shor...

What special characters are allowed in T-SQL column name?

I would like to know what special characters are allowed to be used in column name in T-SQL, MSSQL. So I know I can use letters and numbers, but are the other characters that are available without using brackets [] to refer to this column? ...

Any sucess using UI-based program structuring?

Have you ever structured your source code based on your user interface parts? For example if your UI consists of: GridView for showing some properties 3D rendering panel panel for choosing active tools , then you name and group your variables and functions more or less in the following way: class Application { string Properties...