Exploring Laravel's Custom Blade Directives

Earlier today I was working on coding up a design that displays a varying number of cards, each with a unique title and description think masonry/pinterest-esque. I’ve been using Faker to stub out a bunch of cards, each with different content. Once I’d hooked up the dummy data to the cards, I realized that the design didn’t work as well with titles that had more than 20 or so characters.

Continue Reading
Written By Jesse Schutt
Posted on

Programming for your Future Self

Unless you have an insane memory, you may not remember your reasoning for every line of code. If you're like me, you may occasionally come across something and ask yourself "what on earth?!". I've come up with my list of six ways to better prepare your future-self.

Continue Reading
Written By Jesse Schutt
Posted on

Refactoring Techniques: Extract Method

The Extract Method is probably a technique you use on a daily basis; if not, it should be. It really isn’t any more complicated than the title would suggest. It’s looking through a method and determining what lines of code could easily be grouped together into another function.

Continue Reading
Written By Jesse Schutt
Posted on

Replace Conditional with Polymorphism

If you've ever done any research into refactoring, or programming in general, you've most likely heard the term "polymorphism". When I first came across it, I have to admit, I was intimidated. Now that I've become more familiar with the concept, I can assure you, the word itself is more complicated than the underlying principle!

Continue Reading
Written By Jesse Schutt
Posted on

Simplifying Conditional Expressions

As I’ve been reading through Refactoring by Martin Fowler, I’ve found it helpful to rewrite some of the examples from the book in PHP in order to cement the concepts into my mind. While Martin’s examples are primarily in Java, I’ve found an overwhelming majority of the concepts apply to PHP, which is where I spend most of my programming time.

Continue Reading
Written By Jesse Schutt
Posted on