Posts

Hindsight: Thank Goodness I chose to use OOP for my current project

Image
  I only vaguely remember how my so-called "second" project for learning OOP evolved into my current "Xpander" project . I sure am glad though that I found justification for doing it as an OOP project based on the idea that I will need different instances (a.k.a. different lookup dictionaries) for different situations  (a.k.a. different " contexts " ) . [QAAA = QA3 = here  and here ( Query Asked And Answered )] In other words, (iow ?)   thank goodness it's developing as an OOP project. The project is too complex to not be an OOP project. [QA3 = here ]   ( Link to first image on the right is here ) Let me "step back" in time a bit. I used to write work-related macros in VBA for MS Word. My two most useful, hot key activated, macros were called "DoThis" and "ConvertThis" (made up names here). For the first, I would highlight a text string that was the name of yet another VBA macro and hit a hot key combination. The other m...

More Design and Planning for My "Xpander" [Abbv] Generator

Image
  Initial Draft ideas for  special Xpander cases The P4=(~)P3=(`) sequence: In this case consideration, the user types the following sequence ( each square bracketed [item] is a keystroke while curly bracket is multi-keys ): [space]  {script  name} [P4] [P3] [ script type ] { optional params k-v key name } [space] To do this, the users hits Shift with the left thumb and Tilde with index to invoke  [P4]    before letting go of Shift and hitting same Tilde key for generating at least a first  [P3]   ( there can be more P3's to follow )  {script name}  is one or more characters and specifies the name of a script to be run but does not include the registered file extension of the script ( e.g. the (dot).py extension ) Before the  {script name}  there can be a null, or a space or a line feed (LFCR) ( Note: The null case occurs when there is no space to the left of the  {script name} . it starts at slice index = 0 ...

Reverse Polish Abbreviations Generator

Image
[ The below provides a good example of pseudo code thinking about how to re-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 a project that 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 explained below and also in my next post .) So I was initially thinking like a programmer and assuming that the abbreviation expansion trigger (e.g., the prime char [`]  on the keyboard) should be hit first (in so-called "pre-fix" style) in order to invoke an abbreviation expansion operation. However,  I should have been thinking like a user of the software not like a programmer focusing on delimiters. Please se...

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...