I want to learn programming -- How?

  • Thread starter Thread starter Thermo
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary

Discussion Overview

The discussion revolves around learning programming, particularly for someone with a background in Matlab and an interest in expanding their skills to other programming languages. Participants explore various approaches to self-learning versus formal education, the suitability of different languages, and resources for beginners.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants suggest starting with C as a foundational language due to its general-purpose nature and influence on other languages.
  • Others argue that self-teaching is possible, especially with prior experience in programming concepts like loops and functions.
  • A participant mentions the benefits of taking classes at community colleges, highlighting the value of instructor feedback and structured learning.
  • There are differing opinions on the effectiveness of learning through online platforms versus traditional textbooks.
  • Some participants emphasize the importance of practical experience and experimentation in learning programming.
  • Concerns are raised about the steep learning curve associated with languages like C and C++, particularly regarding system-level programming and potential errors.
  • One participant expresses interest in game development and seeks clarification on how graphics are created in games, indicating a desire to understand the tools and engines used.
  • Javascript is mentioned as a useful language for web-based graphics, with suggestions for hands-on learning through example programs.

Areas of Agreement / Disagreement

Participants generally agree that C is a good starting point for learning programming, but there are multiple competing views on the best approach to learning, including self-study, online resources, and formal education. The discussion remains unresolved regarding the optimal path for individual learners.

Contextual Notes

Some participants note that the effectiveness of learning methods may depend on personal learning styles and prior experience. There are also mentions of varying levels of difficulty associated with different programming languages and the importance of understanding foundational concepts.

Who May Find This Useful

This discussion may be useful for individuals interested in learning programming, particularly those with a background in engineering or related fields, as well as those considering various educational paths and resources for self-study.

Thermo
Messages
49
Reaction score
6
I've been taugth Matlab in university but I want to improve my programming skills and learn other programming languages. I want to ask where to begin? Can I learn it on my own? I can go to some courses too.
 
Technology news on Phys.org
What languages? You can search Google for tutorials or find a book on Amazon. You can definitely learn programming yourself.
 
  • Like
Likes   Reactions: Thermo
Certainly a lot of people can learn on their own, but for many, it might be a more productive use of their time to take a class at a local college. If you are in the US, there are lots of community colleges (two-year colleges that don't award bachelors' degrees). Many of these schools offer courses in Basic, Java, or C++ (or maybe C). Having someone with experience direct your learning and critique your code is very beneficial for many people. Also, two-year schools usually have much smaller classes with tuition that is much more affordable.

IMO, the community colleges can do a better job in some areas of teaching for the reasons I listed above. In full disclosure, I am retired, but am teaching a class in C at a local CC near where I live. Some of the other instructors (including myself) have worked in the software industry for years, and bring a lot of real-world experience to the classroom.
 
  • Like
Likes   Reactions: Merlin3189 and Thermo
Thermo said:
I've been taugth Matlab in university

Did this include programming-type type constuctions such as if-statements, loops and functions? If yes, then you should be able to learn another procedural language by self-teaching, with a suitable textbook and some help from online forums like this one. Scroll down through a few pages of threads in this forum and you'll probably find some other threads with recommendations for languages and textbooks etc.
 
  • Like
Likes   Reactions: Thermo
Yes that was actually about if-statemes,loops, numerical methods and functions on matlab. Thanks. So I can start with C?
 
Thermo said:
So I can start with C?
Yes that would be a fine start.
 
  • Like
Likes   Reactions: Thermo
mit ocw has a full 20something python video course.
 
  • Like
Likes   Reactions: Thermo
Thermo said:
. So I can start with C?
That would be a good place to start since many other languages use constructs originally defined for C.
If you have a good grasp of C, other languages become easier to grasp, though there are exceptions.
Knowing C won't help much if you are trying to understand code written in an assembly language.
 
What do you mean by that?
 
  • #10
I'm just supporting your notion that the C language is a good place to begin learning since it's a very general purpose language, but nevertheless is powerful in that it allows to write code close to hardware level (low level code).
It does permit coding errors more readily than some higher level languages do, but that's actually quite a good thing for learning.
You can learn a lot more by understanding a mistake and fixing it than you can from a language which tries to limit what you can do so that mistakes don't happen.
 
  • #11
Thank you for the answer.

I study chemical enginnering but I want to learn a programming language also. My reasons:
1) I can find a good job. My job may require programming skill besides chemical engineering.
2) I am interested in.
3) I'd like to code a programme or a game and sell them for extra income.

I hope C is still a good choice to learn for those reasons also.
 
  • #12
