You are not logged in.

#1 2010-07-10 16:39:41

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Learning languages

I am curious about learning languages. I have studied C++ for quite some time, but I hit a plateau. I find myself unable to break away from the same routines when it comes to programming. I follow the same kind of pattern and I am unable to break out of it.

I picked up some Python for the fun of it, and I wanted to experience a high level language. I really like it.

Is it practical to practice both a low level language like C++, and a high level language like Python at the same time, or would I be better off mastering one or the other?

I feel like I can reach new levels in Python with more ease-- the code is more readable, getting stuff done is easier. I feel stinted in C++, I always feel like I am stuck under a rock and clawing to get out. However I do believe C++ is more powerful and can do more, but mastering it seems very difficult.

Any advice?

Offline

#2 2010-07-10 17:14:14

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Learning languages

You can learn all the languages that you want, but unless you practice it regularly, you are going to forget the syntax (which is fine), but you are also going to forget the intricacies that each languages have.

Don't try to overload yourself by trying 5 different languages at the same time. OOP was the craze back when I started. Everyone wanted to leave C behind and jump on Java's bandwagon.

Now after working so many years in Java, I feel that even though OOP is nice and gives certain advantages, there are times when I just prefer a simple (or simplicity) functional program. That's why I have started looking into Scala.

I read a couple of books on Ruby, but because I didn't practice much, it takes a while for me to remember the various things that I could do in it. I started Scala only because its similar to Ruby in the way its programming is, but it also works with Java bytecode. This is enormously useful for me, because then I can use Scala in my regular work and that I can practice it daily and still get work done. Ruby didn't offer me that and I could only do it as hobby programming for which I hardly find some time.

All in all only experience will teach you how to read code. Syntax doesn't matter. I can read perl code and python code easily, I probably wouldn't be able to write the best of code in those languages because I have never studies those languages, but reading it and understanding what a program is doing,  is no problem


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2010-07-10 17:32:54

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

How does C++ fare thesedays? When I started learning C++ there wasn't any C# or at least it wasn't popular. Now it feels like it's everywhere. Is there enough reason to drop C++ entirely and pickup C#? I feel like C, C++ and C# are so fragmented and old (except maybe C#, not old at all).

I know Java has gotten big and there was a big bandwagon. My university dropped C++ classes and replaced them with Java right when I finished. I was in the final C++ class.

Could anyone tell me where each language dominates? Java, C++, C#, and Python? I know Java is used heavily on the web, and C++ is used for a lot of heavy software jobs. C# and Python?

Offline

#4 2010-07-10 18:07:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Learning languages

Offline

#5 2010-07-10 20:10:53

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: Learning languages

Google wrote:

How does C++ fare thesedays? When I started learning C++ there wasn't any C# or at least it wasn't popular. Now it feels like it's everywhere. Is there enough reason to drop C++ entirely and pickup C#? I feel like C, C++ and C# are so fragmented and old (except maybe C#, not old at all).

I know Java has gotten big and there was a big bandwagon. My university dropped C++ classes and replaced them with Java right when I finished. I was in the final C++ class.

Could anyone tell me where each language dominates? Java, C++, C#, and Python? I know Java is used heavily on the web, and C++ is used for a lot of heavy software jobs. C# and Python?

(Slightly subjective view)

Java is mostly used in the mobile space. Especially now with Android using it.

C++ tends to be used a lot where performance is critical. It is the language used in a lot of big commercial software products and most commercial games.

C# is what windows devs tend to drift towards these days it seems, both people doing desktop apps and the people doing web things asp.net.

Python primarily seems to be used for tools and utilities. Especially on Linux where these days Python is used really extensively.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#6 2010-07-10 20:23:44

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Learning languages

Google, have tried asking yourself about this? smile

This has been covered endlessly here.

Offline

#7 2010-07-11 02:09:19

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

Thanks, the TIOBE site was an interesting read. It makes me curious about C and C++, I guess to me I don't understand why C is still more 'popular' when C++ basically replaced C.

Thanks Zeist, it gives me an idea about where I need to keep my focus. smile

Offline

