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

SitePoint PHP Blog:
Do PHP and IoT Have a Future Together?
Jul 05, 2016 @ 09:54:23

On the SitePoint PHP blog there's a post from editor Bruno Skvorc wondering if PHP and IoT have a future together. The "Internet of Things" (IoT) is a technology sector that has been growing by leaps and bounds over the past few years as more and more devices become internet-aware and connected.

It’s IoT Week at SitePoint! [...] A whole week of mostly IoT resources on every channel and, yes, that includes PHP. What? “PHP and IoT!? Surely you’re mistaken!”, you must be thinking. No, dear reader. PHP and IoT go well together – better than one might expect.

In this post, we’ll list some getting started resources. Throughout the remainder of the week, we’ll have some amazing hands on posts for you – everything from creating a drinks machine with PHP, to a real life alarm when a door in Minecraft opens (yes, really!) – and that’s just on our channel. Be sure to check out the others, too!

The remainder of the post is then broken down into two sections: hardware and software/tutorials. In each there's plenty of links to articles, libraries, pieces of IoT hardware (low level, not consumer) and various PHP libraries that can help you get integrated quickly.

tagged: future internetofthings iot hardware software libraries listing

Link: https://www.sitepoint.com/do-php-and-iot-have-a-future-together/

Mathias Verraes:
The Repair/Replace Heuristic for Legacy Software
Apr 28, 2016 @ 11:48:06

Mathias Verraes has shared some thoughts about legacy applications and how development should be handled as new features are added and bugs are fixed. He proposes a "heuristic" to keep in mind as you work in your legacy code: the Repair/Replace Heuristic.

Technical Debt is a great metaphor. It shares many analogous properties with financial debt: loans, accrued interest, token payments, bankruptcy… There is a key difference however. We take financial debt with another party. [...] Technical Debt has no measure like money, and no ruleset like Property law, and, more importantly, with Technical Debt there is no other party. The organisation is both the creditor and debtor. [...] In “Managed Technical Debt”, I propose a cheap, imprecise, but surprisingly effective method for mapping and measuring debt. In short, it involves posting stickies whenever progress is impeded by debt, and keep marking the stickies for every incident.

By following this method, you gather together a better overall picture that makes determining the worst debt in your application easier. He proposes using this to follow the Repair/Replace methods: repairing something if it's well architected or replacing it if it's not.

Even when you’re not trying to decide on Repair/Replace — perhaps the decision was already made by others — the process of mapping its history will teach you more about the system and and its design. And one deep insight you learn from temporal modelling.
tagged: legacy code replace repair heuristic software opinion

Link: http://verraes.net/2016/04/repair-replace-heuristic-for-legacy-software/

Christian Mackeprang:
Project delays: why good software estimates are impossible
Apr 15, 2016 @ 12:06:47

Christian Mackeprang has a new post to his site with some of his thoughts on why software estimates are impossible in any realistic project development process.

When you, as a programmer, start a new project, you will often not know full well how to do it, for many reasons. But you are a professional, and you’ve completed similar tasks in the past, so you either try to figure it out, or find someone who can, and ask them how, or just google it.

[...] The problem comes down to the difference between tasks which require a lot of thinking, and routine tasks which you already have some practice with.

He gives an example of solving a Rubik’s cube, how most people take a very long time to figure it out but there are some that can do it in a matter of seconds. He talks about unexpected complexity and how that can blow previous estimates out of the water. He points out that complexity can be cumulative (related to the number of tasks) and the difference between creative and mechanical tasks.

tagged: software estimate project delay impossible opinion

Link: http://chrismm.com/blog/software-estimations-are-impossible/

Christian Mackeprang:
Newton's 3 Laws of Software Craftsmanship
Apr 13, 2016 @ 11:51:11

In this post to his site Christian Mackeprang shares what he calls "Newton’s 3 Laws of Software Craftsmanship" - some guidelines to follow in your development to help make things a bit more sane.

Are there unbreakable laws ruling the process of software development? I asked myself this question while reflecting on a recent project, and the answer leads to many conclusions, some already known and some more revealing.

