30-Year Developer Gives His Advice - Barny Shergold

Smash the Bug: Episode 29

Loading...

Your host: Joseph Maxwell, Founder and CEO of SwiftOtter

Special Guest: Barny Shergold, Certified Magento Technical Account Manager at Adobe, Inc. and former Technical Architect at Vaimo.

Show Notes

What is Barny Shergold good at? Hmm...well, lots of things. Barny has been developing software for over 30 years, dabbling in a bunch of different coding languages and, of course, developing without proper frameworks and foundations. Barny discovered Magento in about 2010 when he got a job at an agency that was really excited about the up-and-coming platform. His job was basically to make it useful for their clients. Throughout the past 10 years, he’s shifted his focus a bit to helping developers get things right in the first place, before they write code and build processes that won’t age well. Sound familiar? It should, because that’s Joseph’s focus at SwiftOtter Training: helping developers improve their skills so that they can become expert problem-solvers and exceptional creators, leading them to the highest level of efficiency and productivity, so that they can become invaluable assets to their team and whoever they are working around. 

Doing a project right involves properly designing and planning it out in the first place, assembling a reasonable and clear vision for the end result, and then laying out a step-by-step plan that makes sense to everyone. Of course you’re probably thinking “duh, I know that”, but Barny seems to think that even more important is the developer’s ability to actually interface with all parties involved. After 30 years in software development, he sees a clear connection between the developer’s ability to clearly communicate progress and technical specifics to non-technical parties and the ability for a developer to reach their highest potential. This means that the developer really needs to get experience with this communication whenever they can, so that they are ready to move into those leadership roles as they become available.

Joseph posted a tip on LinkedIn a couple months before the filming of this podcast that stirred the community up quite a bit. It was a reminder that MySQL does not handle NULL values in the same way that PHP interprets them, and that devs need to be careful how they use NULL, because it does not mean 0 and could potentially cause them a great deal of stress if used incorrectly. The funny thing about NULL is that it literally means “undefined”. Barny reminds us here that if you are going to be using financial numbers in a database, you really must define all of the values and you should never have a NULL value there. You’ve either got some, none, or a negative balance and some people get tripped up by checking values or searching when they are looking for zero instead of NULL. If settings aren’t right, checking the database and pulling information is going to be a nightmare. Joseph argues that PHP has kind of done a disservice because with non-strict comparisons, NULL can be treated the same way and it confuses everyone. Don’t fall into this camp! 

Barny adds a challenge here for developers: because they don’t have to think as much about database structure anymore or really understand the underlying data behind the models to get most of their work done, do they really understand how to dive in, fix problems and logically break down these processes? Do they understand the order of events and how to break these steps apart to troubleshoot them? Do they understand how to translate a MySQL statement into Magento? This comes back to Joseph’s passion for resource models and being intentional about how information is compiled, delivered and managed. It’s very easy now for developers to just not worry about understanding these things, which makes them powerless to optimize or repair them when needed.

Barny reminds us of creative ways to store data in order to make our lives easier down the road. Way too often, the same data gets pulled in the beginning of the customer journey and then again at the end of the customer journey, when it could actually be stored in the beginning for easy access later on. He also reminds us to be conscious of when we should use extension attributes and when we should focus on core tables. Joseph seems to think that many of the bad habits associated with these things stem from the Magento 1 days and have carried over because devs were simply just used to doing things a certain way.

All of this architectural talk should remind us of why it is so difficult for companies to think about switching which platform they are on! They need to remember that there is a whole bunch of architecture that their processes are built on, and if they want to continue to capitalize on what is really working on their website, they need to take great care when considering such a large decision like a platform switch. On the other hand, even though ten-year-old code might still be working, it might still need an update to survive another ten years. With that being said, there is really no way to avoid maintenance in the long term, whether you’re talking about platform migration or not. Even though your code might work, it might not be clear exactly why it works or why you wrote it the way you did. Leave notes in your code so that when you (or someone else) have to go back and update it in the future, you won’t curse your own name! Like Barny said, “I understood every word you just said, but I didn’t understand the sentence”. 

Connect with Barny:

LinkedIn 

Connect with Joseph:

LinkedIn

Twitter

Do YOU have an incredible debugging story to share? Send your story to [email protected] and you might be our next podcast guest!

This podcast exists to inspire, educate and entertain ecommerce developers who are serious about improving their skills and advancing their careers!

Have you joined the free SwiftOtter Slack community? It's exploding and we don't want you to miss out. Go to SwiftOtter.com/Slack to join for free and get plugged into what might be the best group of collaborating developers around!

(Theme music courtesy of TrendingAudio)