• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Programming - Learn First?

AMD_RULES

2[H]4U
Joined
Mar 26, 2007
Messages
3,010
I've had some exposure to VB6 at my school, but I would like to get into programming more. I plan to take some courses, but I'm unsure which I should take...

Choices:

  1. C#
  2. C++
  3. Java

Which should I learn first? Thanks :)
 
I say that you should take either C++ or Java first. They are both very similar, only the syntax is different. I can't say anything about C# because I have never learned it, but C++ was easy to learn for me and Java is almost the same.
 
I say that you should take either C++ or Java first. They are both very similar, only the syntax is different. I can't say anything about C# because I have never learned it, but C++ was easy to learn for me and Java is almost the same.

Java and C++ are not similar... at all.

C# is basically a copy of Java.


C++ provides a very solid base and is harder to learn than both of alternatives.
 
I started with C64 BASIC and GWBASIC when I was a kid and loved it. But, my real compiled language is C++ (just started). I tried Java, but find C++ a lot easier to understand and use. I think it's really fun and somewhat easy to understand the logic.

Personally, from my experience and from what I hear, is that C++ is a great foundation. If you know that, you know a lot of OOP, and can transfer the techniques to other languages such as C# and Java.

But, a lot of people recommend Java stating it is easier and you can transfer the knowledge to other languages. I'm just doing it backwards from those people. I just find that C++ can fit my needs and my learning style better. It just fits better with my style of thinking.

But, job wise, Java and C++ are still in high demand. Java probably has a larger employment demand in my area (PDX, Seattle area). If you aren't looking to learn it for a job immediately, I'd say C++. Otherwise, I'd probably start with Java.
 
I'd say C++ or C. That's what the computer science program taught when I was in college.

That said, I haven't used anything but C#, since.

Here's why I say C++:

C# and Java are managed code. The code is compiled and run in a "virtual machine" (not in the VMware sense). This VM handles memory management, security, and everything else for you. Things that C++ doesn't. When you write and compile C# code, it actually runs through the CLR. When you write and compile C++ code, it's running directly on the CPU, with nothing to stop you from accessing protected memory, committing buffer overflows, etc. I think it's a good opportunity to learn and understand all of the things that C# developers take for granted. Once you've got that good foundation on how it works, I'd move to C#. The jump from C++ -> C# should be pretty easy. Going from C# -> C++ probably won't be, for all of the reasons stated above.

If you're just looking to do some coding and don't care about how it all works, I'd go with C#.
 
It doesn't really matter - if you're 'learning' programming rather than being 'trained' in a language, they're all going to be about the same. C# and Java might be a bit simpler than C++; C#, using Visual studio might be a little closer to the experience of using VB6.
 
learn c++, then when you are writing production code use c# or java.

learn all the fundamental data structures in C++ too, (hashtables, lists, trees, etc)
 
Well i'm either going to major in Computer Science or Software Engineering in college.

I'm looking to take a course so i'm familiar with the language before college... leaning towards C++.
 
If that's what you will be majoring in, I'd say start with C++. Get you a little ahead of the game
Posted via [H] Mobile Device
 
I wrote this essay, which is referenced in the sticky. You might want to give it a read; it explains that learning programming is different than learning a language. You should evaluate why you want to learn programming, then figure out which language will get you to your goal. The language is secondary, though if you want to be a professional software engineer. What's more important, in that case, is to learn systems architecture and software design. After reading it, please let me know if you have any questions.
 
I would say c++ as that is what I started with in highschool through my school's jump start program. It has made dealing with computer science and computer engineering much easier. I am a dual major so I get the best of both worlds in my opinion. The fundamentals of c++ at least to me translate to other languages quite well. In my department we have a saying that if you can handle pointers in c++ you can handle the majority of languages out there with ease.
 
Alright C++ is it is... thanks guys!

@ Mikeblas - i'll take a look at that sticky. Thanks!
 
In my relatively young career, I have some experience working with both computer engineers and software engineers. I believe anyone who has been in either of those fields for a significant amont of time would be likely to tell you many of the things mikeblas does in his sticky.

