Image RSS Feed Latest Screens
icons icons icons
Blog RSS Feed Report abuse Latest Blog: Four steps to improve your code!

0 comments by Herr_Alien on Sep 24th, 2009 digg this super bookmark


This is especially valid when the code you're writting will be used/extended by others.Here's what you should do if your plan is to piss off your co-workers:

  • Do not document parameter values.  That will definitely cause grief among other developers. Imagine them debugging through the code, trying to figure out what did they do wrong. I mean when invoking one of your methods, one thing that the will do when that method fails is to ask themselves if, perhaps, the parameters they used on your method were wrong. Imagine their face turning red, then blue, then green, sweeping through all the colors of the rainbow when finding that if , or switch-case, or whatever hardcoded construct you placed there. YAY!
  • Hardcode naming rules for input/output file names. That's another good one. Place that string comparison/splitting/parsing for file names in the most hidden spot in the CPP code. Then, when the work mate uses your function, they'll never figure out why their parameter/config/input file is not loaded.
  • Do not write anything resembling documentation in the header files. Heck, if possible, also remove the name of the parameters. I mean if it doesn't make any use for the compiler, why bother?
  • Write multiple statements in one line. This comes really handy, and will allow you to see the entire function in one screen. Don't bother about making it easy for debugging, your code is so good there will be no debugging. So, remember, always do this:

               if(condition) return; // this is good!

        instead of:

              if(condition) // this is bad!
                  return;

And these steps will make you one of the most popular developers in your company!

Media RSS Feed Latest Video
Groups
AvP2 Fortress

AvP2 Fortress

Fanboys & Clans group Invitation only

This is the group of AvP2 modders responsible for developing the AvP2Fortress mod. If you whish to join us, please send us an e-mail.

Modding Social Club

Modding Social Club

Official group with 60 members, open to all members

Want to get social? Want to play older mods that lack a constant player base? We have the solution the premiere social club on ModDB, designed to help...

Comments  (0 - 10 of 15)
GokuSaiyan123
GokuSaiyan123 Oct 31 2009, 8:07am says:

any of you play dragon ball Z for the pc can someone help me out

+1 vote     reply to comment
Ninjadave
Ninjadave Oct 3 2009, 3:34pm says:

I write code too.
One time it worked.

+1 vote     reply to comment
Herr_Alien
Herr_Alien Oct 5 2009, 7:17am replied:

Well, in my case I try to make a living through writting code, lol :)

The 'I write code' is actually related to this:
Computergear.com

+1 vote     reply to comment
Camo_Ninja
Camo_Ninja Jul 5 2009, 12:48am says:

hey ya doing? I was wondering if you can help me with a little problem about the project saviour mod. I posted on the prolem in the project saviour page here on MODDB.

can you please take a look and ee if you can help me?

+1 vote     reply to comment
Play0n
Play0n Apr 16 2009, 1:34am says:

Thx for making AVP2 Fortress and keeping the game alive

+1 vote     reply to comment
Herr_Alien
Herr_Alien Apr 16 2009, 4:29am replied:

You're welcome! We have a lot of fun doing it too :)

+1 vote     reply to comment
KOM
KOM Jan 24 2009, 12:15pm says:

hey thanks for watching the mod

+1 vote     reply to comment
Herr_Alien
Herr_Alien Jan 30 2009, 4:08am replied:

You lost me a bit :)
Anyway, I really like the game, and I do enjoy modding it. As for this particular project, it was needed.

I whish you guys good luck! I will definitely play your mod when it is released.

+1 vote     reply to comment
SinKing
SinKing Oct 14 2008, 9:12am says:

I wish it would say "Seamen", instead of "Airmen" in your signature.

Nice go with releasing AvP2 Fortress, any new projects on the horizon, yet?

+1 vote     reply to comment
Herr_Alien
Herr_Alien Oct 14 2008, 11:59am replied:

Well, there is one project I'm working on. Since Sierra will pull the plug on the AvP2 master server, we're now focused in modding AvP2 to use a different and brand new master server.

That takes all my time at the moment.

On the more casual modding side, AvP2 Fortress will get some new maps, but again, developed by Windebieste. There's another guy making an interesting 1Flag-CTF map, there's a good chance of adding that one too.

+1 vote     reply to comment
Post a Comment

Only registered members can share their thoughts. So come on! Join the community today (totally free) and do things you never thought possible.

Level
Avatar
Avatar
Offline Since
Nov 25, 2009
Country
Romania Romania
Gender
Male
Age
27
Member Watch
Track this member
Statistics
Activity Points
1,744
Rank
127 of 63,593
Watchers
1 member
Time Online
1 month
Site Visits
6,749
Profile Visitors
6,591 (10 today)
Contact
Homepage
Herralien.co.cc
Private Message
Send Now
Email
Members Only
Yahoo
garone80
Sigma
Sigma
friends since Jul 15, 2008
Ninjadave
Ninjadave
friends since Oct 03, 2009
FJS
FJS
friends since Jun 01, 2008
foxatphoenixlabs
foxatphoenixlabs
friends since Jul 15, 2008