Posts

I Was Wrong About Being Wrong

Image
In my previous post ( here ), I concluded that I was heading down the wrong solution path. Now I take it back. Well, at least partially.  I was wrong about being wrong. That's a double hit on one's ego (a.k.a. one's Dunning-Kruger confidence about always being right, about our brain-concocted models of the universe being 101% correct despite lack of full knowledge). The reason I was wrong in this particular case about being totally wrong in the prior post is because my initial "thought experiment(s)" provided useful insights . link for image source is ( here ),  more of Bob's Banter ( here ) and also ( here ) about staying motivated Some additional insights about admitting that I was wrong are here: QAB g ::: Admitting you were wrong QAB y ::: Admitting you were wrong          ^^---  The Mental Breakdown : Admitting When We Are Wrong         ^^--- Our Shrinking Attention Span         ^^--- [ Quastri ...

The Nitty Gritty

Image
  It's time to get down to the " nitty gritties ." The grandiose planning and scheming for the Xpander project [ here ] is done for now. So next I've got to break down the code into smaller pieces and figure out how to do the logic properly. First up is the analyzer for the input text. I've got to consider edge cases as well as the assumed general case. [Note to myself: Use r"/'''"  strings in the dictionaries! QABg ::: python r strings ] [G4G re r strings here ] [OTHER prefixed strings here !!] [Music for reading below boring stuff with is here ] Some of the possible permutations for the input text variable include: (0) An empty text string; (1) Only 1 character          (1a) A received lone char is a P3 or a P4 (no pre-fixed char)                     --what to do? (2) Only 2 characters:          (2a) Second one is a P3 or a P4 while first is not = a valid Abv ...

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 =  ( Query Asked And Answered ) =  QA3 -->  here  and here ] In other words, (Abv = iow ?)   thank goodness I'm developing it 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 macro, I would highlight a text string that was the name of yet another VBA macro and hit a hot ...

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