http://www.phparch.com \ December 2018 \ 45
Education Station
Interview Coding Challenges
and MySQL. They have structured
exercises for various algorithms.
- Exercism, https://exercism.io—
includes mentorship. - Project Euler,
https://projecteuler.net—mathe-
matical/computer programming
problems to tackle.
These coding challenges do not aim
to demonstrate your ability to build or
scale-out a website. They’re giving you
the opportunity to demonstrate your
use of PHP as a computer program-
ming language.
Practice
Free Code Camp analyzed thousands
of coding interviews^11 and has several
strategies for getting through the
coding interview.
The article also notes:
Furthermore, no matter what,
poor technical ability seems highly
correlated with poor communica-
tion ability—regardless of language,
it’s relatively rare for candidates
to perform well technically but
not effectively communicate what
they’re doing (or vice versa).
Skill comes with practice. I gladly
recommend finding one or more sites
with coding challenges. Get comfort-
able with the challenges. With practice,
you’ll develop strategies for how to
continue making progress when you
get stuck. You can’t just think about
what you’ll do when you get stuck. You
need to get stuck, repeatedly, and work
through it.
At the same time, practice commu-
nicating your thought process as you
complete the challenge. Talk out loud
to your screen if that’s what it takes!
I’m reminded of the Candidate
Fitness Assessment^12 which is part of
11 analyzed thousands of coding interviews:
https://phpa.me/freecodecamp-interviews
12 Candidate Fitness Assessment:
https://phpa.me/afa-fitness-assessment
the admission process for the United
States Air Force Academy. One of the
six tests is to throw a basketball as far as
you can while kneeling.
It’s a weird position to be in. It’s not
something one would typically do as
part of any sport. You’re on your knees,
with a standard basketball in one hand,
and must throw the ball as far as you
can.
We were informed later (after admis-
sion) that the people conducting the test
can always tell if the person practiced
that motion or not. I had practiced for
months. They want to see the people
who bothered to practice.
Your coding challenges are out there.
Practice! Get comfortable with that
style of writing code. When you’re
presented a coding challenge during
the job interview, show that it’s easy for
you.
A Look Back
Most of the 2018 Education Station
articles have focused on the fundamen-
tals. These are the sorts of skills which
helped me with the various interview
coding challenges I encountered. I am
not convinced this is the right way to
conduct job interviews, but it certainly
does help to be able to pass the coding
challenges!
Right or wrong, fair or unfair, coding
challenges are part of the process. Just
“nail ‘em cold" and keep on movin’ on.
New Direction
I’ve picked a new direction for 2019;
it’s a logical next step from “the funda-
mentals.” I’ll be starting a new column
focused on understanding how PHP
works under the covers.
PHP internals has traditionally been
a difficult topic. As PHP matures, fewer
people see a need to write new exten-
sions. The need has shifted to the PHP
internals and maintaining existing
extensions.
We all use PHP. We should replenish
the well of people who contribute to
PHP itself as open source.
Consider. We all know how the web
server request and response work. We
understand the distinctions between
server-side and client-side processing.
We know about apps and web services.
We know about database interactions.
What about PHP itself? What does
PHP do as it processes and executes
your code? Is it a virtual machine like
the Java Virtual Machine (JVM)? Is it
efficient, or inefficient, to pass a large
array into a PHP function or method?
(I believe the answer is, “it depends.”)
The PHP compiler/interpreter and
extensions are written in C (with a
small portion of C++). Most of us don’t
have the necessary C programming
experience. That makes it difficult for
most of us to consider contributing to
the PHP project itself.
The plan for 2019, then, is to bridge
that gap. Let’s learn how PHP works
under the covers without expecting
extensive C knowledge.
Take, for example, how PHP splits
your source code into tokens. The PHP
Code Sniffer^13 uses these tokens to
check your code for compliance with
various coding standards. Next month
we’ll take a close look at the Code Sniffer,
see how it works, and begin to see how
PHP examines your code’s structure.
I’ll see you in January with a brand-
new year and a shiny new column. See
you there!
13 PHP Code Sniffer:
https://phpa.me/squizlabs-codesniffer
Ed Barnard had a front-row seat when the Morris Worm
took down the Internet, November 1988. He was teaching
CRAY-1 supercomputer operating system internals to analysts
as they were being directly hit by the Worm. It was a busy
week! Ed continues to indulge his interests in computer
security and teaching software concepts to others. @ewbarnard