this, that, and everything else


JavaScript

One of the most puzzling things in JavaScript is this. We could begin by explaining what it is, what it does, and what makes it complicated, but this is not a tutorial. This is a rant, and like all good rants, it should begin with an example. 🙂 Let’s write some code for an object […]

November 24, 2018

WTF is Late Static Binding in PHP?


PHP

One of the features in “advanced” PHP you come across is Late Static Binding. There are two things that make this feature very interesting: It is remarkably useful It is extremely poorly explained in the official docs So if you’ve heard of this term the first-time, or like me, have lost a few hair over what […]

June 28, 2018

How many Controllers should you have? [Laravel]


Frameworks, Laravel, PHP

Controllers are the life and blood of a Laravel application. It’s impossible to imagine a framework without them (well, it is, but technically something has to receive the route action, and whether it’s a class or function, it becomes a controller, so to speak). In the last 3-4 years of my development experience, I went […]

December 16, 2017

The curious relationship between Laravel and Node.js


Laravel, PHP

Even a cursory survey of skills (try LinkedIn) will tell you that a huge percentage of Laravel developers end up learning Node.js. The skills list goes something like this: “LAMP, Laravel, Ionic, Node, Full Stack Developer”. And it’s not just beginners bragging about their skill-set, mind you; I’ve met serious architects who passionately love Laravel and […]

December 14, 2017

Rust Tutorial – Part 6 – Functions


Rust, Tutorials

Functions in Rust are much like functions in conventional languages – simple entities that accept an input and produce an output (but not always). Here’s a very simple example of a function in Rust: fn main() { simple_function(32); } fn simple_function(x: i8) { println!(“The value received was {}”, x); } So, we see that functions […]

December 8, 2017

Rust Tutorial – Part 5 – Tuples and more


Rust, Tutorials

Tuples are perhaps the most fun data type we’ll encounter in Rust. They are convenience and elegance rolled into one, as we’ll soon see. The idea behind tuples is to let you group together items of different types. If you’re coming from a language like PHP, you might like to think of associative arrays; the […]

December 6, 2017

Rust Tutorial – Part 4 – Primitive Data Types


Rust, Tutorials

[This post is part of the series on Rust programming tutorials that I’m writing for enjoyment. All the tutorial links are here.] Let’s take it step by step. I assume you know what data types are (if not, please run away; Rust should not be your first programming language – it’s far too interesting and powerful […]

December 5, 2017

Rust Tutorial – Part 3 – Constants


Rust, Tutorials

[This post is part of the series on Rust programming tutorials that I’m writing for enjoyment. All the tutorial links are here.] Rust allows you to write constants; that is, things that aren’t going to change at all. If you’ve read the previous tutorial on variables, you might be thinking: why constants when all variables […]

December 4, 2017

Rust Tutorial – Part 2 – Variables


Rust, Tutorials

[This post is part of the series on Rust programming tutorials that I’m writing for enjoyment. All the tutorial links are here.] Variables . . . things that hold other things. What other things? These other things vary from language to language, and range from values to references to direct memory addresses (the last one […]

December 3, 2017