What does a coder use when they make a program from scratch?

876 views

I don’t understand what the starting point is. Do they just open a word document and start creating lines of code or is there some type of program that’s specifically used?

In: 1291

25 Answers

Anonymous 0 Comments

This is very easily googleable… And it very much depends on the language used.

For python and html, for instance, you’re likely to use a simple empty document. For C++, C# or Java, there’s usually software like Visual Studio, for instance.

Anonymous 0 Comments

A compiler turns lines of code (written not in Word, but often in a text editor with better styling for code) into an executable program.

A compiler is often written in another language, and ran through that language’s compiler.

First compiler was (roughly) hand-written machine code.

So it’s compilers all the way down.

Anonymous 0 Comments

[removed]

Anonymous 0 Comments

Programming has a long history, starting with automated looms during the industrial revolution. The first “programs” were written by directly setting commands on the processor; a sequence of ones and zeros that move the internal switches to the right state to do what you want (add, subtract, copy, compare etc). Only much later did people moved to more high level languages like C, Ada, Fortran etc. Their compilers in term were written in assembly (which is a more human readable form of the individual instruction patterns). The first assemblers were “written” by manually inputting instructions through punch cards or manually wired memory.

Anonymous 0 Comments

If you are really making a program from scratch, you’ll probably want to go back in time a bit. Study the binary language of your target computer, write your logic on paper with a pencil, then convert your logic to machine instructions (still on paper), then take some punchcards and convert the machine instructions into their binary form on the punchcards (make sure you don’t shuffle them!). Then go to the computer, put in your punchcards to load the program into memory, set the starting variables using switches, and then the computer will run your program and output the answer with some lights or printing on paper.

It’s a bit harder to do from scratch nowadays, good luck trying to orient the ferro-magnetic molecules on a hard drive or to set the bits in a chip of flash memory. But luckily, we don’t have to do it from scratch, as modern technology has been built on layers upon layers of previous technology. So now we have things like high level programming languages, operating systems, integrated development environments (IDE) and frameworks, which allow us to get straight to the point with business logic instead of having to figure out how to make the computer do 1 + 1 = 2.

Anonymous 0 Comments

When I was getting my degree in IT at college, depending on the programming language and purpose of what I was doing I used either Netbeans or Eclipse. They’re officially referred to as an IDE (which is and integrated development environment if I remember correctly). They have color coding, indentation, debugging tools, libraries for the major programming languages, etc. I believe they’re free as well

Anonymous 0 Comments

Yes, you can literally open up Notepad(Not Word), and start writing lines of code. In practice, different tools have been created for different languages. Often times if you are starting a program, some initial code will be auto filled, as it will be some required repetitive code that every program of that language must use. Some examples of different code editors/IDEs are:

* Visual Studio
* Visual Studio Code
* Brackets
* Pycharm
* Atom
* Sublime Text
* Notepad++
* VIM

