Nepedia
Back to Discover
Fluent Reader
💻

Source code

technology Maturity 7-9 Next article →

People use source code to tell computers how to behave.

Hello world c
Hello world c

Source code is plain text that humans can read and write easily. However, a computer cannot use this text directly to work. It must first go through a special way of working. A program called a compiler can translate the text all at once. Another way is using an interpreter, which translates the code while it runs. This method can be 10 to 100 times slower than using a compiler.

Code comments
Code comments

Once the code is translated, it becomes machine code for the computer to run.

Writing code involves several important steps to make it work well. First, a person writes the source code in a high-level language. This language uses words that are easier for humans to understand. Next, the code might go through a stage called preprocessing. Then, a compiler turns the source code into object code. This object code is a form that the machine can actually execute. Sometimes, the compiler also uses external libraries to help the program run. Finally, a part of the operating system called a loader runs the file.

Computer programming has changed a lot since the very beginning. The first programmable computers appeared at the end of the 1940s. Back then, people had to use machine language to give instructions. Machine language is very hard to fix if there is a mistake. It is also not portable, which means it only works on one type of system. In the mid-1950s, people created high-level languages like Fortran. These new languages helped people express ideas without worrying about the hardware. This led to the birth of modern software.

There are many interesting facts about how code is used today. Developers often use comments to leave notes for other people.

Code comments
Code comments

These notes are blocks of text that the computer simply ignores. Some companies keep their source code secret to protect their ideas. In the United States, the rules for code changed in 1974. Before that year, source code was part of the public domain. Now, many programs are distributed as open-source software. This means anyone can see, change, and share the code freely.

Source code is much more than just a list of instructions. It is a way for programmers to communicate their ideas to each other. Some people even view writing code as an expressive form of art. It is also a way to make software that can travel. Because source code is not tied to one machine, it has great portability. You can write code once and run it on many different computers. This makes it a vital tool for building our digital world.

Hello world c
Hello world c
443 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Hello world c.svg
Hello world c.svg
File:Code comments.svg
Code comments.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.