|
Marc Clifton wrote:
I think it's been about 10 years since I last printed out code.
I'm a bit of a dinosaur when it comes to programming. I still like having a printout of the code for when I'm debugging or reworking a section of code. I never have liked reading code on a screen... to easy to miss something.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Marc Clifton wrote:
I think it's been about 10 years since I last printed out code
The only time I print code anymore is when I'm debugging a large piece that takes up more than 3-4 screens. At that, I only print the fragment I'm concerned with. I'll print single page snippets of things occasionally to refer to, if I don't want to clutter the screen with an open window just for reference.
Software Zen: delete this;
|
|
|
|
|
They actually can...
using System.Text;
Encoding ascii = Encoding.ASCII;
|
|
|
|
|
They can my friend!
using cn = System.Console;
C# is good! ![Poke tongue | ;-P](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_tongue.gif)
|
|
|
|
|
Marc Clifton wrote:
I think it's been about 10 years since I last printed out code.
Sometimes you have no choice. In my project group, when it comes time for a peer review, we print the code and pass out packets.
Oh, yeah, and Visual Studio tends to eat up half your screen space w/ all of its docked windows anyway - it's amazing, my screen keeps getting bigger, but the number of columns of text on screen just stays the same! ![Wink | ;-)](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
Stephen Quattlebaum wrote:
my screen keeps getting bigger, but the number of columns of text on screen just stays the same!
That's exactly what I've been saying for the last 5 years. But I've gotten even. I've an extra monitor now. Muhahahahah!
--
Frivolous Theorem of Arithmetic: Almost all natural numbers are very, very, very large.
|
|
|
|
|
Michael P Butler wrote:
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
'War' is what gave you the right to quote General William Sherman!![Confused | :confused:](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
Marc Clifton wrote:
nothing past column 80
Are you using VS.NET?
cheers,
Chris Maunder
|
|
|
|
|
Chris Maunder wrote:
Are you using VS.NET?
Yes. On a 17" wide screen laptop with 8 point font. The rightmost column is #200. And yes, I know about the margin guide feature, which is turned off, as are horizontal and vertical scroll bars and that stupid selection margin. (if you can't navigate with a keyboard, what is the point of being a programmer, eh?) I want to see code. Period.
I'm curious why you ask, though.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
You're hard core mate. You're well hard :P
cheers,
Chris Maunder
|
|
|
|
|
I normally try to stay within the first 80 columns. It requires creative indenting in C# and Java I've noticed which itself may be a fun activity.
But, I've come to the conclusion that C/C++ needs < 80 columns while all other languages may very well use more than 80 columns. Mostly because files in those languages will never be edited or view through a tty, only in a GUI environment
--
Frivolous Theorem of Arithmetic: Almost all natural numbers are very, very, very large.
|
|
|
|
|
It's got to be both really. Writing 'readable' code is not as easy as it sounds. One programmers coding may use techniques that are unknown to whoever is reading the code.
The old VB 'DataField & ""' is one technique that is obvious to me but not to anybody who doesn't know what it does!
|
|
|
|
|
that programmers can write. More specifically, that they can express the concept of the code in English. And since a lot of programmers can't even express their concepts properly in code, how the heck are they going to say it in English?
Marc "Sarcasm 'R Us" Clifton
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Amen, brother. Comments should describe 'why' or 'how' you are doing something. Most programmers know the 'why' and the 'how' intrinsically, but can't or won't express it verbally in their comments.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote:
Comments should describe 'why' or 'how' you are doing something.
This is a really good point. Describing "what" you're doing is often nothing more than psuedo-coding the code itself. But describing why something is done in a particular way, or how it is being done, is much harder because it often involves the surrounding context. Where does one start in describing why? I have this problem myself when trying to explain the why of the AAL. It's darn hard, but worth the effort. On many occasions, after explaining the "why" to myself, I end up saying to myself, "gee, that's a stupid reason!".
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
In my case, the 'why' and 'how' are usually pretty easy. The software I work on does process control (we build high speed ink jet printers[^]), so the why's and how's are usually related to something the hardware is doing. A dilettante would say that, if you're having trouble stating 'why', maybe you need to think about the approach (the 'how') a little more. My how's usually are limited to difficult algorithms.
As an example, I needed a wildcard matching routine. I found one on the C/C++ User's Journal web site. Unfortunately, the routine wasn't usable in its original state. It wasn't well structured (multiple exits), didn't use our naming conventions, and didn't provide a couple of minor behaviors I wanted. I ended up rewriting the routine. For documentation of my version, however, I included the code for the original in a block comment, including the web address of the original article.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote:
so the why's and how's are usually related to something the hardware is doing.
That's cool. I love working with hardware. In some ways, it makes programming easier because the hardware creates a bounded space in which the software must function. Sort of like communicating with a child--you have to use small words and simple sentences. (OK, that's a really off-the-cuff analogy).
Gary Wheeler wrote:
however, I included the code for the original in a block comment, including the web address of the original article.
Nice. I've been doing that with the AAL articles (as far as weblinks, authors, etc) for code that I use that I've found on CP. Personally, one of the things I find even more appealing than writing the articles is the connections that form from people posting links to things that they've encountered. Very enriching.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Marc Clifton wrote:
Sort of like communicating with a child
You ought to see one of our CMYK machines acting like a non-potty-trained toddler. Why is it the yellow head always lets go first?
Software Zen: delete this;
|
|
|
|
|
Good point.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
Programmers than can express themselves in english are worth 10-15k more a year. ![Laugh | :laugh:](https://www.codeproject.com/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
...for tranfering the responsibility from the writer to the reader.
"What? You don't understand my code?- Learn reading, it's all commented"
But a comment make any code running...
void main(void)
{
// char *pszText = new char[2];
// pszText[3] = '?';
}
...yeah, it works ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
That is one use for commenting.
void main(void)<br />
{<br />
<br />
}
I think my mod is good
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
I've tested it, it works. Cool stuff. Comments are really powerful !
|
|
|
|
|
Comments are a waste of time.
Future developers will either understnad it or not.
If they can't understand it without comments, then that's actually good, because you don't wan't some 3rd rate hack messing with your masterpiece.
Understandable code, is subjective.
Understandable to who, and for what purpose.
What really matters is it can build without problems, then it can run without BSODs.
Too much emphasis is place on this stupid unstandability notions.
What really nmatters is if the creator can keep the whole train of thought as he/she types away.
Having to add comments etc, is only going to ruin productivity.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
You are obviously trolling but this is still worth mention; Any fool can get compiled code, it is at run-time that counts.
Paul Watson Bluegrass Cape Town, South Africa
Crikey! ain't life grand?
|
|
|
|