2020 Week 24

Back to Two Space Indent / Google Requires Bash / ShellCheck Utility / Yes, Shell Will Get You a Job / Fighting Depression from How Stupid Humanity has Become — and the Rain / Learning to Learn Requires Reading and Writing / People Generally Suck at Writing / Lazy Learners / YAML as the API of Knowledge / 80 Character Width for YAML / Blank Line Around Markdown Code Fences and Divs / Default Syntax Highlighting Back On in kn / OpenPGP Signed Knowledge / Having a Really Hard Time Going Back to Golang / Return to Gamified Challenges / Language Strengths vs Syntax / Rust is Just as “Read-Only” as Perl / Drowning Out the Assholes / Second Thoughts About Shit

Thursday, June 18, 2020, 6:46:47PM

I seriously can’t get anything done because I keep having better ideas before implementing the previous idea. It is getting really annoying.

The latest comes from really looking into the different forms of knowledge node and realizing that if I can have an entire node just for a concept or term definition I certainly can have one for a blog post. This addresses another concern I was starting to have for letting users order their blog entries the way they want when reading them as well as being able to link to specific blog entries without having to load up the whole weeks worth of stuff.

I’ve also been changing recently to putting some sort of title on the blog to give a summary of it, which means I might as well title the things.

The real question is what to make the URLs. Some say that the text in the URL gives it a better score. I don’t really care. I just want a short, time-based URL. Hummm …

2020/wk24/some

Yeah that’s the ticket.

Thursday, June 18, 2020, 5:35:45PM

My entire life I have struggled with seeing dumb shit and not having an appropriate outlet for it. I thought the ‘Shit’ page here could help with that. Then I experienced another racist prick who uses that approach specifically to appeal to a specific type of person and I’m like, “Oh shit.” Yeah. It became clear that my venting could easily be taken up by that same type of person.

Words are powerful and no matter how raw and frustrated I get from being engaged with the world I cannot let it make me behave in ways that I so deeply loathe in others. I am just a hypocrite at that point.

I’m not saying I’m going the other way and becoming a snowflake afraid to disagree with anyone for fear of offending them simply by contradicting them. A good debate is needed, not a personal, shit-flinging fight.

Thursday, June 18, 2020, 4:55:40PM

Reminded today that some people are just such assholes and sometimes I’m gonna get asked about them. Some YouTubers are obviously misogynistic, racist, bigoted pricks who make fun of autistic people. After a bit of personal frustration with the existence of these people and some support from my wife and community I’ve recommitted to not get mad, just get busy. I have to drown out these dumb-asses not just because of their tech preferences but their influence on particularly young people.

Lucky I have one big advantage. I can form relatively persuasive sentences that form paragraphs. Most of these assholes spend all their time making lame videos and pumping up their echo chamber forums rather than creating anything of substance. But then again, the world largely doesn’t want to read any more. Idiocracy is real.

Thursday, June 18, 2020, 9:12:07AM

The more I toy with Rust the more I realize that a languages strengths are often disassociated with its syntax — but not always.

The stupid implementation of generics in Go to save a few compilation milliseconds at the cost of syntax clarity forever was not worth it. Just shows where the current Go teams priorities are.

The Rust syntax is dense, but not difficult once you understand what is going on. It reminds me of Perl so much it’s uncanny. I chuckle a bit that so many people are Rust lovers while at the same time hating on Perl for its “read-only” complicated syntax. Rust syntax is far more dense than Perl’s for most applications.

Still I don’t mind. God knows complicated syntaxes have never thwarted me in the past. I have to say that the amount of raw, on-the-metal power Rust provides with the promise and hope of a world full of safe code is overwhelming, but I’ve been burned by languages making lofty promises before. *cough, Java*

Wednesday, June 17, 2020, 5:17:41PM

The CTF games https://overthewire.org and https://picoctf.com have reminded me overwhelmingly that the secret to having fun learning is gamification. I’ve always done it, but I sometimes move away from it a bit as I get all teacher-y and start explaining stuff.

Well I’m here to report that returning to challenge-based learning is a massive success. Every private mentored session starts with me giving a challenge in terms of the specific outcome and not telling the person anything about how to accomplish the challenge, only the key terms and words they need to understand and research on their own to do it. The reaction has been overwhelming — so much that I really need to add a point system to the whole thing eventually so people can have me check them out and give them the points somehow, if not just encourage them to keep track of them all somehow.

There are so many things that need to go into this new knowledge app. I have to keep at it.

Wednesday, June 17, 2020, 4:16:32PM

After doing a few small challenge projects in Rust I’m finding how much I really love Rust, not for the syntax, but for the absolute freedom and seriously low-level of the language. It is far easier to integrate C and C++ code with Rust than Go, and safer to do so. There are number of other things bumping around in my head that are really annoying me more than I care to admit about Go:

Wednesday, June 17, 2020, 9:13:35AM

