On programming automatics

Yes I know they are awesome in terms of maintenance. I wish the queries were faster and the clients were smaller.

The mysql2 queries can still be typed, but they are far from being 100% typesafe. But in terms of speed and performance (for example having a connection pool) mysql2 is pretty sweet.

orm is awesome in many cases. e.g. like a blog with ssr, or fir quick prototyping. But I wouldn’t use orm as a client in a demanding project.
And so you have to write all those algorithms optimized according to specification?

Maybe it's a habit for you to write optimized stuff.

For me I can't even write algorithms unless I spend days and bring 80% working solution. I hope to read a book that'll me teach that.
 
And so you have to write all those algorithms optimized according to specification?

Maybe it's a habit for you to write optimized stuff.

For me I can't even write algorithms unless I spend days and bring 80% working solution. I hope to read a book that'll me teach that.
I always try to. It begins from the db design itself. Using correct column types, using indexes in right places etc make a day and night difference.

sql isn’t the worst language to learn. Just give it some time. :)
 
I always try to. It begins from the db design itself. Using correct column types, using indexes in right places etc make a day and night difference.

sql isn’t the worst language to learn. Just give it some time. :)
Not the problem with SQL.

The problem is with these algorithms (functions implementations) where they suck and they fail.

The bugs and the math-like things. Exercises like "code this, so it's something big notation xyz". I don't remember...

This shit gave me crippling anxiety when I was doing it as an exercise. Hence I stopped.

Some buckets inside of buckets then buckets mixed together on top of buildings mixed with cars and boilers. Write an algorithm to sort it all out!

What the hell is that.

You want to see an example? Go to some website like "leetcode" and choose the hardest task. This is what I think software engineers do daily! It gives me pure headache.

https://leetcode.com/problems/kth-smallest-amount-with-single-denomination-combination/description/

Edit: just 2 years ago I would go to Reddit and ask people "anyone struggles" with it? I would get 90% troll replies, 10% replies telling me "you can't, you're stupid". But now I know Reddit is better not visited...
 
Last edited:
Not the problem with SQL.

The problem is with these algorithms (functions implementations) where they suck and they fail.

The bugs and the math-like things. Exercises like "code this, so it's something big notation xyz". I don't remember...

This shit gave me crippling anxiety when I was doing it as an exercise. Hence I stopped.

Some buckets inside of buckets then buckets mixed together on top of buildings mixed with cars and boilers. Write an algorithm to sort it all out!

What the hell is that.

You want to see an example? Go to some website like "leetcode" and choose the hardest task. This is what I think software engineers do daily! It gives me pure headache.

https://leetcode.com/problems/kth-smallest-amount-with-single-denomination-combination/description/

Edit: just 2 years ago I would go to Reddit and ask people "anyone struggles" with it? I would get 90% troll replies, 10% replies telling me "you can't, you're stupid". But now I know Reddit is better not visited...
Leetcode is good, but I don’t have time for it lol. I am an average programmer. I don’t need to solve those leetcode problems right now. Perhaps someday. :p

ps, coming to algo, make it work first and then try to refactor. A poorly written app is better than no app.
 
Leetcode is good, but I don’t have time for it lol. I am an average programmer. I don’t need to solve those leetcode problems right now. Perhaps someday. :p
So doing since 2007 or around that, you still haven't approached this.

Great. And I was stressed!
 
Hahaha twitter won’t forgive you for this. ;)
You mean if I was doing Twitter automation, I'd not be able to handle that because Twitter requires Leetcode hardest exercises ways of thinking?
 
You mean if I was doing Twitter automation, I'd not be able to handle that because Twitter requires Leetcode hardest exercises ways of thinking?
noooo I keep seeing people on twitter swearing by and boasting their leetcode ranks. If you say bad things about leetcode on twitter, they might get you cancelled lmao. :p
 
noooo I keep seeing people on twitter swearing by and boasting their leetcode ranks. If you say bad things about leetcode on twitter, they might get you cancelled lmao. :p
I recall I had similar problems with OSU! game. There were these guys top #1 rank and some of them did jump out of windows etc.

I realized after some time that I just can't get through rank #30k with my setup and lack of knowledge on how to get more skilled.

The same was with ranks in other game.

Jobs are not about ranks to be honest. This is pathological.
 
This is the ORM way: https://sequelize.org/docs/v7/querying/sub-queries/

How is this simpler from raw SQL if it's actually raw SQL + boilerplate of ORM? :mad:

My guess is that this ORM is not something "serious player" ready. If it can't provide subqueries?? What am I supposed to do joins?

Why I can't do both using just ORM without mixing it with SQL? o_O

I'm gonna check different ones as mentioned above.

