All entries of my technical and business blog

PHPUnit Runs Data Provider Before Setup

Dec 3, 2018 php phpunit testing

I started noticing a disturbing trend on one of my projects: developers were doing too much logic in the setup and data provider methods of their PHPUnit tests. However, before we could address this, a “limitation” popped up which helped them kick this habit.

The Many Motivations of Money

Nov 26, 2018 business

Motivation is a very hard thing to master. When used properly, you can get great things and enormous productivity. When misunderstood, a whole host of things appear to go wrong. Getting into all of the motivations of an employee or developer would take a book, one that I’m not ready to write yet! But, I wanted to focus on just one, money. And, in that motivation, only three types of the many ways and mixes that people can be motivated by money.

2 Ways to Use Alfred to Set Status on Slack

Nov 19, 2018 business

I’m a huge fan of Alfred - but I had to upgrade to get the pro version to get workflows. Because I use Slack a lot, I’ve been trying to set up status automation and workflows. When using my phone, I have an automated system that sets my status. You can find that here. But, what about using Alfred for some automation?

How to Learn Programming

Nov 3, 2018 programming

Over the course of many years, I’ve heard many variations of the same question “How do I learn programming?” Normally, I’m caught off-guard. I don’t know the answer. Things are constantly changing, and what was around “back then” may not be around now. Plus, I don’t exactly remember all of the steps I took to learn programming. Finally, the way I learned programming doesn’t make sense these days. Technology is much different - you wouldn’t consider dialing into a BBS or reading the manual that came from your computer, would you?

How Developers Should Delegate

Oct 22, 2018 business management

As a manager, I spend a lot of time delegating. I delegate small tasks so that I can spend more time adding value to the process and project. The value I bring is my ability to see the larger picture, use my experience as a guide, things like that. If I’m doing too many little things, I can’t do what I’m good at.

Better failing tests with Mockery::on()

Oct 15, 2018 mockery php testing

In an earlier post titled Use $this->fail() with Mockery::on(), I explained the challenges of debugging a failing test with the closure passed to Mockery::on(). Instead of returning false, I opted to use $this->fail() - which seemed like a good idea at the time. After all, I was doing my test, then failing with a useful bit of information. (Previous to this, it would just say that you don’t have a matching handler for this assertion, which was really confusing).

Two Questions That Demonstrate if an Experimental Process Should Remain

Oct 8, 2018 business management

I experiment a lot with thoughts and process. I used to be scared of implementing something new because I felt like I was now married to that. Or, if it becomes habit, maybe I won’t want to stop it, even if it’s annoying (how irrational does that sound? But if you’re honest with yourself, you’ll see that happen a lot. If you ever hear “that’s just how we do it” then you’re experiencing it.)