How to become a good programmer? Updated 2025-07-16
Or: how to learn X.
That is the wrong question.
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.
Another very important point to keep in mind is: Section "When in doubt, choose the course that has the most experimental work".
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.
How to develop Ciro Santilli's website before the OurBigBook migration Updated 2025-07-16
The website moved from AsciiDoctor to OurBigBook Markup in 2020, making this section mostly useless. But hey, history!
The source code is located at: github.com/cirosantilli/cirosantilli.github.io
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
./runSource:
./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'
./publishSource:
./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
GitHub pages is chosen instead of a single page GitHub README.adoc for the following reasons:
- Ciro will want some unsupported extensions, notably mathematics, likely with KaTeX server side:
- github.com/asciidoctor/asciidoctor/pull/3338
- stackoverflow.com/questions/11256433/how-to-show-math-equations-in-general-githubs-markdownnot-githubs-blog
- g14n.info/2014/09/math-on-github-pages/
- stackoverflow.com/questions/11256433/how-to-show-math-equations-in-general-githubs-markdownnot-githubs-blog
- www.quora.com/How-can-I-combine-latex-and-markdown-in-GitHub
- when GitHub dies, Ciro's website URL still lives and retains the PageRank!
Neighbourhood (mathematics) Updated 2025-07-16
How to extract data from the Bitcoin blockchain Updated 2025-07-16
TODO: it would be cool to have something like bitcoinstrings.com but including the actual transactions:
Local methods:
- Bitcoin Inscription Indexer
- bitcoin.stackexchange.com/questions/30295/how-can-i-search-for-transaction-text-on-the-blockchain
- bitcoin.stackexchange.com/questions/22500/is-there-a-lightweight-blockchain-parser-library-server/101472#101472
- github.com/alecalve/python-bitcoin-blockchain-parser
- bitcoin.stackexchange.com/questions/84266/wondering-how-to-use-bitcoin-parser
- github.com/bitcoinprivacy/Bitcoin-Graph-Explorer stores the blockchain in a database, and should allow more intelligent querying.
Further bibliography:
- bitcoin.stackexchange.com/questions/799/can-i-download-the-whole-block-chain-from-somewhere
- bitcoin.stackexchange.com/questions/68925/how-can-data-be-accessed-searched-for-in-a-blockchain
- bitcoin.stackexchange.com/questions/55188/download-single-and-specific-block-for-study-purposes
- www.fiverr.com/usefulshine/embed-your-logo-or-brand-art-on-blockchain user usefulshine from India embeds ASCII art for you into the blockchain starting at 260 dollars! XD
How to mine Monero Updated 2025-11-05
Ubuntu 20.10 as per xmrig.com/docs/miner/build/ubuntu:At minexmr.com/#getting_started we see that all you then need is a single CLI command:Seems simple, well done devs!
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)xmrig -o pool.minexmr.com:4444 -u <your-monero-address>Benchmark on Lenovo ThinkPad P51 (2017) as per xmrig.com/docs/miner/benchmark:gives: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.
./xmrig --bench=1M948.1 h/sSo 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/+filebugThen, while reporting the bug, you want to give the developpers access to that Ubuntu's crash report system has already uploaded the
.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.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:and each of those contain a link to:which you yourself cannot see.
xdg-open https://errors.ubuntu.com/user/$(sudo cat /var/lib/whoopsie/whoopsie-id)https://errors.ubuntu.com/oops/<.uloaded error id>askubuntu.com/questions/434431/how-can-i-read-a-crash-file-from-var-crash asks how to read the
.crash files.Running:splits it up into a few files, but does not make any major improvements.
sudo apport-unpack /var/crash/_usr_sbin_gdm3.0.crash /tmp/appapport-retracesudo apt install apport-retrace
sudo chmod 666 /var/crash/_usr_sbin_gdm3.0.crash
apport-retrace -g /var/crash/_usr_sbin_gdm3.0.crashTried:but then
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-keyringsudo 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:
- start by describing experiments that the previous best theory did not explain, see also: Section "Physics education needs more focus on understanding experiments and their history"
- then, give the final formula for the next best theory
- then, give all the important final implications of that formula, and how it amazingly describes the experiments. In particular this means: doing physics means calculating a number
- then, give some mathematical intuition on the formulas, and how the main equation could have been derived
- finally, then and only then, start deriving the outcomes of the main formula in detail
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.
Related:
- settheory.net/learnphysics and www.youtube.com/watch?v=5MKjPYuD60I&list=PLJcTRymdlUQPwx8qU4ln83huPx-6Y3XxH from settheory.net
- math.ucr.edu/home/baez/books.html by John Baez. Mentions:Ciro Santilli is trying to change that: OurBigBook.com.
This webpage doesn't have lots of links to websites. Websites just don't have the sort of in-depth material you need to learn technical subjects like advanced math and physics — at least, not yet. To learn this stuff, you need to read lots of books
- web.archive.org/web/20210324182549/http://jakobschwichtenberg.com/one-thing/ by Jakob Schwichtenberg
How to teach Become famous through teaching Updated 2025-07-16
How to teach Exams and homework are useless, only projects matter Updated 2025-07-16
See: Section "Exam".
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.
This is actually how Ciro Santilli learns new subjects he is curious about, even as an adult! Some examples:
How to teach Explain how to make money with the lesson Updated 2025-07-16
People will be more interested if they see how the stuff they are learning is useful.
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.
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.
How to teach Group students by interest, not by age Updated 2025-07-16
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.
How to teach Help students achieve their goal Updated 2025-07-16
This is the most important of all points.
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
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.
Also, setting overly ambitious goals, is a good idea: the side effects of ambitious goals are often the most valuable thing achieved.
How to teach Let students learn by teaching Updated 2025-07-16
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.
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.
How to teach Publish somewhere people can comment Updated 2025-07-16
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
How to teach Publish your material even if it is not perfect Updated 2025-07-16
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:
- QED and the men who made it: Dyson, Feynman, Schwinger, and Tomonaga by Silvan Schweber (1994) chapter 7.11 "Epilogue" mentions how Julian Schwinger has lots of unpublished notes, or that his collaborators had to write most of the stuff down themselves in the end because he felt they were not perfect enough
How to teach Showcase student work Updated 2025-07-16
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.
How to teach Talk with individuals, not to groups Updated 2025-07-16
Everything you want to teach is already online.
And if it is not, then you are wasting your time saying it face-to-face instead of creating such online resource.
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.
How to teach Text is cheaper than video Updated 2025-07-16
Text materials are generally superior to video because they:
Only produce video material if:
- it shows an experiment, physical technique, natural phenomena or location that is of interest. See also: Section "Videos of all key physics experiments"
- it gives fundamental geometric insight on the subject
- you are filming a human transmitting their passion about the subject, and the speaker is amazing, and does not speak for too long
There are unlisted articles, also show them or only show them.
