conventions

How do you USE Fortran 90 module data

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...

Fluent NHibernate. Auto Mapping and Conventions

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...

Ruby: Boolean attribute naming convention and use.

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...

Python __str__ versus __unicode__

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? ...

Research into Advantages of Having a Standard Coding Style

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...

Official Java Code Guidelines/Conventions

Where can I find the most up-to-date official style conventions/guidelines (like how to properly name variables, methods, formatting, etc) for Java? ...

Outside access to Facebook events

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...

setting Fluent NHibernate Conventions - using Set for OneToMany

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...

is it good "form" to declare new classes in the same file ?

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...

ASP.NET MVC: convention for organizing ViewModels

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...

Python bracket convention

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. ...

Is it better to disable or omit context/popup menu options?

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...

Groovy-script naming conventions?

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? ...

Fluent NHibernate Default Conventions

I'm trying to find a resource that shows what default conventions Fluent NHibernate uses with no custom (user) conventions applied. Thanks! ...

Flex External Stylesheet Conventions

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)? ...

A very basic question about the way GUI integrated with the Logic classes

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...

How should I do a navigation screen in WinForms?

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 :) ...

Code formatter / beautifier for C on Linux for Emacs user

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...

Inline Assembler: What scratch registers can be used?

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...

Mathematical notation of programming concepts

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) ...