what is the source code?

642 views

What is the source code for a program? And why is it kept under secret, is it always part of the production version?

In: 2

10 Answers

Anonymous 0 Comments

Think of the source code as the set of instructions that make anything on the internet what it is.

Everything is software.

The browser you’re using to access Reddit is a software. Reddit itself is a software. Windows is a software. Google is a software. Your Android/Apple OS is a software.

Software is written in what is known as a programming language. Think of it as a set of rules that tell what is to be done.

There are various programming languages – while they all achieve the same end target – the way they’re written is different. Their commands and terminology are different.

So like English or Spanish or German, you can be fluent in one or in several. And build using them.

Overtime, you can work with many different people and increase the complexity of your instructions (your code).

To illustrate by example, you’re tasked with carving the words “Explain Like I am Five” on a tree.

You begin your instructions in English, by providing very basic instructions. Step 1, move to the area where the tree is located. Step 2, open all the carving tools and lay them out, so they can be fetched easily when you begin work. Step 3, clean the area where the actual carving is to be made.

Now, a friend who speaks Spanish joins you. You ask him to work in parallel with you. He begins by creating a stencil – he gives these instructions in Spanish.

You both then begin working together, while you’re giving instructions to carve the word “Explain” – he’s working on the number “5”.

::

1AA – Gradually, you have more people joining in. Some other English Speaking friends, some more Spanish-speaking friends. Some who specialize in carving corners. Others who excel in actual design. Then there’s some who can provide an immaculate polishing job.

You all work together to finish this carving. And at the end of it, you have a fantastic end product that you’re all really proud of.

2AA – You’re still making changes to this product. Maybe in the future you will add an LED inside one of the letters. Maybe some glow-in-the-dark edges. Maybe you’ll build a small base mount for these letters to stay on.

3AA – While doing this, one of you discovers a unique method to smoothen the edges. You guys decide to call it “SmooooothAF”

4AA – Now other carvers in the area can look at this carving and can recreate it on their own with their own instructions. But they will never be able to replicate it 1 by 1, unless they have the explicit “instructions” you and your colleagues used to design this amazing carving job. And they sure as hell won’t be able to use your SmooooothAF technology.

However, if they do have those instructions. They can essentially copy it. Exactly.

These instructions are your source code. The basis of your software product.

If I had Facebook’s source code, I could essentially replicate Facebook with all the bells and whistles and technology.

::

For clarity

1AA – In the above case “English” and “Spanish” become your technology “stack”. Similarly, in a real-world example – a stack would be a set of programming languages used by a company.

Additionally, more people joining means the “creation of a team”. A software product has a large number of people working in conjunction to finish a particular section of a complex job.

2AA – Making changes = “Software Updates”. Planning changes = “Upgrade Pipeline”

3AA – SmooooothAF = Proprietary Technology. A piece of technology unique to one software. So for example, the way Reddit shows the top posts on the home is a form of proprietary technology. It’s not merely listing the latest posts, nor the most upvoted posts. It’s using a system to push a particular post there. If I were to recreate Reddit today using just what I can see with my own code, I’d have a real difficulty trying to reverse engineer the way Reddit does that.

4AA – This is why the “source code” or the original set of instructions is kept secure and confidential. It is years of hard work by many excellent programmers and essentially equal to the product and company itself.

::

Now that you’ve understood “source code” – you should try and understand “Open Source” as well.

Open source happens when a programmer or a company, releases the source code of their software under a license that allows you to see it, modify it and use it.

It can help reduce development costs, allows for transparency, is more often than not extremely reliable and allows for a lot of collaboration.

A good example is a [Chromium Web browser](https://en.wikipedia.org/wiki/Chromium_(web_browser)). It is completely open source. It is developed and maintained by Google. But is completely Open Source.

You must have heard of Google Chrome. Google Chrome is built majorly on Chromium with a lot of other proprietary features added in. Google Chrome is not open source.

There are several browsers on the Internet that work on “Chromium” as a base. Such as Microsoft Edge, Brave, Opera etc. These are all again closed source.

Hope I could help.

You are viewing 1 out of 10 answers, click here to view all answers.