5 ms·
> Nobody but other devs cares about the simplicity of the code if the code works. They care when you start quoting a week for a simple addition that should tak
by newsbinator 6y ago
> Nobody but other devs cares about the simplicity of the code if the code works.
They care when you start quoting a week for a simple addition that should take an hour, because every time you have to wade into a mess, in which one wrong semicolon in functions.php brings down the entire website.
Of course you test and you test, but you're surrounded by landmines at all times.
- tomduncalf 6y ago> They care when you start quoting a week for a simple addition that should take an hour Exactly, this is the key point. If it’s a website that literally will never change then fine (edit: what I mean here is if you are confident WP can meet your needs without resorting to hacks, and can meet your future needs - in my experience, it’s when more functionality gets added on by random developers that things get messy, true of development in general though!). I guess using headless WP might help? The clients I’ve worked with who’ve had WP sites in the past have made a point of saying they definitely don’t want WP again (due to security nightmares, usability etc) so honestly haven’t investigated it too deeply recently.
- iamacyborg 6y ago> in which one wrong semicolon in functions.php brings down the entire website. Don’t immediately deploy code into prod until you’ve tested it?
- YetAnotherNick 6y agoHow do you test wordpress without deploying it? \s
- bartread 6y agoWe do it with a secondary copy of our website. Honestly though, there's a lot of talk about changes here without much talk of the most obvious class of changes that Wordpress is designed to support: adding content to your website or blog. For all its faults it does make that very easy, and it's designed with the intent that you will do so by working directly on the live site (you can obviously preview and review content before making it live). Changing layout and templates is trickier, likewise creating a new page layout, and that's where a staging or development site comes in handy.
- iso1210 6y agoIndeed, I have 3 copies of my wordpress site. The main one, where people update content. Then there's a backup that gets auto restored every morning (with appropiate sed etc to change URLS), which is suitable for developing and testing any code changes The third is one which is manually restored from the backup, and suitable for longer term experiments, how best to organise pages, etc.
- snowwrestler 6y agoThis conversation is feeding my suspicion that a lot of the problems people have with Wordpress come from not knowing how to work with Wordpress. The professional approach is a local copy for development, a staging copy on hosting for QA, and then production. Code goes up in deployments; DB and files come down in regular synchronization. If there are multiple devs you might also have an integration copy on hosting. This is not specific to WP; I’ve seen the same workflow work for other DB-backed CMSs like Drupal.
- folkrav 6y agoI've worked in environments using the exact approach you described, and it definitely seems like the prevalent workflow using these CMSs. Still doesn't help that most WP sites I've ever seen inevitably were those huge card castles just waiting to crumble at the next plugin update. Cause of course, the remarketing plugin the client needs/wants installed just introduced some weird edge-case bug when used in combination with the latest version of the forms plugin you use. Or they ask (demand) administrative privileges "cause they're paying" and proceed to start messing with the configuration themselves and destroy everything. All the local development copies in the world won't make it less temperamental and brittle. Its success - IMHO - doesn't have much to do with its technological merits but familiarity. Most "content" people know how to use WP, so companies like to have WP for their content management. Or maybe I'm just bitter of my time working in the kind of environments that tend to focus on WP. Although last news I got were they were starting to use it more as headless CMSes.
- apple4ever 6y agoHave a dev site, which is easy with modern tools. Even can do a CI/CD system.
- mattacular 6y agoPrograms in any language can crash due to a single character syntax error.
- coldtea 6y agoEven in static languages, if the syntax error is in something that will be reflected/eval'ed, etc (which in many languages includes regexes -usually not validated at compile time-).
- photomatt 6y agoWhat's funny is that this error would have been impossible to make within WP's built-in file editor. It lint checks before letting you save any edits.