Alexander develops more for a hobby than a job. Most of his sites are created with Joomla, but for specific projects he prefers the Laravel MVC framework. Alexander is also a developer of the FluxBB forum software.

Alexander's articles

  1. Time Complexity of Algorithms

    If you are a web developer or a programmer in general, you have most likely written algorithms for various tasks. Examples are: searching through a table, sorting an array of numbers by descending value, calculating the shortest path to get to a location… But what qualifies an algorithm to be a good algorithm?

    One specification of an algorithm is its correctness. You will probably assume that your algorithm works after testing it out a few times. However, if you can mathematically prove that your algorithm will work as expected for every input value possible, this is a huge bonus. I will not go further in to that subject in this writing.

    Another specification is its efficiency: how does the computing time relate to the amount of input? Is it a linear relation? Does computing time rise exponentially for the doubling of input? That’s what this article will be about.

    Time Complexity

    Time complexity is, as mentioned above, the relation of computing time and the amount of input. This is usually about the size of an array or an object. Time complexity also isn’t useful for simple functions like fetching usernames from a database, concatenating strings or encrypting passwords. It is used more for sorting functions, recursive calculations and things which generally take more computing time.

    This is not because we don’t care about that function’s execution time, but because the difference is negligible. We don’t care if it takes 10ms instead of 3ms to fetch a username. However, if we have a recursive sorting algorithm which takes 400ms and we can reduce that to 50ms, that would be an interesting thing to do.

    As you might guess, the lower the computing time, the more efficient the algorithm is. The question that follows is: ‘how can we define time complexity in an universal way?’. That’s where we’ll use the ‘Big O notation’.

    Big O notation

    The Big O notation is a notation for the time complexity of an algorithm. It is a mathematical representation of the upper bound of the limit of the scaling factor of the algorithm. For example, if we double the size of an input array, by how much does the computing time increase? This might become clear with two examples:

    $numbers = array(14,82,4,0,24,28);
    foreach($numbers as $number)
        echo $number;
  2. Using cURL for Remote Requests

    If you need to make remote requests from your PHP scripts, cURL is a great tool for the job, and the PHP extension offers the same functionality as the console utility but in the comfortable world of PHP. This article explains how to use the cURL extension, discussing GET and POST requests, handling login cookies, and FTP.

  3. PhalconPHP: Yet Another PHP Framework?

    From full-stack frameworks to micro frameworks, there’s a wide offering of PHP frameworks to choose from. And they all claim to be special, too. But Phalcon really is quite different compared to the others! This article takes a brief look at what Phalcon looks like and what makes it so special.

  4. A First Look at React

    For the past couple of years, Node.js has been drawing increasing amounts of attention as a promising web technology. While it has some strengths, like being event driven, some people just want to stick to PHP. If you’re one of them, you might want to take a look at a similar project for PHP named React.

  5. What’s New in Laravel 4

    The Laravel developers have been hard at work contributing some major improvements to the framework. Testability isn’t a problem any more, and neither is decoupling. Laravel 4 very well may be one of the greatest PHP frameworks currently available thanks to their hard work… so check out what’s new!

  6. Getting Started with Fuel CMS, Part 1

    This entry is part 1 of 2 in the series Getting Started with Fuel CMS

    When you hear the abbreviation CMS, you probably think about Drupal, Joomla, and even WordPress. However, there are alternatives to those heavy hitters if you want something more lightweight or flexible. If you’re look a simple administration interface, or integrate custom application code into the site, then it might be worth your while to explore Fuel CMS. This part of the two-part series looks at Fuel CMS in general and how to create pages and views.

  7. PHP Dependency Management with Composer

    Maybe you’ve experienced the pain of working on a PHP application which uses third-party libraries and then trying to keep them and their dependencies up to date. If so, Composer can soothe your pain. It can get you the libraries you want at the versions you need. Dependency management can be a hassle-free experience using Composer!

  8. Turn WordPress into a CMS with Pods Framework

    If someone mentions the term Content Management System, probably WordPress, Joomla, Drupal, and others come to mind. But the only content types supported by WordPress out of the box are pages and articles, which is fine for most websites, but what if you want more? Luckily you can use the Pods Framework; it’s a WordPress plugin which enables you to add custom content types and their management to your WordPress installation.

  9. Artisan and Laravel Migrations

    For those who struggle with maintaining their database schema, or who have problems applying updates and often revert them, there is a solution. The Laravel Framework offers you migrations. Learn what migrations are and how they can help you maintain you database with confidence and ease.