coding style guide?

  • Permalink
  • submit to reddit
  • Email
  • Follow


Does anyone have a nice programer's coding style guide I could call my
own. You know, indents, capitals, mixed case, mixed nuts, assorted?

I don't like the all little characters in the SAS manuals.
0
Reply Obomonomical 9/21/2010 10:41:31 PM

See related articles to this posting


On Sep 21, 5:41=A0pm, Obomonomical <davidmwrig...@gmail.com> wrote:
> Does anyone have a nice programer's coding style guide I could call my
> own. You know, indents, capitals, mixed case, mixed nuts, assorted?
>
> I don't like the all little characters in the SAS manuals.

Folks have written papers about this with lots of rules about
placement of statements, (executable vs information), indentation and
the rest.  The problem is they usually don't know enough SAS to
understand when the rules don't work.  I find them mostly useless.

To me if you indent consistantly with a format that "somehow" reveals
the structure of the program or data step then it's all good.  I can't
define it but I know it when I see it.

What do you mean by your last statement?  "I don't like all the little
characters..."

0
Reply data 9/22/2010 1:41:42 PM

On Sep 21, 5:41=A0pm, Obomonomical <davidmwrig...@gmail.com> wrote:
> Does anyone have a nice programer's coding style guide I could call my
> own. You know, indents, capitals, mixed case, mixed nuts, assorted?
>
> I don't like the all little characters in the SAS manuals.

I agree with data _null_.  Define your own, and use it consistently.
Many editors will assist.
0
Reply SD_Data_Dude 9/22/2010 3:34:12 PM
comp.soft-sys.sas 130763 articles. 26 followers. Post

2 Replies
306 Views

Similar Articles

[PageSpeed] 59


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

VHDL Coding Style Guide
Hello, A (new) draft of my (old) VHDL Coding Rules is available at : http://www.alse-fr.com/archive/VHDL_Coding_eng.pdf "Power users" may have adopted different rules, or would discard some. You can send feedback at "info" at the website above. Best regards, Bert Cuzeau Hi Bert, Your coding style is nice but I have few questions... C_13) RTL : In the process above, every signal assigned inside "rising_edge" must be initialized in "if Rst". Not necesarily . Suppose I have a FIFO wtih depth of 8 , then its enough to Reset the first sequent...

[9fans] Style guide for clean code
Hello again all! Does Plan9 offer a style guide similar to the kernel normal form found in the BSD operating systems; http://en.wikipedia.org/wiki/Kernel_Normal_Form? Since Plan9 people dislike GNU and BSD because their code is bloated, and like themselves because their code isn't, I was wondering if they had a structured approach to their simplicity. Also, maybe a few paragraphs on the disadvantages of bloated code similar to http://www.wmii.de? Thanks a lot, Kyrre On Wed, Oct 11, 2006 at 09:46:28AM +0200, Kyrre Nyg?rd wrote: > Does Plan9 offer a style guide similar to ...

The Sense of Coding Guidelines or Programming Style Guides?
Hi, within our department we suggest to use coding guidelines for the implementation of testware. There is an infinite discussion about whether coding guidelines are needed or not and what there contents should be. For example, the coding guidelines regulate the naming of variable names. Advocates of such rules say that this is absolutely needed. Objectors would prefer to do the coding completely to their own taste. They come up with the opinion that programming is an art in which the programmer should have the freedom to do whatever she likes. What are your opinions? Are there any reference...

