Sinisterly
How To Start Programming For Beginners - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Hacking (https://sinister.li/Forum-Hacking)
+--- Forum: Tutorials (https://sinister.li/Forum-Tutorials)
+--- Thread: How To Start Programming For Beginners (/Thread-How-To-Start-Programming-For-Beginners)

Pages: 1 2 3 4


RE: How to start programming? - Mxyzptlk - 02-08-2018

(02-08-2018, 07:48 PM)Ender Wrote:
(02-08-2018, 07:36 PM)Mxyzptlk Wrote:
(02-08-2018, 07:10 PM)Ender Wrote: You'll learn to write good algorithms by doing projects, especially ones that are simple yet logical (like sorting), or ones that involve lots of math (like machine learning).

College courses often teach bad practices (more OOP and Java), so you'll likely end up better on your own if you try hard enough.  Computer Engineering seems like a neat course though.

If you want to learn to write efficient algorithms, learn C, and try to use the least number of instructions and bytes of memory as possible.  C gets you started in a good place, and has simple, nice syntax (unlike C++ and other languages).

But first you need to know how exactly to start. I learned a lot of great things from MIT 6.001 course, Binary Search, Sorting are just one of many things I learned that is not taught anywhere, once you work on problem solving and algo, you can write better codes. MIT uses Python and have great lecturers, they even tell you how to debug a program and best practices. No offense, but take the course before making assumptions.

You don't need to know how to start at all, that's the point of the projects.  Sorting is everywhere, it doesn't have to be taught, it needs to be learned.  Read example code or the Wikipedia page.  Python is only good for scripting, it's useless for real software.  Debugging shouldn't have to be implicitly taught.  They don't teach the best practices, because the current college-CS-world is stuck on OOP and other bullshit.

If you actually are in MIT, then you're more qualified than me (I'm really young).  However, that doesn't mean that it's impossible for me to be correct.

On top of all this, you're the one who asked the question.  I simply gave an answer.  You can learn things from college, I'm saying that some of what you can learn can be taught better to yourself by you.

I am saying essentially the same thing as you. Stanford and Duke recommends C as starting language. MIT and some others recommend Python. I don't know which college is stuck on OOP, I not a fan of OOP myself. (Python is OOP but unlike Java you can write programs without using much concepts of OOP)

And btw, I have included two links for C language if that's ok with you, I am not asking you to take all the courses, take one with the language that you prefer and after you are comfortable, go to github and have fun.


RE: How to start programming? - Blink - 02-08-2018

(02-08-2018, 07:51 PM)Mxyzptlk Wrote:
(02-08-2018, 07:41 PM)phyrrus9 Wrote:
(02-08-2018, 07:10 PM)Ender Wrote: You'll learn to write good algorithms by doing projects, especially ones that are simple yet logical (like sorting), or ones that involve lots of math (like machine learning).

College courses often teach bad practices (more OOP and Java), so you'll likely end up better on your own if you try hard enough.  Computer Engineering seems like a neat course though.

If you want to learn to write efficient algorithms, learn C, and try to use the least number of instructions and bytes of memory as possible.  C gets you started in a good place, and has simple, nice syntax (unlike C++ and other languages).

Literally what he said, but I want to make a few points:

You will learn by working on your own, but in reality the more you struggle the more you will learn. Picking projects you can't finish is probably the easiest way to learn them, because as you do the project you learn more, sometimes you have to set that project aside and work on another, but once you finally do it it's a very rewarding feeling.

College tends to teach you bad practices, but you don't go to college to learn, you do that to get exposed to the ideas. It's still a good idea to take college classes in most cases, but don't consider a degree in computer science to mean that you know how to program, you don't, you simply know how to learn programming.

Agree exactly with Ender on this one, my two cents is that being anal about memory used and instructions included will make you a better programmer in the long run.

1. I understand what you are trying to say, but Algorithm itself means writing an efficient piece of code with minimum Space and Time complexity.

2. Indeed, most colleges teaches bad code practices, but I have taken the MIT course, they use IDLE and give you constant updates on time taken for each program. They care more about the space and time complexity than us.

3. I myself recommend Low level language  check the courses for what languages they are based on, or let me help you:

1. Code Yourself! An Introduction to Programming - Scratch programming, for total beginners [will remove it if you want]
2. Programming Fundamentals - C language
3. Programming for Everybody (Getting Started with Python) - Python
4. Introduction to Computer Science and Programming Using Python - Python
5. Learn to Program: The Fundamentals - Python

I know Python is a high level language, but now a days almost everyone recommend python as starting language and I don't see any bad thing in it.

Python isn't multithreaded, it's fake-multithreaded.
C is also a high level language by the only real accepted definition of high/low level. The issue is that Python is interpreted.

Don't get me wrong, Python is extremely useful for scripting, but not for real programming.

Minimum space and time complexity is not always the goal. O(N^2) algorithms can be better than O(N) ones if the input is small enough. Also, I said to use as little instructions and memory as possible, that means that it would likely need to have good time and space complexity.

IDLE is bad, use vim/nano/emacs and the Python interpreter for POSIX OSs instead.

I wouldn't do anything with Scratch, it's a language made for 5 year olds, and even then I'd say to teach them a BASIC instead of Scratch.
If you do take courses, do not take them on programming. CE and CS are better choices, and you have a better chance of learning things that are harder to learn on your own, if the course ends up being good.


RE: How to start programming? - Blink - 02-08-2018

(02-08-2018, 07:57 PM)Mxyzptlk Wrote:
(02-08-2018, 07:48 PM)Ender Wrote:
(02-08-2018, 07:36 PM)Mxyzptlk Wrote: But first you need to know how exactly to start. I learned a lot of great things from MIT 6.001 course, Binary Search, Sorting are just one of many things I learned that is not taught anywhere, once you work on problem solving and algo, you can write better codes. MIT uses Python and have great lecturers, they even tell you how to debug a program and best practices. No offense, but take the course before making assumptions.

You don't need to know how to start at all, that's the point of the projects.  Sorting is everywhere, it doesn't have to be taught, it needs to be learned.  Read example code or the Wikipedia page.  Python is only good for scripting, it's useless for real software.  Debugging shouldn't have to be implicitly taught.  They don't teach the best practices, because the current college-CS-world is stuck on OOP and other bullshit.

If you actually are in MIT, then you're more qualified than me (I'm really young).  However, that doesn't mean that it's impossible for me to be correct.

