Category: programming

Functional programming is often treated as the fad of hipster mustachioed programmers, and more often is dismissed without much consideration; after all Object Oriented Programming is superior. Well, at least that use to be the trend but in recent years Functional programming has experienced a renaissance and as result functional...

The opinions expressed here represent my own and not those of my employer.

Recently there has been much debate over if Magento Connect should allow encrypted extensions and if so in what shape and form. The following post is my honest, uncensored opinion about the whole situation, please...

Recently I've been collecting a large collection of git shortcuts, tips and tricks. The following commands have been tested on linux and some of them will required a recent version of git.

I expect that many of you will find them useful as much as I do. So let's get...

Docker has taken the DevOps community by storm and is rapidly changing the ecosystem towards distributed architectures, and in case you haven't heard about Docker here is the quick definition:

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.

And while...

The adapter pattern also referred as the wrapper pattern, I find that wrapper is a more fitting name since it describes clearly what this pattern does; it encapsulates the functionality of a class or object into a class with a common public interfaces.

In software engineering, the adapter pattern...

Now that Magento2 beta has been officially released, you are probably wondering what the hell are Service Contracts and more importantly why the hell do you need them.

But before we jump into the nitty-gritty of service contracts let's get this out of the way:

As a full-time Magento Developer I deal with a very specific kind of PHP every single day; this can at time get rather boring since rarely one can apply new technologies or programming concepts. One of the new languages that keeps grabbing my attention is HACK, which is almost identical...

I apologize beforehand if this article is more of a rant than usual. The inspiration for the "Swiss Army Knife Syndrome" came from my frustration in dealing...

If you have been working with PHP for a while, chances are that you have come across with a project, extension or script that requires to be tested on multiple PHP versions, for simple CLI scripts this seems easy enough but what happens when you are working with complex applications,...

I previously mentioned Boris, a terrific REPL for PHP, and while Boris is a great and functional REPL, is not the only available.

Psysh is actually more than a simple REPL it's also an interactive debugger; which means you can say goodbye to the endless barrage of var_dump() and die()...

Recently Facebook unveiled Hack, a new programming language that aims to provide developers with the tools to write and ship code quickly while catching errors on the fly.

What is Hack?

Hack is as programming language designed to work with HHVM and the same time it works seamlessly with PHP...

Among the new features and fixes that come with PHP5.4 we have the addition of traits to the PHP language, PHP is a single inheritance language this means that classes and only inheriting from single parent class, in practice this complicates code organization and can lead to code duplicity.

Languages...

REPL(read-eval-print loop) can be great tools for quickly testing concepts, experimenting and getting quick feedback when learning a new language. Many languages and frameworks provide some sort of REPL like the rails console or laravel's artisan tinker.

PHP by itself has the interactive shell that can be invoked with:

This past weekend the Magento Community hosted the first Magento Online Hackathon, here is a quick recap of my experience.

The Community

First and foremost a big shout out to the Magento Community, you guys are awesome. Very few other communities could and have organized themselves to run a Hackathon...

If you are developer or system administrator working with Magento running one or more medium sized stores, chances are that you are familiar with the many challenges of optimizing and scaling Magento.

Magento is (in)famous for its performance, specially when scaling to a large numbers products, transactions or even catalog...

The singleton pattern is used to restrict the instantiation of a class to a single object, which can be useful when only one object is required across the system.

Singletons are...

The factory pattern is one of the most commonly used Design Patterns, it is useful when we need to choose between several interchangeable classes at runtime. By using factories we are also separating the creation of an object from the actual implementation.

We can define a factory as a simple...

Dependency Injection is a software design pattern that allows avoiding hard-coding dependencies and makes possible to change the dependencies both at runtime and compile time.

By using Dependency Injection we can write more maintainable, testable, and modular code. All projects have dependencies. The larger the project the more dependencies is...

Technical Debt, chances are that you as developer have heard that term at least once before; but ask yourself do you really understand technical debt and when is appropriate to use it.

The term "technical debt" was first coined by Ward Cunningham who compared technical complexity and debt in a...

Welcome to the information age where everything is connected, everything is in the cloud and where rivers of information flow directly to your screen. If you ever felt like you where drowning in information you are not alone, we consume information -- or at least try to -- from dozens...

One of the most underestimated skills that a developer can have is the ability to make well documented, clean commits. Writing good commits can save everyone involved in project tremendous amounts of time, money and effort.

Other developers can quickly see what changes you made and why, and is extremely...

On a previous post Introduction to HHVM we went over HHVM's history and the potential of running our PHP applications on top of it. Currently a few applications are fully supported like wordpress and drupal; more complex applications like Magento are still not 100% with HHVM due...

HHVM (HipHop Virtual Machine) converts PHP code into a high-level bytecode (commonly known as an intermediate language). This bytecode is then translated into x64 machine code dynamically at runtime by a just-in-time (JIT) compiler. In these respects, HHVM has similarities to virtual machines for other languages including C#/CLR and...