Go Down

Topic: approach to programming (Read 509 times) previous topic - next topic

system64

Hello,
I don't know if this should go in this section, but it didn't seem to fit in any other category.
I love programming, I really enjoy putting lots of effort into my projects, but I have made very few "actual" projects (little games and such). Some people say I should focus on doing "real" stuff, projects like games and such, instead of doing exercises and mini-projects no one will see like my alarm clock. (they don't know programming so I can't detail what I've learned because they'll understand nothing and they don't have the time to try to understand either). Two years ago (when I was 13) I passed the IT games at my school (which were mostly logic-focused exercises) and I went to the next phase, where despite having less than three weeks of C++ experience I still scored 11/64 and arrived 5th out of 24 (with people up to 5 years older than me). It's been one and a half years since then, and I feel like I've done tons of progress (the alarm clock I made in 2019 now is very accurate and 600x faster, and will have Bluetooth soon) but I still can't score a lot of points on those kinds of exercises, and that competition is pretty much the only way I can show people that I haven't spent one and a half years doing nothing. The exercises in that competition involve algorithms I still don't know, and I don't know how I could learn them all (or at least enough to score decent points). There are however quite a few people that pass these games, and they are 15-18, which is my age group.

What should I do? Should I continue learning Java and make actual projects, games, and such? How can I improve my approach to programming? What's the best way to learn a programming language?
Thank you for reading this.

TheMemberFormerlyKnownAsAWOL

#1
Oct 15, 2020, 04:07 pm Last Edit: Oct 15, 2020, 04:16 pm by UKHeliBob
A key asset in programming is attention to detail.
This is how this forum section is described

Moderator edit
This is how the forum section that this was originally posted in is described
Quote
Website and Forum
Improvements for the web system, applications to moderator, spam, etc. Use GITHUB for official reports.
Please don't PM technical questions - post them on the forum, then everyone benefits/suffers equally

Robin2

What should I do? Should I continue learning Java and make actual projects, games, and such? How can I improve my approach to programming? What's the best way to learn a programming language?
Until I got to this paragraph I thought you were learning C++.  How did Java come into the picture? You can't program an Arduino with Java.

There is a difference between "learning programming" and "learning a programming language".

If you learn to program then you will find it fairly easy to change from one language to another because you will know the concepts required to write a program and the capabilities of different data structures. It will only take a few minutes, for example, to see that what is called an array in C++ is called a list in Python.

I have no interest in computer games myself but they do seem to me a good way to learn programming. I guess they don't cover three aspects of using computers - the storage of large quantities of information in a database, the manipulation of external hardware and the provision of web services.

Arduinos (and micro processors in general) are usually involved in manipulating external hardware and, in general, they are programmed using C++ because it generates fast efficient code that fits into a small amount of memory. Working with hardware and limited memory requires a different mindset to programming on a PC (or phone or tablet) where a huge amount of memory is available.

Programming that involves large quantities of data or web services is generally done on PCs and then the choice of programming language has more to do with programmer efficiency rather than code efficiency. For tasks for which Python is suitable the creation of a program using it will be very much faster than writing the equivalent code using C++ which means that the cost of programmer time is lower. PCs etc are so fast that the fact that (for example) Python code runs much slower than the equivalent written in C++ does not matter.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

wildbill

What's the best way to learn a programming language?

Hard to say, it rather depends on how you learn most effectively.

A good way in my view is to get the basics of the language down and then start writing code. The basics can come from a book or online tutorials or classroom time. Once you can use what you learned, look into the more esoteric aspects of the language and write more code. Rinse and repeat until you're satisfied with your fluency.

system64

Until I got to this paragraph I thought you were learning C++.  How did Java come into the picture? You can't program an Arduino with Java.

There is a difference between "learning programming" and "learning a programming language".

If you learn to program then you will find it fairly easy to change from one language to another because you will know the concepts required to write a program and the capabilities of different data structures. It will only take a few minutes, for example, to see that what is called an array in C++ is called a list in Python.

I have no interest in computer games myself but they do seem to me a good way to learn programming. I guess they don't cover three aspects of using computers - the storage of large quantities of information in a database, the manipulation of external hardware and the provision of web services.

Arduinos (and micro processors in general) are usually involved in manipulating external hardware and, in general, they are programmed using C++ because it generates fast efficient code that fits into a small amount of memory. Working with hardware and limited memory requires a different mindset to programming on a PC (or phone or tablet) where a huge amount of memory is available.

Programming that involves large quantities of data or web services is generally done on PCs and then the choice of programming language has more to do with programmer efficiency rather than code efficiency. For tasks for which Python is suitable the creation of a program using it will be very much faster than writing the equivalent code using C++ which means that the cost of programmer time is lower. PCs etc are so fast that the fact that (for example) Python code runs much slower than the equivalent written in C++ does not matter.

...R
I'm learning both C++ and Java but I've just started with Java just for fun and C++ is my main language.

Robin2

#5
Oct 15, 2020, 08:51 pm Last Edit: Oct 18, 2020, 01:26 pm by Robin2
I'm learning both C++ and Java but I've just started with Java just for fun and C++ is my main language.
I think it is fair to say that the main users of Java are big businesses who have very conservative approaches to programming.

If that is where you see your future career then Java is a good option.

In my opinion this guy Stefan Mischook has a lot of common sense in his various YouTube videos. He probably seems very old to you, but I can assure you he seems young to me.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

westfw

There are some very good online classes that you can at least audit for free.
I wws impressed by https://www.coursera.org/learn/algorithms-part1 and it's part2 as well.
(It's a good sign when the teacher wrote the textbook)

Go Up