Better Practice, Dec. 2018

(singke) #1
2 \ December 2018 \ http://www.phparch.com

Editorial


Write For Us
If you would like to contribute,
contact us, and one of our editors
will be happy to help you hone
your idea and turn it into a beauti-
ful article for our magazine.
Visit https://phpa.me/write
or contact our editorial team
at [email protected] and get
started!

Stay in Touch
Don't miss out on conference,
book, and special announcments.
Make sure you're connected with
us.


Download the
Issue's Code
Archive:
http://phpa.me/Dec2018_code

Better Practice


Oscar Merida


Practice and more practice are the
keys to adopting modern software
engineering practices. It doesn’t matter
if you’re using WordPress or Drupal to
manage website content, trying to learn
unit testing, get hired, or seeking better
ways to manage date and time data—
there’s always an opportunity to learn
how to do it better. This issue rounds up
articles on each of these topics to help
you deepen your problem-solving skills.
Late in college, I discovered a love
of sport—in particular, soccer. Don’t’
worry; I’m not here to make you a fan.
I’d plan with my friends to head over to
the Virginia Tech drill field to play pick
up games on Friday afternoons or the
weekend. Unlike many of them, I did
not start playing at an early age or play
on an organized team where I learned
from a coach. Like man programmers,
I’m a self-taught soccer player. Each
time I played, I tried to focus on one
skill like dribbling or trapping the
ball. Slowly, through grad school, I got
better. That’s not to say I was particu-
larly skilled, but I could hold my own
on the field and occasionally surprise
the better players.
Similarly, reading about the practices
in this issue only gets you so far—and
in fact, not very far at all. So as we head
into a new year, I urge you to try out one
new practice in your projects. Whether
they’re small changes to how you code
or new additions—like testing—to your
workflow, nothing beats practical, real-
world experience.
First, Andrea Roennig shows how
to best utilize Custom Post Types in
WordPress. If you’re only using the post
and page content types which come
by default in WordPress, you’re miss-
ing out on using structured content to
manage your content more easily. If
you’re looking to use Drupal 8, Michael
Miles walks through The Flexibility of
Drupal 8. For most scenarios, there’s
more than one way you could solve
them. He’ll describe the approaches


you can use in Drupal and highlight
the pros and cons of each one. In How
to Learn PHP Unite Testing with Katas,
David Hayes explains how he uses katas
to learn and improve his Test-Driven
development skills. His article focuses
on using PHPUnit, but if you prefer
another testing tool, you can still use
this advice. If you’re only using the
strtotime and date functions to deal
with date and time calculations, head
over and read It’s About Time by Colin
DeCarlo without delay. He’ll explain
how computers are set up to measure
time, calculate dates, and deal handle
time zones with the DateTime class
while pointing the gotchas you need to
be aware of.
The end of the year brings some
turnover in columnists. Chris Tanker-
sley closes out The Dev Lead Trenches
with advice on Creating a Culture. He
explains why an organization’s culture
is essential and what you can do as a
development lead to foster a positive
culture. James Asgrim will be handing
the reigns over to a new contributor
for Community Corner. He highlights
the milestones of the year in Commu-
nity Review 2018. If you’re looking
for a new position heading into the
new year, check out Edward Barnard’s
Education Station: Interview Coding
Challenges. He shares his experiences
dealing with coding challenges in his
job hunt before turning his focus on
a new column for 2019. Joe Ferguson
concludes his look at how to distribute
your code in Producing Packages, Part
Three by writing about how to manage
issues, pull requests, and contributions
to your library. Eric Mann’s Security
Corner looks at how and when to use
hashes in Adventures in Hashing. It’s
more than just for passwords. To close
out the year, Eli White looks at gree
in finally{}: The Seven Deadly Sins of
Programming: Greed. See how you can
resist the temptations which lead to
wasteful behaviors.
Free download pdf