11

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.

Comments
  • 3
    "main table" code
    I see what you did there :p
  • 2
    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.
  • 1
    @QuanticoCEO that looks tempting
  • 2
    @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
  • 1
    @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.
  • 2
    @QuanticoCEO I might have to also join you in enlightenment
  • 1
    @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.
  • 1
    Needs a java streams update. 😆
  • 1
    @SortOfTested I don’t write java, I’m all C pretty much so I assume java streams is just an abstraction for the tables?
  • 2
    @QuanticoCEO fuck that’s crazy
  • 0
    #ThatWasntTaughtThatInCollege. #justSayin’. Lol
  • 1
    @QuanticoCEO college doesn’t teach shit at all don’t @ me 🤣
  • 1
  • 2
    @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.
Add Comment