• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

good programming practice

OogyWaWa

Senior member
i can program, a bit, but i'm not afraid to admit that i doubt i have very good programming practices. obviously there are things like good comments, clean code, good documentation (if needed), version control, etc. but, i've never been formally taught these things and i'm curious as to where i should start.

basically i just want to develop proper practices and learn about how complex programs are developed in teams and what not.

anyone know of some good guides/videos? also, any links to some simplistic projects with easy to understand source code would be helpful.

also, i'm interested in getting in on some kind of development team to get some hands on with this. obviously it can't be any too complex like OS, audio software, etc. any help in this department would also be appreciated 🙂
 
You might just want to start poking around some open source project and trying to get involved. Talk with the guys active with it and let them know about your capabilities and see if they have somewhere for you to fit in.
 
Originally posted by: ObscureCaucasian
You might just want to start poking around some open source project and trying to get involved. Talk with the guys active with it and let them know about your capabilities and see if they have somewhere for you to fit in.

any ideas on some more simplistic projects? i'm thinking i might be able to help code a plugin or some small insignificant portion of a larger project... doubt I could help with anything too complex 😛
 
Originally posted by: ObscureCaucasian
Originally posted by: degibson
One thing you can do is follow a style guide. Personally, I follow this one as close as I can:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

You can find a lot more here:
http://www.chris-lott.org/resources/cstyle/

One thing I'm not clear on is they discourage, if I interpret correctly, a statement like

using namespace std;

So what is the "correct" way of doing this... at least according to google?

std::cout<<"Like this perhaps?";
 
Originally posted by: nkgreen
Originally posted by: ObscureCaucasian
Originally posted by: degibson
One thing you can do is follow a style guide. Personally, I follow this one as close as I can:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

You can find a lot more here:
http://www.chris-lott.org/resources/cstyle/

One thing I'm not clear on is they discourage, if I interpret correctly, a statement like

using namespace std;

So what is the "correct" way of doing this... at least according to google?

std::cout<<"Like this perhaps?";

This happens to be one thing Google and I disagree on.
using namespace ftw;
 
Originally posted by: ObscureCaucasian
Originally posted by: degibson
One thing you can do is follow a style guide. Personally, I follow this one as close as I can:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

You can find a lot more here:
http://www.chris-lott.org/resources/cstyle/

One thing I'm not clear on is they discourage, if I interpret correctly, a statement like

using namespace std;

So what is the "correct" way of doing this... at least according to google?

I think it depends on where the namespace is declared. For example, I'm completely opposed to putting a using namespace declaration in a header file. It almost completely destroys the reason for having namespaces in the first place. However, at a more local level, I see no problem with using the using namespace declaration.
 
What you need is a good software engineering book. Style guides are just helpful for actually programming. On huge projects, you actually spend a lot less time programming than anything else. Most of the time is spent on design and documentation, which have little to nothing to do with the programming language being used.

There are many aspects to an ideal software project. There's definitely too many for me to list here in this post... But I will say that the one that REALLY stuck with me is that all software must be designed FOR TESTING. Every unit of software must be testable, complete with a test plan and even in-house testing tools. Robust, fault tolerant, and error-correcting code is also a big one.

I highly recommend this book. Sure it's a bit expensive, but you'll really open your eyes to a LOT. It's totally worth the 50 bucks!
 
How much "process" is appropriate depends on the size of the project and the size of the team.

With a small project and 1-2 people you might just need WiinZip as your version control system.

With a small team and rapid / iterative development doubling or tripling your development time to make every bit of code testable may not be practical.

As projects and teams get larger, better version control and automated testing pay off more and more, as does enforced coding styles so anyone can easily read anyone else's code.
 
Originally posted by: slugg
But I will say that the one that REALLY stuck with me is that all software must be designed FOR TESTING. Every unit of software must be testable, complete with a test plan and even in-house testing tools. Robust, fault tolerant, and error-correcting code is also a big one.

I vouch for this methodology. You have no idea how many projects I've been involved in that got delayed just because of this issue !!
 
Back
Top