How to become a good programmer? Updated 2025-07-16
Or: how to learn X.
This pops up on Reddit every week.
The right question is: what is the most awesome project I can do to improve the world?
Then, once you decide to try one, if that involves programming, only then learn to program to achieve that goal. And don't stop learning what's needed until you either get the thing done, or decide that it is actually not a good idea, or not possible, or that there is something else more important to be done first.
But if doesn't involve programming, then don't learn to program, and learn whatever you actually need to reach that goal instead.
Having that goal is the only way to be motivated to do something.
This is the essence of backward design.
How to decide if an ORM is good? Updated 2025-07-16
How to decide if an ORM is decent? Just try to replicate every SQL query from nodejs/sequelize/raw/many_to_many.js on PostgreSQL and SQLite.
There is only a very finite number of possible reasonable queries on a two table many to many relationship with a join table. A decent ORM has to be able to do them all.
If it can do all those queries, then the ORM can actually do a good subset of SQL and is decent. If not, it can't, and this will make you suffer. E.g. Sequelize v5 is such an ORM that makes you suffer.
The next thing to check are transactions.
Basically, all of those come up if you try to implement a blog hello world world such as gothinkster/realworld correctly, i.e. without unnecessary inefficiencies due to your ORM on top of underlying SQL, and dealing with concurrency.
The website moved from AsciiDoctor to OurBigBook Markup in 2020, making this section mostly useless. But hey, history!
Ciro's website is powered by GitHub Pages and Jekyll Asciidoc.
Build locally, watch for changes and rebuild automatically, and start a local server with:
git clone --recursive https://github.com/cirosantilli/cirosantilli.github.io
cd cirosantilli.github.io
bundle install
npm install
./run
Source: ./run.
The website will be visible at: localhost:4000.
Tested on the latest Ubuntu.
Publish changes to GitHub Pages:
git add -u
git commit -m 'make yourself look sillier'
./publish
Source: ./publish.
GitHub forces us to use the master branch for the build output... so the actual source is in the branch dev.
Update the gems with:
bundle update
git add Gemfile.lock
git commit -m 'update gems'
His website was originally written in markdown, however those were deprecated in favour of AsciiDoctor when Ciro saw the light, rationale shown at: markdown-style-guideuse-asciidoc
How to mine Monero Updated 2025-11-05
Ubuntu 20.10 as per xmrig.com/docs/miner/build/ubuntu:
sudo apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
git clone https://github.com/xmrig/xmrig.git
mkdir xmrig/build && cd xmrig/build
cmake ..
make -j$(nproc)
At minexmr.com/#getting_started we see that all you then need is a single CLI command:
xmrig -o pool.minexmr.com:4444 -u <your-monero-address>
Seems simple, well done devs!
Benchmark on Lenovo ThinkPad P51 (2017) as per xmrig.com/docs/miner/benchmark:
./xmrig --bench=1M
gives:
948.1 h/s
which according to the minexmr.com mining pool would generate 0.0005 XMR/day, which at the February 2021 rate of 140 USD/XMR is 0.07 USD/day. The minimum payout in that pool is 0.004 XMR so it would take 8 days to reach that.
So clearly, application-specific integrated circuit mining is the only viable way of doing this.
www.makeuseof.com/cryptos-you-can-mine-at-home/ is a completely full of bullshit article that says otherwise. How can someone publish that!
How to report Ubuntu crashes Updated 2025-07-16
Their crash system does not have an amazing user interface.
Tested on Ubuntu 21.10.
After something crashes, look under /var/crash for a crash file, which helps to determine which package to report under on Launchpad.
E.g. a file /var/crash/_usr_sbin_gdm3.0.crash makes you want to file the bug under gdm at: bugs.launchpad.net/ubuntu/+source/gdm/+filebug
Then, while reporting the bug, you want to give the developpers access to that .crash file. But you can't publicly upload it because it contains memory dumps and could contain secret information. The way to do it is to look at the ID under:
sudo cat /var/crash/_usr_sbin_gdm3.0.uploaded
Ubuntu's crash report system has already uploaded the .crash for you, so you just have to confirm it and give the ID on the ticket.
You can view a list of all your uploaded errors at:
xdg-open https://errors.ubuntu.com/user/$(sudo cat /var/lib/whoopsie/whoopsie-id)
and each of those contain a link to:
https://errors.ubuntu.com/oops/<.uloaded error id>
which you yourself cannot see.
Running:
sudo apport-unpack /var/crash/_usr_sbin_gdm3.0.crash /tmp/app
splits it up into a few files, but does not make any major improvements.
apport-retrace
sudo apt install apport-retrace
sudo chmod 666 /var/crash/_usr_sbin_gdm3.0.crash
apport-retrace -g /var/crash/_usr_sbin_gdm3.0.crash
opens GDB with the core dump. Debug symbols are supplied as separate packages, which is a really cool idea: so you should be able to download them after the crash to see symbols. askubuntu.com/questions/487222/how-to-install-debug-symbols-for-installed-packages mentions how to install them. Official docs at: wiki.ubuntu.com/DebuggingProgramCrash#Debug_Symbol_Packages
Tried:
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo -e "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse\ndeb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
sudo apt install ubuntu-dbgsym-keyring
but then sudo apt update fails with:
E: The repository 'http://ddebs.ubuntu.com impish-security Release' does not have a Release file.
How to teach and learn physics Updated 2025-07-16
The approach many courses take to physics, specially "modern Physics" is really bad, this is how it should be taught:
This is likely because at some point, experiments get more and more complicated, and so people are tempted to say "this is the truth" instead of "this is why we think this is the truth", which is much harder.
But we can't be lazy, there is no replacement to the why.
Related:
There is only one thing that can truly motivate you to make good materials: becoming famous.
Strive for that. Make good materials. Publish them. Get good reviews. Loop.
This generates a virtuous loop, which makes you produce better and better material.
The only thing that matters is that students aim towards the goals described at explain how to make money with the lesson.
Any "homework for which the student cannot use existing resources available online" is a waste of time.
The ideal way to go about it is to reach some intermediate milestone, and then document it. You don't have to do the hole thing! Just go until your patience with it runs out. But while you are doing it, go as deep and wide as you possibly can, without mercy.
The Moonshots in Education project also has a fantastic related quote:
Real World Work. Students must produce learning projects with real world applications and an authentic audience.
People will be more interested if they see how the stuff they are learning is useful.
Useful 99% of the time means you can make money with it.
Achieving novel results for science, or charitable goals (e.g. creating novel tutorials) are also equaly valid. Note that those also imply you being able to make a living out of something, just that you will be getting donations and not become infinitey rich. and that is fine.
Projects don't need of course to reach the level of novel result. But they must at least aim at moving towards that.
This is one of the greatest challenges of education, since a huge part of the useful information is locked under enterprise or military secrecy, or even open academic incomprehensibility, making it nearly to impossible for the front-line educators to actually find and teach real use cases.
How to teach / Give answers Updated 2025-07-16
Give students answers to all questions.
Explain in extreme detail how each result was reached.
Students have the amazing capacity of not looking at answers if they don't want to.
And when they've had enough, then can read answers and understand while the problem is fresh in their minds.
If you don't give answers, no one will be able to use your online material without you being there to hold their hands.
Forbidding students from publishing their answers also goes against let students learn by teaching.
Grouping by age as done in traditional education as of 2020 is useless.
Rather, we should group students by subject of interest; e.g. natural sciences, social sciences, a sport, etc., just like in any working adult organization!
This way, younger students can actually actively learn from and collaborate with older students about, see notably Jacques Monod's you can learn more from older students than from faculty.
This becomes even more natural when you try to give students must have a flexible choice of what to learn.
This age distinction should be abolished at all stages of the system, not only within K-12, but also across K-12, undergraduate education and postgraduate education.
This idea is part of the ideal that the learning environment should be more like a dojo environment (AKA peer tutoring, see also dojo learning model), rather than an amorphous checkbox ticking exercise in bureaucracy so that "everyone is educated".
Perhaps, even more importantly, is that we should put much more emphasis on grouping students with other students online, where we can select similar interest amongst the entire population and not just on a per-local-neighbourhood basis.
Don't set goals for your students.
Ask students what they want to do, and help them achieve that goal.
If they don't know what to do, give suggestions of interesting things they could do.
Once they have a goal, just help them learn everything that is needed to achieve that goal
If they don't have a goal, any attempt to learn is a total and complete waste of time.
This is because the universe of potentially useful things that can be learnt is infinite, and no human can ever learn everything.
The only solution, is to try and learn only what seems necessary to reach your goal, and just try to reach your goal instead.
This approach is called backward design.
"Graduating" and "getting a diploma" are not valid goals, because they are useless. A goal has to be either an amazing specific technological or artistic development.
Tell students to:
  • make suggestions to the course material themselves, since you have used text and published your source.Review their suggestions, and accept the best ones.
  • answer the questions of other students on your online forum. Let them work instead of you.