#8 2010-07-11 02:41:01

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Learning languages

Google wrote:

Thanks, the TIOBE site was an interesting read. It makes me curious about C and C++, I guess to me I don't understand why C is still more 'popular' when C++ basically replaced C.

C++ never replaced C.  Their strengths are in different domains.

Offline

#9 2010-07-11 04:48:11

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Learning languages

I would like to re-emphasize what Trent said. C++ never replaced C. It was never a "step up" from C. Although Microsoft certainly tried to make it sound that way by dishing out Visual C++ and making people buy a 1000 page book on how to use Visual C++

C is still heavily used by many industries, the prime example being the networking companies. My sister and brother-in-law work for companies which make routers and switches and NAS storages etc and the primary programming language they use is C. Its been that way for many many years and is not about to change.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2010-07-11 04:55:23

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

How plausible is it to learn C/C++ at the same time while practicing good programming habits in both?

Offline

#11 2010-07-11 05:02:19

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Learning languages

Google wrote:

How plausible is it to learn C/C++ at the same time while practicing good programming habits in both?

That's an extremely subjective question which only merits one answer.

It depends.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#12 2010-07-11 05:16:34

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

I'm looking to gain very practical programming skills for the job market. Given that Java, C and C++ are the most widely used languages I think they are safe to learn. However Java and C/C++ use very different syntax, while C/C++ share a lot. I am hoping if I learn C/C++ I can kill two birds with one stone, and in the future learn Java.

The problem with learning two closely related languages (in my opinion) is keeping good habits in both. For example, it would be very easy to code C and C++ inside of the same program but it may not be the best practice. The dividing line between the two languages can be very thin at moments (in my opinion). I can see that being good and bad for keeping up with good programming practices.

This is slowly turning into a C versus C++ versus Java problem which is never good.

Offline

#13 2010-07-11 05:29:26

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Learning languages

Google wrote:

...... I am hoping if I learn C/C++ I can kill two birds with one stone, and in the future learn Java.

That is, IMHO, the worst way to learn a new language. you make it seem like its a tedious task that you have to perform. You will never enjoy programming that way. You may become good at it, but you will not enjoy it in the sense that everything you do, will be mostly copy pasting of programming skills that you probably see someone use off of the internet or your peers.

The true way of learning a language is to find the fun in it. Get into the intricacies and understand why you are doing what you are doing. Then it won't feel like a task.


Believe me, I work with a lot of people and I find a lot many who simply "copy-paste" so called "solutions" from the internet. I have also worked with people who copy pasted without having the courtesy to change the variable names and when I inherited that code, the variables didn't make sense at all. That makes for an extremely confusing code to read especially if you join the project later...It was about a month down the line I realized that the code was an exact copy paste of a different application created by another team. The variables made sense in the earlier application...but oh well !!

I have ranted about that to my gf as well....and she is already sick of it....I will just leave it at that

Last edited by Inxsible (2010-07-11 05:30:34)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#14 2010-07-11 08:01:34

saline
Member
Registered: 2010-02-20
Posts: 86

Re: Learning languages

Google wrote:

...However Java and C/C++ use very different syntax, while C/C++ share a lot....

C and C++ have more differences than Java and C++.  Good C++ and good Java are a lot closer to each other than good C.  It was harder for me to move to C after C++ and Java than it was from C to C++, even having more programming experience for the switch back.  I should have fully learned C before switching initially.  This may just be me, but I find C to be easier, prettier and less bloated.

OOP is often overkill, but it definitely brings some useful tools to a job.  I would think about the kinds of problems you want to solve for fun.  Pick a language that is suited to that.  Any of these three will be useful in the job market.

Offline

#15 2010-07-11 10:07:15

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

Given all of this, I think C++ is best for me to stick with. I do need to find a way to enjoy it more. It's hard for me considering I don't like to follow textbooks and my style of learning is more of a 'dive in' type. It's not easy to just dive into the unknown C++ world.

I think I will try again by going from the ground up, and review everything. Then try to put together a small project in C++.

Thanks!

Offline

#16 2010-07-11 10:47:08