On top of all this, you're the one who asked the question.  I simply gave an answer.  You can learn things from college, I'm saying that some of what you can learn can be taught better to yourself by you.

I am saying essentially the same thing as you. Stanford and Duke recommends C as starting language. MIT and some others recommend Python. I don't know which college is stuck on OOP, I not a fan of OOP myself. (Python is OOP but unlike Java you can write programs without using much concepts of OOP)

And btw, I have included two links for C language if that's ok with you, I am not asking you to take all the courses, take one with the language that you prefer and after you are comfortable, go to github and have fun.

I'm not speaking of any specific college, I'm saying that colleges often use Java and OO a lot. I'll take a look at those, although I may be a bit past those. I am interested in ML and mathematical logic though.


RE: How to start programming? - Mxyzptlk - 02-08-2018

(02-08-2018, 07:58 PM)Ender Wrote:
(02-08-2018, 07:51 PM)Mxyzptlk Wrote:
(02-08-2018, 07:41 PM)phyrrus9 Wrote: Literally what he said, but I want to make a few points:

You will learn by working on your own, but in reality the more you struggle the more you will learn. Picking projects you can't finish is probably the easiest way to learn them, because as you do the project you learn more, sometimes you have to set that project aside and work on another, but once you finally do it it's a very rewarding feeling.

College tends to teach you bad practices, but you don't go to college to learn, you do that to get exposed to the ideas. It's still a good idea to take college classes in most cases, but don't consider a degree in computer science to mean that you know how to program, you don't, you simply know how to learn programming.

Agree exactly with Ender on this one, my two cents is that being anal about memory used and instructions included will make you a better programmer in the long run.

1. I understand what you are trying to say, but Algorithm itself means writing an efficient piece of code with minimum Space and Time complexity.

