Looking to become a decent programmer Any advice?

  • Thread starter WhiteKnights
  • Start date
In summary, it is a good idea to start with a language that is easy to learn, such as Java or C#, and to look for good, well-maintained code examples to help improve your skills. Programming can be difficult, but with enough time and effort, it can be mastered.
  • #1
WhiteKnights
50
0
Looking to become a decent programmer...Any advice?

I have never really done any programming before, but I would like to start. I am not sure which language to learn. I am looking for something that isn't too hard, but very versatile. Something that can be used to do physics to games to AI to simple programs in general? I am leaning towards C++.

I mean I have looked at programming and it seems like a foreign language(I guess it is) which I suck at, but I have been told it is math,math, and more math, which I am cool with because I love doing math and the typical problem solving that is involved.

I mean I look at the books and feel overwhelmed at times.
I was given Practical C and Deitel' "How to Program C++" for free, but I will look into other books if needed.

Any advice? What to learn? What to learn from? How to go about learning?...etc.
How long does it take to become proficient in programming? A month? A few months? A year? A life time?
 
Technology news on Phys.org
  • #2


A good way to learn is to look at other people's code. Lots of good code to look through is available through the GNU license.

http://norvig.com/21-days.html"
 
Last edited by a moderator:
  • #3


WhiteKnights said:
I have been told it is math,math, and more math,

Actually, it isn't, unless you're dealing specifically with number-crunching type programs. There are certain types of math that it's useful to know something about for a wide variety of programs, which are taught in introductory "discrete math" courses at the college/university level.

Nevertheless, skill in solving math problems does seem to correlate with programming skill, for many people, mainly because they're branches of problem-solving in general. If you're bad at solving "word problems" or "story problems" in math (or physics!), you're likely to find programming difficult. For most people, the hardest part of programming is starting with a verbal or written problem statement, or vague mental idea for a program, and figuring out what data you need to use, how to organize it (data structures), and how to process it (algorithms) to get the result you want to get. The actual coding in a specific language and debugging is fairly mechanical, and uses a different set of skills.

How long does it take to become proficient in programming? A month? A few months? A year? A life time?

Depends on how much time you devote to it, and your natural inclination for picking up new things. Figure a few months of solid work to get a basic knowledge and skill level, and a year to become somewhat proficient. If you get to the point where you can write a program, then look at it and think, "oh gee, I could have done that better!" and then rewrite it so it is better, that's a promising sign.
 
  • #4


If I were starting again I'd begin by learning Python. The language itself is easy enough to pick up that you'll be doing useful things within a week, and the large number of pieces in the standard library means you can quite easily do things that would be very difficult in a lower-level language such as C++. Give it six months and you should be a reasonably proficient Python programmer.

Once you've got your head around Python you could then think about moving to C++. Beware though: C++ is a much more involved language. Becoming comfortable with the language generally seems to take about a year; becoming good at it takes much longer.
 
  • #5


I use, and have used, lots of different languages. For beginners, high schools are now required to teach Java. So if I were you, I would start with either Java or C# (.NET). They are very similar to each other but C#, being a little newer, is a bit friendlier; Microsoft's Visual Studio Express (the development environment that makes it easier to program) is either free or very low cost and is a great tool.

If you become proficient in either of these, you could then try C or C++. C and C++ are much more difficult because the way they act depends on which operating system and hardware you happen to be using. So migrating a C or C++ program to other machines is always risky. However, you can count on a Java or C# program to work on most platforms these days.

Python is also good, but it tends to be used on websites and it is not quite as generally well-known as either Java or C# (though people tend to love it). It would also not be a bad choice but is simply less mainstream, especially for games. I know that people do write a lot of games in both Java and C# (.NET), though for really high performance things like, say, real-time war simulations, they might have to fall back to C and C++ for parts of the programming because those languages have a little less overhead and thus can perform faster (though not always--Java and C# are quite optimized these days).

I concur that it will take you a few months of hard work to become fully comfortable. Finding a good book is key; check out the book reviews on Amazon for whatever language you choose. I would also suggest buying two different books if you can afford it so that you'll have a couple of different perspectives.

