Edd Mann Developer

Merge sort in Scala using Tail-recursion and Streams

In a previous post I made a rudimentary comparison of Java and Scala using the Merge sort algorithm as a case-study. There I described a trival Scala implementation which did not take into consideration tail-recursion, resulting in an unavoidable stack-overflow when faced with a sufficiently sized list. In this post I wish to describe two very different implementations that resolve this gleming omission.

Installing Nginx/Apache, MySQL, PHP 5.5 (LAMP) stack on CentOS 6.4

With the wide-spread appeal and flexibility of an VPS and Vagrant, a shift from mear FTP access to setting up a fresh installation from scratch has taken effect. Tools like Puppet and Chef are great for certain use-cases (i.e. large deployments, dev-ops teams) but to start with the terminal is your best-friend. In this post I will take you through the process of setting up a trival LAMP stack on CentOS 6.4, with the option to use either Apache or Nginx. Both will take advantage of the features PHP-FPM provides you, via FastCGI.

Coalescing operation in PHP (for default values)

Over the past week or so I have been reading discussions on the PHP internals mailing-list about proposed updates to what the ?: operator currently does. If you are like me, you may not have even known that you could use the ternary operator (since 5.3) as a coalescing operator.

Merge sort comparison in Java and Scala

Having only just recently got a complete shot of functional goodness in the form of the Functional Programming Principles in Scala MOOC, my imperative standing is in a state of confusion. Is mutability the devil, should every function not have side-effects, what really is a monad? Okay, so I maybe joking alittle with these semi-rhetorical remarks - boy, have I read enough monad posts for one life-time. Added to the main-stream application design consensus, the functional paradigm is making in-roads out of multi-core necessity (goodbye Moore’s law).

Personal Git Server with Gitolite

Github and Bitbucket are great, however, there may come a time when you wish to setup a personal Git server. There are many reason for this, you may legally not be permitted to host the repository externally, or you want to have more control over access privileges. Gitolite is here to help remedy this desire, allowing you to simply setup Git hosting on a central server with fine-grained access control capabilities.