├── dreams.md ├── bashrc-one-letter-aliases.sh ├── people-know-the-best.md ├── smartphone.md ├── programming.md ├── how-i-learned-to-code.md ├── four-treasures-of-the-hacker.md ├── README.adoc ├── my-personality.md ├── inspire-teenagers-for-technology.md ├── day-in-pompeii.md ├── open-sourcer-meets-b2b.md ├── stack-overflow-answer-style-guide.md ├── thoughts.md ├── how-to-learn-anything.md ├── tech-motivation-k12.md ├── diary.md └── how-to-become-a-good-programmer.md /dreams.md: -------------------------------------------------------------------------------- 1 | # Dreams 2 | 3 | ## 2015-08-26 4 | 5 | Before waking up in the morning, I've dreamed that I was walking on a mountain resort, like Benasque which we recently visited. 6 | 7 | I was walking on a place where a few other people were, perfect weather, and feeling very good. 8 | 9 | Rare type of dream for me. 10 | -------------------------------------------------------------------------------- /bashrc-one-letter-aliases.sh: -------------------------------------------------------------------------------- 1 | alias a='cat' 2 | alias c='cd && l' 3 | alias e='echo' 4 | alias f='find . -iname "*$1*"' 5 | alias g='grep -E' 6 | h() ( "$1" --help | l; ) 7 | alias l='ls -A -1 --color=auto --group-directories-first' 8 | alias m='man' 9 | alias o='xdg-open' 10 | alias s='less' 11 | alias x='xsel -b' 12 | alias v='vim' 13 | -------------------------------------------------------------------------------- /people-know-the-best.md: -------------------------------------------------------------------------------- 1 | # People know the best 2 | 3 | When you are born, you don't know what is better, and anything goes. 4 | 5 | But as soon as you find something better, everything changes, and anything less good torments you. 6 | 7 | Found the best dish, no other tastes good. 8 | 9 | Found the best work method, all others annoy. 10 | 11 | Found the best art (Mathematics), all others bore. 12 | 13 | Found the best belief, all others are meaningless. 14 | 15 | Found the best woman, no other can tempt. 16 | -------------------------------------------------------------------------------- /smartphone.md: -------------------------------------------------------------------------------- 1 | # Smartphone 2 | 3 | I got my first smartphone in 2015, way after my friends. Some programmer thoughts about it. 4 | 5 | Cloud backup is really fundamental here, as it is much easier to lose a portable device. 6 | 7 | Stuff like voice recognition and swipe typing will get really developed because of cell phones. Those interfaces simply don't matter as much if you have a keyboard. 8 | 9 | I never really understood chat apps vs push mail Someone not explaining anything: 10 | -------------------------------------------------------------------------------- /programming.md: -------------------------------------------------------------------------------- 1 | # Programming 2 | 3 | 99.9% of the bugs are stupid one liners. It is incredible how a silly one liner can render a system useless! It is amusing how hard it can be to find them though! I bet the same must go for health issues. 4 | 5 | I just love it when `cscope` caller list gives only one or two callers. No branching! Static analysis will work! 6 | 7 | Before trying to modify something, understand all the external behaviour. Only then start going inside. 8 | 9 | The joys of programming. Taking 2 hours to write a program that will run for 1s to accomplish a task you could do stupidly in 5 minutes. 10 | 11 | The cool thing about programming the kernel is that there are no dependencies: GCC is all you need. There can be no other dependencies, since all else runs on top of it. Compare that to the insanity of low level instruments like GCC, Binutils and glibc which inter-depend circularly on build and run time. 12 | -------------------------------------------------------------------------------- /how-i-learned-to-code.md: -------------------------------------------------------------------------------- 1 | # How I learned to code 2 | 3 | The single most important thing is: strong desire to get some projects done to improve the world and get rich at the same time (education website and furthen full AI) + belief that maybe they were actually doable. 4 | 5 | To do those projects, and so learned everything that I needed to do them. It so happened that the projects that I wanted to do required learning software. 6 | 7 | School was useless for me, I had some programming courses there, but they were useless like the rest, see also: http://www.cirosantilli.com/interests/ I want to destroy school BTW. 8 | 9 | What enabled me to learn those things, were Stack Overflow, GitHub and the availability of open source software like Linux distros. 10 | 11 | Next, but less important than motivation, are my natural inclinations to learning: 12 | 13 | - obsession with minimal examples. Got one complex software that you want to use? Split it up into a bunch of minimal runnable examples to understand the subparts. 14 | - give great important to standards (e.g. POSIX, etc.) and canonical sources (which implementation is this? where are the official docs? where is the source?) 15 | - I can feel an intrinsic beauty of code as well to some extent 16 | 17 | Those characteristics + my bad memory also make me a slower worker in average, but more solid and more likely to write better docs. 18 | -------------------------------------------------------------------------------- /four-treasures-of-the-hacker.md: -------------------------------------------------------------------------------- 1 | # The Four Treasures of the Hacker 2 | 3 | A Parallel between Chinese and Hacker Culture. 4 | 5 | In Chinese traditional culture, four tools are considered the most important for scholars: 6 | 7 | - brush 8 | - ink 9 | - paper 10 | - ink stone 11 | 12 | This set of tools is a well known concept named *The Four Treasures of the Study* (文房四寶) and has a Wikipedia page: for it. 13 | 14 | Much like Chinese scholars, the programmer's job comes down to information management. 15 | 16 | So as a programmer and a person interested in China (two sets of people which I find to have a large intersection), I was compelled to create a programmer's version. 17 | 18 | Behold, the **Four Treasures of the Hacker**: 19 | 20 | - **file browser**: find and publish information 21 | - **text editor**: produce information 22 | - **web browser**: organize current state of the information into a tree 23 | - **version control**: organize the history of the information into a tree and publish it 24 | 25 | I also claim that there is a **5th** treasure missing from the original Four because it was taken for granted: **language**, which in hacker terms comes down to **compiers** and **interpreters**. 26 | 27 | Whichever brands you pick (I've been following the path of Firefox + Vim + Krusader + Git + Python), these are the tools with which every programmer lives by every day. 28 | 29 | They should be mastered and cherished by all of those who follow the path. 30 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = Essays 2 | :idprefix: 3 | :idseparator: - 4 | :sectanchors: 5 | :sectlinks: 6 | :sectnumlevels: 6 7 | :sectnums: 8 | :toc: macro 9 | :toclevels: 6 10 | :toc-title: 11 | 12 | Original writings and quirky thoughts by me. People might like reading this once I become world famous for something. The best of this content has / will be moved to https://cirosantilli.com 13 | 14 | toc::[] 15 | 16 | == TODO move to adoc 17 | 18 | . Real events 19 | .. link:inspire-teenagers-for-technology.md[Inspire teenagers for technology] 20 | .. link:day-in-pompeii.md[A day in Pompeii] 21 | .. link:open-sourcer-meets-b2b.md[Open Sourcer meets B2B] 22 | . Learning 23 | .. link:how-to-learn-anything.md[How to learn anything] 24 | .. link:how-to-become-a-good-programmer.md[How to become a good programmer] 25 | .. link:tech-motivation-k12.md[Tech motivation K12] 26 | . Poetic 27 | .. link:four-treasures-of-the-hacker.md[The Four Treasures of the Hacker] 28 | .. link:people-know-the-best.md[People know the best] 29 | . Philosophy 30 | .. link:thoughts.md[Thoughts] 31 | .. link:my-personality.md[My personality] 32 | 33 | == Programming 34 | 35 | === Moving from markdown to asciidoc 36 | 37 | Coming from markdown, I've fallen in love with AsciiDoc for anything that has considerable size, around 2018-02 https://github.com/cirosantilli/linux-kernel-module-cheat/commit/254c8bf42e57bb54a715f151ec31b4c87a119faa 38 | 39 | Oh, and after I was converted, I found out that Buildroot, which is a project I love, also uses it: link:https://buildroot.org/downloads/manual/manual.html[]. How I found it out: "Hey, their docs are perfect, they can't be using AsciiDoc, can they? (greps source) Oh, AsciiDoc!!!". 40 | 41 | Rationale: http://www.cirosantilli.com/markdown-style-guide/#use-asciidoc 42 | 43 | Ciro s2 adoc 2018. 44 | 45 | Last update: 2019-03 46 | 47 | == Stack Overflow 48 | 49 | === Stack Overflow answer style guide 50 | 51 | link:stack-overflow-answer-style-guide.md[] 52 | -------------------------------------------------------------------------------- /my-personality.md: -------------------------------------------------------------------------------- 1 | # My personality 2 | 3 | I am intensely passionate about useful knowledge that can make the world better, more than most. This is well explained at: http://www.cirosantilli.com/interests/ 4 | 5 | My memory sucks. This is my greatest strength. It leads me to write and analyze everything down into perfect tutorials that allow me to remember stuff. It leads me to automate everything perfectly, because I have zero tolerance for "I did this a while back something along these lines". 6 | 7 | Because of that, I am an experimentalist. First try stuff out, then deduce theories from it. Learning theory first is bullshit. I dream of making the perfect physics experiment YouTube Channel. In programming, I love debuggers way more than reading source code, as it gives me immediate visibility. 8 | 9 | I derive less satisfaction than most people do from socializing with friends. Unless people are talking about things that I consider work-useful, in which case I become intensely interested, and start checking whatever they mention on my cell-phone. I have learnt never to go somewhere far with people where I know I can't escape back home immediately as I get bored. 10 | 11 | - https://www.inc.com/business-insider/8-personality-traits-highly-intelligent-genius-people-share-according-to-science.html 12 | - http://www.bryanthankins.com/the-3-traits-of-a-genius/ 13 | 14 | I am a generalist, hyperlinker, theory builder https://golem.ph.utexas.edu/category/2007/04/the_two_cultures_of_mathematic.html Higher throughput, higher latency person. I Interruptions my ability to finish a single task quickly, since I by default am interested in several tasks all the time. This is the main reason why I'm not a "genius": I tend to have too many passions at once to revolutionize any individual field. 15 | 16 | My brain stamina is decent, but not insane. It is physically impossible for me to go over 8 hour weekdays and 4 hour weekend days. I hate that, I hate every non-working second I know that I am "wasting time", I wish I could work all the time, but it is a physical limitation, just like my height. So I bear with myself since I have no choice. 17 | -------------------------------------------------------------------------------- /inspire-teenagers-for-technology.md: -------------------------------------------------------------------------------- 1 | # Inspire teenagers for technology 2 | 3 | In late 2012, I went back to Brazil to finish my studies for a few months before coming back to Europe. 4 | 5 | I visited back my home city, Santos, and felt the impulse to go to my old high school, called Objetivo, objective in Portuguese. 6 | 7 | I hated my high school time. I was at one of the best, teachers treated be really well because I had good grades, and I had good friends and few conflicts. 8 | 9 | But there was one fundamental problem: what I was doing was useless. The only goal was to pass the university exam. Memorizing a bunch of useless superficial stuff, much of which I don't care about. 10 | 11 | Individually, each of those things are *very* interesting. Even now, I sometimes navigate Wikipedia like crazy learning high school stuff for real, and think: wow, that *is* cool. 12 | 13 | It is that frustration that motivated me to study. 14 | 15 | So I went back to school, talked to the teachers which remembered me and the principal, and the arranged to let me to give inspirational 10 minute talks to students. 16 | 17 | I would go into several classes, and talk to them. 18 | 19 | In that morning, I sat in the armchair of the school entrance, and decided what I would say. 20 | 21 | The most important thing was: what is the most important subject? 22 | 23 | People gave all types of answers. 24 | 25 | Some of them said scientific subjects because they knew I liked that stuff. 26 | 27 | Others, half joking, said the subject of the teacher who happened to be in the class at the time. So I jokingly covered the teacher's ears with my hands to eliminate bias. 28 | 29 | Finally, someone would say my expected answer: "English". 30 | 31 | I would ask them why?, and some would know the second expected answer: because once you know English, you can learn whatever you want. 32 | 33 | Teachers agreed. 34 | 35 | After the class, I stayed a bit to talk freely with the students. 36 | 37 | I ended up making more contact with the "best ones" (more motivated, better grades, etc.). 38 | 39 | They even came to my home twice for me to teach them to code. 40 | 41 | But they eventually stopped. I could not interest them. They were more interested in getting gold in science competitions than learning university subjects for real. 42 | 43 | From this days on, I ask myself: am I the only one who has that type of desire? Can I not inspire others? 44 | 45 | And also I've decided that the only way to inspire others is online. Creating great content on Stack Overflow and GitHub. 46 | 47 | Those who ever seek it, will find it. That is the most efficient action, which I undertake today. 48 | -------------------------------------------------------------------------------- /day-in-pompeii.md: -------------------------------------------------------------------------------- 1 | # A day in Pompeii 2 | 3 | Sept 11 2010, for an English assignment, based on my traveling experience. 4 | 5 | Our trip was finally drawing to an end. Starting from the Venice, in the north of Italy, we had finally reached Rome, passing through Florence and many other smaller cities in the way. At this point, me and my mother were a bit tired of the museum-church-famous-square approach to tourism, and so we decided to take a day off and explore the famous city of Pompeii. And what a day it would be. 6 | 7 | It was another one of those hot, cloudless Italian summer days. A few minutes after taking the regional train at Naples, and after having chatted with some of its highly communicative locals, we would meet the two defining natural features of our destination city. To our right, we could see the blue of the Tyrrhenian Sea, responsible for the flourishing of Pompeii as commercial city. To our right, the imposing Vesuvius, the cause of its ultimate and tragic decay. 8 | 9 | After a pleasantly short entrance line (not always the case during Italian high-season), a few Euros lighter, and an audio guide heavier, we were finally ready to explore the city. 10 | 11 | Immediately I would experience the most striking characteristic of the site: its incredible sense of modernity. I can say that this is not an exclusivity of Pompeii, but a common feature I felt on most contacts I had with Roman antiquities. But in this case the effect was amplified, maybe because of the sheer size of the city, or because it was virtually frozen in time by the 79AD eruption, only to be opened up by archaeological excavations of the mid 18th century. 12 | 13 | Just like in our modern cities, streets are straight and orthogonal, in perfect contrast to the twisted streets of medieval Europe. The remains of administrative buildings surround the central square. As you stroll through the streets, you will also find what is left of ancient snack bars, food markets, bakeries, wall graffiti, water distribution facilities and a theater. At the local coliseum, the audio guide tells us of the interesting story of a violent conflict between Pompeian and their neighbor Nucerian inhabitants during games. The incident was so serious that the games were forbidden for the next ten years. A perfect analogy to hooligan behavior in modern stadiums. All of these similarities just make it evident how much our culture is a roman inheritance. 14 | 15 | Of course, there are also some more exotic elements to be found in a 1st century city. Extremely shocking are the death casts of the people killed by the eruption. We can almost make out their facial expressions as they try in vain to protect their noses from the deadly ashes expelled by the volcano. Also very impressive is the floor mosaic in the once rich House of the Faun, an incredible reproduction of a Greek painting in the form of a mosaic made up of more than a million small stones. Latter on we came by a tourist crowded house. As we entered it, we discovered that the place was one of the local brothels, and contained well preserved frescoes of many sexual intercourse scenes. Finally, one cannot ignore the public baths, a Roman passion which involved a progressive transition from hot to cold waters. 16 | 17 | Besides a superb source of historical interest, Pompeii is also a pleasant place to spend a relaxing afternoon between ruins of roman houses with a nice view to the Vesuvius. We would often sit down, just to enjoy the sun, and joke about how our legs had been artificially bronzed by Pompeii's characteristically thick and sticky volcanic dust. 18 | 19 | All and all, the city is a very interesting and agreeable site, and should be undoubtedly placed high on the priority list of those explorers who are already in the Rome area. 20 | -------------------------------------------------------------------------------- /open-sourcer-meets-b2b.md: -------------------------------------------------------------------------------- 1 | # Open Sourcer meets B2B 2 | 3 | Thoughts that I've had when I entered my first closed source B2B job at Quartet FS in Jan 2015 after contributing to open source for a while. 4 | 5 | The company was a good one, and I've learnt a lot. 6 | 7 | There were good and bad points, and for every criticism I sometimes could understand why things were like they were even if I disagreed with some of them. 8 | 9 | ## Misc 10 | 11 | One of the managers was deciding how to structure the code of a project. He did not know Git. I hope that when I get older, I manage to keep up with the new technologies :) But I am aware that this is far from certain, as I already have a slightly hard time with some new things I see younger people using. 12 | 13 | I am obsessed by improving workflows. Before you working, I always improve the workflow first. Then I and everyone else can work much faster later. 14 | 15 | Quartet FS becomes QFS, which in French sounds like "cul et fesses" (asshole and ass cheeks). French people immediately see it. Also interestingly, QFS on Google does not show Quartet on the front page: Quantcast Filesystem dominates, with Oracle's Quick File System following, both of which are Big Data competitors :) 16 | 17 | I was given tasks before understanding real use cases. This made them less interesting, and harder to solve. 18 | 19 | A few of the developers type without the 8 fingers. Scary. 20 | 21 | My boss asked me today if I liked the job, because I was making too many suggestions which were not related to my direct obligations. I can understand why he worries about that, but as I've told him, I made those suggestions because they are low-hanging fruits which are related to what I already know, and which be easy to improve, and that I've spent little time on them. While I understand his worries, there is also a downside to that method of operation: the killing opportunities that your employees see. This is of course balanced by the urgency of other matters, which you might notice better than your employees, since you are of course an experienced member of a profitable organization while he is not. 22 | 23 | Update to above: colleague spontaneously asked how to do the thing that I proposed. Moral victory. :-) 24 | 25 | ## Happy 26 | 27 | Today I saw a co-worker using a bit of documentation I wrote. Oh yes, time not wasted. 28 | 29 | Made by first back-port. Feeling like a pro. 30 | 31 | ## Impressed first big company 32 | 33 | Complexity is so high, that you must use a debugger to step trough the control flow. Everything is an interface, and it is too hard to find what is the implementing class otherwise. 34 | 35 | Back-porting is done to several versions. I totally agree with it for large features, but it is hard. 36 | 37 | ## Impressed when coming from open source 38 | 39 | Open source tends to have better tools, because there reducing the barrier of entry is crucial. On enterprises, you get paid, and use whatever your are told. 40 | 41 | Since there is no code review and since the release notes are generated from solved issues automatically, minimal commits are not required! Horrendous. Selected changelogs are the only way. 42 | 43 | We don't follow SemVer: API breaks can happen on minor versions! 44 | 45 | We don't have a nice way of automating tests! There are several repos, and some people start tests on each one manually on by one, and several (like me) have developed their own (bad) personal scripts to help a bit. 46 | 47 | ## Impressed on B2B 48 | 49 | I got assigned the first issue which comes directly from a client, and in particular this one only appears for very large deployments such as theirs. I got surprisingly excited. 50 | 51 | I was not used to B2B. On significant end user SaaS, users are counted by the Millions. But on B2B, you may only have a few clients, and each deal has a huge importance to your company. Thus the marketing department will be much larger proportionally. 52 | 53 | Many bug reports suck, without any concrete example to reproduce. Because users pay us we have to fix things however they get reported, and because they can call us, the written reports become less important. 54 | 55 | On B2B, you sell to company bosses who may have good technical advisors and technical domain knowledge or not. This is already easier than selling to particulars, who have no technical domain knowledge. 56 | 57 | People were happy when bosses from the prospect wanted to bypass their own IT department as it made making deals easier. Likely, the local IT departments felt menaced by the externalization of work or were over-confident about their skills (in which my company specialized, but not them). 58 | -------------------------------------------------------------------------------- /stack-overflow-answer-style-guide.md: -------------------------------------------------------------------------------- 1 | # Stack Overflow answer style guide 2 | 3 | Posted at: https://meta.stackexchange.com/questions/18614/style-guide-for-questions-and-answers/326746#326746 4 | 5 | Here I describe my answer style that has gradually evolved trough the years. I decided to write it down as it solidified and as I noticed some patterns. 6 | 7 | **Markdown generics** 8 | 9 | Use: http://www.cirosantilli.com/markdown-style-guide/ This guide will focus only on SO specifics. 10 | 11 | **Use bold for title-like structs** 12 | 13 | E.g.: 14 | 15 | **Subsection** 16 | 17 | Bleble. 18 | 19 | **Another subsection** 20 | 21 | Blabla. 22 | 23 | Don't use headers as they are too large, and don't generate any link IDs anyways... 24 | 25 | Don't use bold anywhere else, otherwise readers will have a time finding the subsection titles. 26 | 27 | **Start every answer with a title** 28 | 29 | Summarizing the key part of the answer: 30 | 31 | **Minimal runnable example** 32 | 33 | **Theory and experiment** 34 | 35 | The perfect answer often contains both: 36 | 37 | - experiments: concrete examples you have run to verify that you understood the theory 38 | 39 | - theory: for most programming questions, this means a quote from canonical standards, documentation, or source code 40 | 41 | Provide the exact version of the documentation, ideally with a link to it, and quote the most relevant paragraphs in the answer. 42 | 43 | The experiment should come first, that is the better way to teach something to humans. 44 | 45 | **Extremely concrete experiments** 46 | 47 | If the answer contains an experiment, provide: 48 | 49 | - full runnable code 50 | - full commands used 51 | - expected output 52 | 53 | and only then start explaining why the expected output happened. 54 | 55 | **Tested with** 56 | 57 | If you did any experiments, add a "Tested with:" section at the end of your answer, so that others will know how to reproduce your results. 58 | 59 | This should include: 60 | 61 | - your distro version 62 | 63 | - the version of key utilities used in the answer 64 | 65 | While this is implied from Ubuntu version for example, it still saves readers some time. 66 | 67 | E.g.: 68 | 69 | Tested on Ubuntu 18.04, GCC 8.2.0. 70 | 71 | It is true that Ubuntu patchlevel versions e.g. `18.04.2` may change those versions further, and you can also get even more precise package information from `dpkg -l` e.g.: 72 | 73 | 8.2.0-7ubuntu1 74 | 75 | but I think it is reasonable to omit this level of detail as it is likely too much for most users. 76 | 77 | If you have tested different sections with different OSes, add the tested with line for each section instead of at the end of the answer. 78 | 79 | **Code** 80 | 81 | Add a colon to the previous paragraph of every code block or terminal excerpt: 82 | 83 | Run this command: 84 | 85 | echo asdf 86 | 87 | output: 88 | 89 | asdf 90 | 91 | **Files** 92 | 93 | Represent files and their names as: 94 | 95 | main.c 96 | 97 | int main(void) { 98 | return 1; 99 | } 100 | 101 | another_file.c 102 | 103 | int myvar = 0; 104 | 105 | The most important file of each example should be called `main.extension`, e.g. `main.c`, unless there is a more important convention on the language, e.g. `index.html`. 106 | 107 | **Images** 108 | 109 | If input / output images are involved in the answer, provide them. 110 | 111 | Relevant images are fun and intuitive! 112 | 113 | Videos are also good! They can be represented with GIFs, see: 114 | 115 | - https://askubuntu.com/questions/648603/how-to-create-an-animated-gif-from-mp4-video-via-command-line/837574#837574 116 | - https://unix.stackexchange.com/questions/24014/creating-a-gif-animation-from-png-files/489210#489210 117 | 118 | If a diagram would help, also consider some ASCII art. 119 | 120 | **Standard quotes** 121 | 122 | Like this: 123 | 124 | The [C11 N1570 standard draft](http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1570.pdf) 6.2.5 "Some very important section" says: 125 | 126 | > 6 Useless quote that no one understands. 127 | 128 | 6.2.5 "Another not so important one" says: 129 | 130 | > 9 Yadayada yup dup. 131 | 132 | So note: 133 | 134 | - the first quote links to the standard with it's name 135 | - section numbers are plain 136 | - section titles corresponding to numbers are quoted 137 | - `says:` then `>` quote 138 | - following quotes don't need to re-link to the same standard, just section number plus name 139 | 140 | -------------------------------------------------------------------------------- /thoughts.md: -------------------------------------------------------------------------------- 1 | # Thoughts 2 | 3 | I can't believe I've posted this on Facebook!!! https://www.facebook.com/cirosantilli/posts/128228673862284 Was reminded by a do you want to share it thingy. It's from when I started dating my wife and we were fighting: 4 | 5 | Theorem 1.1 (Love sucks). 6 | 7 | Let P(A L B) 8 | be the probability that person A loves person B and h(A) be the 9 | measure of happiness of person A 10 | 11 | Then: 12 | 13 | P( h(A) = 0) = 1 - P(A L B) 14 | P( h(A) = -1) = P(A L B)[ 1 - P(B L A) ] 15 | P( h(A) = 1) = P(A L B)P(B L A) 16 | 17 | Since P(A L B) = P(B L A) ~ 0, average(h) < 0 18 | 19 | Just look at those comments as well. I remember those days at Polytechnique, I wouldn't do anything during weekends, just learn Chinese, maths and physics and think deeply about the world in my little studio. 20 | 21 | I've been watching some climbing videos, like Free Solo movie 2019. After one of them, I was checking my Stack Overflow as I do obsessively, and had a mini-epiphany: this is my wall. The wall of answers. And I strive to climb it. But it is a small wall. The big wall, is yet to be climbed: the wall of the stupidity of our educational system. 22 | 23 | I love it when I'm compiling something in the evening and my cooler is making rain-like sounds. Feels like s like I'm being productive without actual effort, and reminds me of the relaxing rain sounds. And the lack of sound informs me that the compilation has finished, and the I can continue to the next step. 24 | 25 | In the physical sciences, what matters most is not what we know, but how we know it. School gets that fundamentally wrong. The method and tools are everything. And it usually comes down to how scientists managed to observe and control something very subtle in a new way. 26 | 27 | A home is the reaction vessel of men. Like a cell, it has many subsystems: energy, waste, information. Some men come in, some food comes in, and more men come out. 28 | 29 | "What you are afraid to do is a clear indication of the next thing you need to do." by https://en.wikipedia.org/wiki/Ralph_Waldo_Emerson really resonated with me... E.g. I wanted to study Physics at university, by chickened out because I was afraid I wouldn't get a job. Later on in life, I always felt I missed the deeper physics and mathematics background, just for the beauty of it. Of course, it is impossible to say how things would have gone had I done that, and they did go really well regardless since I started programming, just I felt it took more time than necessary. 30 | 31 | Interest if formed through habit, through seeing that your peers are interested in something on a daily basis. I see that clearly in my job, where being close to people's needs inspired me to learn and do a lot of things I would never had heard of otherwise. This is why a vibrant tech community is so key to one's development, you just go along. In that sense, individual events are not very important. What truly matters is being able to see continuous interest of peers through Q&A websites, paper contributions, software contributions, etc. 32 | 33 | Molecular biology is a lot like embedded systems: 34 | 35 | - small, complex, low observability 36 | - one way to understand what something does it to take them out. On cells, remove a gene. On code, remove a function. 37 | - we sometimes need some instrumentation to increase visibility at the cost of less representative data. On cells, edit genome to add fluorescent stuff. On code, tracepoints. 38 | 39 | By self or people I know. 40 | 41 | Every problem is trivial given enough observability. Inspiration: programming with debugging, lack of data in natural sciences. Counter argument: economy. Counter counter argument: simple but large state and chaotic. 42 | 43 | I live on the software hardware interface. 44 | 45 | I like working in a good train with power charger, no trip companions, and not much shaking. Internet helps, but is optional. Done some hardcore C stuff in them. No distractions. Just you and the source. 46 | 47 | If a product of a big company has a name that is too catchy, it is an acquisition. Otherwise, the name would be just "Big Company Product Description". 48 | 49 | It's fun being at ARM. I look up some public information, then have an unanswered question, I can just look it up on the internal wiki. 50 | 51 | Being in a stable relationship, but living separately and in the same time zone is the optimal way to work more (while at ARM Cambridge UK, fiancee in Paris) 52 | 53 | Having to fill those ugly .docx forms for enterprises makes me sick. Huge turnoff. Almost certain that they won't understand what you want you know, and what you want to do. Talking to someone is the only way for they to understand what you want to do. 54 | 55 | Love watching my colleagues freely mixing French and Arab every 2 sentences when talking to their personal friends. 56 | 57 | To succeed in creation: be half action, half planing. (2014-03, while developing GitLab, before success =)) 58 | 59 | We all need a spice of madness to take on the madness that is the world. 60 | 61 | Why do countries with the term "Democratic" or related on their official name, tend to be the least democratic? **People**'s Republic of China, "**Democratic** Republic of Congo". 62 | -------------------------------------------------------------------------------- /how-to-learn-anything.md: -------------------------------------------------------------------------------- 1 | # How to learn anything 2 | 3 | ## Why learn 4 | 5 | Humans have a single motivation in life: **become powerful**. 6 | 7 | Learning is no different: 8 | 9 | - **useful**: improve food, housing, health, etc. for others 10 | - **beautiful**: teach others so they feel the beauty 11 | 12 | Helping others makes you feel good and get money. 13 | 14 | ## Why not to learn 15 | 16 | - make video games 17 | - win at knowledge Olympics 18 | 19 | ## English 20 | 21 | If you don't know English, you cannot make any real developments on any knowledge domain: **you are useless**. 22 | 23 | Learn English before you do anything else. 24 | 25 | Write only in English. 26 | 27 | Read in English instead of other languages if you have the choice. This is rarely the case as everything is in English. 28 | 29 | ## What to learn 30 | 31 | Use the top-bottom approach: 32 | 33 | - first decide something exciting that you want to to 34 | - then learn whatever is needed to do it 35 | 36 | *not* the other way around, which is how formal education works 37 | 38 | - first learn a bunch of generally useful stuff 39 | - then some day hope to magically arrive at the final goal 40 | 41 | Reason: if you don't focus on your goal, you will learn tons of things which don't matter to achieve it. 42 | 43 | And once you *feel the need* for one of the basic subjects for the third time, you will doubly motivated to learn it, and will end up learning it. 44 | 45 | Visualisation: 46 | 47 | Goal 48 | 49 | Step 1: 50 | 51 | Goal 52 | | 53 | +-- Requirement 1 54 | | 55 | +-- Requirement 2 56 | 57 | Step 2: 58 | 59 | Goal 60 | | 61 | +-- Requirement 1 62 | | | 63 | | +-- Requirement 1 1 64 | | | 65 | | +-- Requirement 1 2 66 | | 67 | +-- Requirement 2 68 | | | 69 | | +-- Requirement 2 1 70 | | | 71 | +---+-- Requirement 2 2 72 | 73 | Repeat until you reach requirements that you can tackle directly. 74 | 75 | ## How to learn 76 | 77 | ### Text is better than video 78 | 79 | Text is faster to edit, takes less memory in your computer, downloads and uploads faster and is easier to search. 80 | 81 | A sequence of perfectly chosen images at beats any video visualization. 82 | 83 | If you have the choice, choose books over videos: get familiar with the superior medium. 84 | 85 | ### Find the sources 86 | 87 | Once you have decided the subject, find all the best sources like books or tutorials on the subject. 88 | 89 | For certain subjects you really need non-free books. 90 | 91 | Sometimes there are small tutorials which clarify points that most books don't. 92 | 93 | How to find the best books: 94 | 95 | - see the bibliography for university courses. Go into the websites for each course. 96 | - put the subject name on [Amazon](http://www.amazon.com/) and see the top books. 97 | - [Google](https://google.com) `SUBJECT best books`, or `SUBJECT best tutorials` or `SUBJECT best free books`. 98 | 99 | ### Get the sources 100 | 101 | - buy it new 102 | - buy it used, even if an older version 103 | - go to a library 104 | 105 | A good method to search by ISBN. 106 | 107 | The ISBN is a unique identifier of a book in 10 characters. 108 | 109 | You can find ISBNs on Amazon. 110 | 111 | For example for [this book](http://www.amazon.com/Calculus-James-Stewart/dp/0538497815) The ISBN can be found at `ISBN-10: 0538497815`. 112 | 113 | This way you can compare prices across many sites for the exact same book. 114 | 115 | Do *not* download material illegally via methods like: 116 | 117 | - Torrent 118 | - upload sites. Most of those have links coming from irresponsible blogs. 119 | 120 | since this bankrupts publishing companies, and inhibits the creation of new books. 121 | 122 | ### Use the sources 123 | 124 | First look quickly at all of the sources one by one to find which one seems more interesting, only then go for it. 125 | 126 | Start with sources that are: 127 | 128 | - simple 129 | - concrete with lots of examples 130 | - motivational 131 | 132 | and *not* too theoretical. 133 | 134 | If things stop making sense, try for 5 more minutes, and then jump: 135 | 136 | - forwards 137 | - backwards 138 | - to another book 139 | 140 | If you could not understand something, it is because there is something else missing, possible from another source. 141 | 142 | Don't wast too much time stuck on a single point: when you less expect you will find the answer. 143 | 144 | ### Write tutorials 145 | 146 | Whenever you learn something, *write it down* on your computer and publish it online to help others and make you famous. 147 | 148 | Human knowledge is like a forest. First a few pioneers create new trails in that forest. This makes it easier for others to come through, and make the trail more visible. Until some day, the trail becomes a huge highway with millions of people crossing every day. 149 | 150 | Search for existing tutorials and contribute to them. 151 | 152 | Best method: GitHub + Markdown or similar. 153 | 154 | Whenever there is a point you don't understand, create a `TODO` and explain you problem in as much detail as you can. 155 | 156 | Example: 157 | 158 | 1 + 1 = 2 TODO why? 159 | 160 | This will make it clear to you and to others what is not certain. 161 | 162 | ### Contribute on forums 163 | 164 | E.g.: Stack exchange. 165 | 166 | Don't waste your time refreshing the main page, but if you find a better solution for something that was already asked, or have a new question that has never been asked, post it. 167 | 168 | ### Learn in focused outbursts 169 | 170 | Choose small goals that take from one day to one week, and reach them one by one. 171 | 172 | A goal can be anything that you want to do, e.g.: 173 | 174 | - learn X 175 | - make Y work 176 | 177 | Learn all the basis well to achieve the goal. You will often find that it will take way longer because your sub goals multiplied, but it does not matter: learn the basis well, and continue until the original goal is done, or you decide it is too hard for now. 178 | 179 | ### Virtuous loop of success 180 | 181 | As your tutorials start getting more and more views, you are more and more constantly reminded that you are doing something awesome. 182 | 183 | Just keep monitoring your metrics. 184 | 185 | Then this leads you to contribute more, which leads to more upvotes, and so on. 186 | -------------------------------------------------------------------------------- /tech-motivation-k12.md: -------------------------------------------------------------------------------- 1 | # Tech motivation K12 2 | 3 | What you can say to K12 people to motivate them to learn Math, Physics and the other "hard" sciences. 4 | 5 | ## Control the future 6 | 7 | Technology is the art of controlling the future to make it better. 8 | 9 | Stop and think: if you could control the future, what you do? Wouldn't that be great? 10 | 11 | Examples: 12 | 13 | - I want to get to work faster. 14 | 15 | If I walk it takes 30 minutes. 16 | 17 | If I take a car, it takes 15 minutes. 18 | 19 | Therefore the car (technology) allowed to change my future: one I have it I will take 15 minutes less every day. 20 | 21 | My future improved! 22 | 23 | - I want a cheaper newspaper. 24 | 25 | If I go to a newsstand, I pay 1 dollar. 26 | 27 | If I subscribe to a website, I pay 50 cents. 28 | 29 | Therefore the website (technology) allowed to change my future: I will gain 50 cents every time I read the newspaper. 30 | 31 | My future improved! 32 | 33 | ## Simple and cool technological questions 34 | 35 | To understand why, see: 36 | 37 | - will my airplane fly? 38 | 39 | - will my car protect its passengers? 40 | 41 | - will my motor spin? 42 | 43 | - how will I move all those heavy pieces? 44 | 45 | - what should I take on my trip? 46 | 47 | - what is the shortest path to deliver those goods? 48 | 49 | ## Holy triad 50 | 51 | Technology is based on the holy triad: 52 | 53 | - [model](#model) 54 | - [mathematics](#mathematics) 55 | - [computer](#computer) 56 | 57 | ## Model 58 | 59 | A model is a piece of information that predicts the future. 60 | 61 | It takes inputs: 62 | 63 | - what is the current state? What was the past state? 64 | - what is the action? 65 | 66 | It gives the output 67 | 68 | - then the new state in the future shall be XXX 69 | 70 | The question is then: 71 | 72 | > If I am on a given state, what action should I take to go to the best state possible? 73 | 74 | This called *optimization*! 75 | 76 | ### Example: girlfriend 77 | 78 | - Current and past state: You have a girlfriend. You two are not very happy together. 79 | - Action: you kiss another girl. 80 | - Future state: you don't have a girlfriend anymore. 81 | 82 | If we change the action however, the future state changes! 83 | 84 | - Action: you give your girlfriend flowers and chocolate 85 | - Future state: You two are very happy together! 86 | 87 | If we change the current state, the future also changes: 88 | 89 | - Current and past state: You have a girlfriend. You two are very happy together. 90 | - Action: you kiss another girl. 91 | - Future state: You two are not very happy together. 92 | 93 | ### Example: car on road 94 | 95 | - Current state: You are in a city A. 96 | - Action: you drive at 100 km/h during one hour. 97 | - Future state: you are 100 km from city A. 98 | 99 | If we change the action however, the future state changes! 100 | 101 | - Action: you drive at 200 km/h during 2 hours. 102 | - Future state: You are 400 km from city A. 103 | 104 | If we change the current state, the future also changes: 105 | 106 | - Current state: You are 100 km from city A. 107 | - Action: you drive at 100 km/h during one hour in the direction oposite from A. 108 | - Future state: you are 200 km from city A. 109 | 110 | ### Precise models 111 | 112 | If you forget preciseness, all things we do in life counts as technology: 113 | 114 | - boyfriends and girlfriends model people and what are the effects of their actions. 115 | - drivers model car speeds and road lengths 116 | - lawyers have a model for society and the law system 117 | - artists have a model of what humans think is beautiful and a model for paints and brushes.; 118 | 119 | So how is technology different from art? 120 | 121 | The question is subjective and imprecise, but the answer criteria is simple: how good is your model, and how fast does it change with time. 122 | 123 | What is understood to be technology is based on models that give very good results, and change very little with time. All of those methods can be seen as sub-branches of physics: 124 | 125 | - mechanics 126 | - thermal 127 | - fluids 128 | - electromagnetism 129 | - quantum 130 | - chemistry: same as very complicated physics 131 | 132 | Because of complications, our models are not perfect. 133 | 134 | - biology: same as very complicated chemistry 135 | 136 | Because of complications, our models are not perfect. 137 | 138 | It seems that physics never changes! 139 | 140 | For some areas of physics, our models are close to perfection. 141 | 142 | ### How to write a model down 143 | 144 | Models can be written in many languages such as English. 145 | 146 | Unfortunately, English is too imprecise for certain models (position of a robot arm) 147 | 148 | The best way to write models is [mathematics](#mathematics). 149 | 150 | ### How to create a model 151 | 152 | Do one million experiments with different inputs which you can control. 153 | 154 | Measure the output. 155 | 156 | Write an equation that predicts the output given the input. 157 | 158 | ## Mathematics 159 | 160 | Mathematics is precise, this is why it is good to write models with it. 161 | 162 | What does precise mean? 163 | 164 | Precise means that if mathematics is writen properly on a computer, proofs can be checked on that computer. 165 | 166 | To understand this precisely, you must understand *formal proof systems*. 167 | 168 | But the implication is simple: there is no ambiguity or impreciseness possible. 169 | 170 | The problem with mathematical models: sometimes you write an equation but solving it would take millions of stupid operations. 171 | 172 | This is why we need [computers](#computer): computers can do those millions of operations for us! 173 | 174 | ### Approximation 175 | 176 | For some mathematical problems it is impossible to precisely write down a solution. Ex: differential equations. 177 | 178 | For other problems, find the exact solution would take too much time, but an approximation is *much* easier to find. Ex: discrete optimization problems. 179 | 180 | The solution: find an approximation of the solution, which is good enough for practical purposes! 181 | 182 | ## Computer 183 | 184 | Computers can manipulate information (copy, transfer, delete) in a way that is *very*: 185 | 186 | - fast 187 | - cheap 188 | - robust, i.e. without few errors 189 | 190 | As long as we can write our problems into lots of very simple operations, such as sums or subtractions. 191 | 192 | This allows us to: 193 | 194 | - solve our models. 195 | 196 | The solution of many models comes down to making a huge number of stupid operations. Ex: solving differential equations. 197 | 198 | Computers are perfect for that. 199 | 200 | - act on a physical systems. 201 | 202 | To modify the future we some physical systems, we have to do 203 | 204 | - lots of operations 205 | - very quickly 206 | - at very precise times 207 | 208 | in a way that would be impossible for humans to do. 209 | 210 | Just think about how you hard disk head moves thousands of times per second to precise disk locations! 211 | 212 | This is another major application of computers: control physical systems precisely. 213 | 214 | ### Kids 215 | 216 | Hardware or not? I'd rather not, too much complication + cost. 217 | 218 | Which language? JavaScript because everyone has the interpreter + GUI (browser JS engine + HTML renderer + canvas). Yes, stdout is harder to see... but so be it. 219 | 220 | - https://thejournal.com/articles/2013/10/23/6-tips-to-get-your-kids-excited-about-coding.aspx?=THE21 221 | - https://www.quora.com/What-is-the-best-way-to-get-your-kids-interested-in-coding 222 | -------------------------------------------------------------------------------- /diary.md: -------------------------------------------------------------------------------- 1 | # Diary 2 | 3 | ## 2014-06 Mozilla Sprint 2014 4 | 5 | Talked on Skype with WriteLaTeX John Lees-Miller, W3C editor Robin Berjon, MathJax fred-wang and other similar minded people. 6 | 7 | I told Berjon about the IETF desire to standardize a Markdown MIME-type, he immediately replied: what good is it to have a MIME-type for an underspecified format? Exactly what I had thought at first. He's sharp. 8 | 9 | ## 2014-11-25 Dancing with little Chinese girl 10 | 11 | I was dancing in Place de la République, when a small girl came with her mother. 12 | 13 | The girl started watching me, then came over. I looked at the mother to see if it was OK, she smiled, and so I started dance / playing with the little girl. 14 | 15 | Her happiness was so pure and intoxicating, not a trace of violence in her action, pure carelessness. And on top of that she was East Asian, which is my weakness, her mother, who wore a hijab http://www.bbc.co.uk/newsround/24118241, later told me they were from Singapore. 16 | 17 | When her mother said it was time to go, she didn't want to leave. 18 | 19 | ## 2014-12-12 Interview at QuartetFS [job] 20 | 21 | Today I did my second job interview with the branch head of the enterprise QuartetFS, and he said he will send me a contract tonight. A few thoughts which I had heard many people talk about before, but now have I felt more strongly than ever. 22 | 23 | - I had a friend from university who works for the company, John. He gave me the email of his boss. If I didn't know him, the most likely path of entry would be through a recruitment agency who contacted me. Another friend, which is a capable as I, was contacted for this job, but was rejected after this interview. I got lucky. 24 | 25 | The interesting thing is that I wasn't making a huge effort to find a job, and had turned down three recruitment agencies who contacted me before because I found that the jobs, while financially and carrier-wise good, were not very interesting. 26 | 27 | It was after getting contacted by one of those recruitment agencies that I contacted John, who had casually told me he worked on a similar thing earlier, asking if it was the same, and he said no, I work for another one. I asked if they were hiring, he asked his boss and said yes and gave me the email. 28 | 29 | I sat on that email for three months, until I met John by chance on the subway, he told me how everything was going fine at the company, and I decided to apply. 30 | 31 | Me and John were not super close friends. I never called him or anything. But I had always felt an affinity for the guy, for some unexplainable reason. I always enjoyed talking to him when we met, more than average with other people. It was this unexplainable affinity that led not only him to give me the contact of his boss, but also me to look more into his company and actually notice that they were doing very interesting things. 32 | 33 | Like minded people get together. You don't even have to make an effort. 34 | 35 | - While you are talking, the interviewer is taking notes. 36 | 37 | The importance of what you say to him is proportional to the speed at which he jumps to take the note. 38 | 39 | Some of the questions I expected him to take note, but I was surprised by how fast he noted a few others: 40 | 41 | - when talking about motivation to improve the world, I said that my parents have a very high moral standard 42 | - when asked how I chose the enterprise, I said I mostly excluded I didn't want to do 43 | - school grades (B / C but never flunked) 44 | 45 | ## 2015-05-28 46 | 47 | Xiaohua's birthday. 48 | 49 | I bought some sweets for breakfast. 50 | 51 | Lin Jie, her good friend, called me so that I would not forget, because Xiaohua always tells her I'm very forgetful, but I hadn't. It was funny and thoughtful, she is a friend to be trusted. 52 | 53 | We got the letter Xiaohua's naturalization was adjourned, bad birthday gift :-) 54 | 55 | ## 2015-06-03 56 | 57 | Passed IBM online test. Two types of questions: 58 | 59 | - given a sequence of numbers, which of the ones below fits the patter? 60 | - model 2 line problems and solve systems of linear equations in 2 variables real quick 61 | 62 | So stupid, nothing to do with actual programming. Not sure I want to work there anymore. 63 | 64 | ## 2015-06-22 65 | 66 | Fete de la musique. 67 | 68 | At midnight the police told us that the noise was legal, and we had to go to a hotel to sleep. 69 | 70 | Xiaohua found on the website that is should go up to 00h30, but they had others otherwise because we live in a street with many bars. 71 | 72 | ## 2015-06-26 73 | 74 | USA supreme court said gay marriage is legal in all states. 75 | 76 | Stack Overflow, GitHub and Google search "gay" added rainbow easter eggs to their websites, Facebook an image editor that adds the rainbow flag to your picture https://www.facebook.com/celebratepride 77 | 78 | ## 2015-07-13 79 | 80 | We went to eat on a Chinese restaurant near our home yesterday evening. 81 | 82 | I was tired. 83 | 84 | The food is not nearly as good as the best places in Paris. 85 | 86 | But I was really happy: 19h hours is too early for the French to eat, so we were the only ones there. 87 | 88 | The boss was eating, there were some close friends of her there having tea and chatting, and her son was there as well. 89 | 90 | It felt like a home, like happy people chatting and cooking, not working just to get money. 91 | 92 | ## 2015-07-14 93 | 94 | Suddenly my GF wanted to learn how to use GitHub. 95 | 96 | She was on Mac, and does not know how to use the CLI. A few notes: 97 | 98 | Likely because I talk a lot about it, but also because she thinks Octocat is cute. 99 | 100 | The result: 101 | 102 | Notes: 103 | 104 | - GitHub is impossible to use for non-programmers. 105 | 106 | - I tried to add a mathematician theme to the lesson, and made her create a `.tex` file. 107 | 108 | - GitHub for Mac needs a really recent Mac OS X, so we went for the command line 109 | 110 | - it is really hard to show `.dot` files on Mac OS Finder... 111 | 112 | - by default you cannot install apps on Mac that are not from the app store! Needs to change a config for that 113 | 114 | - `git add .` should be the default for beginners. They should never worry about the index which is a major confusions point. I almost never use the index myself, but rather `.gitignore` and branches. 115 | 116 | - the first baby steps are: 117 | 118 | - create a new repo 119 | - make a new revision 120 | - fix an issue by creating a new revision 121 | - create an issue on someone else's repo 122 | - accept a pull request 123 | - create a pull request 124 | - rebase a pull request 125 | 126 | The most important thing is to show people how to see the inner states of git: 127 | 128 | - log for revisions 129 | - status for index 130 | 131 | ## 2015-08-21 Amazonas on education 132 | 133 | Met a teacher from my father's university, friend of my father's GF who is leaving close to Barcelona which I'm visiting. 134 | 135 | He tried to improve education in obvious ways along giving students more choice, his colleagues didn't like and didn't try to understand, so he retired and now works on EU projects. Great waste for Brazil! 136 | 137 | The most interesting thing he said I didn't know: currently it is hard to upgrade laboratories, because the current teaching method is to put 50 people on a lab and to the experiment at the same time, so you need 50 times the same tools. 138 | 139 | But if instead we would let students take initiative, reserve laboratory time, and to at different times, much more could be done! 140 | 141 | While I was talking to him, I though that his way of looking at people looked a lot like my father: as if looking from over the glasses and tilting the head down. I didn't say anything, but when Xiaohua told me she noticed that, I was like: OMG, it truly is like my father. 142 | 143 | Another interesting thing is that he didn't know how to behave in the present of a judge in an informal setting when he met my father, because of the huge amount of dulling that judges get in course. Hopefully he was pleasantly surprised. 144 | 145 | ## 2015-08-23 Selling GitHub for maths 146 | 147 | I am at the Centro de Ciencias de Benasque, Spain with my GF where she is attending a mathematics conference for PHD / post-grads, around 5- people total, 148 | 149 | I want to make a 5 minute presentation at the end of some course of Git and GitHub and offer to help them out. Sales training, but really useful for them to make math books. 150 | 151 | In the coffee break of the first day, I've tried to talk to one of the organizers, a woman with https://en.wikipedia.org/wiki/Alopecia_totalis , to ask for permission. 152 | 153 | I've lurked on the coffee break, until the was free, and I attacked. 154 | 155 | She first though I was asking about application of mathematics for computer science, but when she understood that it was more of scientific communication, she said "You might be able to do it but maybe not today" and slipped away without trying to understand why Git rocks. My presentation quality was average, I still have to learn what buttons to push for mathematicians. 156 | 157 | She told me however that her husband who is also an organizer does code. Going to talk to him another time. 158 | 159 | I was really glad that my GF talked to her friends about it out of her own initiative, and even found one mathematician who codes a bit and knew GitHub. 160 | 161 | She really believes in what I do even though she does not fully understand it, much like I do in her job. That made me really happy. 162 | 163 | Also I saw her taking to a friend, the point that she pushed the most was that this huge important maths project, the Stacks project of Columbia U, is hosted there. 164 | 165 | Before she mentioned this point, her math friend just frowned as if "I don't care". But when she did mentioned it, her attention was greatly increased. Youtube effect and content is king is the way. 166 | 167 | Seeing people's reaction to how you sell is a great measure of what points to use to convince them 168 | 169 | ## 2015-09-28 Supermoon Lunar Eclipse 170 | 171 | 172 | 173 | On same day: Chinese mid autumn festival, helped Xiaoxiao move to new house. 174 | 175 | ## 2015-11 Rennes 176 | 177 | Went to Rennes to talk with https://www.linkedin.com/in/erven-rohou-5370b31 about http://careers.stackoverflow.com/jobs/100882/ing%C3%A9nieur-r-d-en-compilation-h-f-cdd-3-ans-inria 178 | 179 | The city is was nice, and I've learnt a lot while talking to him. 180 | 181 | The big boss of the laboratry was cool was well, he talked to us informally https://team.inria.fr/alf/members/andre-seznec/ and showed us the last circuit he made: 25 years ago! Now they make CPU optimizations, like cache algorithms. 182 | 183 | Going there was a really good idea to get the feeling of the city before taking a job. 184 | 185 | Then I walked around the city. 186 | 187 | I've also met: Fernando Akira Endo https://www.linkedin.com/profile/view?id=AAEAAAVg_0IBYNBjkxiqLSRUnGJ7ANEM6P4LaN4&authType=name&authToken=Is-8&trk=prof-sb-how_conn-name-link 188 | 189 | ## 2015-11-13 ISIS Terrorist attacks 190 | 191 | I was walking on the street one hour before them besides my home. 192 | 193 | When I got home, my friend Rafael called me to ask if I was alright. I had no idea it had happened. The Charrone attack was really close to our home. 194 | 195 | ## 2015-11-20 Interview with Cyrille Béraud from Savoir-faire Linux 196 | 197 | The way his eyes moves from side to side, in an act of calculation (necessary for business deciders!), reminded me of Georges Bory from QuartetFS. 198 | 199 | Now that I look back, I felt a bit nostalgic about it! It was a great experience, my first real feel of an enterprise. 200 | 201 | I wasn't expecting a job, because their embedded team is in Montreal, but the enterprise seemed really interesting, so I just went to meet him. 202 | 203 | His method is very interesting: 204 | 205 | - first say all the great things about the enterprise: achievements, people, etc. 206 | - then say that the job is really hard, that you will have deal with a lot of BS, etc. 207 | - then ask how much you want. He joked that Brazillians are mercenaries as if it were too much :-) but then said seriously that it was fair. 208 | - then at the very end, make you a job offer! I was really surprised. This is what I like about enterprise over research: the directness and sense of urgency. If you think a risk is worth taking, you just take it. 209 | 210 | Also, unlike the technical interview with the people from Quartet, he took no notes of me. 211 | 212 | He didn't ask me anything technical, just to access myself. 213 | 214 | *That* is how you pick someone. The only way to see if he works well for you is to try it out (unfortunate that French labour law is overprotective). 215 | 216 | ## 2015-11-26 Came back to Brazil 217 | 218 | When I got home, the smells came back to me. 219 | 220 | All those places I've seen a thousand times but don't think about anymore. 221 | 222 | And a few ones that I've seen a thousand times, and see in my dreams from time to time. 223 | 224 | ## 2015-12-10 Physics course to Melissa 225 | 226 | She didn't know that Microsoft was paid. That is the ultimate monopoly. 227 | 228 | The product is so default, that users don't know it anymore, even though they use it every day. 229 | 230 | ## 2015-12-25 Ribeirao preto 231 | 232 | Gabriel, my cousin, told me that I was too concentrated on Wikipedia on my uncle's smartphone while everyone else was chatting away how to say "couve" in English. Such a huge compliment. I told him that you either focus or get lost into useless noise forever. And I was the one to find it in the end: https://en.wikipedia.org/wiki/Collard_greens 233 | 234 | ## 2016-01-13 Back to Paris after Brazil 235 | 236 | First impressions: 237 | 238 | - I like the cold, makes me feel a sexy / nostalgic kind of pleasure 239 | - overheard some smart youngsters talking about their Electrical Engineering courses. Reminded me of the massacre of Polytechnique, and made me feel a bit bad, but hopeful for such a country full of great minds. 240 | 241 | ## 2016-01 Father hits the butcher's balance for playing with my mother 242 | 243 | My mother told me this story, which happened somewhere in the early 2000s. It was not the first time I've heard it. 244 | 245 | She went to the butcher, and he had the bad habit of playing pranks on costumers (mostly women I bet...). 246 | 247 | He grabbed my mother's foot without her seeing it, and started imitating the bark of a dog. 248 | 249 | My mother was startled, but not too offended, and left. 250 | 251 | Later on, she casually told this to my father while walking with him. She said it was a phase in which my father was a bit depressive. 252 | 253 | The other day, when my father came back home, she told her that the matter was settled. 254 | 255 | He had passed by the butcher, scolded him badly for playing such pranks (sexually related?), and hit his meat balance hard with the hand. 256 | 257 | My mother was completely embarrassed by this, but now that I hear it, I think it was well deserved (the only problem being the risk of getting shot by some crazy butcher). 258 | 259 | My mother stopped going to that butcher of course, and told my father that now he would have to take her by car to another butcher, because that was the only good one close by. 260 | 261 | One day, my mother went to the baker's (which because of Portuguese immigration in Brazil is more like a French café), and she came across the butcher and his assistant by chance who were drinking some coffee. 262 | 263 | She apologized for her husband, but the assistant took my mother's side, said that he kept telling his boss that he should stop with those silly pranks. 264 | 265 | I bet he did stop after this time. 266 | 267 | ## 2016-04-25 Xiaoxiao and Fang sheng eat with us 268 | 269 | Xiaoxiao is pregnant, and getting sick easily. 270 | 271 | She wanted to eat something different, so they came over (specially since Xiaohua cooks well). 272 | 273 | It was a really pleasant evening, just eating hot stuff, rainy outside, and half understanding Chinese. 274 | 275 | We bough stuff at the Chinese quarters earlier before. 276 | 277 | ## 2016-11-22 Heat equation 278 | 279 | Went to workplace at 11pm, played around with https://github.com/cirosantilli/cpp-cheat/tree/907ab0bd7bc0a194cbcc79d76405af6873fca695 until 1AM. Felt intense beauty, and that education system sucks. 280 | 281 | We must be brutally practical. Want to learn the heat equation? Write a solver, and do a physics experiment, and match them. Theory only matters if it makes you better in practice. Theory is either improved practical technique, or it is useless. 282 | 283 | It is a miracle that I got interested in maths at all. God is the only explanation? If only my memory didn't suck and I remembered when I was little, and where the balance tilted. 284 | 285 | Will I ever be able to transmit this feeling to younger people? 286 | 287 | ## 2017-01-10 Back to England from Brazil 288 | 289 | I was sad to leave, but when I got to the Gatwick train, King's Cross, and Cambridge home, I felt really glad I was here! Maybe this wasn't a bad choice after all! 290 | 291 | ## 2018-06-16 Watching Magig: The Gathering Arena on YouTube 292 | 293 | I've been watching Magic: The Gathering Arena YouTube videos to turn by brain off recently, and I ended up answering a related Stack Exchange question! https://boardgames.stackexchange.com/questions/38821/is-there-a-card-that-lets-you-put-a-card-from-outside-of-the-game-into-play/42551#42551 Funny how I answer it exactly as I answer programming questions: quoting from the official rules, and thinking about quirky effects. A friend once refered me to https://player.fm/series/goodnight-chrome which says: I will say bunch of technical mumbo jumbo to trick your brain into thinking that it is still working, but while you are actually resting. Actually, this is basically what I'm doing, by watching people play strategy games. I'm basically only interested in understanding the rules of the games, and some level of strategy, but without putting enough effort to actually get tired and really learn how to play. Until I learn enough, and get bored, and find a new game to watch a and learn the rules for. I was doing Age of Empires 2 previously. Both games I played when I was a teen, so I already knew half of the rules. 294 | -------------------------------------------------------------------------------- /how-to-become-a-good-programmer.md: -------------------------------------------------------------------------------- 1 | # How to become a good programmer 2 | 3 | General high level tips on how to become a good programmer. 4 | 5 | First read [how to learn](how-to-learn.md): those techniques apply to any field of knowledge. 6 | 7 | For a huge list of free programming resources, see: 8 | 9 | ## How to type 10 | 11 | - user four fingers 12 | - use closes finger 13 | - look at the screen 14 | - use keyboard shortcuts and good programs that have them (ex: Vim) 15 | 16 | Saves time and preserves your arm. 17 | 18 | ## Make cheatsheets 19 | 20 | Everything you learn, write it down! You will forget it later. 21 | 22 | If there is a good link or book, save the link or the book page. 23 | 24 | Publish your cheats so that others can use them too. 25 | 26 | Always use correct grammar, and make things as understandable as possible. 27 | 28 | ### Write assertion cheatsheets 29 | 30 | Whenever possible, write tutorials in code and assert automatically wherever possible. 31 | 32 | Good: 33 | 34 | assert(1 + 1 == 2); 35 | 36 | Bad: 37 | 38 | printf("%d", 1 + 1); 39 | 40 | ### Split cheatsheets into small files 41 | 42 | You will be tempted at first to write on single big file. 43 | 44 | While it is convenient to write, it is horrible to read, because programming languages are not books, and have no method to add indexes and tables of contents. 45 | 46 | So start right: 47 | 48 | - split it up into small files, each teaching a single small concept 49 | - make a `README.md` file which with links to all the concepts in the good order that they should be learned 50 | 51 | ## Self advertising 52 | 53 | Besides being good, you also have to convince people of it so that you can get better jobs and achieve your goals. 54 | 55 | Make a web page containing: 56 | 57 | - a list of you open source contributions: 58 | - a self evaluation of your knowledge: 59 | 60 | Always search accounts / blogs of who makes software you like: they are potential teammates or supporters. 61 | 62 | ### Consistent public image 63 | 64 | Use the same photo, username and header image on *every* account. 65 | 66 | Link to your web page from every account that allows it. 67 | 68 | Get a domain name based on your name, e.g. `cirosantilli.com`. 69 | 70 | ### Stack Overflow 71 | 72 | Use it. Contribute to it. Two valid methods: 73 | 74 | - when you are researching something, and you find an old question that does not have the perfect answer, create the perfect answer. 75 | 76 | - monitor tags that you love. 77 | 78 | Don't monitor overly generic tags like programming languages: too many people do that, and all new questions are duplicates or off topic. 79 | 80 | Instead, choose niche tags, most often programming *projects* which you are working on. Very few people know about a given project, and it is there that you can really help new users. 81 | 82 | ### GitHub 83 | 84 | Use it. 85 | 86 | Upload *every* line of code or text you write. Including school assignments after the deadline. 87 | 88 | Gains: 89 | 90 | - don't ever lose a line of code again 91 | - allow the hole world to find your code 92 | - force yourself to write better code because it is public 93 | 94 | Write perfect READMEs and repository descriptions. Good content is useless if people cannot: 95 | 96 | - find it 97 | - get started in 10 seconds 98 | 99 | ### Project divulgation methods 100 | 101 | You have to tell people about your projects, or else they will never find them. 102 | 103 | There is a fine line between spam and divulgation, so make sure that you post the links on very closely related threads. 104 | 105 | The best methods are: 106 | 107 | - Reddit. Either on new threads, or commenting on strictly related threads 108 | - Hacker News. Featureless Reddit, very popular. 109 | - Twitter. More personal. Keep low tweet volume to not bore your followers. 110 | - Stack Overflow. If your question / answer requires a multi-file input to try it out, a `git clone` will be easier for other people, and it will often fit in a cheatsheet repository. 111 | 112 | says the order of importance is Hacker News / Reddit / Twitter / Google search. 113 | 114 | ### Open source 115 | 116 | Find applications that interest you and improve programs. 117 | 118 | ### Improvement suggestions to closed source 119 | 120 | Whenever you find a typo or missing feature on a closed source project, make a suggestion on their tracker / email contact. 121 | 122 | I have received a few invitations for job interviews like that. 123 | 124 | ### Prestigious projects 125 | 126 | Contribute to prestigious projects: 127 | 128 | - it is more likely that the project will live on and that your changes will continue to be useful 129 | - you will learn from better coders 130 | - you will get more visibility 131 | 132 | "Low level" tools are the most useful for large enterprises that need to optimize at low level: 133 | 134 | - Kernel and hardware interfacing: file systems, networking, GPUs 135 | - assembly 136 | - databases 137 | - cryptography 138 | - compilers, interpreters and standard libraries: GCC, Python, Node.js. Garbage collection internals. 139 | - Media: formats (websites, audio, videos, images), compression algorithms, viewers (browsers, image viewer, etc.) 140 | - Git 141 | - formal algorithm verification: , 142 | - anything that requires knowing mathematics 143 | - formal proof systems 144 | 145 | Pay huge attention to **security**. Hard to get right, and a single error can cost millions. 146 | 147 | ### Analytics 148 | 149 | Whenever one person somehow notices you and views your profile, try to discover where this person found you. 150 | 151 | If often happens that someone has shared your content. 152 | 153 | On your personal webpage, use Google Analytics. 154 | 155 | On GitHub, use `/graphs/traffic` whenever you get an upvote for a low voted repository. 156 | 157 | Keep public track of all sources that mentioned you. On GitHub, I often use the repository wiki for that. 158 | 159 | ## TODO list 160 | 161 | Maintain a file with a TODO list. 162 | 163 | Whenever you have a new idea, or want to learn something, do the following: 164 | 165 | - can it be done in 5 minutes? Do it now. 166 | - otherwise, add it to the TODO 167 | 168 | Put most important things first on the file. When you do them, delete the entry. 169 | 170 | ## Standards 171 | 172 | When you start learning something, immediately start trying to understand its standards. 173 | 174 | Download the documentation, learn where to find all its versions online. Try to understand it as early as possible while you go through tutorials. 175 | 176 | ### Portability 177 | 178 | Following standards gives you portability. 179 | 180 | Always try to use the least dependencies possible on backwards compatible standards. E.g., if you can do something easily in C89, why use C99 for a few language features? C89 gives you Windows compilation! 181 | 182 | ### Style guides 183 | 184 | Find the most famous style guides if applicable. They are often from big companies. Many technologies offer multiple ways to do things. Learn from the start which one is the best in general. Also great way to learn new features. E.g.: [Google](http://google-styleguide.googlecode.com/), [GitHub](https://github.com/styleguide), [Thoughbot.inc](https://github.com/thoughtbot/guides). 185 | 186 | ### Implementation state 187 | 188 | What is the state of implementations? Are they consistent with one another? Are they updated. Example: 189 | 190 | - standard: W3C HTML or CSS 191 | - semi-compatible implementations: browsers: Firefox, Chrome, IE 192 | 193 | ### Standard extensions 194 | 195 | What are the most important extensions to the standard? How portable are they? Examples: 196 | 197 | - ANSI C vs POSIX vs GNU extensions 198 | 199 | ## Minimal test cases 200 | 201 | This is a common mistake amongst beginners. You have a problem that has 2 parts. 202 | 203 | When debugging, try hard to reduce the problem to the minimal number of parts possible. 204 | 205 | This hugely increases the probability that you will find a solution, and if you don't and ask a question on a public forum, this hugely increases the likely utility of the question for further readers. 206 | 207 | There is even a website dedicated to explaining that to newbs that you can link to: 208 | 209 | ## Backups 210 | 211 | Do them periodically (Deja Dup) on material you generated (not large things you downloaded). 212 | 213 | Use a dedicated home partition. 214 | 215 | Use a dotfiles on GitHub. 216 | 217 | ## Tools 218 | 219 | General tools and applied topics which you should consider learning. 220 | 221 | But do not forget: algorithms are as important than tools, since a single algorithm can be used by one thousand tools. The ideal is to take a middle path and learn both at the same time: 222 | 223 | - learn the tools first to see how things are useful 224 | - learn the theory to see why the tool is made that way, how to improve it, and what are it's theoretical limitations 225 | 226 | ### Where tools come from 227 | 228 | Tools are not magic esoteric objects given by God to man. 229 | 230 | Every piece of software has been code by some human at some point in time. 231 | 232 | Understanding where the tool comes from, who created it, in which package it is distributed, can give you great insight about what it does. 233 | 234 | Whenever you use a command line utility on Ubuntu, check what package it comes from. 235 | 236 | ### OS choice 237 | 238 | Use Linux. 239 | 240 | It's free. 241 | 242 | There are many more open source projects than in Linux that you can contribute to and become famous. 243 | 244 | Learn about POSIX: 245 | 246 | ### Languages 247 | 248 | #### Programming 249 | 250 | Learn: 251 | 252 | - first C and C++. Gives you valuable low-level insight, widely used in fundamental tools like: 253 | 254 | - Linux and Windows kernel 255 | - POSIX API 256 | - interpreters of all major languages: Python, Ruby, Perl 257 | - MySQL 258 | - Git 259 | 260 | Even today, when people have a library which they want to run fast and portably on every language, what they do is implement it in C and let other languages bind to it, including in the web development domain. E.g.: 261 | 262 | - and 263 | - and 264 | 265 | - a weakly typed interpreted language, either Python or Javascript (Node.js) 266 | 267 | Considerations: 268 | 269 | - Most popular? Hard to say 270 | 271 | - Niches matter. Some languages dominate certain application spaces. 272 | 273 | - PHP, Ruby, JavaScript == web 274 | - Fortran == numerical 275 | 276 | - All major programming languages have the same theoretical power as they are Turing complete. 277 | 278 | - Categories: 279 | 280 | - Compiled vs interpreted (virtual machine) non compiled languages. 281 | 282 | Speed vs multiplataform, quick test, prototyping. 283 | 284 | There is no hard distiction: any compiled language could also be interpreted and vice versa. 285 | 286 | It is mainly a question of design: some langs are designed to be interpreted. 287 | 288 | Haskell for example can be compiled but also comes with a standard [REPL] interface. 289 | 290 | - Objects oriented vs non object oriented. 291 | 292 | - Type systems: 293 | 294 | - statically vs dynamically typed 295 | - weakly vs strongly typed 296 | 297 | - Languages are easy, libraries are hard. 298 | 299 | Languages are easy to learn because they are all very similar. 300 | 301 | Library interfaces however are not, because they involve completely different concepts between one another. 302 | 303 | Therefore: if a project does what you want in a language you don't know 304 | 305 | - learn that language! 306 | - **don't** recode the project! 307 | 308 | #### Data languages 309 | 310 | - XML 311 | - JSON 312 | 313 | #### Markup languages 314 | 315 | - HTML 316 | - LaTeX 317 | - Markdown 318 | 319 | ### Language tools 320 | 321 | Once you have chosen a language, there is a standard set of tools that you need to learn to work with the language: 322 | 323 | - the compiler and interpreter. Learn the options from the command line. 324 | - build system and package manager. E.g.: `make` for C++, Rake and Bundler for Ruby, etc. 325 | - IDE. Only use once you can compile from the command line. 326 | - lint tool: checks your style and code smells 327 | - coverage tool: checks how much of your code is covered by your tests 328 | 329 | ### Web development 330 | 331 | - HTML 332 | 333 | - HTTP 334 | 335 | - CGI 336 | 337 | - Apache configuration 338 | 339 | - CSS 340 | 341 | - JS 342 | 343 | - MySQL 344 | 345 | - PHP 346 | 347 | - the other interpreted CGI languages: 348 | 349 | - Python 350 | - Ruby 351 | - Perl 352 | 353 | - real deployment 354 | 355 | - FTP 356 | - deal with permissions you lack on server 357 | - ssh 358 | 359 | #### Multiple browsers 360 | 361 | Have at least two browsers, one main where you are logged in all your websites, 362 | and one secondary, which you will use to see how other users see your profiles. 363 | 364 | Same goes for web development: have multiple browsers to quickly switch users. 365 | Also good practice as it lets you see often how the website renders under different browsers. 366 | 367 | For websites that allow you limited unsigned entry, have a third browser to test as unsigned. 368 | 369 | E.g. on Ubuntu 12.04 I run Firefox (primary), Chromium (secondary) and Chrome (unsigned). 370 | 371 | ### Filesystem 372 | 373 | One of the first things you should understand better as a programmer is your filesystem. 374 | 375 | - home dir 376 | 377 | - upper vs lower case 378 | 379 | - naming conventions 380 | 381 | - bin 382 | 383 | - `~` and `.bak` 384 | 385 | - doc 386 | 387 | - dot hidden 388 | 389 | - lib 390 | 391 | - src 392 | 393 | - include 394 | 395 | - share 396 | 397 | - local 398 | 399 | - and the rest of the Linux Filesystem Hierarchy Standard 400 | 401 | 402 | - do not start filenames with hyphen so as not to conflict with command line options. 403 | 404 | - symlinks vs hardlinks, and other pseudo files like Windows / XDG desktop shortcuts 405 | 406 | ### Databases 407 | 408 | - MySQL 409 | - SQLite 410 | 411 | ### Important programs for life 412 | 413 | - dropdown terminal emulator: Guake. 414 | 415 | - Vim 416 | 417 | Text editor. 418 | 419 | - Krusader 420 | 421 | File manager. 422 | 423 | - Source version control. 424 | 425 | You need to contribute with others. 426 | 427 | Most commonly used: 428 | 429 | - Git. Dominates web development. 430 | - SVN. Still popular for scientific applications. 431 | 432 | - make (Makefile) 433 | 434 | Automate compilations. 435 | 436 | 437 | 438 | - Bug trackers, like GitHub built-in one. **Always** use one for your project! 439 | 440 | - Virtual machines. VirtualBox + Vagrant are game changing. 441 | 442 | - ack (find/grep replacement) 443 | 444 | Find in files. 445 | 446 | #### Shell 447 | 448 | - Each terminal can run one ore more languages. The most important ones are: 449 | 450 | - Linux: bash 451 | - windows: cmd 452 | 453 | - Terminal: the little window that runs a shell language and lets you interact with it. 454 | 455 | Many terminals can be used for a single language, e.g., both `xterm` and `guake` are bash interfaces. 456 | 457 | Pros: 458 | 459 | - easy to explain to other people precisely what to do 460 | - faster than clicking 50 times on a GUI 461 | - less prone to interface changes 462 | 463 | Con: cannot show images. 464 | 465 | Conclusion: always use it unless you *need* images. 466 | 467 | - Bash: 468 | 469 | - pro: super easy file/pipe/process handling 470 | - con: insane, slow 471 | 472 | Use for one liners only. Replacements: 473 | 474 | - Perl is dead, but golfs really well. 475 | - Python! Also useful for other things, so worth learning 476 | 477 | - directory structure, home directory 478 | 479 | - fundamental tools: `ls`, `cd`, `mkdir`, `cp`, `rm`, `rmdir`, Ctrl+Z, `bg`, `find`, `grep` 480 | 481 | - command line option common standards. 482 | 483 | GNU: 484 | 485 | - Single dashed options can only have a single letter 486 | 487 | - Single dashed options without arguments can be combined: `-ab` equals `-a -b`. 488 | 489 | - Parameters are passed just after the arguments, e.g.: `compile --output output-file input-file` 490 | 491 | Most options take a single parameter. 492 | 493 | The last arguments can be a long list. 494 | 495 | - Most options have both a double and single dashed version 496 | 497 | Subcommands are sometimes used to break up very complex utilities: e.g.: `git add`, `git rm`, etc. 498 | 499 | Not all programs follow GNU guidelines, but you should. 500 | 501 | - `--help`, how to read CLI interface specification `[]`, `...,`, `man`, `info`, `--version`. 502 | 503 | - stdin/stderr/stdout: 504 | 505 | - three holes 506 | - pipes `>` to file, `|`, `1>&2` 507 | 508 | - exit status 509 | 510 | - pipe (help grep example) 511 | 512 | - interactive vs. non-interactive 513 | 514 | ### Assembler 515 | 516 | Understand exactly what operations a processor can do. 517 | 518 | 519 | 520 | ### Data representation 521 | 522 | #### character representation 523 | 524 | Understand: 525 | 526 | - ASCII 527 | - Unicode 528 | - UTF8 529 | 530 | #### Integer representation 531 | 532 | - binary, hexa 533 | 534 | - signed 535 | 536 | - one's complement 537 | - 2-complement 538 | 539 | #### Float representation 540 | 541 | Understand how floating point numbers are represented. 542 | 543 | ### IPC 544 | 545 | ### Concurrency 546 | 547 | ### Multithreading 548 | 549 | - thread vs process. 550 | 551 | A process can contain many threads. 552 | 553 | Threads share a memory space, process don't. 554 | 555 | - IPC. 556 | 557 | - pipes : same machine 558 | 559 | - sockets : different machines 560 | 561 | - internet 562 | - PCI 563 | - USB 564 | 565 | ### Operating systems 566 | 567 | You must learn how your operating system works. 568 | 569 | The only operating system you can really understand is Linux since it is open source, 570 | so understand Linux. 571 | 572 | Topics which you should look into: 573 | 574 | #### Program memory space 575 | 576 | Address, operational system division: 577 | 578 | - 579 | 580 | #### Driver programming 581 | 582 | - Control a lamp. Contains C code. 583 | 584 | - 585 | 586 | #### Executable files 587 | 588 | ELF files, including libraries 589 | 590 | ### Hardware 591 | 592 | - Memory: registers vs caches vs RAM vs ROM (BIOS) vs VRAM vs HD. 593 | 594 | 595 | 596 | Deep explanation. 597 | 598 | - Buses: 599 | 600 | ### Optimizing code 601 | 602 | More important than those are to first: 603 | 604 | - use best algorithm 605 | 606 | - compile instead of interpret 607 | 608 | A few important ones are: 609 | 610 | - cache: 611 | 612 | - speculative execution 613 | 614 | - loop unwinding: 615 | 616 | - out of order execution: 617 | 618 | - register renaming: 619 | 620 | ### Automatic optimization 621 | 622 | - branch prediction 623 | 624 | 625 | 626 | An example of perceptible branch prediction: 627 | 628 | 629 | 630 | ### GPU programming 631 | 632 | TODO 633 | 634 | ### SemVer 635 | 636 | ### Semantic versioning 637 | 638 | Popular standard for program versioning formalized by Tom Preston-Werner. 639 | 640 | ## Licenses 641 | 642 | Learn about licenses. 643 | 644 | I'm an open source addict and pro copyleft, so I basically use GPL, AGPL or CC BY-SA. 645 | 646 | I'm against licenses that are too free like BSD and MIT: if people are going to use your work, better force them to merge back stuff, otherwise you and society get nothing in return. And believe it: enterprises care only about money, and they *won't* give anything back unless forced to. 647 | 648 | Another advantage of copyleft is that you are able to sell what you produce if someone really wants to fork it. E.g. MySQL. 649 | 650 | ## Philosophy 651 | 652 | ### Programming and ideas 653 | 654 | ideas (that can be programmed) 655 | + 656 | programming 657 | ------------------------------ 658 | *power* 659 | 660 | - without ideas, programming is useless! 661 | - without programming, some ideas are useless! 662 | 663 | ### Imperfection 664 | 665 | It is the work of a programmer to search perfection, while accepting that imperfection is inevitable. 666 | 667 | When in doubt, look, decide, and follow your decision all the time, knowing that all other choices are also imperfect. 668 | 669 | ### Design patterns 670 | 671 | Learn from the Zen of Python . The following resonate on my mind every week: 672 | 673 | - Flat is better than nested. 674 | 675 | - There should be one, and preferably only one, obvious way to do it, although that way may not be obvious at first unless you're Dutch (Python's creator is Dutch). Ruby disagrees: 676 | 677 | if not true 678 | 679 | unless true 680 | 681 | - Explicit is better than implicit. 682 | 683 | ### Architecture 684 | 685 | Very high level application organization. 686 | 687 | Important, but hard to learn and to formalize. 688 | 689 | , . 690 | 691 | ### Human factors 692 | 693 | Unfortunately, even as a programmer you still have to deal with humans, those unpredictable and hard to optimize systems. 694 | 695 | Artistic level: 696 | 697 | - coworkers 698 | 699 | - clients 700 | 701 | - market 702 | 703 | - 704 | 705 | Quite a few strategy articles. 706 | 707 | E.g.: Microsoft employee, lots of exp. 708 | 709 | ## Find the people you need 710 | 711 | - Whenever you see someone hardcore on any forum like Stack Overflow / GitHub, check out their profile, website and LinkedIn. 712 | 713 | - Pay huge attention to: 714 | 715 | - Industry groups 716 | - Conferences 717 | 718 | Those will group the most interesting people of each domain that matters. 719 | 720 | Stay away from flashy consumer oriented confs, and look into hardcore dev confs. 721 | 722 | --------------------------------------------------------------------------------