-
-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Please give me a little leeway as I'm old enough that I think that early onset dementia is setting in. As a backend dev in the late 90s, this is the most aggravating thing.
Being in a wheelchair sucks. But begining to loose your concentration is absolutely infuriating.
MOF I saw and had your new video playing but could not write this and play it too. So I am not sure what was covered in the new video yet.
I found this video 2 days ago and was finally able to get it coded. I want to thank you so much for your videos.
While I thought your channel name was a little intimidating, I can chuckle at it now. And to be frank I do suck but I am trying to learn more.
I saw and understand your comment about not modifying the orgnl code base, but I did not know where else to stick this question / observation.
First additional code suggestion. To me anything that could be user modified should be pulled out and defined first.
So this is what I came up with.
You'll have to ignore the camelCase as for some reason VScode had an issue with the underscore and dash in the variables which leads to the second question.
### all user config variables ###
batchSize=1
barChar="|"
emptyChar=" "
barLength="50"
#findString="*.temp"
#findString=$1
findString=${1:-"*.cache"}
sleepTime=".02"The other improvement that I did was turn findString into a user supplied arg. This means I run this as $ . progress-bar-mine.sh "*.temp"
I'm also proud that I found the findString=${1:-"*.cache"} allowing for a default if not defined. Something I had never seen before.
I'm sure you can figure out the rest of the code.
Second I was completely confused as to your (I'll still have to read your style guide) as to your mix of UPPERCASE, dash-defined and underscored_defined.
So, why do you use one over the other ? Or where is one used and not used ?
I had read in a book (I have no idea where right now) that ONLY system wide variables should be defined in all UPPERCASE.
But again I was totally frustrated that VScode was not allowing your syntax (however since I don't use VScode that much there might be something that I was doing wrong).
One of my very long time standards that I strictly adhere to is that I use 1 hash for code comment and 3 hash for user supplied comments. I think that it makes it clearer what is code and not.
LOL Heck I even have a header template that I strictly adhere to but does not seemed to be favored by anyone else.
Again please I have not been able to watch and follow your newer video. Sorry, if I doubled up on any talking points.
But wow I have a lot of your videos to watch :)