Jason McCreary Profile Banner
Jason McCreary Profile
Jason McCreary

@gonedark

15,337
Followers
71
Following
1,985
Media
16,102
Statuses

I’m JMac. I build things with my hands like @laravelshift , , , and my standing desk.

Louisville, KY
Joined December 2007
Don't wanna be here? Send us removal request.
Pinned Tweet
@gonedark
Jason McCreary
4 years
My best bit of programming yet.
Tweet media one
16
15
674
@gonedark
Jason McCreary
4 years
🚀 Excited to officially announce the release of BaseLaravel. 📕 99 pages 📺 2 hours of videos 🎙️ 4 exclusive live-streams All demo over 20 practices for streamlining your Laravel applications. And the ebook is FREE! 🥰
28
227
799
@gonedark
Jason McCreary
3 years
A $10 investment which has probably earned me millions.
Tweet media one
26
57
794
@gonedark
Jason McCreary
3 years
🎉 Last week, Shift surpassed $1,000,000 in revenue. 🎉 This is a big milestone. It's taken 6 years to reach. I honestly wasn't sure if it would at times. I kept grinding. I learned some things along way…
Tweet media one
63
42
753
@gonedark
Jason McCreary
4 years
Well that's pretty dope... 🔥
Tweet media one
23
53
618
@gonedark
Jason McCreary
7 years
🔥 Pushing yourself to remove comments is one of the best drivers towards clean code. Here's a few tips on how to spot and replace comments that may be unnecessary…
Tweet media one
Tweet media two
17
285
531
@gonedark
Jason McCreary
1 month
A modernization of the official PHP documentation would go a long way in making PHP feel as relevant today as it was 10 years ago.
Tweet media one
Tweet media two
46
35
486
@gonedark
Jason McCreary
4 years
After a 36 hour deployment, we are now running serverless. First geek dad joke. 🤓 Welcome Isabella Rose. 🥰
Tweet media one
74
0
404
@gonedark
Jason McCreary
7 years
☠️ "Dead Code" can rot a code base over time. Here are a few common types of dead code. Be diligent and thorough about removing them as the code evolves. Even dead code can still cause problems.
Tweet media one
18
201
396
@gonedark
Jason McCreary
4 years
WIP
Tweet media one
58
1
375
@gonedark
Jason McCreary
2 years
Excited for the release of daughter v2, project code named Emilia Lilly.
Tweet media one
58
1
368
@gonedark
Jason McCreary
4 years
🔥 There are so many expressive Blade directives available in Laravel. One of my favorite is ` @forelse `. It combines the typical check for the empty state and the loop over a collection into one. A perfect streamline.
Tweet media one
Tweet media two
16
51
375
@gonedark
Jason McCreary
4 years
I still write the method attribute value in all caps, just like I did back in 1999. 😎
Tweet media one
35
8
365
@gonedark
Jason McCreary
2 years
Good commit messages communicate "why" a change was made, not "what" change was made. The code itself demonstrates "what", "how", "where", etc. It's the commit message which relays the important human aspect of "why". Here's a quick example:
Tweet media one
18
89
353
@gonedark
Jason McCreary
5 years
🔥 Applications often have the most lines of code within controller actions. One practice to streamline your code is directly assigning view variables. This also limits the use of temporarily variables and promotes abstractions which make the code more readable.
Tweet media one
Tweet media two
18
65
343
@gonedark
Jason McCreary
5 years
We've made some final tweaks... So I recorded a demo of running the Tailwind Converter Shift against (which uses Bootstrap 3). This kind of blew my mind, which means we're ready to release a beta version next week. 🤯
18
43
332
@gonedark
Jason McCreary
2 years
Looks like I got about 5 months to finish my todo list. 😅
Tweet media one
50
0
327
@gonedark
Jason McCreary
7 years
A few ways to clean up the conditional code that forms most of your codebase. From simple to nested to spotting unnecessary conditions. 👍
Tweet media one
10
120
317
@gonedark
Jason McCreary
4 years
Today YTD revenue from Shift surpassed the highest annual salary from any previous job I ever had, including consulting. Reaching this milestone has been a relatively slow path for me, but comes at the perfect time. And there's still 3 months left in the year…
37
5
308
@gonedark
Jason McCreary
5 years
🚀 Excited to officially release Confident Laravel. This 4 lesson, 32 video course provides a step-by-step guide to writing tests for your existing Laravel applications. The goal is get more Laravel applications tested and gain confidence in your code. ✊🏻
11
78
281
@gonedark
Jason McCreary
3 years
I wrote BaseCode a few years ago to distill the tips I learned over 20 years of programming into 10 practices for writing more readable code. I've decided to make the book FREE as I want these practices to be available to all developers. 👩🏻‍💻🧑🏾‍💻
8
72
267
@gonedark
Jason McCreary
3 years
What a great day.
Tweet media one
28
0
248
@gonedark
Jason McCreary
5 years
We’re gettin’ hitched.
Tweet media one
49
1
247
@gonedark
Jason McCreary
4 years
Piggybacking off the last 🔥 tip, most Blade templates simply use the `if` directive. However, there are so many more Blade directives available. These are not only more expressive, but often streamline the code. Here's a side-by-side comparison:
Tweet media one
6
58
245
@gonedark
Jason McCreary
2 years
Stumbled upon this pretty cool use of `match` within Laravel's exception handler… They're passing in a static value of `true` to match against one of the evaluated expressions. 🙃
Tweet media one
9
30
235
@gonedark
Jason McCreary
4 years
My ideal Laravel folder structure. Effortlessly elegant. 👀
Tweet media one
17
13
225
@gonedark
Jason McCreary
7 years
🔥 Symmetry is a hallmark of clean code. Symmetrical code is not only easy to read, but also predictable. Here are a few areas to check your code for symmetry.
Tweet media one
8
87
228
@gonedark
Jason McCreary
4 years
Genesis…
19
22
225
@gonedark
Jason McCreary
4 years
🔥 Controllers often have the most code as they contain all the business logic. By leveraging native components and expressive methods, we can streamline our controllers while also improving readability. A huge win. Here are some examples of reducing common blocks of code:
Tweet media one
Tweet media two
10
27
222
@gonedark
Jason McCreary
6 years
Just turned in my notice… I am going to take the next several months to work on my own projects full-time and try to make a go of it. It's something I've been wanting to do for almost a year. Now the moment is here, it's both scary and exciting. 😅
42
8
220
@gonedark
Jason McCreary
3 years
Missing IDE feature for PHP devs: display an example output in a tooltip as you type the date format string. 🔥
Tweet media one
15
5
220
@gonedark
Jason McCreary
4 years
I'm collecting all my recent tweets on streamlining Laravel (and more) into a free ebook. That's right, FREE! It'll outline guiding principles and demo over 20 practices for crafting Laravel code. Available this August, but sign up now for early access:
10
46
219
@gonedark
Jason McCreary
3 years
Anytime I try something new in Laravel, I love how it *all* intuitively works. This morning I used an alternative column for implicit route model binding, then needed to generate the url… I just passed in the model. 🔥
Tweet media one
3
26
216
@gonedark
Jason McCreary
4 years
🔥 Here's an exceptional streamline available in Laravel. Instead of repetitive type checks, refactor your code to throw a custom exception. Then move the logic to the `render` or `report` methods within your exception. Let Laravel do all the work + no more dense code. 🙌
Tweet media one
Tweet media two
8
44
213
@gonedark
Jason McCreary
4 years
🔥 Validation and creation logic can account for the biggest blocks of code within controllers. My favorite abstraction is a Form Request, as it moves all of this code outside of the controller. It may also encapsulate additional logic specific to that type of request.
Tweet media one
Tweet media two
7
44
202
@gonedark
Jason McCreary
4 years
5 years ago today, I launched @laravelshift . It made $26. It was full of bugs and a limited understanding of the framework. Now, I work on Shift full time. It has been used to upgrade 38,159 Laravel applications. Some of it's automation impresses me (and I wrote it).
Tweet media one
18
12
203
@gonedark
Jason McCreary
1 year
In 2009 I paid $4000 to attend WWDC. My goal was to become an iOS developer. At the time, that was more than I made in a month. Huge spend in my 20s. In the following years, I developed multiple paid iOS apps and got a job as an iOS developer paying 2x my salary. The point is,
14
12
189
@gonedark
Jason McCreary
5 years
⚗️ Excited to finally publish this in-depth guide to help you get started testing your Laravel applications. It contains a complete, step-by-step demo of writing HTTP tests to verify the behavior of the auth components. 👀
12
55
187
@gonedark
Jason McCreary
4 years
The time has come… We're heading to the hospital in preparation for our baby girl. 98% excited, 2% scared. Or maybe it's the other way around… 😅
22
0
181
@gonedark
Jason McCreary
6 years
A commit message should: ☑️ Be 50 characters or less. ☑️ Complete the sentence, "This commit …" ☑️ Communicate "why", not "how". ☑️ Include additional references in the commit body.
13
45
178
@gonedark
Jason McCreary
7 years
A before and after of a code snippet submitted earlier. Tried to highlight key areas ( @steveschoger style) to identify each clean up. 😘
Tweet media one
11
14
179
@gonedark
Jason McCreary
3 years
See the difference.
Tweet media one
16
1
180
@gonedark
Jason McCreary
4 years
Still one of my favorite fixes performed by the "Laravel Fixer". Gives those Eloquent chains that last bit of polish. 💅
Tweet media one
9
14
169
@gonedark
Jason McCreary
5 years
🚀 Excited to announce on August 13th I will release both the Test Generator Shift and "Confident Laravel" - a new video course. I believe this combination can be a 1-2 punch to help more devs start testing their existing Laravel applications. 👊🏻
9
43
163
@gonedark
Jason McCreary
1 year
Next week I'll start coding a new side project. A potential SaaS. While I will, of course, build it with Laravel, it's not a service for the Laravel community. I want to see if I can replicate success in a new market. I'll share my progress as a thread…
Tweet media one
13
1
167
@gonedark
Jason McCreary
4 years
🔥 Writing code to check an IP address within your Laravel apps? No need. Don't have to look very deep in Laravel to see it's using an `IpUtils` class from Symfony which does this for you. Yet another way to "grok the framework" and write less complex, more readable code.
Tweet media one
6
23
157
@gonedark
Jason McCreary
3 years
Laravel freelancer strategy: 🏅 Brand yourself a "Laravel upgrade specialist" 🤖 Get familiar with Shift 📈 Upcharge your services 10x 💰 Make that money
9
12
153
@gonedark
Jason McCreary
3 years
Want to clean up branches without writing a bunch of line noise? I do, so I finally built the command I always wanted… Introducing `git trim` - a single command to quickly remove merged, pruned, untracked, or stale branches from your Git repo. ✂️
Tweet media one
8
21
154
@gonedark
Jason McCreary
2 years
Shift just had its best month ever! While there was an increase in consulting during September, this mostly has to do with a steady rise in subscriptions. Shift is about to pass the $20k MRR milestone. 📈
Tweet media one
10
1
150
@gonedark
Jason McCreary
3 years
Sometimes when faced with a list of tasks I'm not motivated to work on, I just choose one that interests me no matter its "priority". It helps me get my momentum back.
6
14
147
@gonedark
Jason McCreary
4 years
🔥 Devs often add a layer of inheritance to “insulate” their apps. Yet, Laravel has widely adopted traits over inheritance. By following suit, you not only align yourself with Laravel, but also remove “extra” classes making your app less complex, and more readable. 👍🏻
Tweet media one
Tweet media two
6
16
139
@gonedark
Jason McCreary
4 months
Love collections in Laravel. But when you're working with an array, remember PHP has over 100 built-in array functions. Instead of wrapping it in a collection, performing the action, and converting back to an array, there's probably a PHP function you may use directly.
15
8
141
@gonedark
Jason McCreary
3 years
🔥 Nice simple way to streamline compound expressions built right into the language... You may pass multiple arguments to `isset()`. Similarly it returns `true` only if all variables are declared and not `null`.
Tweet media one
8
21
138
@gonedark
Jason McCreary
5 years
This can probably be filed under "unpopular opinions", but I feel like Guzzle is more complicated than it needs to be. Even the simplest of requests I find myself having to check the docs and ending up with more questions than when I started.
17
5
138
@gonedark
Jason McCreary
5 years
⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses. Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation.
Tweet media one
8
24
133
@gonedark
Jason McCreary
7 years
Another "clean up" from last week on how you can reduce long methods by introducing objects to encapsulate related blocks of code.
Tweet media one
6
39
132
@gonedark
Jason McCreary
4 years
Finished the first draft of BaseLaravel. Going to proofread over the weekend and share the part of the introduction to subscribers next week. If you want a first look to get your mind right for streamlining your Laravel code be sure to sign up. 👇🏻
6
11
130
@gonedark
Jason McCreary
3 years
I'll be taking the next few days off for Ashley and I to finally have our wedding. 👰‍♀️🤵‍♂️ I proposed in England a week before they restricted international travel, and a month before we found out we were expecting Izzy. ✈️👼
Tweet media one
16
0
129
@gonedark
Jason McCreary
2 years
> npm install 38 vulnerabilities, run: npm audit fix > npm audit fix 40 vulnerabilities 😵‍💫
13
9
129
@gonedark
Jason McCreary
3 years
Chaining `noContent` is still one of my favorite little expressive streamlines in Laravel. 🏄
Tweet media one
7
9
128
@gonedark
Jason McCreary
7 months
Always great to be among Laravel friends. But even better after missing last year.
Tweet media one
6
5
129
@gonedark
Jason McCreary
4 years
Parent Programming…
Tweet media one
8
1
129
@gonedark
Jason McCreary
7 years
🚀 Just launched the landing page for achieve one of my 2018 goals to "write a book"… more a "field guide" really to write lasting code with simple practices proven over 20 years of programming. Sign up for sample passages and early access:
6
37
129
@gonedark
Jason McCreary
4 years
Don't forget, `find` also accepts an array of primary keys and returns an Eloquent collection of matching records. Super handy when you already have a set of keys. 👍🏻
Tweet media one
6
21
128
@gonedark
Jason McCreary
7 years
🔥 Naming things is most certainly hard. I find full names aimed at relaying a human context yield the most readable code. Here are a few examples to help make naming things a little easier…
Tweet media one
6
39
127
@gonedark
Jason McCreary
10 months
8 years ago I launched a niche service called Shift. Today I'm quietly launching another service. I don't expect it to be as successful as Shift. But I love automating routine maintenance. So I'm excited to do that for more developers. I'll share more about it in the new year.
9
4
127
@gonedark
Jason McCreary
5 years
📐 Just tagged a pre-release of Blueprint so you can start generating model components for your Laravel applications from a simple definition. Watch it in action and start testing it in your projects.
15
20
122
@gonedark
Jason McCreary
6 years
🔥 Reviewing your code for symmetry is a great way to improve readability. To get started, check for paired naming, consistent tone, and relative complexity. From there any remaining asymmetric bits will be easy to spot. Here's a before and after snippet from the @OhDearApp . 👀
Tweet media one
3
35
122
@gonedark
Jason McCreary
5 years
⚗️ Quick demo of using Laravel's built-in test assertions to verify complex data you may be passing to your views. This approach can also be used for testing session data and data passed to Laravel facades. Such assertions help strengthen your tests and boost your confidence. 💪
1
27
121
@gonedark
Jason McCreary
2 years
We are home.
6
0
119
@gonedark
Jason McCreary
4 years
@adamwathan I’ve thought for years Netflix should have “channels”. Just a rotating schedule of curated shows/movies constantly playing. Way better at ideas for something to watch than scrolling through an infinite catalog.
10
1
119
@gonedark
Jason McCreary
4 years
Now that everyone wants a table. In classic developer style, I built a table for building tables. 😅
Tweet media one
Tweet media two
Tweet media three
12
2
117
@gonedark
Jason McCreary
7 years
Blade's `continue` takes an expression. @laravelphp for yet another win!
Tweet media one
2
49
110
@gonedark
Jason McCreary
4 years
🔥 Crafting less complex, more readable code takes place on every line. This is made easier by finding a method which better communicates your intent. It means digging into your language or framework. A good example of this in Laravel is using its expressive response chains.
Tweet media one
8
16
114
@gonedark
Jason McCreary
5 years
When tracking down a bug in the code, there's a point when you begin to question how any of it worked in the first place.
8
14
114
@gonedark
Jason McCreary
7 years
Handling return values accounts for a lot of our code base. We can clean up this code by leveraging "reasonable returns". Here's a few examples. 👍
Tweet media one
2
40
113
@gonedark
Jason McCreary
4 years
Gotten a few "take my money" replies. While I love seeing these, just a reminder the BaseLaravel ebook will be FREE. If you're looking for a way to "pay me back", you may share with a RT or post some before/after shots of applying the BaseLaravel practices to your own code. 🥰
2
18
111
@gonedark
Jason McCreary
4 years
The hype is real... Nearly a 50% savings, even when run within Docker. 🐳
Tweet media one
Tweet media two
4
13
113
@gonedark
Jason McCreary
3 years
6 years ago I started using Laravel. Later that year I was chatting with Taylor after my talk on upgrading from 4.2 to 5.0. I asked if he knew of any tools for upgrading. He said, "no, but I'd use it." A month later I launched Shift, which has upgraded nearly 50k projects since.
@taylorotwell
Taylor Otwell ☁️ 🦹
3 years
🥳 Today marks 10 years of Laravel! 🥳 Thanks for all the good memories! Laravel wouldn't be where it is today without every single one of you. ❤️ Ready to crush another 10 years. 💪
165
624
4K
3
1
112
@gonedark
Jason McCreary
4 years
Still feels good, every time. ☺️
Tweet media one
5
6
110
@gonedark
Jason McCreary
3 years
@taylorotwell Release the flag, then kill Lumen. 😈
6
2
110
@gonedark
Jason McCreary
2 years
When consulting on Laravel upgrades, every time I miss my estimate it's because the project breaks conventions. Follow Laravel conventions. I know you want to use the "new fancy". I know it's hard to argue with "done". But if the project lives long enough, you'll regret it.
18
14
108
@gonedark
Jason McCreary
5 years
⚗️ Whenever I generate test data, I like to explicitly set values which could change behavior, even if they are currently defaulted with the same value. The future brings change and resolving such a failure can be hard.
Tweet media one
3
17
107
@gonedark
Jason McCreary
3 years
It worked! MVP complete. 🎉 Will launch next week after some more testing, but this is looking solid. Kind of impressed myself. 😎
Tweet media one
5
12
107
@gonedark
Jason McCreary
4 years
🔥 Don't forget about your routes… There are all sorts of wonderfully expressive methods you may use to streamline them as well. They help avoid the crusty old array options, and motivate you to use resource controllers. That's a win-win. 🙌🏻🙌🏻
Tweet media one
Tweet media two
7
20
106
@gonedark
Jason McCreary
6 years
Remember a legacy system is also the result of success. Otherwise, it would have never lasted long enough to become "legacy".
5
41
107
@gonedark
Jason McCreary
1 year
⏱️ Cache your config On every request, Laravel reads in dozens of config files and merges their arrays. By running `artisan config:cache`, Laravel stores this result, so it only reads a single file. Running this command might gain you 40 reqs/sec.
Tweet media one
Tweet media two
10
21
107
@gonedark
Jason McCreary
5 years
⚗️ Take opportunities to make your tests expressive as well. Tests are also code. These handy response assertions, some added in a recent Laravel patch release, keep not just the code but also the failure messages readable.
Tweet media one
6
27
104
@gonedark
Jason McCreary
5 years
Today set a new record for most Shifts in a single day. Very exciting as my goal this year is to grow Shift. I don’t talk about it much, but @laravelshift is a constant grind of building, tweaking, supporting, and marketing. So it feels good to see users confirming the value.
5
5
104
@gonedark
Jason McCreary
4 years
This is all you should ever need to find your way around an app… 🔎🔥 php artisan route:list --columns=action,uri,name
7
14
101
@gonedark
Jason McCreary
5 years
📐 Getting pretty excited about Blueprint. From a 5 line definition it's already generating multiple components: ✅ Migration ✅ Model ✅ Factory See it in action:
9
10
102
@gonedark
Jason McCreary
3 years
Finished 3 more coffee tables. Hardwood, live edge slabs floating on hairpin legs. One walnut, two oak. Figured I’d post them here before going down the road of setting up an Etsy shop. 😅 Will ship in US. DMs are open if you're interested.
Tweet media one
Tweet media two
Tweet media three
13
5
103
@gonedark
Jason McCreary
4 years
I did it - 10k followers! I set this as a goal back in 2018. ✅😂
6
0
99
@gonedark
Jason McCreary
4 years
🔥 Last week I proposed "fireable events" be added to Laravel. Of course, this already existed. Using this syntax not only allows you to streamline your events, but also write it in a more expressive way which is symmetrical with code for dispatching jobs.
Tweet media one
3
13
101
@gonedark
Jason McCreary
6 months
Always enjoy this little refactor for simple "accumulation" loops. You may immediately streamline it with PHP's built-in `array_filter` function. Nothing else required.
Tweet media one
4
7
100
@gonedark
Jason McCreary
3 years
Yesterday YTD revenue from Shift passed that of my highest paying job. Last year, this didn't happen until October. The year before, I would have made more at my job. I reflected on this last night and feel I narrowed in on the top two contributing factors for Shift's growth…
9
3
100
@gonedark
Jason McCreary
7 years
Dev: "Is testability a reason to change your design?" Me: "Yes. Next question."
1
55
97
@gonedark
Jason McCreary
5 years
⚗️ No matter how you like to organize your tests, adding the `see` annotation is a great way to communicate the link between the test and the thing you are testing. See it in action. 👀
5
21
95
@gonedark
Jason McCreary
9 months
The Laravel 11.x Shift is going to open the most "senior dev" PR yet. With a net reduction of nearly 1500 lines of code. 🔥
Tweet media one
3
3
95
@gonedark
Jason McCreary
5 years
Was about to create a PR to allow `mapWithKeys` to also take two string parameters for the simple case when you want a new key/value collection from existing elements. Read a little further and remembered `pluck` does this. 👀
Tweet media one
6
23
94