There's this site that I enjoy quite a lot:
http://www.codecademy.com/learn
I could never quite make myself read a book on programming, but I'm managing to slowly progress with Java on that site.
It does not have C on the roster, though.
 
  • Like
Likes   Reactions: jackwhirl and Thermo
  • #13
1. For small applictions C is very widely used, and for large scale applications it's dervitive C++ even more widely.
2. If you know C, a lot of other languages become more readily understandable.
3. It's not going to be easy to make a commercial successful game or similar with no previous experience at all, regardless of what language you use
 
Last edited:
  • Like
Likes   Reactions: Thermo and Silicon Waffle
  • #14
You are right but I can give a try at least can do some things later.
 
  • #15
you can always add inline asm to your c code if you learn it.
 
  • #16
It is definitely good to start with C, as in this language you can write very compact and powerful programs and learn programming in a very "mathematical" way, but as this language is mainly used at system level in the industry, it is better to go to C++ after a while or right from the beginning if you want. A word of warning though, is that the extreme capabilities of control over the machine (OS for that matter), that these languages give, comes at the cost of hanging a system and other unhappy experiences, if you are not careful enough, as they deal directly with resources like memory. This is not to tell that they are so hard, but they have a steep learning curve, in order to write some serious programs and they demand serious efforts to get to that. Of course the prize, is to be a very good programmer, they give you back what you put in. Personally, as a Java developer for about 15 years, I would recommend also Java, as it is a really flexible and powerful language and an incredible tool for many tasks in every kind of platform. As for gaming, there are really many choices you can do and an extra one, is to go to Microsoft family of languages (VB, C#, F#) and .NET platform, that they give you an easier "match the blocks" way to construct software, that today's software high technical demands make an absolute necessity. So, it's after all a question of what you want to achieve and how much time and effort you are willing to spend. I agree that learning C, gives you an excellent background and programming mindset to learn other languages too - I can tell from my own experience, and that attending some college course or even an online if you want, is far better than studying alone: there are always things we think we have grasped but we have not and this becomes pretty evident when we take some course, so do it right from start!
 
  • Like
Likes   Reactions: Thermo
  • #17
Thank you. My advisor academician said I had some kind of talent on programming. I got AA in my first year and I haven't even attended one of the courses and didn't know anything about programming. I just got the notes and simply studied on my own and became the most successful while many of the students failed the class even if they attended the whole semester. And it was a very hard exam. So I think maybe I can try more on programming according to my advisor.

I also have a question for you. How do they make the all that graphics of games? I mean you cannot simply code it right? They use some other programs for that or even engines?
 
  • #18
coding-coding.png
 
  • Like
Likes   Reactions: jedishrfu
  • #19
As an experienced programmer I can say (for myself) the best way I learn is by doing.
Since one of your objectives is to possibly write some games, a very good place to
start learning is through trying a variety of example programs where you can see
the inputs and outputs directly. The internet itself is an excellent source.
The Javascript language will likely play a big part in achieving your efforts and there
are some excellent samples - freely available on the internet.
Here is a good approach ...
1. Look at each web page example and see if it displays graphics effects you like.
2. View the programming source code of the web page and study how it works.
3. Copy the source code to your own computer and run it - keep the original.
4. Experiment with the code (trial and error) by making minor changes.
5. Run your version to see if your changes do what you expect.
6. Look up questions on the html or language.
7. Go back to step 1 above.

The following site has lots of good examples and provides fairly good documentation:
http://stemkoski.github.io/Three.js/

With Javascript experience, you can fairly easily grasp some of the other popular
languages like C++, C, Java, etc.
I know I have taken a lot for granted here about existing background and skills you may have,
but if you run into things you do not understand, or don't know how to do, just consult
a website that provides reference information, or ask someone for more explanation or help.

Have fun with programming in Javascript.
 
  • Like
Likes   Reactions: Thermo
  • #20
Thermo said:
How do they make the all that graphics of games? I mean you cannot simply code it right? They use some other programs for that or even engines?
The production of graphics for commercial games, (and other animation), is a whole industry unto itself.
Typically a game studio employs several highly skilled artists who use high end software dedicated to producing 3D models, (eg 3D Studio max), and there are other specialised tools for making 2D animation frames etc.
Often the amount of human resource time dedicated to producing game art can be equal or even exceeding the coding effort.
 
  • Like
Likes   Reactions: Thermo
  • #21
Thermo said:
I also have a question for you. How do they make the all that graphics of games? I mean you cannot simply code it right? They use some other programs for that or even engines?

Games?

For web games you need Javascript because that what browsers use. All browsers. It's the only language they all speak. This isn't a philosophical argument about language preference. You also want HTML5 unless you want to depend on legacy stacks like Flash or Silverlight (cough).

On mobile, most Android gamedevs are using Java and C++ but you're free to choose anything. Apple IOS requires Objective-C and/or Swift due to Apple's control of the ecosystem, and that's not something you can realistically choose.

On a PC or a console, you're free to choose language. Most gamedevs work in C++ with some scripting in LUA or Python. A few more use Java. Many minorities exist.

If your game is non trivial, you will be using a game engine like Unity or Unreal, and they have their own scripting language requirements. I believe it's C# or Javasript for Unity and Unreal has its own graphical programming system.

Edit: If you just want to learn code to get stuff done, Python's really good for your first language. It's easy to learn and quick to write. After that, you will learn other languages pretty fast. I don't know any professional developers who only know one language.
 
Last edited:
  • Like
Likes   Reactions: Thermo
  • #22
The chart I shared also recommends python so I will go with it I suppose.
 
  • #23
If you are interested in higher abstraction languages such as Java, C++ or C# which are object oriented languages, You should check out design patterns. These are methods and solutions for common problems.
And also if you like to do graphics i would suggest C# or Java to start with.
 
  • #24
I like very much
"Introduction to Programming in Java" by Robert Sedgewick & Kevin Wayne

The 1st chapter is here: http://introcs.cs.princeton.edu/java/home/chapter1.pdf

There is a very good course online using a condensed version of this book with exercises and some solutions, many downloadable programs, etc...
http://introcs.cs.princeton.edu/java/home/

To start programming in Java on a pc, first you have to install a Java programming environment.
http://introcs.cs.princeton.edu/java/windows/

The previous link will install DrJava for beginners. http://drjava.sourceforge.net/
 
  • Like
Likes   Reactions: Thermo
  • #25
On the same note. What do you guys think of ActionScript to start with?
 
  • #26
Well I can recommend to you to start with C++, it's a difficult language but then when you understand the logic and the functionality the other languages, that also are derived from C++, will be pretty easy. I see that you eventually want to start mobile development, don't mix up two languages at the same time. First you can start C++ and then for mobile development you can start up with Android, that is Java and XML.
 
  • Like
Likes   Reactions: Thermo
  • #27
Dwabner said:
On the same note. What do you guys think of ActionScript to start with?

Isn't that what Flash uses? Why would you start a new project in that? Even Adobe are trying to get rid of it, and they bought it. If you are doing front-end web or browser games, I would consider JS and HTML5.
 
  • #28
Thermo said:
I've been taugth Matlab in university but I want to improve my programming skills and learn other programming languages. I want to ask where to begin? Can I learn it on my own? I can go to some courses too.
C is hard to learn but probably worth it as it is a basic language. I have spent some time running Linux in command line mode and programming in C. Graphics is a step beyond that. I wound up using SVGA but this is old and not supported very well. You may be better off using a Raspberry Pi. This does allow some pixel graphics in C. Perhaps others out there can help with good command line graphics programming in C. hope this helps.
 
  • #29
C is an okay language, but it may not be the best language to use when you first start coding.

The compiler used in a C environment (usually gcc) will allow you to make many more mistakes than you should at first. The way pointers and memory allocation work will set you up for disaster if you are unfamiliar with common coding conventions.

Perhaps a more beginner friendly language like Java would be suitable if you want to learn scope, syntax and program execution. The way Java does its pointers and memory will allow you to focus more on the core coding concepts you need to know at first before you delve into systems level programming.

Being familiar with the terrain will allow you to embark on a multilingual journey that never seems to end.
 
  • #30
Totally agree with rootone, games is a whole industry unto itself. If you want to enter it step by step, I think that your safe bet, is good knowledge of a "strong" language (like C++ or Java which is definitely more friendly) and of course there are ready-to-go game engines, to support you and of course great graphics by specialists are needed. IDEs which take a lot of burden from the developer, are usually commercial products and this is totally fair in my opinion. On the other hand there are many open source tools, libraries, engines that they can take you to some decent point in this career and yes I agree that internet is a great platform to use too. Just experimenting a bit with HTML5 and its gaming capabilities and adding a little bit of magic by using some JS framework can teach you a lot, but eventually if you want to get further, you'll need much more than scripting, so good efforts in an object oriented language/framework - no matter what this will be will do the trick.
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
1K
Replies
86
Views
2K
Replies
16
Views
3K
  • · Replies 102 ·
4
Replies
102
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
7K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
33
Views
3K