Open source is the secret manual of code magicians ๐ง
It contains all the spells to conjure any form of magic application. This makes being a programmer a not-so-secret profession (it's all open after all!)
That's how open source empowers you in your quest โจ
Open source: free programmer's manual
I go around saying that being a programmer is one of the easiest careers. Only half-joking.
Why? Open source.
It's like a free manual of all the best practices from the best programmers and teams ๐
Many other professions keep their knowledge secret, precious. Code instead is open, and you can learn from it, for free.
Everything being open, you can learn to code on your own; the only requirement is a PC and an internet connection. This is so not-true for many other professions. That's why you see programmers at all ages and from everywhere. The barrier of entry is so low.
Not enough? Here some more for you uncertain out there:
- High paid
- High demand (and growing)
- Creative
- Always changing, always evolving
- Remote
Open source is open feedback
GitHub is a collaboration platform. Issues, reviews, and PR are designed to polish code in an open discussion. In open source, anyone can become a reviewer.
The best and fastest breakthroughs in my knowledge of a library came when people reviewed (and criticized) my implementations.
You implement something that works. "It works" may sound good enough. But is there a better way? Am I missing something?
You only learn this in 2 ways:
- After 6 months, when you look back at your own code, and you are so ashamed on how bad it was
- In an instant, when someone shames you right now with a code review (and helps you get better)
This happened to me more than 1 year ago as I was diving deeper into Effect. Tim Smart (from the Effect team) reviewed my code, showing me some patterns that I am still using today (PR)
Be a reviewer yourself
Gold lessons are found in reviewing others code.
You approach problems with a unique set of assumptions and strategies. Suddenly, you get smacked in the face by the genius of someone else.
You see the same problem from a complete new perspective. It's like opening a new path in the road, and you see it as clear as it gets, with code ๐ช
The more you poke in someone else's code, the more patterns you pick up. With time your tool set expands, you can solve any kind of problem.
Steal code (patterns)
Open source is open. You are totally free to read GitHub code and steal best practices and snippets.
Look for patterns: discover how to solve a problem not in the specifics, but more the general design choices and why they work ๐ก
With GitHub at your fingertips this process becomes a breeze, for any repository on the whole platform:
- GitHub advanced search
- Search folders and files in any repository
- Search any term in a file or subfolder
- Inspect references generated by GitHub
Tip: Tests are one of the best sources of stealing material. Most tests are small but complete enough for you to understand how a feature or API works ๐ช
Open source powers in practice
Here is a concrete example of how I discovered the source of a bug by flowing through GitHub open code.
This was the issue:
Some runtime issue when executing a query. It's not immediately obvious where this error is thrown.
Now, jumping through code references on VSCode didn't help. Time to search GitHub. I opened the possible culprit repository and searched SelectQueryBuilder
:
Searching SelectQueryBuilder in the immediate dependency that caused the error, but no results.
No results. I moved to scan the dependencies of the dependency. It's open source after all! Only one dependency, interesting:
{
/// ...
"dependencies": {
"kysely": "^0.27.2"
},
"devDependencies": {
"@powersync/web": "workspace:*",
"@journeyapps/wa-sqlite": "^0.3.0",
"@types/node": "^20.11.17",
"@vitest/browser": "^1.3.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"vite": "^5.1.1",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0",
"vitest": "^1.3.0",
"webdriverio": "^8.32.3"
}
}
Moved to kysely
repository, and searched for SelectQueryBuilder
again:
Found the source of SelectQueryBuilder using GitHub search!
Found it! I opened the file and searched again for the "don't await SelectQueryBuilder" error:
Reached the exact place where the error originated!
Solved! Knowing the exact source of the issue was the key to fix it (or implement a sensible workaround) ๐ฏ
During the research progress, I also learned more about the internals of the library, its design choices, and the rationale of the implementation ๐ก
On the topic of help and open feedback: I updated the offer for Typeonce (new landing page).
New offer on Typeonce: personal 1-1 support for developers looking for support while learning or working on their projects.
I found that I enjoy supporting devs as they work on their projects. If you are looking to improve your skills, fast, I am open to help you with code reviews, feedback, and features implementation ๐ฏ
Meanwhile, new release today: Effect with React 19: Project Template ๐
Also, Effect Days 2025 are happening in Italy next year, and I'll be a speaker! You can grab your early bird ticket by joining the community on Discord ๐
Effect Days is coming on March 19-21, 2025! Stay tuned for more details soon! ๐๏ธ Want to grab your tickets early? Be sure to join our community: discord.gg/effect-ts
More projects coming on Typeonce in the next weeks ๐
See you next ๐