loading...
Cover image for Thoughts on legacy code, diversity and inclusion

Thoughts on legacy code, diversity and inclusion

erikaheidi profile image Erika Heidi ・2 min read

TLDR; If you're still dropping snarky commentaries about PHP on Twitter, just grow up already.

As some of you may know, I've recently started a new job as Technical Writer at DigitalOcean. One of my first assignments was writing a tutorial about phpMyAdmin.

I thought a lot about legacy code / legacy applications while I was writing that tutorial.

Most web developers from my time had used phpMyAdmin in the past. Yes; it is a software well known because of security issues. But it has served well many people, and it still has pertinent use cases for small businesses and whenever it is necessary to expose database information (read-only, hopefully) for third parties who won't have the expertise to use software like MySQL Workbench, but still would like to peak at the data they own.

As we mature as an industry and as professionals within it, we realize more and more the need for diversity and inclusion in all spheres, even code. Inclusive code might not be the most beautiful, the most sophisticated, or the fastest. Inclusive code is code that most developers, if not all, can use and customize to their needs. It's accessible, cheap, multi-purpose. It doesn't invalidate high-standards software, but it offers a way in and fuels a whole section of the industry that wouldn't be there otherwise.

This is also valid in the context of programming languages, and how there's still people out there acting as gatekeepers, in an attempt to marginalize whole sections of our bigger developer community.

Instead of condemning the usage of software like phpMyAdmin and criticizing the developers who wrote that code, you'll be way more helpful to your community by sharing practical advice on what to do in order to improve security and usability of such applications. Naturally, it is important to educate people on the risks involved and show alternatives, but you can't close your eyes to the fact that people will keep using it anyways, whether you think it's good software or bad software.

Posted on by:

erikaheidi profile

Erika Heidi

@erikaheidi

Code sorceress and machine enchantress. Passionate about writing and creating technical content for a variety of audiences.

Discussion

markdown guide
 

I've often winced as I've heard people deride languages like PHP, small throwaway statements like those betray an ignorance. I started my career on PHP and the tools that you mention, I've built many web sites and smaller web-based utilities using PHP 4 and 5 that brought a lot of value to their users. With the benefit of hindsight its easy to criticize the deficiencies but I felt just as productive and able to meet requirements then as I do now (working in the .net ecosystem). PHP, like any other language, is fundamentally a tool that helps you accomplish a goal. If you use it irresponsibly, it's on you. Granted, it's possible to build in safe guards so users of your language don't hit problems but PHP was a pioneer of sorts, lessons learned fed into new languages and frameworks, it laid a small part of the groundwork for what we have today. Let's also not forget that PHP still has a vibrant community and ecosystem. Can something that's survived all those supposed failings be so bad?

 

Absolutely, PHP was a pioneer, and it was a very good language by the criteria of 15 years ago. I think nobody in their right mind criticizes that. But the times have changed, we now know much better ways to do some things (the hindsight you're talking about), and let's be honest, most of the community and ecosystem is there by inertia, not by explicit will (which is ok). Learning new tools is hard.

 
[deleted]

I meant for a particular purpose: hacking together a dynamic homepage in one night. Of course if you want to write a microframework with it, you'll encounter weird roadblocks. You could say that the reason people who hack a homepage in one night don't complain is simply that they don't know any better, and there is a bit of truth in that argument -- but still, many people used PHP quite successfully back then.

 

These are wonderful points, Andrew! Thank you for sharing this! 👏👏👏

 

I only snark at the prospect of beginning new projects in languages such as PHP. Knowing well the deficiencies of certain languages or libraries, it is unfortunate that people wilfully refuse to learn from the past.

I have no problem working with, integrating, or porting a legacy codebase, but I think it is important to be mindful of the lessons (both positive and negative) we can glean from projects and developers that have come before us.

 

I'll admit to having written a snarky comment about hating PHP. I believe I added the proper context in saying that I was thrown into a legacy application with no experience in the language and debugging something that started as open source and had been forked and customized. It was the perfect storm of terribleness and the language was secondary to that.

But on behalf of my past self, I apologize. It's true that certain languages and tools get treated like red headed step children in this industry. Those languages and tools still exist and it does no one any good to marginalize them and the people who work on them.

Your tweet in this post is spot on. Legacy code is complex and we need to stop using current assumptions to judge past actions.

 
 

Hello. Good article. A lot of valid points raised by others already.

I would put it like this. Two things seem to challenge people most;

  • Thinking one approach is better. (And blustering)
  • Knowing an approach is better. (And showing respect and guidance).

Both of the above are irrelevant once we consider "Jobs to be done". This means it is okay to use anything to get the job done. Making everything the best tech must have a fundamental reason. As a technologist, you can decide on an approach but it should fit in with a lot of other jobs to be done.

However, bad development code bases and approaches really causes a lot of headaches. People should be allowed to voice their dissatisfaction and they should be listened to. This is aka freedom of speech. There is nothing more demoralising to be on a project with people saying - "Yeah, we know it is shit, but it is out of our hands."

 

Um..:YEA!! Like you can still actually become a whole millionaire with languages like PHP & Java. Same for vanilla-js, React.js, and jQuery. If it ain’t broke, DO NOT fix it!! Yay 😀 for this excellent article. Empathy, honesty, quality, and efficiency are both king, and queen. 💯

 

You can become a millionaire with oil and coal - making money from something doesn't have anything to do with it being a good idea.

 

You’re a weirdo. This is specifically related to ENGINEERING!! Humble yourself!! #troll

 

Also oil and coal are antiquated. It’s called fossil fuels and emissions. The more money you make, the more you can do. It’s called being an entrepreneur. #wierdos

 

"Instead of condemning the usage of software like phpMyAdmin and criticizing the developers who wrote that code, you'll be way more helpful to your community by sharing practical advice on what to do in order to improve security and usability of such applications."

You've said it all!

 

But writing snarky comments on twitter and bathe in the glorious 'lulz' is so much easier than doing something useful. Not that i want to tell anybody how to spend their private time - but yeah, the problem you state is clearly there...

 
 

Oof that hits close to home.

My lack of experience in SQL means I'll desperately try to make PhpMyAdmin work on my dev environment or on my web server, because the muscle memory is still there to do everything, but when I do MSSQL or PLSQL I end up spending more time googling and searching stackoverflow than writing SQL requests.

This is also why Entity Framework and similar ORMs are a blessing. But that also means I can't work in big enterprises because they always end up doing more SQL than actual development.

Data is important, I get it, but presentation of said data is equally as important !

 

I get your point, well said. Never good to look down on people, programming languages or even programs just because you have the elitist idea that your language, your software or even yourself are "superior" ... if it's useful and people get stuff done with it, then who are we to judge.

 

Good points Erika, those comments are mostly made by some people referencing the language more than a decade ago, they havent looked at the way things are now and languages changed over time, an example of this will be Laravel which is the most popular php based fullstack framework, and also Rails which is in decline, one got faster, the other got slower to todays standards.