Podcast 286: If you could fix any software, what would you change?
We review the things about programming and tech that drive us nuts. If we had the chance to do it all over again, how would we build Regex, CSS, or Bluetooth?
Paul spent the weekend building a parser, cause who doesn’t? He needed a Regex, found one on Stack Overflow, looked over the characters, and realized this is not the way to get folks interested or excited about code. “You come across a problem and you think to yourself, I know I’ll use a regular expression. Now you have two problems.”
This sets Sara off on a tangent about CSS. What’s wrong with CSS in her opinion. Well, all of it. She shares a few thoughts on how it could have been built right.
Ben dives into the endless annoyances Bluetooth has been bringing to his life recently. When you have four people in a family sharing six mobile devices and five sets of headphones, audio signals are constantly getting piped to the wrong ears. Now his car wants to connect. When Bluetooth tells you it’s forgetting a device, how come it never keeps it promise?
Our lifeboat badge of the week goes to Zero Piraeus for answering the question: Why must dictionary keys be immutable? He provided his answer in the form an elegant short essay, and it’s definitely worth checking out.the stack overflow podcast
I wrote code pretty heavily for about 40 years. I learned several dozen languages. I was a non-programmer who wrote a lot of business application software. I was a programmer who knew a lot about statistics, finance and investments. There’s a lot I know, and a lot I don’t know.
Software tends to start pretty simple. Then somebody has a brilliant idea and achieves something of value by making the software more complicated. Then someone else has another brilliant idea, and it gets more complicated, especially when they fork the software. Then somebody organizes a committee to standardize the software, which complicates it further, and introduces 20 or 30 rules to comply with, even though you never use that stuff. This is typically the point of lift-off, where the software departs from the real world. At this point, you can’t get hired to work with the software unless you’ve been certified in the use of the 20 or 30 things you have to neutralize every time you write a program.
The advent of Object Oriented Programming (OOP) brought nearly all the imaginable sins of software evolution, overstimulated by commercialism and marketing. Although few programmers ever rewrote anything they didn’t have to rewrite, and modular programming and reuse were known and practiced by Howard Aiken’s team at Harvard during WW2, OOP promised you would never have to rewrite your code (so you could spend your time boldly going where no one has gone before) and then ordained that all code would have to be rewritten to comply with OOP.
There are numerous examples. BASIC, C, Fortran, Bourne Shell, perl, PowerPoint, spreadsheets, HTML. All these started out pretty simple.
Thank you for indulging my rant.
I’m retired now. I still write a little noncompliant code now and then. Good luck.
If I could change one piece of software, I would change StackOverflow back to the way I remember it in approximately 2016.
Id add datk mode to EVERYTHING . LITTERLY. EVERYTHING!!!!
The CLR would have checked exceptions. If the purpose of high-level languages is to shift cognitive load from the developer to the compiler so they can focus on more interesting problems, checked exceptions are the greatest thing since function parameters. In the years since Java became popular, I’ve watched the arguments against checked exceptions go from ignorance about how they’re supposed to be used to complaining that they make things harder for compiler writers. This is just Microsoft’s desperate spin on the fact that they made a huge mistake twenty years ago that they can’t fix without breaking backward compatibility.
Fix one thing? Roll back the calendar, and get Dennis Ritchie of blessed memory and Brian Kernighan to put safe text-string and array data types in C. The null-terminated and overrunnable C stuff is a colossal disaster that’s still unfolding. How many security bug fixes were in MS’s most recent Update Tuesday push? Well over 100.
Agreed regex is bad for anything non-trivial. Use parser combinators! They’re like regex but understandable and type-safe!
For really good parser combinator libraries your code basically maps one to to one to a BNF spec in the RFC.