Let's say you have a Fortran 90 module containing lots of variables, functions and subroutines. In your USE statement, which convention do you follow:
explicitly declare which variables/functions/subroutines you're using with the , only : syntax, such as USE [module_name], only : variable1, variable2, ...?
Insert a blanket USE [modul...
Im new to NHibernate, the configuration aspect of it has always seemed overly onerous to me. Yesterday, I came across the Auto Mapping features of Fluent NHibernate and was suitably impressed.
To educate myself, I set myself the challenge of attempting the 'Getting Started First Project' (http://wiki.fluentnhibernate.org/show/GettingSta...
Learning ruby. I'm under the impression that boolean attributes should be named as follows:
my_boolean_attribute?
However, I get syntax errors when attempting to do the following:
class MyClass
attr_accessor :my_boolean_attribute?
def initialize
:my_boolean_attribute? = false
end
end
Apparently ruby is hating the "?". Is...
Is there a python convention for when you should implement __str__() versus __unicode__(). I've seen classes override __unicode__() more frequently than __str__() but it doesn't appear to be consistent. Are there specific rules when it is better to implement one versus the other? Is it necessary/good practice to implement both?
...
There are a couple of questions on Stackoverflow on whether there is any research or studies into what is the best coding convention/style. That's not what this question is about. This question is about whether there are any studies that research whether there are any advantages, productivity gains or other positive side effects to hav...
Where can I find the most up-to-date official style conventions/guidelines (like how to properly name variables, methods, formatting, etc) for Java?
...
Let's say I own/control a Facebook page where events are posted. I'd like to display these events on another website (In my case, a WordPress blog, but that's not the important part) on an "Upcoming events" page.
What I'm unsure about is: Is the Facebook API usable "externally" like this? I've downloaded the PHP library and got a demo a...
I am trying to modify the Automapping conventsion in Fluent NHibernate to use ".AsSet" for OneToMany mappings, rather than ".AsBag" (which, judging from the hbm files exported, appears to be the default).
I have spent hours pouring over the documentation, and I understand that I need to do a
"AutoMap.AssemblyOf<T>().Conventions.Add<Cu...
I code in Python a lot, and I frequently create classes. Now, I'm not sure if this is good Python form, but I just declare a class in the same file as my main().
class foo {
...
}
I'm wondering if it's good form in Java to do the same?
For example,
class foo {
public static int name;
public static int numPoints;
public s...
As discussed throughout the various MVC questions and blogposts, we know that the ASP.NET MVC project layout is heavy on convention.
I blindly made a sub-directory in the Controllers folder.
This doesn't feel right.
Question: What's the common accepted convention on which directory to store your ViewModels? What are your suggestio...
What do you think is the convention that is mostly used when writing dictionary literals in the code?
I'll write one possible convention as an answer.
...
My application is context-sensisitve and I dynamically build menus for the main window / context/popup, and other places. I typically know if a given menu command will be valid given the current state of the application. Is it better practice to DISABLE/GREY the menu options which currently do not apply OR since I'm generating the menu a...
Hey,
how do you name your groovy scripts? Does it depends on the enviroment? Do you name groovy classes diffent to groovy scripts?
Example:
convert_csv_to_xml.groovy
ConvertCSVtoXML.groovy
...
What do you think?
...
I'm trying to find a resource that shows what default conventions Fluent NHibernate uses with no custom (user) conventions applied.
Thanks!
...
I know that there are questions regarding this same topic, but for HTML. What are some good conventions in regards to using external stylesheets in a Flex app.? How would you break up the stylesheets (names of stylesheets and what they include)?
...
hi,
assume i have a huge input form, which of course representing classes. i need this input to be loaded into the class's instances. this input obviously contains (some very complicated validation) checks, obviously the logic layer contains those input validation already. the question is what am i doing with gui.
should i just, in a v...
Hi,
I want to build a navigation screen, just like installation shields has (next/previous stuff), maybe a bit more sophisticated.. How is this usually done in WinForms?
thanks :)
...
I'm a Linux user looking for a code beautifier which will take files containing C code and format them to specification. Specifically, I'm looking to:
Change all indentations to be 8 spaces
Format blocks of code consistently
Add line breaks consistently
It would be nice if it had both defaults and the ability to customize. I prefer f...
When inserting inline assembler into a function in a C-like language, what is the convention about what registers you're allowed to use for scratch? Is it the compiler's responsibility to save the values of all the registers it needs to save before entering the asm block? Is it the responsibility of the programmer to store the values i...
There are many methods for representing structure of a program (like UML class diagrams etc.). I am interested if there is a convention which describes programs in a strict, mathematical way. I am especially interested in the use of mathematical notation for this purpose.
An example: Classes are represented as sets (fields, properties) ...