Skip to content
Anton GoncharovAI systems developer

Code: The Hidden Language of Computer Hardware and Software

Charles Petzold

  • Programming
  • Computer architecture

Petzold builds a computer from scratch right on the pages of the book: from Morse code, Braille and a flashlight to relays, logic gates, a binary adder, memory and a processor that runs a program. No formulas — only sequential steps, each of them clear.

Key ideas

  1. Any information is a code: an agreement on what each combination of signals means.
  2. Everything is built from simple logic gates: an adder, memory, a processor.
  3. The binary system isn’t mathematicians’ choice but a consequence of a switch having two states.
  4. A program is the same numbers in memory that the processor reads as instructions.

Where and how I applied it

  • Demo · Web app · AI economics · vanilla JS

    AI bot cost calculator

    A real o200k tokenizer in the browser shows how text turns into numbers for the model and why the same meaning takes more tokens in Russian.

  • Demo · Web app · OCR · validating company details

    Document recognition

    Check digits of INNs (taxpayer numbers) and bank accounts are a code too: they reveal and fix recognition errors.

  • Demo · Web app · AI security · vanilla JS

    Prompt injection defense trainer

    Attacks through base64, invisible characters and look-alike Latin letters: the defence first normalises the text (Unicode NFKC).

More on the shelf

  • Reading

    Hands-On APIs for AI and Data Science

    Ryan Day

    A practical book on building an API for data and connecting AI to it. The running project is a FastAPI service with a database and documentation, then an SDK for it, using the API in analytics and, finally, LangChain agents that call the API themselves.

    AI and agentsPythonAPIApplied in 3 projects
  • Reading

    Server Applications in Python, Django, Flask and FastAPI

    R. S. Bukharev

    The path of server-side development in Python, from sockets and protocols to architecture and launch on a server. Django, Flask and FastAPI are covered through real projects: a CRM system, a Telegram bot with server-side logic, a REST API for a mobile app and a WebSocket chat. Separate chapters cover caching and scaling, Docker and Kubernetes, PostgreSQL, MySQL, SQLite and MongoDB, and security: password hashing, JWT and OAuth 2.0, protection against SQL injection, XSS and CSRF, TLS.

    ProgrammingPythonBackendApplied in 1 project