Jump to content

How to get started with computer programming?


Pawelk198604

Recommended Posts

Is the age of 30 I'm too old for this?
In high school I signed up (actually my mom at the urging of a teacher of computer science) to the class of computer science. I had a basic knowledge of programming in Pascal, barely I, I had an assessment of 3- (ie, D-, in the Anglo-Saxon rating scale)

Today I was in a bookstore I bought a book for learning's programming in Python, someone told me that this programming language is fairly easy to learn, but wracjąc to the topic bookseller recommended me the book Authored by Jason R. Briggs / "Python for kids. A Playful introduction this programing "its Polish translation, the bookseller said that the book is indeed dedicated to children, but it is used also as a primer in our Polish polytechnics and universities, and that may well serve for adult self-taught, but do computer programming, you can learn by yourself ?

Link to comment
Share on other sites

35 minutes ago, Pawelk198604 said:

Is the age of 30 I'm too old for this?

No, never. I have seen people well over 30 getting into university and finish a PhD.

You might have to get better literature and/or consult the internet a lot, but programming is definitely something you can tackle on your own nowadays.

Good luck and keep it up! Never ever give up, man.

Link to comment
Share on other sites

Python is likely the absolute best place to start (although its future isn't as bright as it once was, the lessons it teaches are still great, and nothing has really replaced it as "the next great language").

Make sure you download python 3.x (2.x is still used in the wild, largely because it isn't fully compatible), preferably 3.5 or higher (I checked the downloadable chapter 1:installation, and they were downloading 3.5.  Following examples on a 2.8 version of python might get unpleasant).

If you have a problem with programming, make sure the problem isn't in the book and not yourself and the language.  Humble Bundle recently had a sale on books from "no starch press" (although I can't remember this being included) and I can't say I was impressed.  Don't be afraid to check https://docs.python.org/3/tutorial/index.html (which I think was written by Guido Van Rossum, the creator of python, while good may assume you can already program in a similar language.  I suspect that if you have issues with the book (but have been following along), the tutorial may help you with a different explanation.  I was able to check out a book out of the local library (which I think was based on writing simple games) that was pretty good (on the other hand it wasn't very clear about the issues inherent in the pickle command, leaving programmers to think that sending pickled data across the internet might not be that dangerous: in reality using unpickled data in Python can make things like simply adding such data together infect your [user level] system with any malware the author wants).

* I am an electrical engineer whose career was exclusively hardware based, then picked up Python well over 30.  Still concentrating on hardware, but did write an absolutely huge project in python.

Link to comment
Share on other sites

As a Python programmer I can recommend Python as an excellent language not just to learn programming in, but also to write real world code in (there's a surprising amount of large websites that run on Python, likely a whole bunch you visit on a daily or weekly basis). It's also fairly easy to achieve anything in it

Most important though is that you find yourself one or more projects that you can actually start coding in what ever language you pick. Once you get past the initial “hello world” code and the examples in text books you need to go out and write something. That doesn't have to be the next No Man's Sky or Half Life, but it can be something as simple as a script that backs up your KSP files, or reads a KSP save file and prints a list (use HTML for formatting) of all your vessels and around what planet or moon they're orbiting.

It doesn't have to be KSP oriented of course! But look for little things in your life that you want to automate and start cracking those problems. In the beginning it will be hard, but coding is always about problem solving, and the more you do it, the easier it gets. And it's representative of what coding always entails: in 99% of the cases you will run into a new well how do I do THAT?! kind of problem, and you'll need to google and research to find a solution. And probably do that three or four times; your first solution will rarely ever work. But it's fun to get something to work, and incredibly satisfying.

Link to comment
Share on other sites

I started with BASIC when I was in elementary school, then had a long pause until college where I briefly (just a few months) learned C#, which was a great primer for C++, which is what I use the most now when dealing with Arduino. I find Arduino a great motive for learning programming and electronics at the same time, while having a great time and actually doing something useful for my day job.

Edited by Shpaget
Link to comment
Share on other sites

1 hour ago, Kerbart said:

As a Python programmer I can recommend Python as an excellent language not just to learn programming in, but also to write real world code in (there's a surprising amount of large websites that run on Python, likely a whole bunch you visit on a daily or weekly basis). It's also fairly easy to achieve anything in it

Most important though is that you find yourself one or more projects that you can actually start coding in what ever language you pick. Once you get past the initial “hello world” code and the examples in text books you need to go out and write something. That doesn't have to be the next No Man's Sky or Half Life, but it can be something as simple as a script that backs up your KSP files, or reads a KSP save file and prints a list (use HTML for formatting) of all your vessels and around what planet or moon they're orbiting.

It doesn't have to be KSP oriented of course! But look for little things in your life that you want to automate and start cracking those problems. In the beginning it will be hard, but coding is always about problem solving, and the more you do it, the easier it gets. And it's representative of what coding always entails: in 99% of the cases you will run into a new well how do I do THAT?! kind of problem, and you'll need to google and research to find a solution. And probably do that three or four times; your first solution will rarely ever work. But it's fun to get something to work, and incredibly satisfying.

Programmed for 30 years now if you include basic on the C64, and still need to google how do I do that a lot. 
Google is your friend other people has had your problem before. 
Last serious issue was how images taken with an smart phone keep the default orientation and just add image orientation as metadata. This works well until you use .net to make an thumbnail 

Link to comment
Share on other sites

2 hours ago, Kerbart said:

As a Python programmer I can recommend Python as an excellent language not just to learn programming in, but also to write real world code in (there's a surprising amount of large websites that run on Python, likely a whole bunch you visit on a daily or weekly basis). It's also fairly easy to achieve anything in it

Most important though is that you find yourself one or more projects that you can actually start coding in what ever language you pick. Once you get past the initial “hello world” code and the examples in text books you need to go out and write something. That doesn't have to be the next No Man's Sky or Half Life, but it can be something as simple as a script that backs up your KSP files, or reads a KSP save file and prints a list (use HTML for formatting) of all your vessels and around what planet or moon they're orbiting.

It doesn't have to be KSP oriented of course! But look for little things in your life that you want to automate and start cracking those problems. In the beginning it will be hard, but coding is always about problem solving, and the more you do it, the easier it gets. And it's representative of what coding always entails: in 99% of the cases you will run into a new well how do I do THAT?! kind of problem, and you'll need to google and research to find a solution. And probably do that three or four times; your first solution will rarely ever work. But it's fun to get something to work, and incredibly satisfying.

 

Thanks, as a child I was a complete idiot in mathematics, but I never had excessive problems with computers, by the way, thanks to KSP learned more mathematics and physics than trough the entire school :D

I recently visited the Career Expo event in my town, I thought I'd find a job, I have a problem with that and my Asperger's syndrome (albeit mild) does not help matters.

It turned that most jobs offer on Career Expo was for IT specialists, medical, and some for logistic and transportation, I have higher education i have BA in Library Science, but there was no offers for me :( 

But there ware some very interesting presentations, on was about computer programming, and on of the speaker said that "you don't need to be math genius or even specially bright in math to be good programmer, "and fun with programming can start at any age 8, 14 30 or even 60 years old"

So i thin hey maybe i try too? I would not know if i don't try it? So i bought this book :D           

 

Maybe i even get job in ESA after all Poland is now full member of ESA :D

But i'm 30 years old, i think i would be too old to work there :(

  

Link to comment
Share on other sites

i was thrown directly into c/++ back in the late 90s. somewhere along the lines i picked up lua. these days you can completely get away with an interpreted language and nobody will notice the 10 to 100 fold decrease in performance.

Link to comment
Share on other sites

39 minutes ago, Pawelk198604 said:

 

Thanks, as a child I was a complete idiot in mathematics, but I never had excessive problems with computers, by the way, thanks to KSP learned more mathematics and physics than trough the entire school :D

Computer Science is very mathematical but the act of programming requires far less math. The kind of problem solving that you need in programming is the same kind of problem solving for mathematical problems though; people who are good with math usually have little difficulty with programming. That doesn't mean that if you have a hard time with math, programming will be hard too; don't despair.

 

39 minutes ago, Pawelk198604 said:

I recently visited the Career Expo event in my town, I thought I'd find a job, I have a problem with that and my Asperger's syndrome (albeit mild) does not help matters.

Not necessarily. A friend of mine runs an agency in Holland to place autistic and asperger adults in software companies as testers. People on the spectrum tend to be very precise and will not quickly take shortcuts in their jobs, which is exactly what is needed when running test scenarios. That is a direction you could look into as well. It doesn't require straight coding, but good testers don't just say "it not worky" but also figure out why it doesn't work ("only on Tuesdays and when you hold the mouse in your left hand" or something like that :P )

39 minutes ago, Pawelk198604 said:

But there ware some very interesting presentations, on was about computer programming, and on of the speaker said that "you don't need to be math genius or even specially bright in math to be good programmer, "and fun with programming can start at any age 8, 14 30 or even 60 years old"

So i thin hey maybe i try too? I would not know if i don't try it? So i bought this book :D       

There's plenty of people on this forum you can ask for help about Python (I'm one of them). Once you get better you can also take a shot at the kRPC mod that lets you control your craft through Python scripts! An advantage of it compared to kOS is that Python programming skills are applicable outside KSP as well :wink:

And don't forget that through the KSP forum you're building other skills as well, like becoming better in English as a 2nd language, and you're practicing your skills with interacting with people (even if it's written, not face-to-face) as well, not unimportant if you've been diagnosed with Asperger's. I wish you all the best!

10 minutes ago, Nuke said:

i was thrown directly into c/++ back in the late 90s. somewhere along the lines i picked up lua. these days you can completely get away with an interpreted language and nobody will notice the 10 to 100 fold decrease in performance.

A good algorithm beats faster code in more complex cases anyway, and the modern scripting languages make it much easier to write "smarter code" as you don't have to deal with a lot of logical plumbing. Add to it that the popular scripting languages have high-performance libraries (usually written in C) to perform computational intensive tasks. With NumPy I can tear through a five gigabyte dataset in less than 200ms performing calculations.

Of course there's a place for languages like C/C++; it does offer superior performance when coded the right way. And while KSP written in native C would probably be blowing the current version out of the water, it's also very likely that there would never have been a KSP if HarvesteR was forced to write it (and rolling out his own physics engine) in C.

Link to comment
Share on other sites

10 minutes ago, Nuke said:

 these days you can completely get away with an interpreted language and nobody will notice the 10 to 100 fold decrease in performance.

Pretty much, unless you pick up a microcontroller and have 2 KB of flash, a few hundred bytes of SRAM at your disposal and a whole lot to do.

It hapened to me a few times that I was a bit lavish and had to completely rethink the approach to the code to fit into the very limited space available.

Other times I had to change the micro for a bigger one, which brought along all sorts of problems.

Link to comment
Share on other sites

3 hours ago, kerbiloid said:

My colleague began when she was 38, with impressive results.

Not sure if Python is the best choice if treat programming as main occupation. Most of "industrial" languages use C-like syntax, not Python-like.

So what is the use of Python, someone told me that the best learning for beginners programming is the programming language Python, during the job fair in my town, I was talking about, I have seen jobs Nokia research center in my city of Wroclaw, 

prevailed offers for people familiar with JavaScript, HTML, C ++ and Python's,

Link to comment
Share on other sites

2 hours ago, Pawelk198604 said:

So what is the use of Python, someone told me that the best learning for beginners programming is the programming language Python, during the job fair in my town, I was talking about, I have seen jobs Nokia research center in my city of Wroclaw, 

Python is rapidly becoming a mainstream language like C or Java, because it allows code to be developed so much faster (and programmers tend to be expensive). Dropbox and Instagram run on Python. And Youtube. That's not to say that it's limited to websites, just that it's not an exotic language only suitable to learn programming. A lot of real-world projects run in Python these days.

On the other hand, it's always good to know more languages; it gives perspective and offers you flexibility. And once you've figured out the basics of writing code, and you've done a couple of projects, learning a second language is much, much easier than learning the first one.

Link to comment
Share on other sites

14 hours ago, Kerbart said:

A good algorithm beats faster code in more complex cases anyway, and the modern scripting languages make it much easier to write "smarter code" as you don't have to deal with a lot of logical plumbing. Add to it that the popular scripting languages have high-performance libraries (usually written in C) to perform computational intensive tasks. With NumPy I can tear through a five gigabyte dataset in less than 200ms performing calculations.

Of course there's a place for languages like C/C++; it does offer superior performance when coded the right way. And while KSP written in native C would probably be blowing the current version out of the water, it's also very likely that there would never have been a KSP if HarvesteR was forced to write it (and rolling out his own physics engine) in C.

i use a lot of stand alone lua. you normally embed the interpreter into a c/++ application, but im just using the reference interpreter and a lot of modules. anything i cant do with lua i can make a module for it in c.  i like it because i can spin a gui application or a render window in a few minutes. i also do a lot of embedded programming (many cases a lua scrip is written to talk to some project over a fake serial port), and that usually calls for lower level languages. i cringe when people talk about running a lua interpreter on an esp8266, or worse an atmega.

Edited by Nuke
Link to comment
Share on other sites

Well, let me be a Devils advocate... I tried to learn programming many times, same as quitting smoking... the easiest thing to do... I've done it a thousand times as Mark Twain used to say... I always I mean always hit the same wall writing functions ...  everything else is pretty reasonable... variables, operators, lists, reserved words, objects, classes, inheritance etc. etc. I'm talking from the perspective of someone who's for a long time in the world of 3D animation but also is an anti-talent for math in general... so I began to dug and the first thing was "you need to learn linear algebra, vectors etc."... ok what's that? It turns out it's a small part of monstrosity called Calculus... ok let's dig deeper... pre-Calculus... what's that? Well it's comprised of advanced levels of three math branches, trigonometry, algebra and geometry. At this point I turned green... ok, let's assume I learn all this... there are thousands of classes and libraries... how do I know what's what, and where is what? Do programmers have photographic memory? How do you "move around" (figuratively speaking) and choose what you need at the moment? Do you learn classes by hearth? These were and still are the questions which are bothering me... so IMHO without math there is no programming...     

Link to comment
Share on other sites

8 minutes ago, NeverEnoughFuel!! said:

Well, let me be a Devils advocate... I tried to learn programming many times, same as quitting smoking... the easiest thing to do... I've done it a thousand times as Mark Twain used to say... I always I mean always hit the same wall writing functions ...  everything else is pretty reasonable... variables, operators, lists, reserved words, objects, classes, inheritance etc. etc. I'm talking from the perspective of someone who's for a long time in the world of 3D animation but also is an anti-talent for math in general... so I began to dug and the first thing was "you need to learn linear algebra, vectors etc."... ok what's that? It turns out it's a small part of monstrosity called Calculus... ok let's dig deeper... pre-Calculus... what's that? Well it's comprised of advanced levels of three math branches, trigonometry, algebra and geometry. At this point I turned green... ok, let's assume I learn all this... there are thousands of classes and libraries... how do I know what's what, and where is what? Do programmers have photographic memory? How do you "move around" (figuratively speaking) and choose what you need at the moment? Do you learn classes by hearth? These were and still are the questions which are bothering me... so IMHO without math there is no programming...     

Ok so if you want to write everything yourself, especially for something like 3D animation, you will need to tackle the maths at some point. However, this is where the programming community comes in:

It's pretty much certain that in whatever you do, someone else has already been there, done most of the hard work and written you a nice library. What's more, it will almost certainly be better, faster, and have more features than what you might put together yourself.  This means all you have to do is search for the problem you're having, find the library and use it.

 

TL;DR: you absolutely DO NOT need to know vector calculus and linear algebra to program unless (a) you are doing something complex like working with 3D animation at a low level (and let's be honest, there are very few applications outside this, scientific computing and game development where you are going to need any knowledge of vectors whatsoever) and (b) you want to start writing every function you ever use yourself

Edited by Steel
Link to comment
Share on other sites

1 minute ago, NeverEnoughFuel!! said:

These were and still are the questions which are bothering me... so IMHO without math there is no programming...     

My father did not understand math. When I was thirteen and asking for help with my homework I was told “from here you're on your own.” He was also a talented coder. I've encountered some solid coders who couldn't differentiate (see what I did there?) between integrals and matrix calculations.

Sure, there's certain code that requires math. I'm sure KSP will be very hard if you don't grasp quaternions or tensor math (I don't, and I'm not going to try). But for everyday business processes you really don't need to either. If one's intention is to be a programmer at JPL's orbital mechanics department, then yes, expect to need solid knowledge of math. But those are basically business rules for those programs. "Repeat this segment of code until a <= 0" doesn't really require anything beyond basic arithmetic.

Link to comment
Share on other sites

Well in this job a top level is a guy/girl who knows Calculus and linear algebra inside-out, and can write a custom node in C++ for Maya... let's say a famous and eternally fleeting single (bone/joint) chain IK/FK switch for an arm or leg... just a random example... maybe I was looking at the wrong places, but I couldn't find something like this nowhere on the internet... mainly because all of these things are built in-house and are considered as a pure gold value... but even if could find some example of this code all I can do is stare at it like an idiot... because I don't know calculus and linear algebra and I don't understand what this or that line of code is doing... so I'm in a closed loop...   

Link to comment
Share on other sites

2 minutes ago, NeverEnoughFuel!! said:

Well in this job a top level is a guy/girl who knows Calculus and linear algebra inside-out, and can write a custom node in C++ for Maya... let's say a famous and eternally fleeting single (bone/joint) chain IK/FK switch for an arm or leg... just a random example... maybe I was looking at the wrong places, but I couldn't find something like this nowhere on the internet... mainly because all of these things are built in-house and are considered as a pure gold value... but even if could find some example of this code all I can do is stare at it like an idiot... because I don't know calculus and linear algebra and I don't understand what this or that line of code is doing... so I'm in a closed loop...   

As I said, if you're going to be writing custom Maya nodes then yes, you will need an understanding of the maths. However, for the 99.9999% of programmers who don't work in advanced 3D, it's not really necessary.

Link to comment
Share on other sites

I personally don't like Python, but it's pretty widely used in various domains, so it's a good choice of language to learn if you're looking for a job.

But the most important part isn't which language you choose or how technical your book is; the most important thing is whether it keeps your interest. You can always switch languages more easily than learning how to program in the first place.

Link to comment
Share on other sites

5 hours ago, Kerbart said:

Python is rapidly becoming a mainstream language like C or Java, because it allows code to be developed so much faster (and programmers tend to be expensive). Dropbox and Instagram run on Python. And Youtube. That's not to say that it's limited to websites, just that it's not an exotic language only suitable to learn programming. A lot of real-world projects run in Python these days.

On the other hand, it's always good to know more languages; it gives perspective and offers you flexibility. And once you've figured out the basics of writing code, and you've done a couple of projects, learning a second language is much, much easier than learning the first one.

With a little bit afraid because I have bad memories of math class at school and lesson of programming in Turbo Pascal programming language   in Gimnazjum (midle school) :(

But I always wanted to learn to program, now feels like Dr. Strange, when he volunteered with the desire to learn from the masters in Kathmandu :D

I bought a book that was indeed quite expensive as for Polish standards for books market, because it cost me 70 or Polish Zloty about  $17.73

 

http://ksiegarnia.pwn.pl/Python-dla-dzieci,114592565,p.html

https://www.nostarch.com/pythonforkids

 

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...