Advanced Search
Welcome to Omgili,
Omgili (Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.

This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.

AskReddit: I'm taking an intro programming class, would it be a good idea to learn Python and Java at the same time? : programming

A place for all things programming. Before making a self-post in /r/programming, please check the programming.reddit FAQ to see if it's there first We're toying with the idea of blocking this reddit from advertisers and replacing the 300x250 ad unit with our redditjobs widget so you'll see new jobs instead of advertisements. Check out our jobs board .

I'm a student at University of Washington, I'm taking the intro to programming class this quarter. The class is taught in Java and they are offering an optional Python session in which I do the same homework assignments in Python.

I have tried teaching myself a little Python before.

With Python being seemingly easier than Java from my experience, I was wondering if learning Python would make learning Java harder or if it would help me learn both better.

I believe it would help you learn programming better.

You'd see the similarities and the differences in the two approaches, and there's always the BOBW with Jython .

Really, python will only lend to remarkably poor coding practices in java.

You'll forget braces and semicolons and other punctuations in java all the time, and it will take you a long time to debug.

I learned c, then java, and this last semester I picked up ruby, python, php, and perl, and I have to say that, while python has the allure of simplicity, java forces you into a few really good programming practices that python will let you simply avoid.

If you really want to learn both of them now, I'd say learn how to do everything you learn in java in python, but about a week after you do it in java.

Java forces you into a few really good programming practices that python will let you simply avoid Such as?

The programmer might get used to an immediate mode prompt, for one.

No one programs applications in REPL mode silly.

Interrupter mode is so 80s.

;-)

A what now? I program in Java all the time and I've never heard of that.

I work in Java for day job, and python for fun, and don't find this to occur in any substantial way.

Occasionally I'll forget a 'new on an object construction, or drop the ()s on an if … but it's just not a big deal.

Even when doing jython-based stuff in the middle of a java codebase, it just wasn't a real problem.

Learn both better: the essence of computer science is working with concepts and systems, not syntax.

You'll be able to think of how to approach the same problems using different syntax, by making the syntax variable and changing, the concepts still sit still, become easy to identify, and they are the real value.

Languages change over time.

The core, the comprehensions about systems, are universal and timeless.

You should learn both if you have the desire.

Knowing either of those two programming languages will be helpful for your professional development.

Should you learn both?

Definitely. Should you learn them at the same time?

Hard to say. At work, I'm constantly jumping between PHP, Python and JavaScript, and occasionally jumping from one to the other causes a momentary brain explosion (such as my Python suddenly becoming littered with semicolons).

I can only guess that you'd run into the same problems trying to learn them at the same time (I learnt each of them a year or two apart). If your brain is up to the task, it might be good for learning good code design, but you might be risking a mental breakdown.

I pretty much do the same thing, but what helps me out the most is my IDE.

With code and syntax highlighting, it's never an issue.

PHP, Ruby, CSS, HTML, SQL and JS all have different color schemes (not that I would confuse some of those without it).

It seems like such a simple and obvious thing to do (syntax highlighting) but it's one of the most helpful things for a programmer.

Now, don't downvote this just because you're hardcore and don't use an IDE when you're developing.

Sometimes the most useful tools for programming are the simplest. EDIT: Also, I would second learning two languages at the same time.

Why the heck not?

This depends on you more than anything.

If you are an experienced programmer (seems unlikely that an experienced programmer would not know either Java or Python), you can pick up enough to pass the course with both languages in a day.

Programming languages are pretty much all the same, just slight variations in syntax, and different contents of the standard library. Sometimes something like Haskel or Lisp will come along that is very different at first, but once you learn them well you will discover that they too are all the same - they just forced you to learn weird things you didn't know you could do in other languages before (and often mean you write weird code that just works in the other languages, but nobody else understands) At some point you will want to take the 20 languages in a semester class just so you see a bunch of variations.

However maybe you are better off learning programming (Computer science - see rabbit's post) with one language instead of confusing yourself with several different syntax's now. Don't read this as an assertion that there is no extra value in someone who has 10 years experience in the language.

Subtle details can be important once in a while.

However the value is nil for an introduction class.

Learn python if only to realize that programming can be fun (Java intro courses sometimes miss this point)

I think I would concentrate on Java first.

That'll hammer in good habits concerning stuff like encapsulation before you start responsibly using (read "abusing" ;) ) it in Python.

I'd learn Java first too, but for a different reason.

If I learned python first, in all likelihood I'd keep wanting to blow my brains out as I typed gobs of code in Java.

[deleted]

How do you go about getting code reviewed in a community?

E.g. if I write a hangman game in Python?

For a quickie, try out DLRConsole .

While it is C# instead of Java, Python is also at your fingertips.

REPL in a browser.

Learning a couple of sane languages like Python will probably make you realize that more text != better code. With that knowledge in hand, even your Java code should take on a semblance of sanity.

Learn both, but not at the same time.

Java and Python are sufficiently different that you will be confused by the difference if you're new to programming.

If you are a nonprogrammer who wants to learn programming and you've chosen Python as your first language, I'd like to plug my free book Invent Your Own Computer Games with Python While many books go through a bunch of syntax and reference material, this book focuses on complete examples of small games.

Each chapter starts with the full source code for a simple game, and then explains the programming concepts from the example.

It's completely free under a creative commons license.

Absolutely. I think it is important to learn many languages to understand what is language-specific skills, and what are the core programming skills.

Was going to downmod you for not being a Coug, but I can't since you're at least repping WA.

You simply get nothing. EDIT: And I would recommend you learn both at the same time.

The answer to "Should I learn [programming language X]?" is always almost yes.

New programming languages typically become popular because they encourage a different approach to solving problems.

It naturally follows that learning many different languages will expose you to many different problem solving methods.

This makes you a better programmer because when it comes time for you to solve real problems, you have exposure to a variety of problem solving methods and can choose the combination that best fits the problem.

This makes you a better programmer because when it comes time for you to solve real problems How does it make you better?

Atleast the place I work at I don't get to choose my language every other day.

I have to be good at C++ or else I'm useless to the team. I may have a superior solution in lisp but its of little to no value to my employer. - My personal view is to learn each KIND of language.

I.e. learn some [ C, C#, lisp, Perl, scheme,...

] - And time for some (counter-) relevant TV Quote: s :) Dr.

House: Don't you people know your dwarfs? Dr.

Chase: There are over 200 varieties of dwarfism, each with different medical complications;

You can't expect us to be intimately familiar with all of them. Dr.

House: The sick dwarfs sure expect you to.

There is no benefit as such.

If an opportunity presents itself to learn both at the same time (and it won't come again) then by all means take it.

There is no benefit to it in isolation though. Generally I'd say to stick to on language when learning to code.

This way you aren't continually bombarded with syntax issues when trying to learn the much more important key concepts.

In short, your doing it wrong.

Your in an intro programming class.

Start with one language, get very familiar with it, and learn the basics of programming.

Get a clear understanding of OOP.

Once you have that down, learning a second, third, or fourth language becomes easy.

There's plenty of time to learn many languages if thats your desire.

Slow down and take it one one step at a time.

Your doing it wrong ...

Despite the irony of 'your doing it wrong', your advice is pretty sound ....

I've read that java isn't an ideal OOP language to learn initially as it's so verbose, but meh ...

That's what I started out on.

You're just learning the principles to start off with ....

The actual syntax isn't as important as just getting the right ideas in your head to begin with.