All of these tools will have different features, and are often very customizable. Most editors have what is called Intellisense or something similar, that will bring up suggestions of standard code snippets, [as you start to type words](https://code.visualstudio.com/assets/docs/editor/intellisense/intellisense.gif). So it is no longer necessary to memorize every last detail of a coding language, like it was long ago. Code editor also help organize the code with proper lines, indentation, and color coding, to make it easier to read and write.

EDIT. Just wanted to add this to show just how simple it is for someone to make a piece of code:

1. Open Windows Note pad.
2. Type this **<html>Hello World</html>**
3. Save as. Name the file, and change the file extension from .txt to .html
4. Find and Open the file in your browser of choice.
5. Congrats, you just made a really shitty web page!

Anonymous 0 Comments

the starting point’s assembly. primarily based around the registers in your computers memory. i think that’s all operating systems (?).

but modern languages are all compilers. they tell all that what to do. convientently.

it’s why sometimes you see things like punch cards from back in the day. those punches registered the registers in memory. it was all just push and pop and very simplistic. almost beautifully. modern programmers can’t cram half the stuff they did into such little memory. i’m one of them. and i know a little assembly from reverse engineering games. the way that works extrapolated across all the registers is really a thing of beauty. sneaking suspicion it’s why people liked the matrix. that screen.

Anonymous 0 Comments

Use a text editor. Emacs, Brief, Vi, etc. to create a file in the language of choice (C, Fortran, Basic, assembly language). Then compile your file with the appropriate executable, and if it compiles, run it. If not, edit some more. Edit, compile, edit, compile, … repeat until no errors, run, go back and edit, compile,….

Old school programs that are the underpinnings of operating systems, compilers, etc. were done this way. Then at some point you use that method to write a GUI, and the more advanced languages and environments, and go up from there.

Anonymous 0 Comments

So, you may have heard that everything computers do is just operations on 1’s and 0’s. Basically, a computer is full of tiny light switches that can be turned on (1) or off (0). Certain combinations of off and on switches mean certain things to the computer, like “go look in this spot for what you’re looking for”, or they can represent actual data (for example, “01001000 01100101 01101100 01101100 01101111” spells out “hello” in binary). Computers like binary (1’s and 0’s), that’s all they do and all they can understand. However, humans have a pretty hard time reading and writing in binary. Look at how hard it was to read “hello” and think about how difficult it would be to read and write complicated instructions, or whole paragraphs of words that you wanted to store, if you were the one writing it out with 1’s and 0’s.

That’s where programming languages come in. You want to write instructions, but you want to write them closer to English than to binary. For example, you may want to tell the computer to display the word “hello” on the screen. There’s a big spectrum of languages, with ones that are closer to plain English being called “high-level” and ones that are closer to binary being called “low-level” or “assembly” languages. I’m going to focus on high level languages, since that’s probably what you see people use most often. There’s lots of different ones, like Python, Java, etc. They all (for the purposes of this ELI5) work pretty much the same way, but they have different rules for how you can write things. For example, in Python you would write ‘print(“hello”)’ and in Java you would write ‘System.out.println(“hello”);’. The only difference is that within each language, everyone agrees to write things in a certain way and use certain keywords to mean certain things.

To write in a high-level language, you wouldn’t write in a Word document because that has a bunch of extra information (like what font you used, and what size your text is) that the computer wouldn’t need or understand. But you can just open a plain text editor and type code into an empty .txt file. The trick is, you have to stick with only one language and use all the right syntax and conventions of that language, like putting a semicolon after each line or using tabs to properly align things. This will be important for the next step. You can also use code editors to do this, but they really are just software that gives you hints, like reminds you that you forgot a semicolon. You can copy and paste the text right out of the fancy editor and into a .txt file and it will run exactly the same, so the important thing is just the words you wrote.

Now, you take the .txt file and name it something like .c or .py so that the computer knows what language you wrote it in. Then, when you try to run your program, a chain of events will occur to translate your high-level code that follows a certain languages rules and looks kind of like English, into straight up 1’s and 0’s that turn the computers light switches on and off. Something called a compiler will take the high level code and replace each instruction with more basic instructions, called low-level code. So, if you write “y = 2 * 5 + 4”, it might turn that into “x = 2 * 5”, “z = x + 4”, “y = z”. Then, it will get further replaced by instructions that tell the computer something like “before, we stored the value of y at lightswitch spot 1234” so now instead of “y” the instruction will read “1234”. This is assembly language. Everything gets turned into a lightswitch spot and whether the lightswitch at that spot should get turned on or off. The compiler that does this is just another program, but it’s not one that programmers write. It was already written and we generally trust it to function properly. Now you have everything in binary, just a bunch of 1’s and 0’s, and the computer turns its light switches on and off according to those instructions. Those light switches being turned on and off is what makes everything on your computer happen, and if you’ve written everything right, all the correct light switches will be turned on and off and your computer will do whatever your program told it to do.

This is a kind of simplistic view, but that’s really what’s happening. John/Hank Green also have a good video series explaining the levels of abstraction, which I think is what you’re trying to get at. It’s a really complicated concept and hard to wrap your brain around at first, so don’t feel bad if it seems confusing.