how basic programming concepts translate in real software?

same as title
i do not know much about programming and when i try to read book or watch videos

i find people explain how to print something , how to do simple calculation , simple if and else statments and functions


how those concepts really happen in real software when i try to apply from what i have "learned" i just find myself cant do much , if anything at all
 
All programming languages follow a few basic patterns, loops, conditionals and variables. Those three basic principles all apply similarly in every language, only the syntax might be different from one language to another. Understand the principles, not the syntax.

i find people explain how to print something
We all started with a simple "Hello World" :D

i try to apply from what i have "learned" i just find myself cant do much , if anything at all
Start simpler, it just means that whatever you wanted to do is a bit too far out of reach for now. Maybe a simple game? A number guessing game, let the program pick a random number and you have to guess that number. Computer can only give you a hint your guess is lower or higher than what it picked.
 
They translate by accumulation, like words translate into a novel. Words turn into phrases, phrases into sentences, sentences into paragraphs, paragraphs into pages, pages into a novel. In general, with a single sentence you can't do much, but when you start to accumulate, you end up writing, I don't know, FreeBSD or War and Peace.

The best way to learn is to start writing code with the ambition of creating something meaningful, not just tests.
 
We all started with a simple "Hello World" :D
That is still my goto in any language.

how those concepts really happen in real software when i try to apply from what i have "learned" i just find myself cant do much , if anything at all
A very old concept around programming, there have been books written on it:
"Data plus algorithms equals programming"

At the very core a program is really nothing more than a transform.
Data can be as simple as a keypress, the algorithm (what to do with the data) may be as simple as "display the character. Combine them and you have a program.

If you work closer to the hardware (device drivers, OS level) the greatest joy is getting LEDs to blink in the sequence you want them to. To outsiders, the just go "yeah, but aren't they supposed to blink?", but you go "yeah, but look at what I did to make them do that".

As SirDice points out, all programming languages have common things (just like all spoken languages have common things):
make a decision (if statement)
data (constants and variables)
looping (iterate over something)

The exact way of doing them is the syntax, which like spoken language can be picked up as you go (answers from stack overflow are some of the most useful).

So think of the data, think of how you want to transform it and then pick a language and you are at the point of "programming"
 
When you start learning something, you don't begin with the most complex and technical concepts (for example: dynamic memory management, real-time programming, advanced polymorphism, high-performance computing, etc.). Regardless of the language, we all started with "Hello World."

Where I agree with the original poster is that I’ve always found it hard to code "for the sake of it"; you need to find a coherent project, one that’s somewhat ambitious but still within your reach. As others have said, it could be absolutely anything, since coding yourself gives you a great deal of freedom. Games, databases, calculations utilities, systems, low-level programming, graphics, networking, and so on. Just Depending on what you enjoy :)
 
A very old concept around programming, there have been books written on it:
"Data plus algorithms equals programming"
so i think i should stop trying to learn programming and learn data plus algorithms instead?



So think of the data, think of how you want to transform it and then pick a language and you are at the point of "programming"
i know what i want to do for now atleast which is a simple fuzzer

this is what i am thinking of and hopefully correct :


take a website from user

take a wordlist file and read a line from it

do wordlist_line.website.com

send it to curl or whatever and get reply

repeat until end



i think i know exactly steps i need to do but can not mange to make it a program
 
Short:
Pick one of the languages: C, Perl, or Python (My personal recommendations; others may tell you other things. I would not say, they are wrong, neither they are right. You pick!)
Write a "Hello World!" prog in it.

Long:
Start to learn programming always starts with 'write a program that prints "hello world" on the terminal.'
This is to have you at least your very basic tools ready to hand: texteditor, know how to write source code with it, save it to a file, know how to compile that file with the compiler, know at least that a compiler is some prog that translates the source into an executable, learn to correct errors when the compiler complains (and it will. 😁), run that executable, and learn to see if the output is what you expected (It will not. 😂)

Plus you already started on programming.
Plus of course you needed to pick a language for it.