2. Indeed, most colleges teaches bad code practices, but I have taken the MIT course, they use IDLE and give you constant updates on time taken for each program. They care more about the space and time complexity than us.

3. I myself recommend Low level language  check the courses for what languages they are based on, or let me help you:

1. Code Yourself! An Introduction to Programming - Scratch programming, for total beginners [will remove it if you want]
2. Programming Fundamentals - C language
3. Programming for Everybody (Getting Started with Python) - Python
4. Introduction to Computer Science and Programming Using Python - Python
5. Learn to Program: The Fundamentals - Python

I know Python is a high level language, but now a days almost everyone recommend python as starting language and I don't see any bad thing in it.

Python isn't multithreaded, it's fake-multithreaded.
C is also a high level language by the only real accepted definition of high/low level.  The issue is that Python is interpreted.

Don't get me wrong, Python is extremely useful for scripting, but not for real programming.

Minimum space and time complexity is not always the goal.  O(N^2) algorithms can be better than O(N) ones if the input is small enough.  Also, I said to use as little instructions and memory as possible, that means that it would likely need to have good time and space complexity.

IDLE is bad, use vim/nano/emacs and the Python interpreter for POSIX OSs instead.

I wouldn't do anything with Scratch, it's a language made for 5 year olds, and even then I'd say to teach them a BASIC instead of Scratch.
If you do take courses, do not take them on programming.  CE and CS are better choices, and you have a better chance of learning things that are harder to learn on your own, if the course ends up being good.

1. What is wrong with an interpreted language?
2. Yes, I understand the concept of Big-Oh, Omega and Theta.
3. I like Pycharm more and yes, Brackets. You see everyone has different preference.
4. Dude, those courses are for CS, I made that article for people who have no knowledge about programming or CS, people who think math and programming are different, those courses will show them how math is integrated with programming. My motive is to help develop people's logic and thinking capability, otherwise I would've pasted links of Lynda, Pluralsight, Udemy, etc.


RE: How to start programming? - Mxyzptlk - 02-08-2018

(02-08-2018, 08:06 PM)Ender Wrote:
(02-08-2018, 07:57 PM)Mxyzptlk Wrote:
(02-08-2018, 07:48 PM)Ender Wrote: You don't need to know how to start at all, that's the point of the projects.  Sorting is everywhere, it doesn't have to be taught, it needs to be learned.  Read example code or the Wikipedia page.  Python is only good for scripting, it's useless for real software.  Debugging shouldn't have to be implicitly taught.  They don't teach the best practices, because the current college-CS-world is stuck on OOP and other bullshit.

If you actually are in MIT, then you're more qualified than me (I'm really young).  However, that doesn't mean that it's impossible for me to be correct.

On top of all this, you're the one who asked the question.  I simply gave an answer.  You can learn things from college, I'm saying that some of what you can learn can be taught better to yourself by you.

I am saying essentially the same thing as you. Stanford and Duke recommends C as starting language. MIT and some others recommend Python. I don't know which college is stuck on OOP, I not a fan of OOP myself. (Python is OOP but unlike Java you can write programs without using much concepts of OOP)

And btw, I have included two links for C language if that's ok with you, I am not asking you to take all the courses, take one with the language that you prefer and after you are comfortable, go to github and have fun.

I'm not speaking of any specific college, I'm saying that colleges often use Java and OO a lot.  I'll take a look at those, although I may be a bit past those.  I am interested in ML and mathematical logic though.

Those colleges that start with Java are stupid. I am also interested in ML as well as Cybersec. Let's see what my masters will be in ML or CyberSec.


RE: How To Start Programming For Beginners - phyrrus9 - 02-08-2018

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 1. I understand what you are trying to say, but Algorithm itself means writing an efficient piece of code with minimum Space and Time complexity.

