Browse category Education Station

Education Station: Deeper into the Streams

by · February 8, 2021

0
 

As I wrote last month, streams are an important feature of PHP used quite a bit without most developers ever noticing. While developers can use them to help optimize read and write operations, they are also useful for working with incoming requests and data manipulation.

 

Education Station: Working with PHP Streams

by · January 8, 2021

0
 

Even with today’s larger servers and more abundant resources, web applications still need to be mindful of what resources they are using. While the days of worrying about every bit of memory have gone, many applications still work with data sets in the tens or hundreds of megabytes in size. We may not think about […]

 

Education Station: Using Factories and Hydration

by · December 3, 2020

0
 

The applications that we build are usually portals for users to view and manipulate data. That data may be as simple as a web page pulled from a database or a collection of raw data. An admin section may display graphs of various analytical data on one page, while another may show configuration data.

 

Education Station: Locking Down Resources

by · November 11, 2020

0
 

Many of the applications that we write need to access some form of resource. These resources may come in the form of images we need to display, logs we need to write, or external services we need to pull data from. But, at the end of the day, our applications are accessing things outside of […]

 

Education Station: Race Conditions and Dead Locks

by · October 5, 2020

0
 

Despite PHP shifting more and more toward preferring Object-Oriented Programming, at its heart, PHP is a procedural language. All of the code is executed one line at a time, in the order that the parser receives it. To my mind, one of PHP’s strengths is blending a versatile object model along with procedural programming. Web […]

 

Education Station: Autoloading Your Code

by · September 1, 2020

0
 

Broadly speaking, autoloading is a mechanism for the loading code into your program on demand. If you look at a single request in your application, chances are it needs a different set of classes than another request. Where a “Login” action may use a controller, database class, and an authentication layer, a “Logout” action may […]

 

Education Station: Writing Concise Code

by · August 18, 2020

0
 

By Chris Tankersley There is a huge emphasis put on the code maintainability, and for a good reason. The programming industry is rife with what we like to term “legacy code,” which boils down to code that solves a business problem, but we, as the current maintainers, do not understand. No language is safe from […]

 

Education Station: Calling All Callables

by ·

0
 

By Chris Tankersley When facing a challenging problem, you want a flexible codebase that adapts quickly. Object-oriented programming facilitates it by giving you the power through inheritance, encapsulating code in reusable objects, and generally making them work for your application as you see fit. However, we can find flexibility in other programming approaches. Languages such […]

 

Education Station: Effective Data Typing

by · August 6, 2020

0
 

In our documentation at work, there are a few places where we list things as strings but look suspiciously like Boolean values. This realization sparked a discussion at work around data types, but not the one most developers tend to have. This discussion was not about strict versus dynamic typing, but more about what kind […]

 

Education Station: Writing Concise Code

by · July 1, 2020

0
 

There is a huge emphasis put on the code maintainability, and for a good reason. The programming industry is rife with what we like to term “legacy code,” which boils down to code that solves a business problem, but we, as the current maintainers, do not understand. No language is safe from this problem.