Actually everything in this ORM feels harder than writing pure JS and pure SQL. Even though I have little experience with SQL.

Look at their comparison syntax like "Op.gt". I'm getting blue writing this. :suspicious:

This is early in the project and there are problems with this dependency. It ain't gonna make far.

Edit (15 minutes later): sorry but the competition looks even worse. I'm not gonna change anything! All that stuff will be sequelize + SQL mix!

This is all created for people who don't go beyond wordpress blogs! HA-HA-HA-hA-HA

C# and .NET - THIS IS MATURE! But I'm not gonna do it for this reason. Steve Ballmer knows the key is developers. Microsoft had a lot more to offer when it comes to developers, developers, developers... but I'm not gonna do puppeteer in C#...

Focus is the key, don't get distracted by bullshit and unnecessary changes. And don't make emotional decisions. If you see an enemy in a thing, look at it like an ally.
 
Last edited:
Actually there are 3 or more ways to do what I want in sequelize.

Instead of subquery, you just write 2 queries.

Or do some self association.

Or just write SQL literal.

And so on and so on...

It's a clusterfuck when you think about something for the first time.

But suddenly doors of perception open and that tight mind blows up and you see the light.

That dissonant feeling when I was writing previous response and thought like "wait... I cannot be the smartest guy out there! There must be something they thought of!". And indeed, I'm not the smartest. There's a way. And sequelize is an ally.

Happy end

And I even had this moment of noticing a syntax imperfection like op.gt. My mind was strongly looking for evidence that change of ORM is really needed. But the hero guard - the self of reaaski - didn't let the ultimate distraction happen. As if learning sql itself wasn't distractive enough.

TIme to get back to the list of tasks. Enough of books!
 
Last edited:
I adjusted my stack

JavaScript:
  "devDependencies": {
    "@types/fs-extra": "^11.0.4",
    "@types/jest": "^29.5.12",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.4",
    "typescript": "^5.4.5"
  },
  "dependencies": {
    "@google-cloud/text-to-speech": "^5.3.0",
    "puppeteer": "^22.10.0",
    "ts-node": "^10.9.2",
    "typeorm": "^0.3.20"
  }

Heh, kinda short, isn't it. And that's what it is.
With Typeorm I get decorators and entities. That's 5000 lines of boilerplate code less.
I can extend it to repositories and entities if I want but I don't need to.

It's important to remove everything and put directories in a more organized order.

I had some packages installed that smelled mid React-developers. Basically people who write super high level code and had never used an imperative language - they haven't even tried and their docs look like they were written during a 15 minute bus ride.

Now Google Cloud? Google cloud is one of the best dependencies your program can have.
It opens doors to real expert packages that are written by world class engineers.

They seem to keep it simple and consistent and OOP, and SOLID, and a lot of that cool stuff that super high level coders don't think of.

1717137835111.png


They don't include "JavaScript" in high level programming. Guess why? Because it's in the skies! It's not even considered valid programming by older coders. If you put it into an environment like Node.js, it looks like programming, but data structures in js by default are still poor.

You got to switch to Typescript and introduce your own structures because it's still kind of poor compared to C# or Java.
 
So my updated tsconfig.json is going be this

JavaScript:
{
  // Change this to match your project

  "compilerOptions": {
    // "strict": true,
    // Tells TypeScript to read JS files, as
    // normally they are ignored as source files
    "paths": {
      "@orm/*": ["./libs/external/installed/orm/*"],
    },
    "allowJs": false,
    // Generate d.ts files
    "declaration": true,
    // This compiler run should
    // only output d.ts files
    // Types should go into this directory.
    // Removing this would place the .d.ts files
    // next to the .js files
    "outDir": "./build",
    // go to js file when using IDE functions like
    // "Go to Definition" in VSCode
    "declarationMap": true,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "strictPropertyInitialization": false,
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "lib": ["es5", "es6", "DOM"],
    "sourceMap": true
  },
}

Then there is package.json

JavaScript:
{
  "name": "on-framework",
  "version": "1.2",
  "description": "",
  "main": "index.ts",
  "scripts": {
    "test": "jest",
    "start": "ts-node index.ts"
  },
  "author": "reaaski",
  "license": "UNLICENSED",
  "devDependencies": {
    "@types/fs-extra": "^11.0.4",
    "@types/jest": "^29.5.12",
    "@types/node": "^20.13.0",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.4",
    "typescript": "^5.4.5"
  },
  "dependencies": {
    "@google-cloud/text-to-speech": "^5.3.0",
    "better-sqlite3": "^9.6.0",
    "puppeteer": "^22.10.0",
    "reflect-metadata": "^0.2.2",
    "ts-node": "^10.9.2",
    "typeorm": "^0.3.20"
  }
}

