Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Here’s the page and the paragraph on the other side regarding table based solutions referred to in the rant.
Personally it’s one of my favorite and “easiest” refactorings that I do the most. Because of how impactful it can be. Some refactorings do very little OR take a lot of effort.. this is probably the quickest. And reduces the code the most. -
@RememberMe OHHHH LMFAOOO... that was not intentional.. that was a mistake but funny how that turned out.. I won’t edit .. it was suppose to say maintainable LMFAOOO. Brain thinking faster than my fingers haha
-
@Bubbles dude.. when I figured it out a few years back without the book more or less on my own... I was trying to clean up legacy code that was sooooo bloated I was like there’s gotta be a better way.. slept on it woke up the next morning and I was BOOM! Tables .. , it was kinda life changing hahaha.. i was like woah, how did I go this long without seeing this possibility.
-
@Bubbles to take it further I’ve done the table thing with function pointers.
Completely eliminated switch statements and large if else blocks, replaced with for loops thru tables, and or function pointer table arrays. -
@SortOfTested I don’t write java, I’m all C pretty much so I assume java streams is just an abstraction for the tables?
-
@QuanticoCEO
Nah, just left page would nowadays be done using the optional monad a map operator and reduce it all into the jpanel so it's all pure functions.
Related Rants
-
QuanticoCEO32From the guy who wrote all the Programming Microsoft books and the Annotated Turing book. Comes this book. Th...
-
QuanticoCEO7Working in the embedded systems industry for most of my life, I can tell you methodical testing by the softwar...
-
QuanticoCEO35Forgot to post a book yesterday, so maybe I’ll post two books today... Anyway, this book, I found it recen...
Here’s the second book for today.
Another small 100 page or so book.
It’s called advanced programming techniques, personally I don’t like the title, I don’t consider most of the items in here advanced, I would consider them more “better ways of solving a problem”, they do talk about recursion and linked lists, so I guess that could be a little advanced.
But like table based solutions is not advanced it’s just a technique that allows for simpler, scale able and main table code.. I been doing it for a long time, most easiest way to determine if something can turn into a table solution is look for a function that has a bunch of calls to the same function or something of that nature lots of repeated code with slight changes in a function or range of functions .. those of simplist way of “tablefiying”a solution I will picture the example from the book below.
The book, is all in java except for linked lists Thats in C..
But anyway this book is a great quick reference book, into the pile with programming pearls book, and those like that.
rant
bookaday