Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualScarabus2

Posted 03 February 2014 - 09:30 AM

C++ wizardry like that drives me nuts, and is a clear sign of an inexperienced programmer. SeanMiddleditch is totally right.
Clarity always wins over a couple of cycles worth of optimization, especially in a team environment where you aren't the only one dealing with the code. Basically, if you're trying to reduce line counts for arbitrary reasons, then you're doing it wrong. Bit masking and bit shifting is almost always a sign of over-complication.
 


#2Scarabus2

Posted 03 February 2014 - 09:21 AM

C++ wizardry like that drives me nuts, and is a clear sign of an inexperienced programmer. SeanMiddleditch is totally right.
Clarity always wins over a couple of cycles worth of optimization, especially in a team environment where you aren't the only one dealing with the code. Basically, if you're trying to reduce line counts for arbitrary reasons, then you're doing it wrong.

In my experience clear and simple code makes everyone more productive, not just the code. I've programmed C++ for nearly 10 years and I have no idea what "id &= ~NX::COLLISION_ID_IsPickable" even does. (I do, but I'd have to look it up to be sure.)


#1Scarabus2

Posted 03 February 2014 - 09:14 AM

C++ wizardry like that drives me nuts, and is a clear sign of an inexperienced programmer. SeanMiddleditch is totally right.
Clarity always wins over a couple of cycles worth of optimization. In a team environment that kind of code just doesn't fly.

I've programmed C++ for nearly 10 years and I have no idea what "id &= ~NX::COLLISION_ID_IsPickable" even does. (I do, but I'd have to look it up to be sure.)


PARTNERS