If I were you, I would read it several times and compare your career goals with how his has turned out for him. Just to let you know, mikeblas actually has a name for himself outside of this board. He has worked very extensively in the past with microsoft developing some of their best tools, and he has published a few books that many would consider the bible of the particular subject that they cover. You would do well to read his sticky intently. Maybe a lot of it won't apply to your career goals, but the principles should be the same.

I say this all the time, but thanks again mikeblas for your presence and comments on this board.
 
As a Java programmer trying to learn Assembly, C, and C++ (not all at the same time of course) I'd recommend C++ as a starting point.

You'll come out of it with a better understanding of what the computer is actually doing with your code. You'll go through a lot of languages in your time and you'll find that C++ is large enough to share some similarities with almost any major language you face.
 
I learned Python, then C#, then C, then C++. If you start on C++ though, Java and C# will seem very easy in retrospect to not having to deal with memory management when you want/need to learn them.

My job this summer is doing C++ development, but anytime we can we like to make things with C# wrappers because it is a friendly language for many tasks.
 
I learned Python, then C#, then C, then C++.
Nice to hear. How is your career turning out? That is, what weight is behind your recommendation?

If you start on C++ though, Java and C# will seem very easy in retrospect to not having to deal with memory management when you want/need to learn them.
In C#, you have to deal with memory management. In some cases, more so than C++.
 
In terms of what the job market trend has been like at least in california, I would say that C# is the language to learn as opposed to C++. But in the end, learning how to program is more important than any particular language.
 
Please elaborate.
Nothing is free. C# does reference counting and cleans up memory it thinks you're not using. Because of the design of the langauge and the run time, there's a threshold where this is good enough for your applicaiton, and where it isn't. For instance, it would be a pretty bad idea to write a server using C# because it would stop processing requests every so often in order to do garbage collection. If it's acceptable that your server quits responding every so often, then that's fine -- go for it.

If you're using C# to process a large amount of data, you'll find that its memory usage is very large. Structures and collections in C# take far more space than their counterparts in C++ do. You'll have to concern yourself with C# memory management when you think you're only allocating 40 bytes per structure, but really are using 256 bytes per structure, and you can only fit a sixth as much data in memory as you thought you could.

For some applications, for some situations, for some quality criteria, these things don't matter. For others, they do.
 
To add to mikeblas's explanation, many programmers assume that garbage collected languages like Java and C# can never leak memory. That's not true! Consider this example from Effective Java, 2nd Ed.:
Code:
// Can you spot the "memory leak"?
public class Stack {
    private Object[] elements;
    private int size = 0;
    private static final int DEFAULT_INITIAL_CAPACITY = 16;

    public Stack() {
        elements = new Object[DEFAULT_INITIAL_CAPACITY];
    }

    public void push(Object e) {
        ensureCapacity();
        elements[size++] = e;
    }

    public Object pop() {
        if (size == 0) {
            throw new EmptyStackException();
        }
        return elements[--size];
    }

    /**
     * Ensure space for at least one more element, roughly
     * doubling the capacity each time the array needs to grow.
     */
    private void ensureCapacity() {
        if (elements.length == size) {
            elements = Arrays.copyOf(elements, 2 * size + 1);
        }
    }
}
So where is the memory leak? If a stack grows and then shrinks, the objects
that were popped off the stack will not be garbage collected, even if the program
using the stack has no more references to them. This is because the stack maintains
obsolete references to these objects. An obsolete reference is simply a reference
that will never be dereferenced again. In this case, any references outside of
the “active portion” of the element array are obsolete. The active portion consists
of the elements whose index is less than size.
 
I would suggest C# or Java to learn right now as that's where all the hot jobs are. It's nearly a 50/50 split out there in reality between C# and Java. Personally I LOVE C#. C++ is a VERY good skill to have, but in many many cases these days you can get away without it.
 
There is a long journey between your first language and a paying software development job.
 
Back
Top