Level 33 C++ sourcerer. https://about.me/marek.knapek

  • 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle


  • Doesn’t depend on programming language but something with visual debugger. You know that stuff when you can see current line of your source code highlighted, press a key to step into, step over and so on. You can see values inside your variables. You can also change your variables mid-run right form the debugger.

    Because you spend 20% of your time writing bugs and the other 80% debugging them. At least make it pleasant experience (no printf-style debugging).

    Back in the day I was using Turbo Pascal, Delphi, Visual Basic, C#, Java, PHP with Zend, Java Script, today I’m using Visual C++.





  • Oversimplified:

    • You have your current OS, text editor, compiler.
    • You write code of the new improved OS using your current OS, text editor.
    • You compile the code (text file), compilation yields the new OS or the new kernel (binary file).
    • You replace (overwrite) your current kernel by the new kernel (current OS by new OS). This is possible, because while the OS is running it is in RAM not touching the disk.
    • You restart.
    • BIOS loads the new OS from disk to RAM and executes it.
    • tada.wav

    More questions:

    • How to update BIOS? Answer: The same.
    • How the first OS, text editor and compiler were created? Answer: The same. Using more primitive OS, text editor and compiler each step into the past. At the beginning there were toggle switches, punch cards, punch ribbon strips or similar.

    The same style of question would be: How to create a hammer if in order to create a hammer you need a hammer? How was the first hammer created? Answer: By more primitive hammer, or something that is no hammer, but almost works as a hammer.

    For more info read about bootstrapping compilers. Or trusting the trust by Ken Thompson.