Comments are an important part of making code comprehensible to other people, especially when they explain the why– linking lines of code to requirements, specification documents, etc. Karl used to work for a large company that maybe didn’t see comments that way.

So, for example, when you see a line of code like this:

VideoTitle = store.Region

You might be left wondering: why is VideoTitle storing that value? And in an ideal world, maybe a comment would reference the requirement.

Or, for Karl’s team, it might be something more like this:

// John told us that video title comes from the store region field.

Most of the comments were something along the lines of “John told us”. Unfortunately, John worked there a long time ago, and no one currently working there knew who John was, or why he told people to do the things they did.

At least there were comments.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

Remy Porter

Source link

You May Also Like

‘Speedcuber’ Solves Rubik’s Cube In 3 Seconds, Sets New World Record

A 21-year-old from California set a new world record by solving a…

Our Infamous “Matching Outfits” Photo

“It’s 1964 and mom is pregnant with baby number 5 in this…

Internet responses that nailed it like no others (29 Photos)

Elizabeth Source link

We Wanted A Nice Photo With All Our Relatives, But Someone Had Other Ideas

“Our perfect family photo shoot was only a little hampered by my…