Famous hard problems in computer science

I’ve been working hard on the new version of PoweredCache for a while and hope to announce the new version soon (very soon). I found myself repeating famous phrases from Phil Karlton a lot.

There are only two hard things in Computer Science: cache invalidation and naming things.

Phil Karlton

The third hardest problem: addressing edge-cases

Using a software product is like you are driving a car that has an engine problem (and sometimes you wish the engine is the only problem). There is always something missing under the hood.

A friend of mine once told that “software is the only thing that you know it’s faulty when buying”. And he was right.

Even if the code that you wrote works with a 99% success rate in the first place, does the remaining 1%, acceptable? Imagine a web server is not properly handling 1% of the requests, wouldn’t that be a disaster? Or imagine you are working on something like autopilot, that literally people’s life depends on it.

Development PercentageTime Estimation
90% Development50% of the time
10& Development50% of the time
just imagine a perfect world and time estimates are accurate 😬

Thankfully, I’m just a web developer and doing WordPress-specific stuff, how complicated can it be?

Let’s circle back to talking about caching stuff with an example scenario;

Example scenario: I have a website top on WordPress multisite, let’s say test.example.org, and mapped to test.uysalmustafa.com I can manage my website on both domains. When I purge cache on test.example.org/wp-admin dashboard I expect the cache gone for both domains. (technically, test.example.org shouldn’t have any cached content due to redirection rules)

This is one of the issues that I fixed recently, it’s fairly simple yet hard to test.

A WordPress plugin has 3 moods

  1. Single site: single installation
  2. Multisite: activated per site
  3. Multisite: network-wide activated

When you think 3 situations, things can be messy easily (complexity increase logarithmically when you add a new factor, including capability checks)

Developer’ Dilemma

As the given example above, this is clear “must be addressed” problem, but when you do that math, how many websites are really going to get this problem?

Reproduce the bug: You have to use WordPress multisite, with domain mapping and you are managing the website from the network address to get this problem. I bet 0.01% would be an optimistic guess?..

Overthinking and pessimism as the side effect

The law of attraction doesn’t work in software development. You won’t have secure software by labeling it “secure by default”. Today’s regulations force all of us to be extra cautious about the data. The data was mostly DBA’s problem 10 years ago, it is everybody’s problem today.

Engineering is a design work (don’t necessarily need to be visual), you have to design a well-functioning system that does the job perfectly. But what is the definition of perfect? Remember the security flaw in macOS High Sierra? I’m sure Apple hires the smartest minds on the planet and has enough code coverage to ship the products, yet still having that kind of problem? Shit happens, embrace it! 💩🤗

Personally, thinking about the worst-case scenario and writing the adaptive software made me a bit pessimistic over time and it influences my day-to-day life. For example, if you are thinking about plan B about travel, I have already plan C in place, kinda self-torture.

Good software takes time…

Crafting software is easy, but crafting secure, reliable, and performant software is not so easy. As a result; good software takes time, like other things in life…

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: