The team I work with attended the SuperComputing Convention last November, but it was geared far more towards hardware then application and algorithms. We would like to find a convention for us to attend that caters towards the algorithmic and implementation side of things.
We have found this convention, but I haven't seen any press on ...
I'm brand new to MVC and, as a learning exercise, I'm trying to re-write an old application as an ASP.NET MVC application. I'm a little unclear about some conventions which the question Action Naming Conventions only partially covers.
Lets say I have two controllers: JobController and ClientController. Both of the controllers are goin...
Say I have this table:
Person table
--------------
PersonId
Address table
------------
AddressId
PersonAddressId
where PersonAddressId is PersonId and the foreign key. Is there any type of database violation in renaming the foreign key? It can become very confusing to work with when they have different names.
...
Maven 2 uses a standard directory layout for projects, documented here:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
What I'm wondering is: are there recommended conventions for other projects besides the plain-vanilla Java library, JEE and WebApp projects? Specifically, where to place...
I have a User.create action that provisionally registers a new user and sends an email with a generated password. What is the most Rails-like way to complete that action? I want to do everything exactly right from now on. No more nonsense. This time I'm serious.
I'm thinking these are the options...
Create a view called login_email_se...
Outside of benefiting from Adaptive Rendering for alternate devices, does it ever make sense to write all of this code:
writer.WriteBeginTag("table");
writer.WriteBeginTag("tr");
writer.WriteBeginTag("td");
writer.Write(HtmlTextWriter.TagRightChar);
writer.WriteEncodedText(someTextVariable);
writer.WriteEndTag("td");
writer.WriteEndTag(...
Edit: Since this question was asked a lot of improvement has happened in the standard Python scientific libraries (which was the targeted area). For example the numpy project has made a big effort to improve the docstrings. One can still argue if it would have been possible to address these issues continuously right from the start.
I ...
I've been nesting my viewdata classes inside my controllers and, as their numbers grow, I'm starting to ask myself if this is a good idea. Then again, something about polluting the /Views and /Controllers directories with these things seems off.
Is there a convention I'm missing here? Maybe a /ViewData directory? idk, what are some good...
I'm just trying to understand where the label 'container' came from. Anyone know?
Seems like many things could be called 'containers'.
...
In pretty much all applications that have a menu bar, some of the items have an ellipsis (...) after them, and some don't. Is there a well known convention on when to put that ellipsis there and when not to? When do you do it? Do you do it?
I have looked at various windows applications, and this is what I have come to:
Ellipsis
Menu...
Following the directions from Spring Source and the book Spring in Action, I am trying to set up Spring MVC in a way that minimizes xml configuration. However according to Spring Source this is how you set up the ControllerClassNameHandlerMap
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>
...
I've seen these two things lately and I'm a bit confused.
var blah = new MyClass() { Name = "hello" }
and
var blah = new MyClass { Name = "hello" }
Whats the difference? and why do they both work?
Update:
Does this mean that if i have something in a constructor which does some computation that i would have to call the first one??
...
What is a trunk, branch and tag in subversion and what are the best practices to use them.
What tools I can use for subversion in Visual Studio 2008?
...
I'm trying out pylint to check my source code for conventions. Somehow some variable names are matched with the regex for constants (const-rgx) instead of the variable name regex (variable-rgx). How to match the variable name with variable-rgx? Or should I extend const-rgx with my variable-rgx stuff?
e.g.
C0103: 31: Invalid name "settin...
I use various code checkers for Java development but I haven't used one for HTML,. CSS, Javascript.
Do any exist. That flag bad practices or similar tool.
...
I looked through some code and noticed that the convention was to turn pointer types like
SomeStruct*
into
typedef SomeStruct* pSomeStruct;
Is there any merit to this?
...
I have this class:
public class GenericEventArgs<T> : EventArgs
{
public GenericEventArgs() : this(default(T)) {}
public GenericEventArgs(T value) { Value = value; }
public T Value { get; private set; }
}
And this event handler delegate for it:
public delegate void GenericEventHandler<T>(object sender, GenericEventArgs<T>...
What do you think about one line functions? Is it bad?
One advantage I can think of is that it makes the code more comprehensive (if you choose a good name for it). For example:
void addint(Set *S, int n)
{
(*S)[n/CHAR_SIZE] |= (unsigned char) pow(2, (CHAR_SIZE - 1) - (n % CHAR_SIZE));
}
One disadvantage I can think of is that it...
I started working with C# recently and I noticed that the convention seems to be that the variables start with a capital letter along with the methods.
Is this the only language that does this and why?
For instance:
Page Page = new Page();
Page.Action();
In other languages, you'd see instead:
Page page = new Page();
page.action();
...
I like the pattern I saw in this blog post (http://marekblotny.blogspot.com/2009/04/conventions-after-rewrite.html), where the author is checking to see if a table name alteration has already been made before applying a convention.
public bool Accept(IClassMap target)
{
//apply this convention if table wasn't specified with WithTabl...