I’ve turned on syntax highlighting by default in kn because the blank line fix addresses it. This will result in substantially larger knowledge base renders than with it turned off but will allow people to provide their own loadable syntax highlighting. It is just a matter of time before the default knowledge base template contains the JavaScript to tap and pick from a number of different syntax highlight options that the reader can set based on their preference. I cannot wait, actually, that is something I have been wanting to do ever since I set all the standard colors of the rendered Web version as CSS variables that can very easily be changed and stored in the browser or even downloaded as a JSON file.

As much as I want to do other things eventually, this work on kn and the README.world is so important that it must take priority. When fully realized the world will have an easy way to capture, maintain, share, and consume knowledge according to the preferences of the reader. Taken to the n-th degree this could become the foundation for all knowledge, even proprietary knowledge that needs to be sold. I have not encountered any other solution to this problem that incorporates so much of what is already best practices.

By the way, I cannot wait to integrate OpenPGP signatures as well. Every time I see a star by someone’s name in Twitter indicating that Twitter has graciously decided to confirm for the world that a person is who they say they are I feel a little kick in the butt to get signing working. This is a problem that already has a solution — that no one actually uses because they think it is too hard.

Wednesday, June 17, 2020, 8:30:42AM

I’m super annoyed that Firefox decided to actually make whitespace a node that screws up pre-formatted blocks. There is simply no way around it without a horrible JavaScript fix that does not work for text-based browsing.

I did find a fix for Markdown documents that I hate but will have to start following. Always put the fence posts in a code fence on their own lines and deal with the extra blank lines always at the beginning and ending, which is easy enough through some style changes.

This goes for Pandoc div fences as well:


Do this:

```js


console.log('hello')


```

And this:

:::co-pwz

No seriously.

:::

That makes it more readable and searchable anyway so I’m fine with that convention — especially since it gets entirely out of the way when doing optional syntax highlighting.

Wednesday, June 17, 2020, 7:59:27AM

Even though Linus even came out and said 80 characters is too limiting for line lengths today, and the fact that I have been pushing for one-big-long-line paragraphs in Markdown paragraphs to play better with panes that might be less than 80 characters I have adopted a 72 maximum line width convention for my own YAML knowledge base data, including the Summary and paragraph forms of data.

Here’s the thing. Once you sign off on putting your data into YAML instead of Markdown you are accepting that white space matters — particularly initial white space since it is a fundamental of YAML syntax, structure and readability. Such is not that case with Markdown. Having a super long text value wrap and break up the clean whitespace lines to the left is simply so ugly and hard to process that I couldn’t take it.

Luckily Vim and other editors will automatically do this whitespace indentation for you. And since Python is still so popular with people in the world they will be fine with it.

This works particularly well for a new knowledge node format I’ve called ParaList which has a distinct topical sentence T and a paragraph body P. I can see if the topical sentence is getting to long just by seeing if it wraps.



---
Title: Don't Be a Lazy Learner
Subtitle: Identifying an Anti-Autodidact
Quote: This is all just too much talking.
Query: true

Type: ParaList

Summary: 
  Sometimes understanding how to become one thing means first understanding
  what that thing is *not*. Here's a list of characteristics and behaviors you
  will find in an *anti*-autodidact, a lazy learner who would rather make
  excuses than do the real work to learn on their own.

ParaList:

- T: They are bored and confused by words in general.
  P: The more words, the more they check out, spoken or written. Most have
     a ridiculously low vocabulary and don't ever let on how many of the words
     they don't understand in any given conversation. 

- T: They don't have the capacity or motivation to figure things out.
  P: They say shit like, "I don't get it" or "It's not working" or "I did what
     you said" or "The stupid computer won't..." or "What is happening?" They
     ask a lot of questions during movies.

- T: They want to be in the same space with people who *do* learn. 
  P: They are uncomfortable working from home. They wander into your cubical at
     work a lot. The feel safer in your presence because they don't on their
     own. They feel they need you close to learn, even on their own.
---

Typically such format constructs will have the topical sentence be first and all bold while still remaining a part of the paragraph.

Wednesday, June 17, 2020, 7:29:45AM

YAML is the API of knowledge. I don’t think I fully recognized the genius that is behind the full and much derided version of YAML until I started thinking of all my knowledge in terms that would fit into one of a few self-made knowledge organization types. Turns out there are only a few constructs we use to capture our knowledge and all of them can be easily categorized as knowledge format types. I’ve been building out the list made a few blog posts back and as I’ve been converting my RWX.GG knowledge base over I’ve been loving it in ways I’m quite sure very few others will appreciate. Doesn’t matter. I know Aaron Swartz would approve. His is the only opinion I would work to win over.

One dilemma I am having, however, is how much to dismiss the idea that all knowledge should be able to be written by anyone. I still maintain that Pandoc Basic Markdown is the world’s most universal and simple format for knowledge without losing sustainability. But putting more of my knowledge into the YAML section instead of the Markdown section could be see as a move away from easy to attain technologies.

Basic YAML is so easy to learn and maintain and read that I feel like this move is consistent with my primary goal of knowledge format simplicity. If anything it might help people categorize their knowledge as they capture it by pre-meditatively working from a few common organizational formats that don’t have anything to do with a heavy syntax such as HTML — or worse – XML or the semantic web specification.

