Thoughs on programming and life

"How do I even approach building that?"

I'm ambitious. I don't take 'no' as an answer. At least not from myself. Sometimes I even catch myself in the pattern of concerned mothers saying: "You cannot stand up from the table, until the food is finished". This is not the best approach. It causes you to be constantly under pressure.

Today I was asking myself this question: how did built Minttea? You have to be an amazing engineer to approach this kind of endeavor. How would he build it?
...
Where would he start?
How do you even print anything to the terminal?
wait...

Well you use console.log() right?
Okay, I'm gonna print something.\

Hello, World!

yeah. This I can do. I'm printing.
Well If i can print that I might as well print a box.
But what is a box? How all those people even print boxes? hm. I guess unicode can have some special characters? yeah... let's see unicode characters hmm block elements. Let's search: Oh yeah, there it is: Unicode specification of block elements

Wow so I can draw all kinds of thick and thin lines? I can align them on the screen to make a box!!
But how do you align anything on the screen?
How after drawing the top border do I go to the next line...
Next line ! I can use the next line character.

Yeah, but for sure there is a lot of knowledge required, to put something in the middle of that box. I know, I'm a front end engineer. For ages people struggled with centering div, why would I come up with that now...
I would have to calculate the length of the content, take to consideration some kind of padding...

Well... It's just series of lines, isn't it? So I can define the lines (for the sake of clarity in the code) as array of strings, right? and each string I can generate based on the length of the content, and I can add the padding also, to the top bottom - as repeated lines, and left right - as repeated characters!

So something like:\

---------------------
|                   |
|   Hello, World!   |
|                   |
---------------------

Well isn't this a box with content and padding?

Why am I even writing this? Well, I give myself a lot of shit for not doing things, so I started thinking, that I'll just start doing things. This way the things can be done! I don't have to build the whole TUI and use someone's idea / library.
I can just Render Something In The Terminal Window at first.
This way I can learn how to actually achieve anything.

This also teaches me something different that is very important. This is the moment when I work out some kind of intuition about the problem that I'm working with. It is extremely valuable, the intuition is like a superpower later on! The moment you understand what to expect from a given problem, the moment you know how to proceed and what to look for!

So my takeaway from this is: build stuff. Think how the most basic example is made, build more examples, expand. And the knowledge will be there.

tui wip