php[architect] November 2018

(singke) #1

44 \ November 2018 \ http://www.phparch.com


finally{}


The Seven Deadly Sins


of Programming: Sloth


Eli White


This month I touch on the sin of sloth in programming.
I mean, I don’t want to. I want to go flop on the couch
and watch some TV and relax. However, I’ll avoid the
sin itself and manage an article this month.

In general, I believe that slothful-
ness in programming can often be a
good thing. It’s good to look for “easy
answers” and to not re-invent the wheel
each time. Laziness can be a virtue
when it pushes us to automate repeti-
tive tasks and re-use solutions from the
community. Don’t let your pride be trig-
gered instead. Find what works, make it
happen, move on.


However, there are situations where
this becomes a problem and they
primarily concern education. Program-
ming is a topic that continually changes.
New technology is created while ways
of interacting with older technology
are explored. Laziness and sticking
to familiar tools will keep you from
growing as an expert. “If all you have
is a hammer...” you’ll go down a road
where you try to make every problem
look like a nail.


Now, to many programmers this isn’t
a problem as they are always seeking
out the latest ideas, voraciously trying


to learn everything that is new. However,
often, the opposite happens. We find
ourselves set in our ways. We know how
to do a task the way we’ve done for years.
So we continue to work on that task in
that one fashion. Why put effort into
learning a new way?

My ambition is handicapped by my
laziness


  • Charles Bukowski


Hopefully, this is not a problem that
you, the reader, will have experienced.
Since you subscribe to this tome of
knowledge each month, you already

understand the need to put in that
extra time learning more about your
profession.
Make sure that this carries into your
development practices. Don’t dismiss
that new idea just because you’d have to
go figure it out. Take the time to at least
mentally explore those new paths. Read
an article, attend a meetup, or attend a
conference session.
Do what you need to continue your
education and don’t just fall into a rut.
Would you want to go to a doctor who
had learned everything 10 years ago
and hasn’t ever studied newer medi-
cines and treatments? No! So why
should you be writing code the way you
did 10 years ago?

Eli White is a Conference Chair for php[architect] and Vice
President of One for All Events, LLC. He’s ready to go check
out that couch now. @EliW
Free download pdf