One thing is for sure. Even if I do move my knowledge formats into a form that requires learning YAML as well as Markdown and it puts it out of reach from someone who just knows basic Markdown I feel I need to do it anyway for much the same reason that a Mathematician would use LaTeX within Pandoc to describe their knowledge. Some knowledge must be more structured than simply a whole bunch of Markdown.

Wednesday, June 17, 2020, 6:54:41AM

Yesterday I had a lazy learner during the live session say, “This is just all talk”. The topic was “Get Linux” which requires an enormous amount of discussion to get right. I made a big deal explaining how important it is to assess the needs of the person to whom you are recommending a Linux distro before just blurting out, “Manjaro is the best!”

People who make recommendations without considering the needs of the people they are recommending too are irresponsible egomaniacs motivated by something other than the welfare of those they claim to be helping.

Lazy learners have a few things in common:

Wednesday, June 17, 2020, 6:38:53AM

While helping people during private mentoring I’m becoming more aware of just how difficult it is to get a handle on one’s own knowledge management. In fact, I’m now convinced it just might be the single biggest thing blocking people from doing their own learning, from becoming a true autodidact. Without being able to write down what it is that you are learning and learn from your own written self assessments that you can search for later you just cannot learn effectively. In lay terms, you cannot learn without taking good notes — especially if your notes are also your main text book.

This is a bit frustrating because the number of people who simply don’t even know how to form a sentence — let along type it quickly and coherently into a codebook — is far too high. I think this was part of the reason I was so frustrated later. I realized that my formula for learning might simply not be as universal as I’d hoped because of this major prerequisite. If you cannot read, write, and type you cannot become an effective autodidact — let alone create your own exercises and execute your own activities and self-assessment. Learning to learn is actually way harder than I have thought it to be, but like so many things, because I surround myself with those who have already learned it on their own I’ve had the impression that its not difficult at all. Having them around me has confirmed a false bias and conclusion that learning is easy, that it is innate, that it does not have to be taught. It does.

In short, I need to have a boost for each of the RWX elements, reading, writing, and executing. I also probably have to have one for basic computer algebra.

Tuesday, June 16, 2020, 5:58:37PM

I have had a lot of success moving to a more data model approach to the knowledge bases. It feels a lot like what was intended behind the semantic web but more focused on localized, even personal, knowledge instead. If there is one thing I continue to obsess over it is organizing, capturing, and sharing knowledge in a digestible, searchable way.

The latest breakthrough was adding a Challenge category with the Prereqs pointing to other HowTo type knowledge nodes. The Challenge nodes are of type HowTo as well.

Tuesday, June 16, 2020, 5:35:46PM

Don’t know if it is the dreary day outside but feeling a little depressed. I have all the reasons in the world to be happy. Let’s face it. I’m a sun worshiper. I always knew it.

I think I’m battling feelings of being under-appreciated a bit as well. I know that people value what I’m putting into the world — for free — but I do sometimes wonder if they realize just how valuable the information I am putting out there is. Yesterday I reviewed an absolutely horrendous book that is $37 at Amazon. I fell for it. I bought it. It absolutely sucks. But they have my money no less.

Meanwhile I continue to endeavour to put out high quality accurate, modern content that is backed with objective experience and research only to have to deal with the occasional downvote from a dolt who doesn’t even know what the word dolt means.

I am seriously saddened by the overwhelming level of stupidity rising all over the world. All I can do is help to fight it with every breath. But it is the incessant attack on my optimism that eventually gets the best of me and makes me just want to do the minimum to get by and languish in escapism for the rest of it. So many people live in their escapism — especially now.

I need more coffee.

Tuesday, June 16, 2020, 4:23:03PM

I read a dumb comment in a StackExchange post that said, “Why would you ever learn shell? No one ever gets a job with that.”

I can’t believe that level of cluelessness of that statement. The thing that people think isn’t “going to get them a job” is actually the most magical way of making the 10x better than anyone else qualified for that job — especially if you are going into anything in cybersecurity or systems operations.

Monday, June 15, 2020, 9:43:09AM

Looks like Google’s shell scripting guide agrees with my conclusions on pretty much everything. It doesn’t just validate my conclusions on Bash but everything I keep saying about all the shitty advice out there — particularly on YouTube.

One thing that convinced me to go back to two-space indent was Google’s guide. The waste of space has started grating on me — especially now that YAML is being affected. I would rather have more levels of modern nesting than a default that wastes space.

Also discovered shellcheck after reading the Google guide. This isn’t the kind of utility that I would have exposure to in my previous POSIX-only life. It is an absolute must for beginners and will definitely be the first thing I introduce, along with bat for test-driven shell development.

I did discover that there is a readonly keyword which is the same as declare -r which is far more useful when declaring global constants. I also ran into an interesting quirk that prevents the use of any readonly variable name anywhere else in the code. It throws an error even when using declare within a function scope.

I confirmed again that declare is exactly the same as local but learned that the local keyword accepts all of the same options that declare does. Therefore I will begin using Google’s convention of local only for stuff within functions and declare only for global stuff at the top and readonly for constants. While there is no technical requirement to do so, this distinction makes for much more readable code.