What does Larry’s style look like?

Sorry this took so long – work’s been really busy lately. Clearly I’m not enough of an egotist[1]  to believe that my style is in any way the “one true style”, but over the course of writing the series on style, I realized that I’ve never written down my current coding style, and I think…

29

I need to apologize

Sorry about leaving things hanging, I’m currently on vacation, that’s why the ‘blog’s not been updated. I’ll be back on Monday the 29th and continue where things left off.  

14

What does style look like, part 8 (the end)

So over the course of the past week, I’ve spent some time talking about various things that make up a program’s “style”.  There’s one final aspect of programming style that I want to touch upon, and that’s “Literate Programming“.  Literate programming got its start with Donald Knuth’s seminal book “Literate Programming“.  The entire TeX project…

19

What does style look like, part 7

Over the course of this series on style, I’ve touched on a lot of different aspects, today I want to discuss aspects C and C++ style specifically. One of the things about computer languages in general is that there are often a huge number of options available to programmers to perform a particular task. And…

37

What comes after Quaternary?

Valorie asked me this question today, and I figured I’d toss it out to everyone who runs across this post. She works in a 5/6 split class, and they’re working on a unit on patterns and functions.  They’re ordering the data into columns, each of which is derived from the information in the previous column….

21

What does style look like, part 6

Previously in the series, I’ve touched on indentation and commenting, The next aspect of “style” that I want to talk about is variable (and function) naming conventions. Upon reflection, I hungarianized the code way too early in the series, it properly belongs in this article, so lets go back to the beginning, and see what…

14

What does style look like, part 5

Continuing the discussion of “style”.. The other day, I talked a bit about how comments affect the “style” of a piece of code. Today, I want to talk  about the headers that accompany each routine and file. And yes, every routine and file needs to have a block comment header around it.  If you don’t…

13

What does style look like, part 4

Continuing the discussion of “style”.. Yesterday, I showed the code reformatted into “BSD” style format, which looks like: #include “list.h”main(C cArg, SZ rgszArg[]) {    I iNode;    I cNodes = atoi(rgszArg[1]);    I cNodesToSkip = atoi(rgszArg[2]);    PNODE pnodeT;    PNODE pnodeCur;     InitNodes(cNodes);    for (iNode = 2, pnodeCur = PnodeNew(1); iNode <= cNodes ; iNode++)     {        pnodeT…

31

What does style look like, part 3

When we last left the code we were looking at, it looked like: #include “list.h”main(C cArg, SZ rgszArg[]) {    I iNode, cNodes = atoi(rgszArg[1]), cNodesToSkip = atoi(rgszArg[2]);    PNODE pnodeT, pnodeCur;     InitNodes(cNodes);    for (iNode = 2, pnodeCur = PnodeNew(1); iNode <= cNodes ; iNode++) {        pnodeT = PnodeNew(i);         InsertNext(pnodeCur, pnodeT);         pnodeCur = pnodeT;…

23

What does style look like, part 2

In my previous style post, I took a piece of code from  Robert Sedgewicks algorithms book, and “Hungarian-ized” it.  The routine currently looks like: #include “list.h”main(C cArg, SZ rgszArg[])  {    I iNode, cNodes = atoi(rgszArg[1]), cNodesToSkip = atoi(rgszArg[2]);    PNODE pnodeT, pnodeCur; InitNodes(cNodes);    for (iNode = 2, pnodeCur = PnodeNew(1); iNode <= cNodes ; iNode++)      {…

12