I couldn't really call myself a programmer yet, but I've been trying my hand at Scheme. SICP, of course :P.
Hah, reading through this thread I was going to post the exact same thing! Yeah, I just look at some C++ coding and I just wanna make sweet, sweet love to it... Err, I mean, yeah C++ is hawt. I also like C#, especially how in Microsoft Visual Studios it has error checking for you. Lord knows I stare at C++ code for huge amounts of time looking for where my error is, when it turns out I missed a semi-colon or curly brace somewhere. But those are about the only languages I know!
I can't believe no one mentioned PERL which is my favorite (for small tools, I prefer C/C++ for large applications).
I used to play with BASIC when I was in middle school but never had the patience or discipline to get into more advanced stuff. I often copied code from library books on this PDA: Still one of my favorite devices to this day. Faster and more useful than the original Palm Pilots, and the CPU is a Z80!
you know, sometimes I think I am the only programmer that does this: Code (Text): void functionname() { functioncall(); // comment } as opposed to this: Code (Text): void functionname() { // comment goes on its own line functioncall(); }
This. Most of the times I put comments on the same row of the instruction if I want to comment line by line, but some other times I put generic comments on the lines before, especially when I want to describe a section of code and not a particular line. Either way it doesn't matter since 99% of the times I don't comment my stuff at all :v:
Same here. Most of my programs have a title, date, revision, and quick rundown of the main variables. But that's it.
I comment the hell out of my code. I comment both ways. If I need to get a little detailed with my comments I comment above the function/variable. Otherwise it's beside the function/variable. My language of choice is still C++. In the past month I dabbled a LOT in DirectX10 and HLSL shaders and I really enjoy those as apposed to the little experience I had with OpenGL and GLSL. It was a terrible experience. Then again, it was OpenGL 3.1. Who knows how much better OpenGL 4.0 is.
I comment my code the same way Dude does. And when I do write code, I comment the shit out of it. :v:
What? 3D isn't any harder than 2D in OpenGL. And I hope you aren't talking about immediate mode, that thing is completely gone in GL3 (and D3D10 doesn't have it either). In before somebody mentions XNA.
"real programmers never comment, if it was hard to write it should be harder to read and impossible to change" xD
Real programmers don't write code, they use butterflies to write the binary directly into the hard disk.
I use both commenting styles (if I comment), depending on certain things. Also, I put braces on their own line. I absolutely HATE the other style (of putting the starting brace in the same line as the block start). Let me say it again, I HATE IT!
Me too. Only exception: Code (Text): if (something) { //code }else{ //code } I don't like to waste three lines for an ELSE. edit: yes this is php
This, this, fucking THIS! It looks so much cleaner, more organized. [am I the only one who indents a-la C++ when scripting XHTML/CSS/javascript?]