You need to very, very careful about what you put there or you'll be debugging your program, setup new repositories and try everything from scratch 15 times.

Then I have to run it using "ts-node" because other options didn't work for me and I don't understand what is their purpose.

This ecosystem is weird as it usually is with javascript forks.

Well, C# was more consistent but it was imperative and fully featured which was an overkill.

AI can't teach you how to configure programming environment. Forget it. I read documentation and an e-book on gitbook about TypeScript from Microsoft MVP last night.

TypeORM gives some shape to the project and suggests some patterns.

Well, on top of that I will need chain of responsibility, dependency injection and some separation of concerns.

"lib": ["DOM"]

It's very important to have this under "lib" key in tsconfig.json, otherwise it will tell you referencing "window" object of window and elements in puppeteer evaluations is not doable and you'll complicate stuff with types.

I'll have to install SMS notifications. :/

"license": "UNLICENSED",

- Hello, whatchya doing?
- I'm writing software, UNLICENSED!
 
Last edited:
That's what I'm talking about.

As Gogol does, orher people should do.

Mathematics I got them figured out.

Suddenly I had a revelation screaming in my room how I understand math because I have divine intellect.

I realized that anything in math can be used to create and reveal invisible structures and patterns that are abstractions of our reality in our heads and we can use those abstractions to form different realities in our heads, then make things feasible in our reality by using continous calculations and effects of those models.

Mathematics tools are insane. For example you can create a computer game or model a physics world. But you can also create automated videos like I do.

When you go and watch abstract videos, they make heavy use of exponents and logarithms to create patterns. This is where all that stuff is applied.

So in automation and engineering mathematics tools are very useful and it's just another thing to make engineering powerful.

Understand mathematical concepts in relation to what you're doing and you'll notice the power of it is infinite.

What you need to do is use math to calculate things continously like a CPU or any other device does. You need to understand math is a tool to do things constantly and it's a language of machines. It's the most basic but the most powerful one.

I'm building a module to automate video creation using specific algorithms. I can do this for the rest of my life.
 
Pollution all around

I noticed there's a lot of people with about 5 lifetime submissions running around like chickens with their head just cut and explaining to other people how a software or hardware system is supposed to be built. Usually those use nothing but derogatory language and use simple passive-aggressive techniques to make themselves feel like they win some argument they created in the first place. Well, that's the internet. Everyone can join the party and be whoever they want to be by either pretending or for real becoming that person. Some people just act like they took a role of trolls from World of Warcraft too seriously. You either ignore them or help them leave the conversation. Both ways work. They'll give up with time even if you miss arguments and are wrong. You just want to win with them mentally. Think in a way that their silliness makes you feel stronger by analyzing their behavior and learning from their mistakes.

I can understand how painful it can be when someone wastes another 12 hours and a lot of energy on playing games, figuratively and literally. Then refreshing ad networks dashboard to pay rent. On figurative side they're playing games with society, themselves and minds creating negative atmosphere hurting themselves in the process stalling their progress. On literal side they're playing games like LoL, WoW and whatever else is commonly known as not the most optimal way to spend majority of own time. One of their problems is that they usually use money or their specific achievements as validation of everything they produce. They feel "above other people", they feel like they have worked out the ultimate system and are on par with nobel prizes receivers. However, these people forget above them there are true Nobelists, politics, academics, experienced engineers, millionaires, multi-millionaires, billionaires and whole families that never do what they do. It's a situation that usually happens in teenage years or to people who don't take their time to assess if their submission is toxic or helpful.

Reflection

This thread was made at March 31, 2024. There were some helpful submissions that helped me understand that my own thoughts and abilities will never correspond with what is presented in the books, on hackathons and at universities. Simply because everyone is different and there are no two people built in the same exact way with fixed, predetermined destiny. I cannot become a person that I see on the outside, I can only transform my own personal reality using tools and inspiration available around me. Having this in mind, I can take a deep breath and never again worry about what some alleged engineer with 60 years of alleged experience on Reddit or Quora said to me. To give an example, some people will be extremely bored with academic tasks and some people won't be able to be efficient if they don't have peace in mind. In pursuit of greater things and goals, there's no size that fits all. If we are talking about meeting basic physiological needs, we can apply some universal principles. However, once we step up and want to build something extraordinary, there's a lot of personal decisions we have to make with our comfort in mind.

If you try to put things in perfect, ideal order, you'll have problem opening your mind to new ideas and experimentation which is crucial to find what gives desired results. You'll create a mindset full of perfectionism that may hold you back and you may even stop writing personal notes and stop helping yourself. Some people never write down their ideas and simply try to get everything done only with their own mind. This is a big mistake to try to remember everything and depend only on our own minds which cannot process a big amount of thoughts at the same time. We cannot grow 5th hand, the same as we cannot generate 8 thought streams and efficiently manage all of them. However, it's completely possible to manage 8 people or a program that does 8 things in more or less synchronous way.

