Skip to content

A change in coding style

I’m a verbose guy when it comes to code. The compiler doesn’t care and it’s easier for me to read later on down the road. I’ve changed my style over the past few months, it started at Pelco because I was confusing folks with a particular syntax. I must admit, it even confused me on occasion.

When checking pointers I used to do this.

if (NULL != ptr)

That was confusing. I’ve since switched my tune back to a tried and true method of removing the NULL !=, like this

if (ptr)

Much easier for most to understand. I do, however, still check for explicit FALSE and NULL as the case may be, because I believe it to be a bit more clear. Here’s what that looks like.

if (NULL == ptr)

or

if (FALSE == value)

There is a statement some don’t like, that I love, and probably won’t switch away from. The ternary operator.

something = (value) ? value1 : value2;

My brain just likes it.

Categories: Development.

Tags:

Comment Feed

No Responses (yet)



Some HTML is OK

or, reply to this post via trackback.

Inderal 10mg
Toprol generic recall
Natural substitute for plavix
Lipitor best price
Isosorbide mononitrate 60 mg
Buy compazine
Generic statin drugs to replace lipitor
Zithromax without prescription
Generic keflex pills
Flagyl natural substitute
Amoxicillin 500 mg for dogs
Tetracycline no prescription
Ceftin order online no prescription
Spy surveillance
Ultram er 200mg dosing
Ultram onine no rx
Canadian pharmacy ultram
Ultram no prescription needed
Order ultram from discount pharmacy
Ultram for sale online
Online overseas pharmacy ultram
catch ur cheating spouse
signs your spouse is lying
spy monitoring
how to catch a man
what to do if you catch your boyfriend cheating
is it possible to spy on a cell phone
signs your guy is cheating
spy monitoring
what are the signs of a cheating girlfriend
buy nolvadex in the uk
nolvadex cheap
order tamoxifen online
tamoxifen online uk
order cialis without prescription
pharmacy tramadol utram
generic cialis
buy tramadol online
buy synthroid online
order tramadol online
buy vibramycin
buy toradol
buy lidocaine
buy celebrex
buy flagyl
lasix furosemide
canadian family pharmacy
cialis online
tramadol 100mg
nexium generic
buy nolvadex
how to catch a cheating wife
generic viagra
Canadian Family Pharmacy
buy nolvadex