Slashdot is powered by your submissions, so send in your scoop


Forgot your password?

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).


Comment: Re:Ockham's Razor tells me.... (Score 1) 963

by richardchaven (#24712905) Attached to: Why Corporates Hate Perl

Golly, I read Knuth, and Kernighan, and McConnell. Perhaps the introduction to Knuth will help you understand the difference between algorithms and implementation. Take a look at Steve Gibon's beautiful assembler code if you want a clear example of low-level code with high readability.

If clear code is "old-fashioned", then get my horse and carriage ready. Ad-hominem aside, yes, you CAN read that COBOL code even if you never used COBOL; is that a bad thing?

Good code is good code: COBOL, C, Algol, Basic, or Ruby.

I think Hungarian notation is worse than using the words "Button", "List", "Array", etc. because it is a shorthand, and we don't need to speak in shorthand. Understanding what the user wants and what our fellows mean and "What in hell were they thinking when they wrote this code?" is enough of a challenge.

You think that

void initcheckers(void) {
    int i,j;
    for (i=0;i7;i++) {
        for (j=0;j7;i++) {

is more readable than

void initializeCheckersBoard(void)
    int ColCounter, RowCounter;

    for (RowCounter = 0; RowCounter NUMBER_OF_ROWS; RowCounter++)
        for (ColCounter = 0; ColCounter NUMBER_OF_COLS; ColCounter++)
            SpotPieces[RowCounter][ColCounter] = '';
            SpotColors[RowCounter][ColCounter] = (RowCounter + ColCounter) % 2; // alternate colors

You can use the wrong word or poor spacing to make a bad example of any system; the bottom line is not impressed by knocking down straw-men.

BTW: Did you spot the bug I introduced in your version of the function? How easily would a new maintenance coder spot it?


It is masked but always present. I don't know who built to it. It came before the first kernel.