No, an algorithm is just a way of doing something, bad algorithms exist (like swife's expression parsing)

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 2. Indeed, most colleges teaches bad code practices, but I have taken the MIT course, they use IDLE and give you constant updates on time taken for each program. They care more about the space and time complexity than us.

I don't vouch for MIT's classes. They give you exposure, but that whole town is too up their own asses

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 3. I myself recommend Low level language check the courses for what languages they are based on, or let me help you:

As do I. C is great and powerful, but my favorite is AArch64 (ARM 64-bit Architecture), which is machine code


(02-08-2018, 07:58 PM)Ender Wrote: Python isn't multithreaded, it's fake-multithreaded.
C is also a high level language by the only real accepted definition of high/low level. The issue is that Python is interpreted.

Don't get me wrong, Python is extremely useful for scripting, but not for real programming.

Minimum space and time complexity is not always the goal. O(N^2) algorithms can be better than O(N) ones if the input is small enough. Also, I said to use as little instructions and memory as possible, that means that it would likely need to have good time and space complexity.

IDLE is bad, use vim/nano/emacs and the Python interpreter for POSIX OSs instead.

I wouldn't do anything with Scratch, it's a language made for 5 year olds, and even then I'd say to teach them a BASIC instead of Scratch.
If you do take courses, do not take them on programming. CE and CS are better choices, and you have a better chance of learning things that are harder to learn on your own, if the course ends up being good.

"not for real programming". Agreed, Python isn't a programming language, it's a scripting language. I use it commonly for automating small tasks and making complex cron jobs

What I said about memory image size wasn't about spacial complexity, it was about code density. Look at ARM for example. The most efficient way to write something is actually using Thumb-2, which significantly limits the instructions and registers available, but it also (and literally) cuts your program size in half, and you get to retain the always conditional portion, but you lose things like the set bit. Sometimes (look at the XNU kernel) it's more efficient to transition in and out of thumb2 and aarch64. This is the definition of hacking.

Agreed entirely with vi, nano is nice sometimes.

I worked with scratch a lot (when I taught programming classes). its neat for teaching logic, nothing else


RE: How To Start Programming For Beginners - Mxyzptlk - 02-08-2018

(02-08-2018, 08:22 PM)phyrrus9 Wrote:
(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 1. I understand what you are trying to say, but Algorithm itself means writing an efficient piece of code with minimum Space and Time complexity.

No, an algorithm is just a way of doing something, bad algorithms exist (like swife's expression parsing)

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 2. Indeed, most colleges teaches bad code practices, but I have taken the MIT course, they use IDLE and give you constant updates on time taken for each program. They care more about the space and time complexity than us.

I don't vouch for MIT's classes. They give you exposure, but that whole town is too up their own asses

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 3. I myself recommend Low level language  check the courses for what languages they are based on, or let me help you:

As do I. C is great and powerful, but my favorite is AArch64 (ARM 64-bit Architecture), which is machine code


(02-08-2018, 07:58 PM)Ender Wrote: Python isn't multithreaded, it's fake-multithreaded.
C is also a high level language by the only real accepted definition of high/low level.  The issue is that Python is interpreted.

Don't get me wrong, Python is extremely useful for scripting, but not for real programming.

Minimum space and time complexity is not always the goal.  O(N^2) algorithms can be better than O(N) ones if the input is small enough.  Also, I said to use as little instructions and memory as possible, that means that it would likely need to have good time and space complexity.

IDLE is bad, use vim/nano/emacs and the Python interpreter for POSIX OSs instead.

I wouldn't do anything with Scratch, it's a language made for 5 year olds, and even then I'd say to teach them a BASIC instead of Scratch.
If you do take courses, do not take them on programming.  CE and CS are better choices, and you have a better chance of learning things that are harder to learn on your own, if the course ends up being good.

"not for real programming". Agreed, Python isn't a programming language, it's a scripting language. I use it commonly for automating small tasks and making complex cron jobs

What I said about memory image size wasn't about spacial complexity, it was about code density. Look at ARM for example. The most efficient way to write something is actually using Thumb-2, which significantly limits the instructions and registers available, but it also (and literally) cuts your program size in half, and you get to retain the always conditional portion, but you lose things like the set bit. Sometimes (look at the XNU kernel) it's more efficient to transition in and out of thumb2 and aarch64. This is the definition of hacking.

Agreed entirely with vi, nano is nice sometimes.

I worked with scratch a lot (when I taught programming classes). its neat for teaching logic, nothing else

Yes, sorry bad algorithms do exist. I must rephrase, I wanted to say that learning algo and DS and making efficient steps to solve a problem is better than working on a particular language. We were taught that, once you can write good algorithms, you can write programs in any language you want. (you need to know the syntax of course)


RE: How To Start Programming For Beginners - Mxyzptlk - 02-08-2018

(02-08-2018, 08:22 PM)phyrrus9 Wrote:
(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 1. I understand what you are trying to say, but Algorithm itself means writing an efficient piece of code with minimum Space and Time complexity.

No, an algorithm is just a way of doing something, bad algorithms exist (like swife's expression parsing)

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 2. Indeed, most colleges teaches bad code practices, but I have taken the MIT course, they use IDLE and give you constant updates on time taken for each program. They care more about the space and time complexity than us.

I don't vouch for MIT's classes. They give you exposure, but that whole town is too up their own asses

(02-08-2018, 07:51 PM)Mxyzptlk Wrote: 3. I myself recommend Low level language  check the courses for what languages they are based on, or let me help you:

As do I. C is great and powerful, but my favorite is AArch64 (ARM 64-bit Architecture), which is machine code


(02-08-2018, 07:58 PM)Ender Wrote: Python isn't multithreaded, it's fake-multithreaded.
C is also a high level language by the only real accepted definition of high/low level.  The issue is that Python is interpreted.

Don't get me wrong, Python is extremely useful for scripting, but not for real programming.

Minimum space and time complexity is not always the goal.  O(N^2) algorithms can be better than O(N) ones if the input is small enough.  Also, I said to use as little instructions and memory as possible, that means that it would likely need to have good time and space complexity.

IDLE is bad, use vim/nano/emacs and the Python interpreter for POSIX OSs instead.

I wouldn't do anything with Scratch, it's a language made for 5 year olds, and even then I'd say to teach them a BASIC instead of Scratch.
If you do take courses, do not take them on programming.  CE and CS are better choices, and you have a better chance of learning things that are harder to learn on your own, if the course ends up being good.

"not for real programming". Agreed, Python isn't a programming language, it's a scripting language. I use it commonly for automating small tasks and making complex cron jobs

What I said about memory image size wasn't about spacial complexity, it was about code density. Look at ARM for example. The most efficient way to write something is actually using Thumb-2, which significantly limits the instructions and registers available, but it also (and literally) cuts your program size in half, and you get to retain the always conditional portion, but you lose things like the set bit. Sometimes (look at the XNU kernel) it's more efficient to transition in and out of thumb2 and aarch64. This is the definition of hacking.

Agreed entirely with vi, nano is nice sometimes.

I worked with scratch a lot (when I taught programming classes). its neat for teaching logic, nothing else

Isn't what Thumb-2 does, is a step of Code Optimization phase of compilers and some languages have that feature?


RE: How To Start Programming For Beginners - phyrrus9 - 02-08-2018

(02-08-2018, 08:28 PM)Mxyzptlk Wrote: Isn't what Thumb-2 does, is a step of Code Optimization phase of compilers and some languages have that feature?

No, thumb-2 is a separate instruction set. the regular ARM instruction set is 32-bit fixed width instructions, Thumb-2 is 16-bit (still operates in 32-bit mode). It's a way of writing very dense code, particularly useful for a bunch of math operations with little control structure (it's not so great when it comes to branches).


RE: How To Start Programming For Beginners - Blink - 02-08-2018

(02-08-2018, 08:25 PM)Mxyzptlk Wrote: Yes, sorry bad algorithms do exist. I must rephrase, I wanted to say that learning algo and DS and making efficient steps to solve a problem is better than working on a particular language. We were taught that, once you can write good algorithms, you can write programs in any language you want. (you need to know the syntax of course)

Learning algorithms is good. You can do it on your own (me irl here), or you can be taught it. If the class is good, then taking it is good. I have an issue with a lot of classes because they often teach that OO should be used everywhere (spoiler: it shouldn't), and they often teach bad practices, or languages that create bad practices. If you're in a class teaching algorithms in C, Go, Rust, non-OO Python, or something else that isn't terrible, then that's great.