Writing code for wx vs "wxWidgets Programmer Style Guide"
If I write code that will be a part of wxWidgets library, but the code breaks General C++ Rules (http://www.wxwidgets.org/develop/standard.htm), especially: 1. Don't use C++ Templates .... 5. Don't use STL the code could be a part of wxWidgets in future? On Sat, 18 Nov 2006 11:06:20 +0100 Dominik Tyniw <dominik.tyniw@gazeta.pl> wrote: DT> If I write code that will be a part of wxWidgets library, but the code DT> breaks General C++ Rules (http://www.wxwidgets.org/develop/standard.htm), DT> especially: DT> DT> 1. Don'...

general coding issues
Hi all, since I'm just a 'handicraft'/beginner or so, could anybody provide me with some (rough) hints, about how to enhance the code here: http://calmar.ws/tmp/cal.html Cheers and thanks a lot calmar -- calmar (o_ It rocks: LINUX + Command-Line-Interface //\ V_/_ http://www.calmar.ws calmar schrieb: > Hi all, > > since I'm just a 'handicraft'/beginner or so, > > could anybody provide me with some (rough) hints, about how to enhance the code > here: - why are these {{{ thingies there? ...

Can this code be cleaned up? / Good coding style ?
Dear developers, I am used to Mathematica, but have got a new job which uses Matlab, so I am now re-writing my scripts to Matlab. Can someone look at these 2 scripts and tell me what I should do different, so they utilize Matlab manners ? Lots of love, Louise %----- script1-------------------------------------------------------------- tic % parameters perturb = 10e-3; dist = 10e-3; delta = 0.2; % or 0.0 delta_omega = 0.008; delta_epsilon = 0.0010; [Omega, Epsilon] = meshgrid(0:delta_omega:2.0 , 0:delta_epsilon:0.25); f = @(t,x) [x(2); -x(3)^2*(1+x(4)*cos(t))*x(1) - delta*x(2); 0; 0]; colo...

good style guides for python-style documentation ?
(reposted from doc-sig, which seems to be mostly dead these days). over at the pytut wiki, "carndt" asked: Are there any guidelines about conventions concerning punctuation, text styles and language style (e.g. how to address the reader)? any suggestions from this list ? </F> > (reposted from doc-sig, which seems to be mostly dead > these days). > > over at the pytut wiki, "carndt" asked: > > Are there any guidelines about conventions concerning > punctuation, text styles and language style (e.g. how > to addre...

coding style
#include <iostream> using namespace std; int main(){ cout<<"Hello world"<<endl; return 0; } OR #include <iostream> int main(){ std::cout<<"Hello world"<<std::endl; return 0; } I've been told many times that the second option is better coding practice, but I fail to understand why. I mean, if one had to move to another namespace in the program, then only then do you have to change. The first option, imo, makes the code more readable. What is this forum's opinion? -- [ See http://www.gotw.ca/resources/...

Coding style
Which is better? lst = [1,2,3,4,5] while lst: lst.pop() OR while len(lst) > 0: lst.pop() PTY enlightened us with: > Which is better? > > lst = [1,2,3,4,5] > > while lst: > lst.pop() > > OR > > while len(lst) > 0: > lst.pop() The first one. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? Frank Zappa On 17 Jul 2006 08:56:34 -0700,...

Style Guide?
Quick question. Is there a official or unofficial Ruby Style Guide floating around anywhere? Thanks. James Edward Gray II James Edward Gray II wrote: > Quick question. Is there a official or unofficial Ruby Style Guide > floating around anywhere? Thanks. http://www.rubygarden.org/ruby?RubyStyleGuide Note that this page has a mix of advice for source code formatting (e.g., "use CamelCase") and development techniques (e.g., "Chop input."). But handy either way. James On Thu 26 Aug 2004 at 05:01:38 +0900, James Edward Gray II wrote: > Quick que...

Coding Style
This is more a style question, so I know it's subjective (I hope I don't start a religious war!), but I'm also interested to know if there is a trend. I've noticed that a lot of C++ code shuns lower case and basically tries to keep variables and functions with as short a name as possible (or at least one that's easy to type). Functions might be like this: getval() ldcfg() But I've also noticed some code that uses underscores between words: get_val() ld_cfg() And here's the part I'm curious about. It seems to me that more recent code seems to have the Java...

Coding Style
I thought it might be fun to run a simple vote to discover the most preferred spacing style for a simple if statement with a single, simple boolean test. By my count, there are 32 possible variations for this case. Here is a complete list. AA: if ( a > b ) AB: if ( a > b) AC: if ( a >b ) AD: if ( a >b) AE: if ( a> b ) AF: if ( a> b) AG: if ( a>b ) AH: if ( a>b) AI: if (a > b ) AJ: if (a > b) AK: if (a >b ) AL: if (a >b) AM: if (a> b ) AN: if (a> b) AO: if (a>b ) AP: if (a>b) AQ: if( a > b ) AR: if( a > b...

code with style
Hi all, I was trying to calculate the max number of variations of the columns on an array. I have worked the code on this way. It works fine and I get what I need but I think that still my style is not too perl. The idea is that I have to take the length of the array in order to operate by columns and then go for every element of the row. I am not fully convinced with my style, and I guess this can be done in a simpler way. Any suggestion? Thanks for your help P use strict; my @a = ( [qw/1 2 3 4 5/], [qw/2 2 3 2 4/], [qw/3 1 2 4 5/] ); my $var = maxi...

my coding style
------=_Part_8362_9999763.1138558936898 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi all, i was wondering if my rubyness has increased above the 'total newbie'-level.. so below is some code in my coding style, can you give comments on how it looks and how effective it is. greetings Dirk. def find_factors( number ) factors =3D [] 1.upto( number ) do | factor | if number%factor =3D=3D 0 factors << factor end end factors end def find_prime_numbers( max ) factor_list =3D [] 1.upto( max ) do | ...

Coding Style
I've read, that I should avoid code-lines of more than 80 characters width - to keep the code readable when read from the command line (is command line the right term? i mean this non-graphical environment, like DOS uses it). How important is that in practice? On Mon, 03 Nov 2003 18:02:41 GMT, Angus Parvis <angusparvis@spamyourself.gmx.at> wrote or quoted : >How important is that in practice? People on programming teams fight over it. I suggest having some standards to referee. Younger folk with wide screens like long lines. Older folk with small screens like shorter lines...

Style of coding
Consider the following styles, which one is preferred.... 1. public class Person { private String name; public void setName(String n) { this.name = n; } } 2. public class Person { private String name; public void setName(String n) { name = n; } } and...if in case of static .... 3. public class Person { private static String name; public static void setName(String n) { Person.name = n; } } 4. public class Person { private static String name; public static void setName(String n) { name = n; } } 1 or 2 3 or 4 ? howachen@gmail.com writes: >Consider the fol...

Coding style
Hi, Does anyone happen to know what will the following (software) code will look like after going through a synthesis tool? I was told, back in the school, that never use *HDL as a software language and should have a block diagram or data path before coding. But it seams that more and more people trust the synthesis tool rather. // Verilog version reg [5:0] offset; // input reg [15:0] we; // input reg [15:0] data_in[127:0]; // input reg [7:0] data_out [63:0]; // output wire [5:0] offset0; // internal logic wire [5:0] offset1; // internal logic .... wire [5:0] offset1...

Coding Style
I am a self taught programmer and over the years have used a coding style that seems to be quite a bit different to what I normally see. I often see code like this: if x then if y then if z then DoSomething end end end I write it: if not x then return if not y then return if not z then return DoSomething In other words I dip out of the method early by chucking out the unwanted cases and then am left with what I want. The code is much more "linear' and thus (to me) more readable and easier to understand. I am not super reli...

Convert to new "Code" style from a now-redundant custom style
Hurrah for the new default style "Code"! Prior to version 6 I used a custom style-sheet with a roughly equivalent style called "InputInitialization". I have a (large) bunch of notebooks using this custom style-sheet. How can I automatically convert my old notebooks from my custom style- sheet (which I no longer need at all) to the new default Mathematica style-sheet, while simultaneously converting all the cells with style "InputInitialization" to cells wiith style "Code"? Is it sufficient to find all instances of Cell[_, "InputInitiali...

Searching for code to get the center section to the webpage "http://www.w3.org/Style/CSS/" to change when the menu item is clicked and code the allows the menu to remain stationary when scrolling
This question is concering website, "http://www.w3.org/Style/CSS/." I notice on the right side of the screen there is a menu. How do you get the center section to change when a menu item is clicked. Also, how do you get the menu to remain stationary when scrolling the screen? What CSS code is used on the above website to get the center session to change and to get the menu to remain stationary. "m. bell" <bellm777@earthlink.net> wrote: >This question is concering website, "http://www.w3.org/Style/CSS/." >I notice on the right ...

prfered style of coding?
Hi, I just wanted to ask which is prefered style of coding...behavioral or structural? Which among the two fit into FPGA easily? Thanks. Behavioral is mainly for testbenches and simulation, structural is the style for implementation on FPGAs/CPLDs/ASICs. bxbxb3 wrote: > I just wanted to ask which is prefered style of coding...behavioral or > structural? If you have got a core of a subcomponent - use it. Somebody has done the work for you and you don't need to do it again unless you try to do it better or you try to expand it. -> structural If you have a huge project -...

Coding style 47654
Hi, Does anyone happen to know what will the following (software) code will look like after going through a synthesis tool? I was told, back in the school, that never use *HDL as a software language and should have a block diagram or data path before coding. But it seams that more and more people trust the synthesis tool rather. // Verilog version reg [5:0] offset; // input reg [15:0] we; // input reg [15:0] data_in[127:0]; // input reg [7:0] data_out [63:0]; // output wire [5:0] offset0; // internal logic wire [5:0] offset1; // internal logic .... wire [5:0] offset15; // internal lo...

Code style question
I stumbled across the following code (in the regex library by Kenneth Parker) and would, out of curiosity, like to know what people think of it: (defun make-anchored-matcher (matchfn) #'(lambda (*str* *regs* *start* *end* *start-is-anchor* *end-is-anchor* *acceptfn* *hooks*) (declare (special *str* *regs* *start* *end* *start-is-anchor* *end-is-anchor* *acceptfn* *hooks*)) (declare (ftype (function (fixnum) t) matchfn)) (catch 'cease-matching (f...

simd-style coding
I've got some code which was written to make use of some integers as vector= s of bits, which deals with only a couple of bits at a time. I'd like to speed it up, and use whole words at a time... similar to how SI= MD coding works. Here's some pseudocode for how the original bit-at-a-time code works: outer_loop_start: advance_lfsr(); old_bits[0] =3D lfsr_lsb(); have_old[0] =3D true; advance_lfsr(); new_bit =3D lfsr_lsb(); i =3D 0; inner_loop_start: next_bit =3D new_bit !=3D old_bits[i]; if( next_bit ) output(new_bit); new_...