Scientific laws reflect reality and cannot be broken. They have strong implications onto how we build things. For instance, there is no point in building a car with vertical propulsion once you’ve observed that the law of gravity will prevent your car from drifting into space anyway. But software lives in the logical world. Does it really follow any laws?

He shares his three laws and provides a bit of background for each:

  • "Under fixed circumstances, every solution will behave the same way, unless it has been modified."
  • "The impact of a technical decision is directly proportional to the size of the project and to how much of it is affected."
  • "Every technical decision comes with an implied tradeoff."

He also includes a "how to be mindful" section for each of the laws, giving you both practical and mental tips to help you follow it.

tagged: threelaws newton software craftsmanship solution decision tradeoff

Link: http://chrismm.com/blog/newtons-3-laws-software-craftsmanship/

Ted Blackman:
Lug-Nut Driven Development (LuDDite)
Mar 21, 2016 @ 11:53:27

In his post on his Medium.com site Ted Blackman looks at something he calls "Lug-nut driven development" (or, shortened LuDDite). He breaks it down into a few different suggestions including "build the whole thing badly" out to "automate stop and start".

These are practices that I’ve applauded myself for doing at the beginning of some projects, and kicked myself for not doing early enough in other projects.

The full list suggests things like:

  • Building a system that goes through the whole flow first (not perfect) then come back and refine
  • Testing as you go instead of coming back at the end and retrofitting them
  • Log everything you can then cut back and refine
  • Plan out the error handling before hand to help make it consistent
  • Be able to "stop" and "start" the system easily

While not all of these are specific to web applications there's some definite helpful advice in here, especially to those starting out on new projects.

tagged: lignut development luddite software suggestion practices

Link: https://medium.com/@belisarius222/how-to-start-a-software-project-ad51373c1510#.nfx206q5v

Toptal.com:
The Art of War Applied To Software Development
Feb 19, 2016 @ 11:17:35

On the Toptal blog there's an interesting post where author Jose F. Maldonado takes the infamous book "The Art of War" and applies several principles to programming and development. He obviously doesn't go through the entire Art of War and relates each section, but he does pick out some good bits and makes some interesting parallels.

If you work in the software industry, it’s likely that you have heard about the divide and conquer design paradigm, which basically consists of recursively splitting a problem into two or more sub-problems (divide), until these become simple enough to be solved directly (conquer).

[...] However, the divide and conquer rule is not the only political strategy that can be applied to software development. Although politics and warfare have little to do with software development, just like politicians and generals, developers must lead subordinates, coordinate efforts between teams, find the best strategies to resolve problems, and administer resources. [...] Detailed below, you will a find a brief list of basic tactics and tips explained in the Art of War. They can probably be applied to your job in the software industry, or any of a number of other industries.

Included in his list of Art of War excerpts are topics like:

  • Time Is Crucial In Any Campaign
  • No Leadership, No Results
  • Teamwork And Motivation
  • Thinking Outside The Box

For each topic there's a reference to a chapter/paragraph location in the book, quotes from that section and his own thoughts on how this relates back to software development.

tagged: artofwar software development parallels opinion programming

Link: http://www.toptal.com/agile/art-of-war-software-development

Ethode.com:
Fixing Spaghetti: How to Work With Legacy Code
Jan 27, 2016 @ 12:09:38

On the Ethode.com blog they've shared some hints for working with legacy code to help you more effectively refactor your way out of the "spaghetti code" you might have right now. These are more general tips and aren't really PHP (or even really web application) specific but they're a good starting place for any refactoring effort.

Legacy code is software that generates value for a business but is difficult for developers to change. [...] The longer this goes on, the more frustrated customers get with the software due to quirky defects, bad user experiences and long lead times for changes. Developers are afraid to make changes due to the "Jenga effect" -- as one piece of code is changed or removed, it often leads to new defects being introduced in the system in sometimes seemingly unrelated places. This compounds into what is known as "technical debt".

They continue on talking about what "spaghetti code" is, how it can happen and some of the warning signs you can use to determine just how far down the rabbit hole you and your code are. They talk about "The Big Rewrite" everyone dreams of but points out that this is almost never a practical path. Instead they offer some good things you can do to help fix the problem: quarantining the problem, refactoring relentlessly, keeping it simple and "doing the dishes" as you go rather than letting the changes pile up.