There are many languages to start with.
IMO it's no use to start on some programming language especially created to teach programming, since at least to me it feels somehow unsatisfying - you wanna do something with it, so pick a language that's used by professionals.
While IMO C++ or Rust are advanced languages, no good choice to start with.
I always recommend C, but IMO Perl, or Python were also a good choice. Since they are easy to learn, at least for the very basic beginning, and they are used a lot on unix[like] systems.
At least to grasp the most basic concept of variables, branches ("if"), loops, functions etc. it doesn't really matter, which language you pick.
When you do start programming own programs you use for your own personal use (you can really pimp your system with such) even small ones, you will soon start on programming in more than one language anyway.
Which then includes shell scripting. IMO shell scripting is nothing to start with, when you don't even know what a variable, a loop, or a condition is - learn this things first in some other programming language.

If you start programming more seriously, you may need to look at and improve your environment: which texteditor - learn it's usage and feel comfortable with it is more important than which one you pick, create a system of how you organize your files, start use some version control... - this all will come when the time comes.

How you learn best you can only answer for youself.
Personally I find videos most inefficient. I prefer real books, PDFs, man pages and webpages - anyway written text. I get from those within a few minutes for which I need hours on watching, stopping, rewind, repeat... videos.
But best learning always is:
Just do it.
Don't bother much, just start somewhere.

"usus sine doctrina quam citra usum doctrina valeat."
"practice without learning will be of more avail than learning without practice."
____________________________________________________________[Quintilian, ca. 35 - 100]

You find lots of useful stuff here:
Become a Programmer, Motherfucker
many quick starts here:
Learn X in Y Minutes
of course there are a lot many other sites - pick what you feel most comfy with.

I also recommend Books: (you can get those used for a few bucks.)

For getting into Unix and shell scripting:
Robbins, Beebe, "Classic Shell Scripting", O'Reilly
Kochan, Wood, "Shell programming in Unix, Linux and OS X", Addison Wesley

Both are not only teaching shell usage, and shell programming, but the very basics about Unix usage. The second one is easier to read and gets you quicker in, the first is more comrehensive, and dives deeper.

My always #1 tip to anybody who really wants to start seriously on programming: C
This is my very own personal opinion. Others will tell you, 'Heavens, No!' And I would neither say they are wrong, nor they are right.
However, it's your decision in any case.
Kernighan, Ritchie, "The C Programming Language - second edition", Prentice Hall
If you want to learn programming, some say, 'start with Python', others recommend other languages. I say, learn C. Despite of what all bad things you may hear about C, true or not, wether you like it or not, most of [Free]BSD's source is written in C. C is Unix, Unix is C. Get a copy of this fourty year old book (a few bucks at a used books shop), and work it through. If you already took a programmers class, don't just skim through it, look at the exercizes, get a rough idea how trivial it was to solve, but actually really do it! You will not only gain a solid in-depth fundamental training in C, but above all a very good general programming class, which is useful anyway wether you will later program in C or not.

Some junk I already wrote on the same topic:
About learning C
C on FreeBSD

Tip for not become disencouraged:
Become better at programming doesn't mean doing fewer errors.
When you become better, you don't get fewer errors. You simply get other ones instead.
Sure, you'll do fewer simple errors like syntax typos (they never will vanish completely. 😎)
But instead the errors you do will become more complex instead.
A good programmer ain't no one doing few or none errors.
A good programmers is good in finding and correcting errors.
Only errors found and corrected give you experience.
So: Do errors! Lots and many of errors! Then find and correct them.
🤓

Have fun!
 
Computers are very simple. They can only do a small number of real operations. Add numbers together. Store a value in memory. Read a value from memory. Perform conditional tests and change program flow depending on the result. The trick is, they do those simple operations extremely fast. So, just like you can make a moving picture cartoon from a series of static drawings and then flipping through the stack of drawings quickly, you can make a computer appear to do all kinds of magical stuff, but deep down inside, all its doing is the same set of simple operations, just very quickly. You may have heard of 'MIPS', millions of instructions per second. So if you have a 10 MIPS cpu, that means it can do 10 million of those basic operations every second. Over the years, people have worked out how to make those basic operations appear to do all the things you see on your desktop today.
 