Finally, once you've gotten started programming, and if you like it, consider checking out Steve McConnell's semi-famous book, Code Complete (see https://www.amazon.com/dp/0735619670/?tag=pfamazon01-20), which is an excellent philosophical discussion of many programming matters, and what it takes to develop skills that would make you seem, to others, "a cut above" the average coder.

Finally, my advice is (even if you do take a course), do programming recreationally for a program that you really want to make. I first learned in college courses, where someone else chose what I was working on. I didn't really come to love it until I did my very own projects, the ideas I conceived of myself. THEN I was really really motivated to get it right.
 
  • #6


harborsparrow,Thank you so much for those valuable information.
 
  • #7


Loai Najati said:
harborsparrow,Thank you so much for those valuable information.

You should note that several things in harborsparrow's post are, at best, highly subjective opinions that don't agree with actual facts.
 
  • #8


Particularly the Java part!
 
  • #9


harborsparrow said:
Python is also good, but it tends to be used on websites and it is not quite as generally well-known as either Java or C# (though people tend to love it). It would also not be a bad choice but is simply less mainstream, especially for games. I know that people do write a lot of games in both Java and C# (.NET), though for really high performance things like, say, real-time war simulations, they might have to fall back to C and C++ for parts of the programming because those languages have a little less overhead and thus can perform faster (though not always--Java and C# are quite optimized these days).

harborsparrow has some good points. However, I thought I would point out that usually only online games are made with Java, since it is a cross-platform binary. Despite the fact that Java has made strides in speed, almost anything that requires calculations to be done quickly and uses lots of memory is going to be written in C++. That is why you will see any big budget game written in C++. I honestly have not had much experience with C#, but it looks very promising.
 
  • #10


Java (and C#) programs "warm up" once all their parts have been JIT-compiled. If there is enough memory (and on modern machines there often is), Java and C# programs then (after warm-up) run as native code exactly as fast as any C or C++ program would. Only the startup is a little slower.

The myths persist, however.
 
  • #11


If you are looking to get into the game programming industry then learn C++ or possibly C# as the former will probably remain the standard for a while, and eventually I imagine get overtaken by C#. I'm not in that industry so I can't say that will be the case, but the way MS has been evolving their development tools that would seem to be the logical step.

I think the debate about execution speed isn't that big a deal right now for the OP. He isn't looking to write some production-ready piece of software at this time, he is looking to learn programming. I am partial to C, because that is what I deal with all day along with assembly, and my intro CS class was C++ based, but I imagine java would be a good place to start and learn about programming and about object oriented programming in particular. The basics of the language are pretty simple, then you just need access to javadoc for all the standard packages (do they still make the hardcopy almanacs?). You don't have to deal with pointers in java, and garbage collection(memory management) is handled for you. I guess an argument could be made that it would be better to start with C, or C++ in order to learn to deal with those issues properly from the start. The point is don't worry too much over language selection while learning about programming, you can work on learning a language best suited for a future project later. Don't tie yourself to just one language. Knowing multiple languages allows you to think about and attack problems in different ways. What might be extremely painful to accomplish in one language, could very well be easy to do in another. Defining the right problem is the most important step to solving the task you are trying to solve. A lot of good examples of this can be found in Jon Bentley's excellent books Programming Pearls and More Programming Pearls.

Depending on how much time you plan on investing, and how serious you are perhaps spend some time playing with some languages that focus on different programming paradigms. Play with a functional language like Lisp, or ML. Play with a logic language like Prolog. Learn to think about a problem as a bunch of objects with an object-oriented language like Java. Play with C and learn about pointers, memory management, and how easy it is to shoot yourself in the foot if you are not careful. Get to know your processor and learn some assembly language (or spend time looking at assembly code generated from source for a higher level language) and understand how nice it really is that you don't have to spend your time trying to write your programs at that level.

Learning a programming language is much easier than learning a foreign language. Natural languages always have tons of exceptions to all of their rules.

Perhaps others can list some books that would be good for learning a specific language. I imagine the O'reilly books for learning different languages do the job well enough.

If you want to learn C, the best book is still Kernighan & Ritchie's The C Programming Language.

From what I recall Bruce Eckel's books Thinking in Java and Thinking in C++ were okay.

Like I said before, look at other people's code.
 
Last edited:
  • #12


If you want to make games, but don't want to learn a somewhat difficult language (like C), try game maker by yoyo games. I am taking game design classes at a private university, and that's what they start with, while your learning C and C++. Gamemaker also helps you understand event driven coding, which seems to be used frequently in windows apps and games. However, keep in mind that I am by far not an experienced programmer. :)
 

Related to Looking to become a decent programmer Any advice?

What skills are necessary to become a good programmer?

To become a good programmer, you should have a strong foundation in problem-solving, critical thinking, and attention to detail. You should also be proficient in at least one programming language, have a good understanding of data structures and algorithms, and be familiar with software development principles.

What is the best programming language to learn?

The best programming language to learn depends on your goals and interests. Some popular languages include Java, Python, and C++, but it's important to choose a language that aligns with your career aspirations and the type of projects you want to work on.

How can I improve my coding skills?

Practice is key to improving your coding skills. You can also read code written by experienced programmers, participate in online coding challenges, and take courses or workshops to learn new techniques and best practices.

How can I stay updated with new programming trends and technologies?

Follow programming blogs, podcasts, and social media accounts to stay updated with the latest trends and technologies. Attend conferences and meetups to network with other programmers and learn from their experiences.

Do I need a formal education to become a programmer?

No, a formal education is not necessary to become a programmer. Many successful programmers are self-taught or have learned through online resources. However, a degree in computer science or a related field can provide a strong foundation and open up more career opportunities.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
8
Views
909
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
2
Replies
49
Views
3K
  • Programming and Computer Science
2
Replies
69
Views
4K
  • STEM Academic Advising
Replies
4
Views
239
  • Programming and Computer Science
Replies
11
Views
1K
Back
Top