Irrelevancy and lack of personal touch

The point of discussion is to speak about a topic and topics that are in relation to that topic. However, transferring too much stuff from one discipline to another sometimes creates an area for distraction and too big digression from the goal of discussion. To minimize it, it's best to specify a clear goal and remind yourself of it by making a simple note and putting in different places in environment.

The goal is to solve one, specific problem:
  • Make money by creating high quality how-to videos and distributing them to specific video platforms on the internet.
It's a multi-step problem that requires a set of technologies and classes to:
  • Automate distribution on social media platforms by using tools like Puppeteer.
  • Automate video production and scripts writing by using database of gathered footage.
  • Automate scheduling of all operations with accordance to settings (either aggressive or slow).
All of the above 3 core problems can be solved using TypeScript in Node.js environment to automate browser tasks and C/C++ to automate video production.

The simplest possible use of C/C++ is to use FFmpeg library and connect it to scheduler based on a file-based database that is SQLite. A big step further is to create scenes, objects and manipulate videos using both graphics specifications like OpenGL and FFmpeg.

Emotional craze

An important thing is to avoid making decisions influenced by emotions, impulses and general opinions seen in the industry. There are no two same systems and there are no two same people. Hence comparing and transferring things from one place to another is a counterproductive behavior.

Picking tools just for the sake of having them in the toolset is counterproductive and generates unnecessary costs in the form of hours spent on learning proprietary formats and tools of which knowledge isn't generally useful.

Pure distraction

While building a system consisting of the specified stack, there's no need to choose a certain operational system, browser, platform, code editor, IDE, 3rd party tool or any sort of an API or a SDK or cloud services. This is pure distraction and this is not solving any problem.

To make decisions in stack design, there's a time about once a week when it's a good idea to do an assessment of what was created, what to remove and what to add. This way it will be clear at which step of the path a project is.

The whole thing is thought of in such a way that there's no need to use mobile phones, desktops or any specific type of proxies. The choice of social media platforms is one that allows to be platform independent and it solves a lot of issues by business choices that work around some problems instead of solving them directly. In other words:
  • using TikTok is a bad business decision due to problems occuring with traffic generation,
  • using Instagram is a better business decision,
  • using social media platforms or e-mail where there's no discrimination of desktop users is the best business decision simply because it allows to skip the process of building a phone farm.
 
Last edited:
Yes, for the first time in the history of myself I reached level 3 where maximum level is 500. I was usually at levels 1.5 - 2 where 98% of my stuff was somehow aligned, but not really well organized. In recent days I removed everything that would distract me on the internet. This took a huge amount of caution from me and required big effort to tell what's really useful and what's really useless. It was harsh as usually to realize how much of the stuff I'm encountering daily is just noise, bad articles and meaningless questions written by bots or some people who aren't genuinely interested in anything that is happening around them.

My workspace on my laptop and on my telephone was completely cluttered with useless information and it was impossible to not get distracted and post valuable information. I was asking myself, how is this possible ME is so distracted if I don't use TikTok, Reddit and Quora. Well, the answer was that people are really distractive. People who don't care about you and people you don't care about. People who don't really care about sharing value and who don't try to understand what living in civilization and society are about. In my opinion it's a giant hivemind and those who are the good bees, can reach higher levels. Those who only parasite, will naturally stay at the bottom and get stuck under middle due to their opportunistic, quick attitude with "feed me" type of questions.

How can someone form a strategy using some quick tricks if they can't even logically connect them together? There's no other path to achieve anything than to learn a lot and inspire yourself by people greater and usually older than you. Filtering things using javascript and css isn't hard and you can write your own addons using userscripts later added to your browser. Bookmarks aren't enough. They won't hide the noise. You also can't block everyone who you don't consider of higher standards. This type of people you can just hide by using your own criteria written in javascript. If you aren't at a level of being able to grab elements from website using document.querySelector and then reading and comparing their values to your predefined criteria, that's time to do that.

Alright, so I added a new module to get unique landing pages and websites without human intervention. I have used 0 APIs, zero dependencies, zero frameworks, zero libraries and I used only pure functions that don't depend on anything other than parameters. For the same parameters, the same values are always returned.

This is the final work:

1720221766953.png


I hope you are happy. Each time it's a unique website with unique images, video footage or anything else I can add to this now or in the future.
 
This is the best ramblings i've ever read.

Can't wait for you to showcase TempleOS V2
 
Back
Top