Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stitcher.io Blog:
A programmer's cognitive load
Jul 03, 2017 @ 12:23:49

On the Stitcher.io blog there's a new article posted about a programmer's cognitive load and offers some tips to help reduce it, especially when reading code that's new to you.

Whether it's your own code or that of others, when you open a file, you have to take it all in. You need to wrap your head around what's going on, before you're able to write your code. Doing this day by day, it's important to find ways to make this process easy. To try and reduce this cognitive load as much as possible. Streamlining the way you take in code, will allow you to not only work faster and better; but also improve your mental state and mood.

[...] Today I want to share some techniques that can help you reduce this cognitive load while coding. In contrast to some recent advocates of "visual debt", I won't talk about stripping away pieces of your codebase. We'll look purely into the visual aspect: what makes code hard to read and reason about, and how to make it easier.

The tips they article make use of some of the most common features of IDE including adjusting fonts and spacing, using code folding to reduce visual noise and effective naming. Each point has either screenshots or code examples to help illustrate the point.

tagged: programmer cognitive load opinion advice

Link: https://www.stitcher.io/blog/a-programmers-cognitive-load

SitePoint PHP Blog:
How Privileged Are Programmers? Are You a John, Too?
Apr 25, 2017 @ 09:31:16

On the SitePoint PHP blog Christopher Pitt has written up a new article, a story about "John" a developer caricature that's all too familiar in the development world and how you can grow up from "being a John". It's all based on Christopher's own experiences too.

John was a developer. To be specific, he was a young, white, straight, young, self-taught developer. He wasn’t rare, but he was special. John grew up with a couple parents, who paid for everything he needed.

[...] John got average grades, but it was ok because [according to mum]; “he’s just bored of schooling, and too clever”. He walked right out of high-school and into a programming job. The pay wasn’t great; only enough for a small apartment and modest groceries [for one]. In time he’d earn more. [...] Over the years, John quickly got bored of programming. He loved the thought of the career, but it was all so boring. He moved jobs every year or so, and only then when his idiot bosses stopped seeing how much he mattered to their company.

He talks about his own past, how he realized he was a "John" and how he made the conscious decision to grow up and out of that situation. He talks about those being born into comfort and how they're not always forced to grow up or to really struggle. He mentions other common "John" points of view ("we can always just move jobs" or "meetings are just a distraction"). He's angry with himself for seeing so much of his previous life in these examples. He's also angry to see these same patterns in other developers around him, other "Johns" that treat him the same way with excuses, failed promises and delays.

I think of all these clever little things I could do, to force John to work. All these processes and mantras and check-lists. Then I despair. The only thing that’s going to make John realise he is wasting away is wasting away enough to fall through his safety net. He’s going to have to grow up on his own, and maybe then he’ll pay it forward to his future employers and clients.
tagged: john programmer privilege example opinion experience

Link: https://www.sitepoint.com/how-privileged-are-programmers-are-you-a-john-too/

O'Reilly Software Engineering Blog:
The traits of a proficient programmer
Aug 09, 2016 @ 10:52:26

On the O'Reilly Software Engineering blog there's a post from Gregory Brown sharing what he thinks is the definition of a "proficient programmer" and how it differs from competence.

Do you know what the difference between competence and proficiency is? That sounds like a trick question, because the words seem to mean the same thing. But the subtle distinction between them is critically important.

Competence means having enough experience and knowledge to get stuff done; proficiency involves knowing why you are doing something in a certain way, and how it fits into the big picture. In other words, a proficient practitioner is always a competent practitioner, but the opposite may not be true.

He goes on to talk about the Dreyfus Model of Skill Acquisition and how it relates to the biggest bottleneck he sees for developers: "crossing the divide from competence to proficiency." He defines what it means to be a "competent" programmer first and then one of the things junior developers struggle with - thinking knowledge is enough to make you more competent. He gives a more concrete example of this with the use of the Memento pattern, when to use and - for the competent side - when it breaks down.

He ends the post with some suggestions that can help you if you're wanting to make the jump from "proficient" to "competent" (even if you've been programming for a long time, some good tips here).

tagged: traits proficient programmer opinion oreilly

Link: https://www.oreilly.com/ideas/the-traits-of-a-proficient-programmer

Ben Ramsey:
Yak Shaving is the Entire Job Description
Dec 01, 2015 @ 09:13:27

In his latest post Ben Ramsey suggests that "yak shaving" (a seemingly useless activity that lets you solve an immediate problem) is a core part of what we, as developers, do.

When I began my journey as a programmer, every task was fraught with problems, and I loved it. Everything was new, and every problem was an opportunity to learn and grow. It was great.

Somewhere along the way, though, problems became nuisances. As I grew older in life and my career, my tolerance for problems became lower, and my desire for things to Just Work became greater.

As I struggled to find a solution for the problem I had with Packer, Tate Eskew reminded me that yak shaving is a part of my job.

In his example he was working with Packer and hit a problem with the environment required to get it working. Instead of slogging through it he created a patch to make it work correctly with Amazon Machine Images.

tagged: yakshaving description packer patch programmer

Link: https://benramsey.com/blog/2015/11/yak-shaving/

Sahand Saba:
9 Anti-Patterns Every Programmer Should Be Aware Of
May 13, 2015 @ 11:29:50

In a recent post to his site Sahand Saba has posted a list of nine anti-patterns every programmer should avoid. This list isn't language specific and ranges in types of advice from general programming practices down to more specific "code smells" to avoid. The code examples are in Python but you can interpolate them into the world of PHP pretty easily.