tagged: legacy code refactor opinion advice fix software development

Link: http://www.ethode.com/blog/fixing-spaghetti-how-to-work-with-legacy-code

Procore Blog:
Evolution of Software Applications
Jan 12, 2016 @ 11:55:19

On the Procore blog there's an excellent article covering their thoughts on the evolution of software applications and the different stages they go through during their development.

If you develop software long enough, you notice patterns. One pattern that isn’t talked about enough is how systems evolve over time.

The software industry is so focused on the flavor of the week that we lose perspective. Most of what is “invented” today was created decades ago. Most problems we face today were solved by someone else.

Software developers don’t have a good understanding of our own history. In the spirit of that, I present to you my take on how software tends to evolve and why.

He starts by defining a term that is used through the rest of the article, software gravity, and illustrates how it relates to development time and complexity. He then gets into describing the seven stages of software evolution as he sees them (starting with zero, naturally):

  • Stage 0: Humans, Paper, and Spreadsheets
  • Stage 1: Simple Script
  • Stage 2: Pile Of Files
  • Stage 3: The Framework
  • Stage 4: Beyond The Framework
  • Stage 5: Modularization
  • Stage 6: Network System

For each of the points he provides an overview of what the application might be like at this stage and what levels the complexity/gravity are at. The post ends by asking about a "Stage 7" and if it even exists, suggesting that it might be an even further abstraction from previous steps.

tagged: evolution software application gravity complexity development time stages

Link: http://devblog.procore.com/dev/evolution-of-software-applications.html

Kinsta Blog:
The Definitive PHP 7.0 & HHVM Benchmark
Dec 09, 2015 @ 09:07:44

On the Kinsta blog Mark Gavalda has shared their latest PHP 7 versus HHVM benchmarks now that the first official stable release of PHP 7 has been unleashed for public consumption. They opted for testing with a large variety of tools and software rather than simple benchmarking scripts to give a more "real world" look at the difference between the two.

To see how much of an improvement we can expect from this new PHP interpreter we put the public release version of PHP 7.0 to test and compared a couple of popular software suites’ performance using PHP 5.6.16, PHP 7.0 and HHVM 3.10.1 on a bare metal server (so virtualization doesn’t interfere with the results). Tested software includes WordPress 4.3.1, Drupal 8, Magento 2.0 CE, OctoberCMS build 309, PyroCMS v3 beta2, and Flarum v0.1.0-beta.4.

The basic tl;dr of the post is that HHVM still performs better for all of the software tested but PHP 7 is not too far off on some of them. They share the specifications of the machine (bare metal) they used for testing and get into the results for each of the seven pieces of software tested. Their results are in transactions per second and both graphed and numeric results are shown. Unfortunately, though, the Flarum software had to be kept on a "pending" list as it doesn't run on either PHP 7 or HHVM properly.

tagged: hhvm php7 benchmark popular software wordpress drupal magento octobercms pyrocms flarum

Link: https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/

SitePoint PHP Blog:
First Look at Flarum – Next Generation Forums Made Simple
Oct 19, 2015 @ 13:54:29

On the SitePoint PHP Blog Jeff Smith introduces Flarum, a project that bills itself as "forums made simple" that's easy to set up and includes both the standard features you'd expect from a forum and some interesting "power" ones as well.

Flarum is a forums solution that is currently in public beta and is under active development. Today we’re going to take a look at it, get it set up in a Homestead Improved Vagrant virtual machine, and look at the configuration and the features that Flarum offers. Then, we’ll compare it to some other forums platforms to see how it stacks up at a glance.

They start with a bit of environment setup including the creation of the Homestead virtual machine. The tutorial then roughly follows the installation guide and helps you get the software installed, the web server configured and configuring the software via the Admin interface. They help you set up some of the basics, permissions, change the appearance of the site and work with tags and extensions. They get more into this last topic, introducing some of the things you can customize in the layout and links to more information on both extensions and themes. The post ends with a brief overview of some of the general features that the forum offers including it being touch friendly, "friendly" URLs and easy moderation functionality.

tagged: homestead configuration installation introduction software forum flarum tutorial

Link: http://www.sitepoint.com/first-look-at-flarum-next-generation-forums-made-simple/