Praise those that do this very highly, and give them better grades if you have that superpower.
This is part of a larger concept Ciro Santilli holds dear: don't just consume, but also produce.
Whatever you do, even if it is playing video games: if you manage to produce related content that will interest other people, and possibly allow you to get paid, it will much much fun to do that thing.
Then, if people find errors, or have questions, they will write a comment near the content itself.
Then, next person that comes along and has the same problem, will also find that comment, and your answer will solve their problems too.
The perfect way to do this is to use GitHub issues
Just make it very clear what you've tried, what you observed, and what you don't understand if anything at all.
This will already open up room for others to come and expand on your attempt, and you are more likely to learn the answers to your questions as they do.
And there's a good chance someone who knows more than you will come along and correct or teach you something new about the subject. For example, this has happened countless times to Ciro Santilli when doing Ciro Santilli's Stack Overflow contributions.
Perfect is the enemy of good.
Examples of famous fails:
How to teach / Showcase student work Updated 2025-07-16
The thing about projects is that they are illiquid: it is not easy to immediately compare them.
And that is the whole point.
The outcome of that however is that you have to learn how to explain what you've achieved to others and why it is awesome.
Just like in the real world.
You have to create portfolio, and do some public relations.
When you do get face to face time with students, don't teach a large group.
Everything you want to teach is already online.
The only goal of meeting students is talking to them individually or in small groups to:
  • understand what they feel
  • transmit your passion for the subject
and letting them do the same amongst themselves.
If you talk to a large group, you will only reach / understand a very small percentage of the group, so your time is wasted.
It is better to deeply understand what 25% of the students feel and adapt the course material, than to talk to everyone at once, and have only 5% understand anything.
Text materials are generally superior to video because they:
  • are faster to create and edit
  • uses less disk space and network bandwidth
  • is easier to search: Ctrl + F on the browser and off you go. And then grep if you have superpowers.
Only produce video material if:
Never create videos of people just speaking hardcore content for long amounts of time.
If you have to use videos, make them as short as possible, and index them with a textual table of contents.
Also consider using sequences of images or GIFs instead of videos, since those are cheaper.
Figure 1.
Textbooks Y U NO HAVE CTRL-F meme
. Source. Same applies to videos.

There are unlisted articles, also show them or only show them.