Hello, I'm MK 👋

I'm a hobbyist programmer and writer

Currently, I'm working on (and learning about) launching my first SaaS


* This page is currently synced live with my private notepad.

I’m conducting this as a form of art experiment, to rediscover the charm of the old internet and personal blogs.

While the writing here might be quite unrefined, it also very raw and authentically me.


Hope you enjoy reading!




Scratch file


18/05/2024 (Tuesday)

  • Note to self: Keep sys prompts simple when fine tuning LLMs, handle the formatting on client side.

05/06/2024 (Wednesday)

Notes

  • Interesting take on dependency hell in the JS ecosystem. Apparently it’s called ‘vendoring’.
    • Actually exposes a very interesting software supply chain problem.
  • Working tiptap example.

30/05/2024 (Thursday)

Notes

  • Perpetual Motion Machines violate the laws of thermodynamics.
    • Unless you are an electron, and your orbit infact is a perpetual motion machine in a classical sense.

27/05/2024 (Monday)

Notes

  • Inform 7 was crazy innovative for its time.
    • The best use case for natural language programming.

26/05/2024 (Sunday)

On rust APIs

  • CPU IO bound / multi threaded APIs run good on rust.
  • Nothing wrong with C# abstraction, but class names can get very nested and long.

21/05/2024 (Tuesday)

Notes

  • Tech Debt is a real thing.
  • Pgsql and Prisma now work locally, time to write some queries.
  • Victor Taelin is cracked genius.
  • DBWeaver CE is not bad, I usually won’t say this about JSwing applications, but boy is it a diamond in the rough.

20/05/2024 (Monday)

Notes

  • Prisma ORM has good Examples.
  • Florr.io is an example of udp protocol in the browser.

Random thoughts


17/05/2024 (Friday)

Notes

  • Chatgpt 4o does not seem to understand that it’s a new model.
  • The JS ecosystem is hot garbage. I love hot garbage.

Thoughts on Hono JS (Another js framework)

  • I like that it has a more “web standards” approach
  • RegExpRouter > radix tree

15/05/2024 (Wednesday)

Thoughts on Dex

  • Dex is a great idea, but the idea died long ago after they discontinued linux support.
  • There’s still a cult following.
  • Intel NUCs and Mini PCs are alternatives
  • Distributed Computing can solve the resource bottleneck of mobile devices.
  • Minimalism sounds good until it’s time to do real work.
  • Docker on SSH could handle dev environments on mobile devices.

09/05/2024 (Thursday)

Notes

  • I wonder if the Pocketbase Typescript SDK is any good.
  • Copilot knows me more than I know myself.
  • Pocketbase collections eliminate the need for complex json data structures.

Thoughts on Pocketbase

  • Sqlite on steroids
  • Scales vertically
    • If it scales vertically, it eventually becomes a monolith. But that’s fine.
  • Made by one guy, who may or may not burn out before it reaches alpha.

Thoughts on pay2win games

  • p2w game algorithms are heavily factors in monetization eg. Roblox.
  • Players do not feel good, but how does the company make money?
  • Literally most MMOs are p2w, they can still be fun.
  • If platforms and games are not p2w, p2u - YOU are the product.

08/05/2024 (Wednesday)

Notes

  • Koa is so much nicer to work with compared to Express.
  • Drizzle ORM has the best customer reviews. So “meta”.
  • Investing in good design is investing in the future.

Notes on this video

  • Composition is important in anything you build.
  • Eliminate shallow classes, write deeper classes instead.
  • Make classses more general purpose.
  • Minize places to handle exceptions.
  • Write documentation as you develop.

07/05/2024 (Tuesday)

Notes

  • Nobody can care enough about your vision as much as you do.
  • Typescript promises will always return at a pending state, you must call .then() to capture the resolved value.
  • Early hires of startups wear many hats, if the founders value data they’re better off hiring data inclined generalists instead of specialists.
    • Also the best piece of “data” you have as a startup will be revenue which companies must hyper focus on.
  • You know what you know, and chatgpt can only elaborate on what you know. (That’s why you have to read a lot)
  • Monorepos are cool, but what warrants a monorepo anyway?

