Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quicksort set
#31
im not a big fan of the . in variables or subs but this almost proves aga's point.

Code:
Hmm... Why is:

qsort.linked.string.lowstart array1(), array2(), a.max%

easier ot shorter to write than:

qsortLinkedStringLlowstart array1(), array2(), a.max%

Code:
Llowstart
EVEN MEN OF STEEL RUST.
[Image: chav.gif]
Reply
#32
Tongue
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#33
And, just one more thing!

Going back to the beginning, where the use of CLS at the very beginning is "attacked", I would like to state that I have almost always put CLS as my first line of code! The reason? Well, when I am coding, I like to see what my screens look like, before proceeding, so, I run my half-finished code repeatedly. And, every time it runs, I want to see the first screen as the first screen, so, I just make sure the CLS is the first line...or thereabouts...

Then, whenever my program runs, I want to make sure the screen is cleared, first of all, of any previous stuff that is there.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#34
Funny thread... welcome back aga.

Regarding starting code with CLS...I've done the same for years. My comments were made as I was learning c++ as a second language, which made me more aware of style than when I was a BASIC-only atuned. However I like the c++ principal of putting code close to where it's needed, and I've adoped that concept to QB.

It's interesting to read mine and Aga's original posts...I still agree with every point I raised, and apparently Aga holds firm to his views...which shows...style is subjective...at the end of the day "does it work" and "does it work for you" is orders of magnitude more important than "does someone else think it looks good". This is true because in programming, nobody looks at code...they use programs. Aga should be honored that so many people have looked at his code.

Aga...how do you defend your decision not to indent block for-next loops...see my comment in original post about your loop counter being confused. Do you see no value to visually isolating sections of code that dis-ambiguate? Or...do you still subscribe that code should be read like a novel?

Cheers all.


BTW...my modification to Aga's code is MUCH better than his original ugly-as-sin code ;-)
Reply
#35
I see no value. I was going to write a whole essay about it just now, but right now I cannot argue against you without going back to preference, and you cannot argue against me without going back to your preference.

Your argument could be:
Well, it tells you where an inner loop is and what size and order it is.

My argument is:
It's harder to read a single mechanism in the code that does X, and often the nesting of a loop is not equal/separatable to its function.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)