gajo
Member
Registered: 2008-04-01
Posts: 93
Website

Re: Learning languages

if you want to learn C++/Java/C# you should know C, even though Java and C# aren't extended C, it will help you understand some concepts
now, if it's your choice to learn C++, it should really be a long term investment, since C++ is hard for newbies, and mistakes you make can give you headaches
that said, you can write programs in C++ in many different ways; both java like with bunch of classes/inheritence and similar, closer to C with only a few classes that have a bunch of methods and just a few inheritence, and to a different, purely template metaprogramming style followed with all the beuties that boost libraries give
in any case, if you want to have fun writing code, use python (altough you should still understand basic datastructures), if you want to have "enterprise" level efficiency use java, and lastly, if you really need speed, use C++
don't use C if you know OOP, it brings 0 benefits

Offline

#17 2010-07-11 11:03:49

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

I have learned C++ in university and on my own, but I have hit a plateau. I don't know why but it's hard for me to learn more. I can keep trying though. I find OOP confusing. I don't even fully understand concepts I have learned about over and over again.

I am interested in C as well....

Offline

#18 2010-07-11 12:04:53

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: Learning languages

Is it rather the entire cocept of OOP that confuses you or are there just some OOP-related keywords that do not make any sense to you? If you are entirely confused, then you have missed some important things and should get back to the basics. In the second case: Don't worry. A lot of features are optional and only useful in some cases.

I really recommend learning a lot of languages because it helps to develop different points of views for problems. You don't need to achieve mastery in each language, but you should be familiar with their concepts.
By learning another language you usually also learn something about the languages you already know.

Python is really a great language because it incorporates a lot of concepts from other languages. So its a good way to start with functional programming for example. However, you should still learn a pure functional programming language because this will really change your programming abilities for the better.

Offline

#19 2010-07-11 12:18:30

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Learning languages

gajo wrote:

if you want to learn C++/Java/C# you should know C, even though Java and C# aren't extended C, it will help you understand some concepts

I would argue that C++ isn't "extended C" either, simply because the approach to programming is so different. The set of good C++ programs and the set of good C programs are mutually exclusive.

I don't know C# and only a little C++, but I'm of the opinion that it doesn't matter what you learn first, as long as you learn things right.  Want to learn C++?  Fine, learn C++.  Learn to write idiomatic C++, the way it's written in the software industry.  Learn its pitfalls and strengths and how C++ programmers work around them.  Don't learn a bastardized child of C and C++ (that's incest, by the way).  Don't find a drawback to C++ and solve it the way a C programmer would solve it.  Learn to write C++, and then, if you want, learn C.  They're different languages.

Based on my admittedly limited knowledge of C++, I would say that C++ and Java are more closely related programming disciplines, and they fight over much the same markets.  C is a step sideways, into a different programming world where the decisions are different because the demands are different.

Offline

#20 2010-07-11 12:22:14

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

I think it's everything in OOP that confuses me. I never really understand what I am doing when I code, I just code. I have a very top down approach. I know it's totally not how OOP should be, but then again I don't know how to fix it.

I rely a lot on my top down approach. I start with a skeleton, I figure out functions I need. I create skeleton functions and I pretty much ignore classes because a function can work nearly the same way, or I force them to. I feel like I go top down and patch together a program to work.

I feel it may be because I have never worked on a large enough project to need OOP or to use classes and objects the way they are suppose to be used. I feel like I do need to go back to the basics and learn it again, and try to wrap my head around OOP and how to use the mind set and solve problems in a way other than top-down.

Offline

#21 2010-07-11 14:03:11

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Learning languages

You may be interested in Head First Design Patterns.  I've not read the entire thing but it's a good intro to common patterns used in OOP.

Offline

#22 2010-07-11 14:14:59

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

Thanks, I will look it up smile

Offline

#23 2010-07-11 15:19:32

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Learning languages

Navigating C++ is an excellent book. Once you've wrapped your head around the fundamentals, look into STL and Boost.

Offline

#24 2010-07-11 19:00:49

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Learning languages

Thanks, I grabbed the books smile

Offline

Board footer

Powered by FluxBB