A healthy dose of self-criticism is fundamental to professional and personal growth. When it comes to programming, this sense of self-criticism requires the ability to detect unproductive or counter-productive patterns in designs, code, processes, and behaviour. This is why a knowledge of anti-patterns is very useful for any programmer. This article is a discussion of anti-patterns that I have found to be recurring, ordered roughly based on how often I have come across them, and how long it took to undo the damage they caused.

The list of nine includes things like:

  • Premature Optimization
  • God Class
  • Inner-platform Effect
  • Management by Numbers

Each item on the list includes a few subheadings talking about what it is, why it's bad, how to avoid it and some code examples (where appropriate) to find it in your code.

tagged: antipatterns nine list programmer avoid opinion

Link: http://sahandsaba.com/nine-anti-patterns-every-programmer-should-be-aware-of-with-examples.html

Anna Filina:
Common PHP Mistakes
Jul 21, 2014 @ 13:53:31

Anna Filina has posted her own addendum to a top ten list of common PHP programmer mistakes, adding seven more of her own.

I was recently asked by one of my readers to give feedback on the following article he read: 10 Most Common PHP Mistakes. It is well written and very thorough. Most of the tips are specific to PHP, others are about web programming in general or database performance. It’s a very good read. I was also asked to contribute to this list, so here are 7 more tips.

Her list of seven touches on topics like caching, allowing SQL injection, disabling error reporting and ignoring accessibility. She also includes some configuration settings, code and links to other tools/resources to help provide information on preventing these other mistakes.

tagged: common programmer mistakes additional tips

Link: http://afilina.com/common-php-mistakes/

/Dev/Hell Podcast:
Episode 41: Let Me Wet My Beak
Mar 12, 2014 @ 13:14:27

The /Dev/Hell podcast, hosted by Chris Hartjes and Ed Finkler, has posted its latest episode - Episode 41: Let Me Wet My Beak. In this new episode they're joined by guest David Rogers.

This week we’re joined by David Rogers, aka @al_the_x, to hear how he’s teaching PHP in college courses for brand-new programers. We also talk about what possessed Ed to develop his own unit testing framework.

You can check out this episode either through the in-page player or by downloading the mp3 of the show. Also, be sure to subscribe to their feed if you like what you hear.

tagged: devhell podcast ep41 teach programmer college

Link: http://devhell.info/post/2014-03-10/let-me-wet-my-beak/

IT World:
Does relying on an IDE for development make you a bad programmer?
Feb 27, 2014 @ 10:04:45

On the IT World site there's an interesting post that poses the question - does relying too heavily on your IDE make you a bad programmer?

The truth is that a good IDE makes you vastly more productive than a bad one or none at all. Projects are off the ground faster thanks to helpful scaffolding. Coding moves faster thanks to intelligent autocompletes and IDE refactoring tools. Integrated unit testing helps your application be more maintainable. Built in deployment tools, web servers, code analysis, and compile time bundling streamlines the workflow. It also standardizes the developer experience which benefits both the programmer and the business.

He mentions the original post that got him thinking about the topic. It talks about the reliance one developer feels like they now have on their IDE. They feel that it's "made them lazy" in their development practices. The article isn't specifically focused around PHP as there are IDEs for other languages that do a lot more for work for you. There are some in the PHP world, like PHPStorm that do rank up there as far as automated features, though.

tagged: dependency ide development opinion programmer quality

Link: http://www.itworld.com/development/406451/does-relying-ide-development-make-you-bad-programmer

Pádraic Brady:
PHP 5.6 and SSL/TLS: Getting Better But Will PHP Programmers Actually Use It?
Jan 31, 2014 @ 11:24:32

In his latest post Pádraic Brady looks at a new addition to PHP (well, to be included in the next release) related to the SSL/TLS handling it provides in streams. He's happy to report that things are improving. This commit integrated an RFC allowing for TLS perr verification in PHP streams.

The RFC reverses PHP’s course and provides PHP streams with defaults that enable both peer verification and host verification. The patch implements the RFC and it lets PHP leverage the local system’s own certificate stash (e.g. Debian’s ca-certificates) where possible to avoid PHP having to distribute a bundle of its own and while also assisting in backwards compatibility. [...] Once we have a PHP streams/sockets system with a passable level of default security, the rest will be left to programmers on the ground to change their practices.

With this new functionality coming in PHP 5.6, he strongly encourages developers to change how they're currently doing things and embrace this new verification to keep their code safer.

tagged: ssl tls php56 programmer peer verification rfc

Link: http://blog.astrumfutura.com/2014/01/php-5-6-and-ssltls-getting-better-but-will-php-programmers-actually-use-it/

What does it take to be hirable in the world of PHP?
Sep 14, 2012 @ 09:57:56

On Reddit.com there's a new discussion about what it might take to be "hirable" as a PHP developer and recommendations from the community as to things to do.

I'm a 19-year-old who has recently hit a bit of a rough spot in life, and the only real skill I have other than tending the cash register is programming. I've been programming for quite a while, although I've never taken more than small web design work in terms of paid jobs. I'm interested to know if with some touch-up and extra learning PHP is something that's realistic for a young person to be looking at for a career, or at least an interim step in life.

There's several different kinds of suggestions including:

  • They may consider relocation as a viable option
  • Learn MVC and related technologies
  • Find a local meetup and network
  • Learn about the most up to date techniques (namespacing, wriitng secure code, etc)
  • Make a publicly available code repository with samples of your work
  • Look for an open source project to contribute to
tagged: hirable programmer community opinion