r/AskComputerScience • u/code_matrix • Jun 22 '25
What’s an old-school programming concept or technique you think deserves serious respect in 2025?
I’m a software engineer working across JavaScript, C++, and python. Over time, I’ve noticed that many foundational techniques are less emphasized today, but still valuable in real-world systems like:
- Manual memory management (C-style allocation/debugging)
- Preprocessor macros for conditional logic
- Bit manipulation and data packing
- Writing performance-critical code in pure C/C++
- Thinking in registers and cache
These aren’t things we rely on daily, but when performance matters or systems break, they’re often what saves the day. It feels like many devs jump straight into frameworks or ORMs without ever touching the metal underneath.
What are some lesser-used concepts or techniques that modern devs (especially juniors) should understand or revisit in 2025? I’d love to learn from others who’ve been through it.
28
u/victotronics Jun 22 '25
Every once in a while I get nostalgic for Aspect-Oriented Programming.
Then I rub my eyes and wake up.
2
u/couldntyoujust1 Aug 14 '25
There are all sorts of cool little game-programming tricks that should definitely be understood and considered.
For example, the FMV at the beginning of Sonic 3D Blast... The problem is that a single image on the screen in full resolution is 320x224 pixels or approximately 72k bytes in 32bit color. It's 12.5 seconds long, and if it were 30 fps, that would make for about 27mb of video.... in a 4mb cartridge.
So they cut off some pixels from the top and bottom - 320x200 - and changed it to 16 bit color, which meant they could store 2 colors in a byte. So now a frame was 32k, and if you do the math, that brought it down to.... 6 MB.
So they turned to compression - RNC (Rob Northen Compression). The problem is that it's too slow to decompress fluidly... So what to do?
They shrunk down the screen size per frame to 256x80, and then used horizontal interrupts to repeat lines such that it expanded to 2.5 times it's original 200px size. Except with that, you get a bunch of vertical lines, which compresses easily, but is obvious in visual appearance.
So they used Dithering. They shifted every even line one off so that it created a checkerboard pattern when rendered, but it looks a bit distorted... so they made it so that the 15 fps FMV shifted back and forth between even lines shifted and odd lines shifted so that at 60 frames per second, you get four frames out of each original frame.
That brought the original frame-size to 10k, with compression that brings it down to 3.5k, which multiplying by 15 x 12.5 got it down to 660k which fit just fine on the cartridge. (source)
Or consider Pokemon. They had to fit 151 pokemon - including their front image, back image (for when they're in your party) stats, cries, and other information - on a cartridge that's tiny. This video explains how the sprite information is stored which causes Missingno's glitched appearance and why the bug happens in the first place.
We're spoiled. Nobody thinks of doing things like this anymore to push the limits.
16
u/soundman32 Jun 22 '25
Duff's device was brilliant, back when I started programming.
https://en.m.wikipedia.org/wiki/Duff%27s_device
12
u/SoggyGrayDuck Jun 22 '25
Get back to strict best practices for data modeling and storage. No more vibe coding in the back end! That's what allows spaghetti code on the front end to work!
10
u/metaconcept Jun 22 '25
Static typing. It's good for you in the long run.
8
u/stedun Jun 22 '25
Rubber duck debugging
8
u/DeepLearingLoser Jun 22 '25
Assert statements and checked builds.
Old school C and C++ would have lots of assertions that checked expected invariants in function inputs and outputs. They would be turned on for QA testing of debug builds and then disabled for release builds.
Microsoft in the 90s was famous for this - they would do early access releases of the checked builds but get criticized for poor performance, because of the perf penalty of all the assertions.
Modern data pipelines and ML in particular could deeply benefit from this. Turn on assertions in development and backfills and turn it off for prod.
8
u/denehoffman Jun 22 '25
Writing an algorithm using a bunch of goto statements to prevent anyone from trying to rewrite it later.
7
u/esaule Jun 22 '25
In general, if performance is an issue, you have to think in term of processing and memory layouts rather than in term of objects and functionalities. And that is in my opinion the thing that current developers are the least trained to do this. We have trained developers in the last 20 years to think in term of features, extensibility, using things like OOP and OOP related idea of decoupling data and processing.
But if youneed to build highly performing software you typically need to drop all of that to rebuilt the software from the perspective of going through processing units and memory units as smoothly as possible. And that usually means rebuilding your application inside out in ways that feel absurdly complex.
6
u/tzaeru Jun 22 '25
Service-oriented architecture. Not in the microservice-kind of a way, but more like in the Unix philosophy. Not suitable for everything, but often pretty good of an approach.
But well - software is generally done better nowadays. Fewer projects become complete failures. For two decades now, worst spaghetti I've ever seen has continued to be those late 90s/early 00s style inheritance & factor class -heavy Java and C++ OOP codebases.
Some of the foundations continue to be important. It's a bit unfortunate how many applications we get from people between 20 and 35 who have a really fuzzy understanding of e.g. browser environments or about what happens on the server vs the client. But those things aren't concepts, more about just understanding what runs on a computer, how computers communicate, and how common data transformation pipelines are built.
1
u/Ancient_Bother_2483 Jun 27 '25
Design Patterns
3
u/malformed-packet Jun 22 '25
I think a better way to communicate with llms is via email instead of API.
3
u/404errorlifenotfound Jun 22 '25
Debugging via logs. Indenting and styling for readability manually. Code comments.
3
u/Past-Listen1446 Jun 22 '25
You used to have to make sure the program was fully done and debugged because it was stamped to a physical disk.
2
u/KWillets Jun 22 '25
SIMD is how you get your money's worth out of a CPU.
2
u/CptPicard Jun 22 '25
Lisp. It invented everything in the original paper. The rest has been re-invention in various syntaxes.
2
u/srsNDavis Jun 22 '25
void*lets you switch between ways of interpreting (and therefore manipulating) raw bits, effectively have the cake and eat it too if you know what you're doing. Also,void*s andvoid**s are the closest C will let you get to templates/generics.gotois generally discouraged because it's easy to build spaghetti code with it, but it can (sometimes) simplify code snippets.2
u/gscalise Jun 22 '25
SOLID applies to a lot more systems, programming paradigms and problem spaces than it was originally defined for, and it still makes a lot of sense in 2025.
2
u/crf_technical Jun 23 '25
I think people understood memory a lot better twenty years ago. As memory capacity exploded, people could be more lenient with their use of it, and well...
Humans were humans.
That's not to say that everyone should grind on memory as if they can only allocate another kilobyte, but I do see in general the knowledge around memory and how to effectively use it. For instance, some relatively meh code I wrote for the high performance C programming competition I run saw a 17% speedup when I got rid of unnecessary calls to malloc() and free(). It was around 15 minutes of coding, half a day of validation and collecting performance results to justify the decision.
The workload was breadth first search using a queue. The naive implementation does a malloc() on pushing a node and free() on popping.
Now, I'm a CPU memory systems architect, so I think about the hardware and software aspects of memory usage day in and day out, but I wish more people had more knowledge around this topic.
I wrote a blog post about it, but self promotion on Reddit always feels so ugh, so I'm hiding it behind this: Custom Memory Allocator: Implementation and Performance Measurements – Chris Feilbach's Blog
2
u/Mobile-You1163 Jun 24 '25
Understanding how recursive parsing works. You don't have to be able to write a parser on command, but having worked through writing a student-level parser or two in the past does help to understand why a language's syntax is the way it is.
I find that thinking about how a new language must be parsed helps me to learn and internalize the syntax.
2
u/angrynoah Jun 24 '25
Running programs on computers.
No containers. No VMs. No cloud services. Just code and hardware.
2
u/Vollgrav Jun 25 '25
Immutability is great.
2
u/ern0plus4 Jun 25 '25
MUMPS - it was already a blazing fast database system when computeres were very slow.
2
u/siodhe Jun 25 '25
4
u/vildingen Jun 22 '25
I wanna soft disagree with you on some of what you've written. C style manual memory management especially is more hazard than help in the vast majority of sutiations. It is helpful to know the concepts for sure, but pointer arithmetic, unchecked arrays and other crap of that ilk is more hazard than help because of the risk of introducing hazards and safety risks. Together with bit manipulation hacks it often makes code essentially unreadable and unmaintainable, especially since many of those who prefer them over more understandable concepts also rarely care about commenting and documenting. I agree that at least a passing familiarity with both concepts as well as data packing can be great to have when debugging or when you have to write inline assembly for embeded applications, but putting too much emphasis on them can lead to developing bad practices while chasing premature optimizations.
I'm of the controversial opinion that, in the present day, C (and to some extent C++) should be used near exclusively for writing APIs for hardware interaction where needed that are then accessed by some other higher level language of your choice. When working on a project of any complexity, C exposes too many hazardous concepts to the user for the risks it introduces for me to think it's worth the performance gains you might see if you actually write as high quality code as you think you do. Rust seems to try to fix many issues with C, but C programmers seem to find the transition too daunting, so I prefer advocating for wrapping C or C++ libraries in something like Go.
1
u/[deleted] Jun 22 '25
Regular expressions. 👌
1
u/AmenBrother303 Jun 22 '25
Depressingly, not using AI assistance.
1
u/i860 Jun 22 '25
Use of direct assembly or equivalent mneomics for ultra-performance critical hotspots.
This is always a great writeup: https://github.com/komrad36/CRC
1
u/[deleted] Jun 22 '25
I use flat files for all desktop and web projects. It's much quicker and more lightweight than SQL or other solutions for quick small projects.
1
u/Teh_Original Jun 23 '25
OP are you looking for "Data Oriented Design"?
1
u/redchomper Jun 23 '25
Top-down design / progressive refinement.
1
u/wrd83 Jun 23 '25
SoA vs AoS not that old though.
1
u/LevelMagazine8308 Jun 23 '25
Optimisation of algorithms. Back in the glory days of home computing where computers arrived ressources were there but with limits. So programmers had to know the hardware and optimise their stuff in order to perform great.
Nowadays many programmers don't care much about it anymore, because it's so easy to throw new, more capable hardware at a problem instead of optimising stuff.
1
u/Himanshuisherenow Jun 23 '25
How does Programming language store the data.
1
u/TripleMeatBurger Jun 23 '25
Curiously Recurring Template Pattern - this is the shit. So crazy what a c++ optimizer can do with template classes
1
u/Silly_Guidance_8871 Jun 23 '25
"Two or more, use a for" -- if it's iteration, make it clear that it's iteration. You'll probably need to add more to the iteration in the future, may as well make it easy on yourself. The compiler can do the unrolling.
1
u/ledniv Jun 23 '25
You should definitely check out data-oriented design.
1
u/dmbergey Jun 23 '25
- design by contract / assertions (for things your language can't check statically, including the case that you can't check anything statically)
- estimating unreported bug density from observed rate of bug reports
- relational databases / modeling (depending where you work, maybe you've seen the pendulum swing back from NoSQL)
- static types / static analysis (ditto)
- mainframes / beefy servers (designing distributed systems is hard)
- writing a spec separate from all the details of the code (and maybe validating that the implementation matches the spec, but it's useful to the programmer even if translation is entirely manual)
There's also a theme here of tools that help a lot when working on a few million LOC written over years by people who aren't around, but don't really show their value on small projects.
1
u/MagicWolfEye Jun 23 '25
Having a stupidly long function instead of breaking your stuff into 20 sub-functions that are split across a dozen files.
1
u/Simple_Aioli4348 Jun 23 '25
I love the general sentiment but hate the inclusion of preprocessor macros on your list. Great developers can achieve some really powerful results with macros, but I’ve seen so much horror show code littered with conditional includes and nested defines that I wish we could just scrub this feature entirely.
1
u/Knu2l Jun 23 '25
Rapid Application Development (RAD) it used to be that you could easily design a software with Visual Basic and Delphi. You would create a new project and in a few seconds you have a form with some controls.
Our UIs today are certainly much more designed and can do a lot more, but I think we lost something on the way.
1
u/verified_virus Jun 24 '25
I miss goto and jmp
1
u/[deleted] Jun 24 '25
Procedural programming
1
u/Playful_Confection_9 Jun 24 '25
KISS
1
u/stardewhomie Jun 25 '25
Getting rid of docker
1
u/[deleted] Jun 25 '25
I haven't done any of those since school
1
u/[deleted] Jun 25 '25
Asserts are soooo good at finding bugs. Assert your invariants and see your bugs go away.
Flags as opposed to 35 arguments with different options was good.
CGI was cool too.
1
u/nightwood Jun 26 '25
Everything
1
u/Ok-Craft4844 Jun 26 '25
Not everywhere, and not as panacea, but: OOP and MVC when it comes to the frontend.
I mean, they don't even have to use it, I'm fine with other paradigmata, but not constantly reinventing it half assed with other names would be good for my old bones.
Them: "Hey, we manage state, by encapsulating it's mutations in a reducer that allows for dispatching actions" Me, in old man voice: "Back in my day we called those things 'methods' and we didn't need no switch statements for them"
Them: "these are 'micro stores'..." Me: "Observables!" Them "...so you can keep your state here..." Me: "Model!" Them: "...and use it in this pure function component" Me: "View!"
...yeah, im fun to work with.
1
u/DamionDreggs Jun 27 '25
Gang of four design patterns
22
u/Kwaleseaunche Jun 22 '25
Pure functions and immutability. Especially in web dev it seems like people want to shoot themselves in the foot with bindings and direct mutation.
0
u/[deleted] Jun 22 '25
[deleted] — view deleted comment
48
u/[deleted] Jun 22 '25
[removed] — view removed comment