Better Python Decorators with Wrapt

A Python decorator wraps a target function with another wrapper function. This wrapper function can add any behavior you might want. For example, it can track execution times, redefine how the wrapped function runs, or modify return values. As a concrete example, the standard library’s functools.lru_cache() decorator wraps a target ... Read more

How to Convert a String to a Number in PHP

PHP is a weakly typed language. This means that when initializing a variable in PHP, one doesn’t need to declare the variable type. PHP implicitly declares a data type for your variable. This can save you from prospective type errors in your code. When working with programming languages, it is ... Read more

PHP Memory Leaks, How to Find and Fix Them

Memory leaks can happen in any language, including PHP. These memory leaks may happen in small increments that take time to accumulate, or in larger jumps that manifest quickly. Either way, if your app has a memory leak, sooner or later it will cause problems. The source of and solution ... Read more

A Tour of 7 Popular Ruby Frameworks in 2021

Ruby may be over 25 years old, but it remains popular in the software community for its focus on programmer happiness. Building software with Ruby often involves leveraging one or more popular frameworks for the purpose of increasing productivity by relying on existing solutions to common problems. Ruby frameworks generally ... Read more

PHP Json_encode: Serialize PHP Objects to JSON

PHP’s JSON_Encode Function: Convert PHP to JSON PHP is a server-side scripting language for creating your website’s backend system that can serve webpages, communicate with databases, and exchange data over the internet. A decent backend framework like PHP needs to be capable of providing and processing data in any format ... Read more

How to Use Lambdas in Ruby

Lambdas are a powerful feature of the Ruby language. They allow you to wrap logic and data into a portable package. In this post, we’ll cover how and when to use lambdas. You’’ll also learn about the difference between lambdas and Procs, and the performance profile of lambda functions. The ... Read more

Elixir GenServers: Overview and Tutorial

Introduction Elixir describes itself as "a dynamic, functional programming language designed for building scalable and maintainable applications." Although it's a relative newcomer, Elixir is built on top of the functional programming language Erlang. Elixir is capable of using any Erlang library, and is ideal for use cases such as web ... Read more

Go Fast: Getting Started with Sanic for Python

Go Fast: Getting Started with Sanic for Python Tired of waiting for sluggish HTTP requests to complete before your backend code can proceed with other things? Sanic is an asynchronous web framework in Python, that is built to be fast. In a world where Flask and Django are the most ... Read more

Tutorial: Log to Console in PHP

“All code and no logging makes John a black box error-prone system.” Logging is a key aspect of monitoring, troubleshooting and debugging your code. Not only does it make your project’s underlying execution more transparent and intelligible, but also more accessible in it’s approach. In a company or a community ... Read more

Programmatically Adding Laravel Middleware

When it comes to web development, middleware is often the key to ensuring everything connects up - even if some of the pieces don’t always matchup. HTTP Middleware is a mechanism used to conveniently filter HTTP requests coming into your web application. When it comes to PHP, frameworks often help ... Read more

Start your free 14-day trial today.
No credit card needed.