Posts

Back to Basics after My Code Chokes from Bloat

Image
Humility. Simplicity (KISS) Frugality.  These are some of the principles we are taught to keep in mind as we add more and more code to our projects. Alas. I strayed off the path. And now my Xpander project modules are crashing during compilation due to a host of never ending syntax errors. So it's time to start over with a clean slate. Back to Basics, Return to Roots. But wait. I hear that "UV" is the superior way to launch a new project. How do you install and use UV as a beginner?   ( <-- YouTube search results)     ^^^-- Astral install site here     ^^^-- TwT's answer here     ^^^--  Corey Schafer's  answer here     ^^^-- Josh's answer here     ^^^-- Indently search results ::: UV here (includes TOML)     ^^^-- How to Use UV in PyCharm Shaw ::: The Fastest Way to Install (and Use) Python Indently's advanced UV commands here TO BE CONTINUED  MORE TO EXPLORE QAB-g :::  Use UV to set up your P...

Typewriter Echo Mode for my Xpander Project (a.k.a. 2nd OOP project)

Image
So far I've been operating on the premise that my expandable text (that which is to be expanded by the Xpander module) is going to come in from a pre-existing file. However, another use case is that where the user is inputting original text via the keyboard and expects to see his/her keystrokes immediately echoed on the console. In that case, I will need to send each keystroke to two two different destinations: (1) first to the console and (2) secondly to my three parsing buffers (Buff_0, Buff_1 and Buff_2). If an abbreviation expansion is triggered by the incoming text, I will have to erase part of the text on the console and replace it with its expanded counter part.   I don't remember if there is a clear-current-console-line escape code that will work on my computer's console. Time to go back and research the issue. ... TO BE CONTINUED I should storyboard the plan per own advice about storyboarding before coding: I only need one function, not a bunch of instances as was...

Enough Goofing Off (in a Dopamine Hole), Time to Dive into Hard Tasks Again

Image
This post is part of a showcase of how a " story board " is invaluable in helping to develop the code (e.g. Python) for implementing the desired outcome. [more on storyboarding ( here ),  ( here ), and  ( here )] In my previous post ( here ) I took a pass at explaining my below, "partial" flowchart for my "Xpander" project.  Now it's time to explain the details, this again happening well BEFORE writing any of the corresponding Python code. (click on the image to enlarge it, back a page to return to here) (or get image separately  here ) Just to recap the overall scheme:     (a) First,  I decided I was going to parse the incoming text into three buckets, or buffer "lists" (as I will be implementing them). The decision of which buffer to dump the next incoming piece of text into is performed by a three state, sequential state machine having states S0, S1, S2 and then looping back to S0. [Post script: A new idea just came to me : Add a f...

Retreating to Obsidian Again for Sake of Re-Setting and Re-framing

Image
For reasons not apparent to my conscious self, I felt a pressing need to break off from my Xpander project ( here ) and retreat to the comfort of generating a bunch of Obsidian notes and of "relaxing" and reading a bunch of Reddit posts. Doing this, of course, raises the red flag of me engaging in a Dopamine-driven avoidance of the hard tasks. It reinforces my counter-productive habit of constantly retreating to the comfort of mindless collecting and hoarding of bookmark conten t . [ specific e.g. here ]  ... Come to think of it as an aside here, I think I found an answer to how to organize my Blogger bookmarks. The answer is to work backwards ! First locate the titles of my posts here on Blogger and then, using those; create folders in my weekly bookmark saves with the same names. For example, create a "Brain Boosters" folder under my "Learning" [about Lea r ning] major-tab, create an "Every __ explained" folder under my "Other Sw" maj...

I Was Wrong About Being Wrong

Image
In my previous post ( here ), I concluded that I was heading down the wrong solution path with my Abbreviations* "Xpander" code. [* = Actually abbreviations plus scripts & url's] Now I take it back. Well, at least partially.  I was wrong about being wrong. Two wrongs do make a write -- meaning, something to write about. The two oopsies could operate as a double hit on my fragile ego (a.k.a. my Dunning-Kruger  based confidence about always being right, about my brain's concocted models of the universe and them being 101% correct despite my lack of full knowledge of the universe ). One reason I was wrong in this particular case (wrong about being totally wrong) is because my initial "thought experiment(s)" did  provide useful insights . I now more clearly understand what problems I'm facing in coding up the Xpander project. link for image source is ( here ),  more of Bob's Banter ( here ) and also ( here ) about staying motivated Some additional in...