# Thread: how do I practice programming logic for a beginner?

1. ## Re: how do I practice programming logic for a beginner?

play with python if only for few days and see if it influences your java negatively.
It has much higher fun/grind ratio so if you need fun to keep you going, python might be better to get you through the initial stages of the road to programming mastery. And it's not like it would be a total waste of time (even if it's not really your thing) because it's perfect for whipping up smallish programs to automate some everyday tasks, not unlike shell scripts. If you need results quick, there's your tool.

2. ## Re: how do I practice programming logic for a beginner?

Well, what a lot of people overlook is the connection between mathematics and programming. If you would like to improve programming logic, try improving your mathematics skills (specifically Algebraic equations with variables, and If-Then statements. Perhaps Geometry, Trigonometry, and Calculus if you're programming animated figures and simulated physics) before you begin tweaking your language specific code.

You may also consider using Python. I know you'd probably prefer C++ or Java, but the reason I suggest Python is because it's simpler and can later be used alongside C++ and Java as an extension.
Here's two links to this website called Khan Academy. It helps with Mathematics, and teaches some Python in the Computer Science section.

And truth be told, sometimes the best way to learn is to get your hands on some source code and begin to experiment by cutting and replacing sections of the code to see what happens.
Last edited by King Dude; June 27th, 2013 at 11:26 PM.

3. ## Re: how do I practice programming logic for a beginner?

Originally Posted by TheFu
Programming based on your "itch" is a great idea. I wish you luck for starting with Java and Android. It is a fairly advanced topic. Android programming is unlike any other coding that I've done, with all sorts of odd ways (non-standard for any of the other 15 platforms I've coded on) the environment forces things to be handled. I can't imagine trying to learn to program in Java AND Android at the same time.

When asked "how to learn to code" the last 2 yrs, I tell people to start with Python - though I don't know that language. I'm from a different generation. Python forces good coding style and has everything that a new programmer needs to learn ... except the compiling aspects of non-scripted languages. http://blog.jdpfu.com/2011/10/19/how...arn-to-program explains and a few highly experienced Java programmers left their comments.

OTOH, Java has been taught in schools for 10 yrs as the beginning programming language. I'm from a pre-Java time - before the language existed.
Thanx for your input, but also I wanted try to code apple apps as well when I get good experience and knowledge for android. I think its not too hard to learn another language when you know the basics of oop, despite syntax is well different :/.

4. ## Re: how do I practice programming logic for a beginner?

Originally Posted by pavelexpertov
... I wanted try to code apple apps as well when I get good experience and knowledge for android. I think its not too hard to learn another language when you know the basics of oop, despite syntax is well different :/.
If you start working on Apple devices, you'll find that Objective-C syntax is well well different.

Fun though, and Xcode is a great IDE.

5. First Cup of Ubuntu
Join Date
Jun 2013
Beans
2

## Re: how do I practice programming logic for a beginner?

Agreed i feel like if you can java you can do anything, but learning python first or at the same time even would negatively influence your java. The world would be a much better place if everything was simple as python though.

You can always take it slow and steady and go to school for it by spending a year's salary lol ill help you a little http://training.linuxfoundation.org/...arship-program http://www.collegespirit.me/scholarships/

6. Tall Cafè Ubuntu
Join Date
Feb 2009
Beans
1,466

## Re: how do I practice programming logic for a beginner?

Originally Posted by flowers92
Agreed i feel like if you can java you can do anything, but learning python first or at the same time even would negatively influence your java.
Not at all. The problem with Java is not its complexity or that people don't understand it; the problem with Java is that when coders don't know how to solve problems, it leads them into creating ever more deeply nested class hierarchies and IteratorStateAbstractFactoryBuilders rather than reconsider the original approach. Python encourages one to think about problems simply, which is exactly the antidote to the Java mindset. Unless you're thinking of syntactic differences like self/this or semicolons, the only reason learning Python would harm your ability to write Java is because you'll spend so much time wishing you could use Python instead. (Aside: since stuff like Jython exists, this is not always impossible.)

I also don't know what "if you can java you can do anything" is supposed to mean, or how Java is different from C, Perl, Python or C# in this regard. I can certainly think of plenty of projects for which I would not use Java nor hire a Java programmer, even a particularly skilled one. If you just mean that Java is a solid foundation for learning other languages, I'll concede the point, but I certainly don't think it's better at that than most other languages.

7. ## Re: how do I practice programming logic for a beginner?

Languages are not good or bad, but specific implementations of each language definitely are.

<rant>

IMHO, finding a "good implementation" of Java is nearly impossible. All of them that I know are slow and abuse RAM, which is exactly the opposite of what a good implementation does. Ruby has that issue too, but is getting better about it. C is a wonderful language with many fantastic implementations. I understand that C# is great too, but I am not a fan of "managed code."

There are only a few places where I would seek the use Java.
* Enterprise applications that must run on 5+ different platforms.
* Android - there isn't really any choice.

Besides those specific needs, I'd use the fastest language to code with. today, python might be that language.

For many years, Java was used as THE teaching language, which seems to have produces a bunch of mediocre programmers. Pascal was THE teaching language before that and FORTRAN was before that. Each sucked in a special way. Today, Python is not just the language used to teach programming, but it is a beloved language by many and hated by very few. Heck, the things that I hate about Python is the mandated use of indentation. Seems dumb to me, when a {} pair easily groups things. I'll get over it.

Java looks very much like my loved C++, so it isn't the look of the language that bothers me. It really is just the terrible implementations that suck CPU and RAM.

I've worked in large enterprises where Java was the preferred language on over 200 different projects. I've met many mediocre Java programmers. Honestly, everyone starts out as a terrible programmer. A very few become "artists", but the majority get only to "competent" level after 5-10 yrs. Learning to code is 20% of being a good programmer, maybe less.

If you search github or sourceforge, you'll find many projects that are java which shouldn’t be. Why? Hammer/nail.
</rant>

I'll try to find my happy place now. It will be ok. Promise.