While IMO C++ or Rust are advanced languages, no good choice to start with.
I always recommend C, but IMO Perl, or Python were also a good choice. Since they are easy to learn, at least for the very basic beginning, and they are used a lot on unix[like] systems.
why start with C not C++ , from what i hear , they are near even syntax is somewhat near

My always #1 tip to anybody who really wants to start seriously on programming - start with C.
This is my very own personal opinion. Other will tell you, 'Heaven, No!' And I would neither say they are wrong, nor right.
However, it's your decision in any case.
Kernighan, Ritchie, "The C Programming Language - second edition", Prentice Hall


seems a good book but isnt old books outdated mostly?
 
If you have a clear goal, shell script might be a good start. If things require more speed or graphics/media, you can try to improve parts with a real language that's also executed in a script. This is the lazy selective approach. Only study things for specific demands...
 
Standard teaching language nowadays is probably python. C++ is probably a bit too much to chew for a complete beginner, its a huge subject. I always liked BASIC as a beginners programming language, but it seems to have fallen out of fashion, not "modern" enough. If you want to try BASIC, there is a very nice old book called 'Illustrating Basic' by Don Alock that is a nice and fun way to learn, you can probably find a copy cheap on ebay.
 
Computers are very simple. They can only do a small number of real operations. Add numbers together. Store a value in memory. Read a value from memory.

Computers haven't been simple for decades. You simply cannot explain what happens in today's hello world in C.

You can explain into great detail in 15 minutes what happens when you write that code on the 80s IBM PC type computer. You can also pull out an oscilloscope or logic analyzer and tap it directly onto the motherboard, allow the student to see how

- the actual "hello world" string is loaded to RAM from the executable
- the bus interface unit of the CPU reads byte at a time from RAM into the registers
- the execution unit of the CPU spins many cycles to reinterpret that byte into several other values
- the bus interface of the CPU pushes those values directly to VRAM
- the CRTC on the graphics card generates a textual character from the VRAM data

OP's question is really the most important one in computer science in last decade or so. How do we train new people, if the abstractions have gone so high, it would take them at least a portion of time the present programmers spent on it. Everyone is tutored how to achieve a goal with minimal understanding of what goes around them.

I mean yes, a programmer that understands what happens in modern C hello world such as libc runtime, streams, shell, etc, has tons more background to lean on compared to a phyton script kiddie or a web developer, but rest assured, nobody there knows how anything exactly runs.
 
Computers haven't been simple for decades. You simply cannot explain what happens in today's hello world in C.

You can explain into great detail in 15 minutes what happens when you write that code on the 80s IBM PC type computer. You can also pull out an oscilloscope or logic analyzer and tap it directly onto the motherboard, allow the student to see how

- the actual "hello world" string is loaded to RAM from the executable
- the bus interface unit of the CPU reads byte at a time from RAM into the registers
- the execution unit of the CPU spins many cycles to reinterpret that byte into several other values
- the bus interface of the CPU pushes those values directly to VRAM
- the CRTC on the graphics card generates a textual character from the VRAM data

OP's question is really the most important one in computer science in last decade or so. How do we train new people, if the abstractions have gone so high, it would take them at least a portion of time the present programmers spent on it. Everyone is tutored how to achieve a goal with minimal understanding of what goes around them.

I mean yes, a programmer that understands what happens in modern C hello world such as libc runtime, streams, shell, etc, has tons more background to lean on compared to a phyton script kiddie or a web developer, but rest assured, nobody there knows how anything exactly runs.
you maybe can but very hard these days , take a look at console emulators for example (i know all of them now are HLE which means they fix issues as it happens and do not emulate cpu 1:1 but still they need a good understanding which means it is possible but not simple at all)
 
