The Cost of Being Hacked

An Ounce of Prevention is Worth a Pound of Cure Imagine waking up one day to the sound of a loud CRACK... CRASH! You are startled and run into your living room to find that a large oak tree has fallen onto your house. You go out and begin investigating only to realize the center of the tree has been hollowed out by carpenter ants. You had noticed them climbing up and down the tree this year, but couldn't have imagined the situation had gotten this bad.Now, you have to call a tree removal service, a contractor to fix your house, and figure out how…

Cache is as Good as Gold

Data processing is money, and waiting for responses can compound your site's request queue in high load situations. Whether you have a custom database or are working with external libraries, caching those responses is one of the easiest ways to speed up and scale your site. Utilizing $modx->cacheManger MODX has a built-in caching mechanism called cacheManger. This system has various functions, which can be invoked via a $modx->cacheManager call. One of the cool things about the cache manager is you have the ability to save cached responses anywhere.…

Embracing Walking (and other crazy forms of alternative travel)

It has been almost a year since I started taking my health more seriously, so I figured on this anniversary I'd write about what got me started. I'm definitely not a role model or health nut, but I feel as I become "well-matured" it is something that I should stay on top of. So here's my story. A long time ago... In March 2017, I was getting ready for a client meeting and decided I'd up my game by getting a new shirt. Honestly, my shirts had all seemed to shrink on me, so I was hoping to get something that was less snug. While I was at the store,…

Moving away from declaring functions in MODX Snippets

!function_exists() I see it in a lot of code, and I'll admit that I did it quite a bit too, but functions should not be declared in the same script that processes output, a.k.a side effects. MODX has an amazing class load structure that makes it easy to move away from this old habit, and we'll talk about it briefly here.  Using Classes in MODX You can technically set up your folders & class structure location however you want, but for the sake of this I'll show you the (my?) preferred method and you can thank me later when you're building something…

Personal Space

Being a developer is a 24/7 thing.  I never know when I'm going to get an idea and need to spend somewhere between an hour and a week on implementing it.  It's important to use the free time you have wisely and not get too sucked into the code grind. For me, I volunteer, have a family, and veg out on the occasional video game.  The hardest thing I find time to squeeze in is sleep! Volunteering I enjoy spending time giving back to the community. Volunteering is a great way to break away from your normal tasks and focus on someone else's needs. I've…