06/05/2024 (Monday)

Notes

  • Took some time off yesterday, back at it today.
  • Has async functions really removed the need for middleware frameworks like express?
  • Just learnt that CORS (Cross Origin Resource Sharing) is actually a thing…
  • Typescript conducts static checks on parsed JSON.
  • Try catch statements are ugly, but I don’t know any other alternatives to write error logic succinctly.

04/05/2024 (Saturday)

  • May the force be with you.

03/05/2024 (Friday)

Notes

  • My motivation is high, I will make small wins everyday.
  • Sveltekit SSR, dynamic routes and APIs can be handled with managed / serverless functions.
    • This repo sort of demonstrates how it’s done…
  • Building a serverful web application that runs on port 8080 with multiple endpoints (Containerized with Docker) , then deploying it to AWS Lambda Web Adapter is apparently called a “Fat Lambda” architecture 😂.
  • Building an API is fun and all, but I really have to start thinking about how it works with the SRR functionality on Sveltekit.
  • Just found out that storing multiple records in json is basically just using an array… my mind is blown.

02/05/2024 (Thursday)

On Yaml

If SQL where built on YAML, it would look like

SELECT:
  - name
  - id
FROM:
  - customers
WHERE EXISTS:
  SELECT:
    - name
  FROM:
    - orders
  WHERE:
    AND:
      - EQUALS:
          - customers.id
          - orders.customer_id
      - LT:
          - price
          - 69

Notes

  • Write out the data structures of the system… how does the data pass through the system.
  • The purest form of abstraction is data.
  • Is runtime memory heap memory…?
  • This is a good lecture.

This post brings up an interesting idea

  • Assume each file exports a single function (no need to use typescript namespaces)
  • Each file ends up being a namespace
  • When browsing functions, file explorer has an easier time finding functions instead of scrolling through a long file
  • Unused code better detected by IDE
  • Cleaner API design
  • Easier to mock up behaviours

01/05/2024 (Wednesday - It’s labour day!)

On Books

Spend less time on programming books. Read more code. Books can be distracting, it’s not how I learn.

Reading code and writing code is how I learn.

Git Gud


On Good Software

Good software is software that does exactly what it’s supposed to do. Nothing more and nothing less.

I will gladly pay for good software.


30/04/2024 (Tuesday)

Jeff Bezos

Just found the original post from Jeff Bezos on Usenet in 1994.

30 years later he is worth 197 Billion Dollars.

“Your compensation will include meaningful equity ownership.”

Deal of the century, as it turned out.


Notes on This Video

Simplicity in software is about focusing on a single fold eg. tasks, roles or concepts. It emphasizes convenience, replaceability and ease of use.

Software becomes easier to use when it is close to our tools. This includes our own understanding of the system.

Every bug found in production has passed tests and type checks. Over reliance on safeguards can be deceptive.

Embrace modularity by only linking abstractions and avoiding entwining components.

Choose tools that support straightfoward concepts eg. values, functions, namespaces, and data structs (JSON, XML).

Complex tools like state, objects and methods increase “complect levels”.

Simplicity should be a deliberate choice in system design, aim to reduce complexity.

Achieving sophistication through simplicity is the ultimate “Good Design”.


29/04/2024 (Monday)

Creating the live functionality of mkchong.com, here’s the plan:

  • Create a symlink to my dot scratch directory
  • Edit notes through the dot scratch.md document
  • Create an auto commit / auto push script to sync my notes when I make changes

My Concerns

  • Memory limits on static hosting
  • Leaking private information
  • Exposing my flawed mind

Verdict

  • Yolo

Hello World!

Hello Internet, i’m putting my scratch.md on the frontpage of my website as an art experiment. Hope to review this in 1 year and cringe at my notes!