why start with C not C++ , from what i hear , they are near even syntax is somewhat near
Even if you will stumble many times over C++ named as "C" they are not the same.
By theory any C code should be 100% compatible in C++, and any C++ class I've seen so far always starts by teaching "basic" C first, even if "C++" is written over it.
But C++ brings a lot more to the table. And those things are for sure nothing simple, nothing to begin with.
I cannot tell you, what to do, but by my personal opinion and experience, if you never learned any programming language at all, start with C, or some other language, but not with C++.

seems a good book but isnt old books outdated mostly?
Outdated, strictly speaking, yes. Mostly, not. The differences between the C used in this fourty years old 2nd edition to today's C standard are pretty small, three or four things - negliable.
C didn't changed that much over time like other languages like Python, or above all C++.
Anyway you can invoke your compiler by telling him to use another (older) C standard, like e.g.:
cc -std=c89 helloworld.c Then it will treat your source exactly as it was written in C standard from 1989.
 
Well, if you really want to understand how it works from the bottom up, you need to understand computer architecture, how microprocessors work, how to write assembly language, how to write a language translater (compiler), then how to write C, and then an operating systems course, and then start learning about comms and graphics, application programming libraries, and all the stuff on top of that. But you can't do all that in any kind of short, easy way.

I think I would just sign up for a beginners python programming course, learn that, to start with.
 
All programming languages follow a few basic patterns, loops, conditionals and variables. Those three basic principles all apply similarly in every language, only the syntax might be different from one language to another. Understand the principles, not the syntax.
That is for a WHILE-language similar to ALGOL60.

FORTRAN, as machine language: operations that change state, jump according to the state, repeatedly.

A functional language like LISP and relational like PROLOG has a different paradigm, the variable are not like the language above.

And specialized languages like SQL are more like LISP than a WHILE-language.

shell scripting is easier amd more rewarding than most shit

Yes, scripting, but not SHELL scripting that is frustrating.

As I alwas say: tcl + tk + sqlite3.
 
shell scripting is easier amd more rewarding then most shit
Rewarding in deed.
You can almost directly write small programs that already do really very useful things.
Very satisfying, very useful indeed.

Why I did not recommend shell scripting for the very beginning is, you're dealing with more complex data like a = 4, b = 5, c = a + b, and I find the syntax is a bit wordy, and special, particulary when quoting and things like $((...)) needed to be done, etc..
Maybe it's becasue I started first on other programming languages, and then found sh scripting pretty weird.
But, as i said, my word ain't for sure not the one and final truth. :cool:

I always liked BASIC as a beginners programming language, but it seems to have fallen out of fashion, not "modern" enough.
The point with BASIC is not, if it's modern, or not.
BASIC describes a large family of programming languages.
If you take the ones coming on the homecomputer's ROM in the 1980s - which, sorry, were genuine crap - or this, very much better but still not good GW-BASIC, you have the essential #1 core problem with BASIC:
It's so easy to avoid to think about the structure of your program. So you don't do it. So you don't learn structured programming.
There are already for a long time way more sophisticetd BASIC dialects, but unless you're going to write some Visual Basic programs under MS Windows, frankly I see no sense in learning BASIC under unix[like] at all, since there are so many other languages available.
Back a long time ago I also once started on BASIC as my very first programming language myself. Looking back, it was not good. I teached me so many bad habits that tooks me effort later to unlearn again.
 
why start with C not C++ , from what i hear , they are near even syntax is somewhat near
C is more elementary, you can easily guess how it translate to machine, and it is a closed system.

C++ is for 'object oriented' programming, perhaps you will seldom need object programming, and you can do it to some extent with C.

C will be more difficult, but more rewarding. But I would recommend to begin with C only if you want to do calculations, as an alternative to FORTRAN. For beginning: tcl + tk and later sqlite3.
 
how those concepts really happen in real software when i try to apply from what i have "learned" i just find myself cant do much , if anything at all
What really happens when you try? Where do you get stuck? Take an example of this "real software". Also, what is your background? Hard to answer such generic questions except with a lot of hand waving.
 
Back
Top