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

Josh Lockhart:
Advice For Aspiring PHP Developers
Jun 30, 2017 @ 09:18:09

On his site Josh Lockhart, author of Modern PHP and the Slim framework has shared advice for aspiring PHP developers, mainly centering around one core idea.

As a fledgling PHP developer, I aspired to be in the same league as legendary figures like Cal Evans, Chris Hartjes, Larry Garfield, Anthony Ferrara, Paul Jones, Sebastian Bergmann, Taylor Otwell, et al. I consider these folks members of PHP's inner sanctum, so to speak. They are decision makers, tool builders, and opinion shapers.

[...] My advice to aspiring PHP developers: there is no great Wizard of OZ. There are only opinionated men and women behind a veil of authority who bicker of politics and standards. It's not magical. It's messy. It's a minefield of polarizing politics, sensitivities, and opinions.

He points out that, no matter why you say or do, there'll always be someone that will take it the wrong way - it's just human nature. He uses a recent example of an interaction he had with another member of the PHP community around contributor guidelines on a project.

Aspiring PHP developers, stay above the fray. Don't seek out a Wizard of OZ. He does not exist. PHP's inner sanctum isn't worth your time. Instead, do your research, recognize and avoid propaganda, and trailblaze your own path.
tagged: advice aspiring developers community experience opinion

Link: https://joshlockhart.com/blog/2017/6/advice-for-aspiring-php-developers

Robert Basic:
Open source taught me how to work with legacy code
May 01, 2017 @ 09:36:29

In a new post to his site Robert Basic shares how some of his work on Open Source projects taught him how to better work with legacy code.

Contributing to open source projects has many benefits — you learn and you teach, you can make friends or find business partners, you might get a chance to travel. Even have a keynote at a conference, like Gary did.

Contributing to open source projects was the best decision I made in my professional career. Just because I contributed to, and blogged about Zend Framework, I ended up working and consulting for a company for four and a half years. I learned a lot during that time.

He shares some of the things that open source taught him about working with code and how it relates back to legacy code (including how to find his way around). He also tries to dispel the myth that all legacy code is bad and was "written by a bunch of code monkeys who know nothing about writing good software." He points out that, at the time the code was written, the changes may have been the best that could be done, it might be a necessary workaround or it could be an actual bug that needs fixing.

tagged: opensource legacy code opinion experience codemonkey

Link: https://robertbasic.com/blog/open-source-taught-me-how-to-work-with-legacy-code/

Danny van Kooten:
Moving from PHP (Laravel) to Go
Apr 27, 2017 @ 10:14:04

Danny van Kooten has an interesting post on his site sharing his experience in converting a Laravel-based application to Go, briefly describing some of the changes made, performance differences and the lines of code required.

Earlier this year, I made an arguably bad business decision. I decided to rewrite the Laravel application powering Boxzilla in Go.

No regrets though.

Just a few weeks later I was deploying the Go application. Building it was the most fun I had in months, I learned a ton and the end result is a huge improvement over the old application. Better performance, easier deployments and higher test coverage.

He talks about why he selected Go and some of the external services he would need to interface with to make the transition complete. He then gets into the actual porting of the codebase and some of the challenges involved to replace Laravel functionality. With the application ported, he then compares the performance of the Laravel application versus the Go version, sharing the request of requests/second for each. He finishes out the post looking at a lines of code comparison between the two and how testing was handled on the Go side.

tagged: laravel move rewrite application go summary experience performance

Link: https://dannyvankooten.com/laravel-to-golang/

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/

CloudWays Blog:
Stefan Priebsch Talks About ThePHP.Cc, His Experience With PHP Development, PHP 7 &
Apr 14, 2017 @ 12:50:39

The CloudWays blog has posted another in its series of interviews with members of the PHP community. In this latest article they talk with Stefan Priebsch of thePHP.cc (a consulting company) and some of his experiences, past and present, in the world of PHP.

Today, We are honoured to have Stefan Priebsch for this interview. He is a cofounder of thePHP.cc, a well known PHP consulting firm. He is also an entrepreneur, university lecturer and a thought leader in modern software application architecture. Stefan specializes in PHP powered enterprise applications and has built an enviable reputation as one of the best trainers in Germany.

Additionally, Stefan speaks regularly at international PHP conferences and wrote a book PHP 7 Explained with Sebastian Bergmann and Arne Blankerts. In this interview, he talks about his career, PHP 7 ebook and the latest developments in the industry.

In the interview Stefan answers questions about the benefits of the PHP 7.x releases, his work at thePHP.cc, his book, what development tools he uses and how he spends his free time. You can read his answers to these questions and more in the full interview.

tagged: cloudways interview stefanpriebsch thephpcc experience php7 book development

Link: https://www.cloudways.com/blog/stefan-priebsch-interview/

What are some things you wish you knew when you started programming?
Mar 21, 2017 @ 10:24:44

Leonid Mamchenkov has linked over to a great thread over on Quora that asks the question "[What are some things you wish you knew when you started programming?


The post is originally from Ken Mazaika, CTO, Co-founder & Mentor @ thefirehoseproject.com but it has expanded way beyond his original list of 27 things. There's comments sharing everything from personal experiences out to their own lists of things they wish they knew. Topics mentioned include:

  • the "cognitive burden"
  • the importance of getting away from the screen sometimes
  • the value in listening, not just hearing, your colleagues
  • thinking about security at all times
  • learning the "why" of coding, not just the "how"

