Posts

Reverse Polish Abbreviations Generator

Image
[ The below provides a good example of pseudo code thinking about how to structure and progressively evolve / improve your program ] So in my previous post about "Something (Not) Happening" ( here ), I hinted at my reversal of strategy. I'm now switching to the use of  "post-fix" operators  instead of using "pre-fix" ones. This was for what I called my abbreviations -expanding Python program (an OOP project) but now I'm generalizing it to be an "Xpander" class for more than just abbreviations. ( The latter revealed below .) So I was initially thinking like a programmer and assuming that the abbreviation expansion trigger (e.g. the prime char [`] ) should come first (in pre-fix style). However,  I should have instead been thinking like a user of the software. From the user's perspective it goes like this: You are typing some prose in left to right progression, say: " The quick brown fox jum...". As you hit the "j...

Something Happened (Not)

Image
There are times when it seems like nothing happened. [ Link to Memes Gen here ] [Link to Heller's book here ] Where was I these last few weeks (months?)  Can't fully remember. That DOES happen when you're 70+ years old. I had committed to journaling my travels through the Learning about Python (LaP) lands. Learning coding . However, unlike Odysseus of Homer fame, I fell for the Siren Calls of easy-to-do scroll ing habits. In particular, those of collecting binaural sound tracks. I've been "busy" as a non-productive bee in mindlessly hoarding those sound tracks   plus more  in hopes that listening to them will make me smarter. Of course, they do the exact opposite. The hoarding embeds itself as a non-productive, time-wasting bad habit. In short, I've succumbed to the allure of the Siren songs in place of finishing my second Python OOP project. ( See the sirens of Odysseus here ) That brings us to the topic of acquiring non-productive / subconscious ...

Me too ! I seem to have forgotten everything

Image
 [ Music for listening to while reading this page] [ Epilog: More things I've forgotten] So, here I am, ... confidently  working up my next OOP project. I get the idea that I wnat to see the latest directory of my newly defined class -- what methods have I created in here so far? So use the dir() function. Right? But the function returns a very long, long list object stretching across one line in the console. No good. I want it broken up into smaller pieces. Oh no! How do I do that? I'm cluless. My mind is a BLANK. I go to sleep. "Idiot!", my subconscious replies upon waking up. Have you forgotten how to slice a list? Seems so. Amnesia has struck. It happens. Even to me. Luckily not a permanent condition. Point is, we have to repeatedly go back to fundamentals (back to our roots) and refresh them or else we forget them. Even the most elementary ones. Eventually, I got it going. But in the process realized I don't remember how to convert a list into a set of st...