Also, if anyone is well versed in Actionscript3 and is willing to answer a few questions that would be great too. Had to pick it up recently and I've run into a few snags here and there. C++ is my preferred language but you learn what the job requires.
Programming Best Practices?
Blogs > Phyre |
Phyre
United States1288 Posts
Also, if anyone is well versed in Actionscript3 and is willing to answer a few questions that would be great too. Had to pick it up recently and I've run into a few snags here and there. C++ is my preferred language but you learn what the job requires. | ||
CommanderFluffy
Taiwan1059 Posts
expected some drills in BW or something i start my programing classes this year in college so i cant help you on your search. sorry | ||
EtherealDeath
United States8366 Posts
| ||
haduken
Australia8267 Posts
I think a good practice is to keep things simple and commented but that's pretty much a given if you program. There are quite a few code optimisation, algorithm blah blah things that you do but they contradict eachother sometimes so it's really a philosophical choice at times. Personally i hate programmers that write their code and treate it like a fucking poetry by make shits unneccary complicated to look cool but maybe it's because i'm not on their level yet. | ||
il0seonpurpose
Korea (South)5638 Posts
| ||
orca
Israel469 Posts
kinda off topic, but i recommend you do things like Google Code jam (I'm doing some problems from there right now actually.) http://code.google.com/codejam/contest/ | ||
Phyre
United States1288 Posts
| ||
haduken
Australia8267 Posts
I sometimes find that OO gurus design their codes way tooo abstract to make any use of the advantage of OO. Stir clear of OO methodologies that are specific to one language. such as multiple inheritance under C++ (Could be wrong here, can't remember exactly) If your design is good then another programmer will pick it up and say hey i can do this! instead of saying hey this guy is leeeet. or maybe that's your purpose. | ||
Mastermind
Canada7096 Posts
Its important to just be really consistent in your code. Structure all your functions and classes in a very consistent format. Make sure all your tabs and braces are always done the same way. Commenting is good, but pointless comments just get in the way. Explain things that may not be easy to figure out, and dont comment anything else. Im surprised you didnt learn a lot of things specific to OOP in college. Im not really sure what to say there. Just look for a good online reference for that, or buy a quality book if you really want to learn a lot about it. | ||
MasterOfChaos
Germany2896 Posts
If you can get "Code Complete" from a library you should read it, I think it is more or less what you want. And don't overcomplicate things(Which in my experience if common CS students which mainly worked with Java). Often the simple solution is faster to write, easier to understand and if the need should arise it can still be refactored into something more complex. And practice, practice practice. For example I like writing small games. Commenting is good, but pointless comments just get in the way. In most cases you just have to commentate the plugin interfaces not the implementation itself. Often if you feel the need to commentate code it is better to split it into several well named helperfunctions. But of cause if there are certain traps/unusual things you do a comment is usefull. Assertions are usefull, so you can make the things your code relies on explicit instead of implicit and they are automatically checked which helps with debugging. | ||
VIB
Brazil3567 Posts
These should help you: http://en.wikipedia.org/wiki/Code_conventions http://en.wikipedia.org/wiki/Programming_style http://en.wikipedia.org/wiki/Indent_style | ||
Scorch
Austria3371 Posts
Keep your stuff readable! Use meaningful variable names. Write comments on what's happening if a step is not immediately obvious, but not too many comments either. Try your best to make it so that you (or also someone else!) can revisit your code at a later time, understand it and change stuff with minimum effort. Environment: I'd strongly suggest using a good IDE like Eclipse which helps you greatly by auto-generating getter and setter methods, auto-completion, debugging, syntax-highlighting etc. Use a dual monitor system if possible so you can have Firefox, documentation or what-have-you open at all times and look things up without having to switch around. Health: Increase the font size to 14 or so to reduce the stress on your eyes. Invest in a good chair if you sit in front of the computer all day. Take a break from time to time, go out on the balcony or out the door for a couple of minutes to relax your eyes and take a breath of fresh air, and drink a glass of water. | ||
| ||