There's a lot more in this post so get over and start reading. There tips in here for everyone, both those new to programming and those that have been doing it for years.

tagged: wish you knew programming opinion experience quora

Link: https://www.quora.com/What-are-some-things-you-wish-you-knew-when-you-started-programming

Michelle Sanver:
We can all learn from the Drupal community
Mar 02, 2017 @ 09:17:51

Michelle Sanver has written up a qucik post on the Liip blog sharing a few things she thinks we can all learn from the Drupal community.

I started hearing about Drupal 8 back in 2014, how this CMS would start using Symfony components, an idea I as a PHP and Symfony developer found very cool.

That is when I got involved with Drupal, not the CMS, but the community.

I got invited to my first DrupalCon back in 2015. That was the biggest conference I have ever been to, thousands of people were there. When I entered the conference building I saw several things, one of them was that the code of conduct was very visible and printed. I also got a t-shirt that fit me really well – A rarity at most tech conferences I go to. The gender and racial diversity also seemed fairly high, I immediately felt comfortable and like I belonged – Super cool first impression.

She goes on to talk about more of her experiences at the conference, both in how it was run and about her fellow attendees. She ultimately shares the main message of the post:

[...] Embrace our differences, and each other, and accept that we do different things and we are different people and it doesn’t matter because that is what makes community work, that is what makes us awesome. Diversity matters, Drupal got this.
tagged: drupal community opinion learn experience conference

Link: https://blog.liip.ch/archive/2017/03/01/can-learn-drupal-community.html

Zend Developer Zone:
Scheduling ElePHPants (DateTime math is HARD)
Nov 18, 2016 @ 12:49:38

On the Zend Developer Zone there's a new post talking about scheduling in applications ("scheduling elePHPants") including both library recommendations and advice about code reuse.

It was while I was creating the 100th or so cronjob to do some very similar to the other 99 that I thought, “Hey! Why not just put all this in a database and check it once a minute instead?” [...] It would be so much easier to deal with in PHP. Also, cron does not scale well at all either in performance or management.

The problem is that cron is an elegant solution for “Do this at that time” type of problems. Every solution I came up with was basically re-creating cron. That in itself isn’t a bad thing, but the logic involved in doing what cron does is mind-melting.

[...] Then it hit me, I am probably not the first person that has had this need. There have probably been other people who needed to implement “Do this at that time” within a PHP application. So I started looking around. What I found was encouraging.

The author then mentions several packages that he went through searching for the right solution to his problem, noting that while Laravel-based solutions seemed nice, they wouldn't work with his framework choice (Slim). He decided on the cron-expression package, finding it to be the best fit for the project's needs.

I had spent countless hours trying to create the solution myself. [...] I got so lost in solving the problem, I forgot to look to see if someone had already solved it. [...] After I finally came to my senses, I tweeted that out to remind myself to “Use the Source”.
tagged: schedule task cron experience package code reuse datetime

Link: https://devzone.zend.com/7418/scheduling-elephpants-datetime-math-is-hard/

Dailymotion.com Engineering Blog:
PHP 7 deployment at Dailymotion
Oct 18, 2016 @ 13:53:51

On the Dailymotion.com Engineering blog there's a recent post detailing their experiences moving their services to PHP 7 and some of the discoveries they made along the way.

In march 2015, we started to think that code refactoring and architecture improvements, will not be the only way to optimize the response time on dailymotion.com. This is the core problem of websites with high load : “how to scale without investing too much in people/servers”.

They started out by looking into Facebook's HHVM project to potentially replace the default PHP interpreter with a better performing core. They mention incompatibilities they discovered and some of the results in testing it on a handful of servers in production. They had some time to play with things so they waited until PHP 7 was officially released and tried that to make an equal comparison. In the end, they ultimately chose to go with PHP 7 as it was the route with less "friction" and work on changes for their current codebase. The post also includes graph output of some of the improvements they saw when

tagged: dailymotion engineering php7 deployment experience

Link: http://engineering.dailymotion.com/php-7-deployment-at-dailymotion/

Slack Engineering Blog:
Taking PHP Seriously
Oct 14, 2016 @ 09:16:45

On the Slack Engineering blog there's a new post from one of their engineers talking about a choice the company made about their platform - they decided to take PHP seriously. In this post author Keith Adams talks about why they chose PHP and what kind of experiences they've had with it in their own environment.

Slack uses PHP for most of its server-side application logic, which is an unusual choice these days. Why did we choose to build a new project in this language? Should you?

PHP-the-language has many flaws, which undoubtedly have slowed these efforts down, but PHP-the-environment has virtues which more than compensate for those flaws. And the options for improving on PHP’s language-level flaws are pretty impressive. On the balance, PHP provides better support for building, changing, and operating a successful project than competing environments. I would start a new project in PHP today, with a reservation or two, but zero apologies.

He starts with some background on the history of PHP itself, where the language came from and what kinds of issues it tries to mainly solve. He then gets into some of what he sees are the "virtues of PHP" including the blank slate at the start of every request, one-request-one-process concurrency and the fast programmer workflow. He then gets into the "bad stuff" they've found when working with PHP, things like surprise type conversions, a "failure-oblivious philosophy" and inconsistencies in the standard library. Finally he looks into two options (created by Facebook to improve its use of PHP) - HHVM and the Hack language - and how it was integrated into their environment.

tagged: language slack serverside hhvm hack usage experience

Link: https://slack.engineering/taking-php-seriously-cf7a60065329#.pdj63el96