Page 1 of 1

Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 7:01 am UTC
by Tide-Arc Ephemera
Hey um... I REALLY, REALLY want to learn how to code. Especially for Java (since it's universal between Mac and Windows) and Mac (since I use it)... however I think there's so many habits and mindsets that I'm missing, them being the important ones. I'm particularly interested in making applications. However, if making applets is more appropriate for a beginning, I am (for once) willing to settle if it will help me solidify the basics into my brain.

I'll address my three main problems and then each one that comes along I might ask for some help... but as thankful for any help given I may be, I'd like it to be kept in mind that this will be my first language that I actually study.

Problem 1... I can never figure out where to start. If I try to do the basics, I get bored halfway through and give up. If I do the advanced voodoo, I get confused halfway through and give up. Does anyone know something beyond the "Hello World" yet something basic enough for me to figure out the basic mechanics? If I MUST do the Hello World thing, could I have something to follow it up (e.g similar but more complicated).

Problem 2... does anyone know any good Java compilers on Mac OS X? (Preferably for 10.3.9, old I know)

Problem 3... If learning by reference can give extremely high amounts of help, is there anything which is open source that I could read through to see what it does and how it works? I'm also willing to accept things like scripts which are intentionally written with //comments and such to help me learn.

I'm interested, so far, in making small applications which let me manipulate the screen (e.g make the whole thing black via splash screens) and I'd also like to be able to make things for webpages. Also, I'm interested in other multi-platform languages (other than HTML and maybe XML), so mentioning of those would be nice.

I apologize if this post pissed anybody off, but I would like help with this matter.

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 7:54 am UTC
by froggie
Hi,

I think the key here is to find fun examples. The language does not really matter, as there are a host of languages that can be used in a platform-independant fashion. You may want to log on to http://projecteuler.net and have a go at a few problems.

Java compiler on OSX: use the Sun JDK.

For something more complicated than an "hello world" but still simple, try GUI programming. Craft a simple text editor, for instance. Don't use java AWT or Swing, it's fucked up (IMHO). Try Jambi (haven't used it but Qt --the C++ equivalent toolkit-- is way cool). It will also teach you asynchronous programming.

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 8:17 am UTC
by btilly
I would strongly suggest that you start with a scripting language such as Perl, Python or Ruby instead of Java. The reason being that you get much more reward for your effort. Which makes it easier to stay motivated, particularly when you're just starting out. And they're all crossplatform languages, so should work just fine on Windows if you have an interpreter installed. They all come pre-installed on your Mac. And there are plenty of tutorials for each of them. Google for whichever you want. But I'm sure that the oddest has to be http://poignantguide.net/ruby/. (It is actually a fairly reasonable tutorial. It is just odd. For reasons that will be quickly apparent to anyone who tries reading it.)

After you've learned one or more of them, you'll probably find Java easier to learn than it would have been otherwise. And even if you learn Java first, you'll find that there is a benefit to learning a scripting language as well for small (or not so small) tasks. So why not learn the scripting language first?

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 8:31 am UTC
by Tide-Arc Ephemera
froggie wrote:Hi,

I think the key here is to find fun examples. The language does not really matter, as there are a host of languages that can be used in a platform-independant fashion. You may want to log on to http://projecteuler.net and have a go at a few problems.

Java compiler on OSX: use the Sun JDK.

For something more complicated than an "hello world" but still simple, try GUI programming. Craft a simple text editor, for instance. Don't use java AWT or Swing, it's fucked up (IMHO). Try Jambi (haven't used it but Qt --the C++ equivalent toolkit-- is way cool). It will also teach you asynchronous programming.

GUI... has done bad things. I TRIED to learn a language, but it was more complicated to get to the direct-script than it was to GUI, so naturally (lazily) I went to GUI because it was shorter. Although, if the GUI can convert to the code so that I can view the GUI and then change it to the code so I can make references to the script, that would be nice.

btilly wrote:I would strongly suggest that you start with a scripting language such as Perl, Python or Ruby instead of Java. The reason being that you get much more reward for your effort. Which makes it easier to stay motivated, particularly when you're just starting out. And they're all crossplatform languages, so should work just fine on Windows if you have an interpreter installed. They all come pre-installed on your Mac. And there are plenty of tutorials for each of them. Google for whichever you want. But I'm sure that the oddest has to be http://poignantguide.net/ruby/. (It is actually a fairly reasonable tutorial. It is just odd. For reasons that will be quickly apparent to anyone who tries reading it.)

After you've learned one or more of them, you'll probably find Java easier to learn than it would have been otherwise. And even if you learn Java first, you'll find that there is a benefit to learning a scripting language as well for small (or not so small) tasks. So why not learn the scripting language first?

Programming languages sure have fun names, so you suggest learning those? Are they particularly simpler? I think I'll give those others a look. Go-go wikipedia...
That Ruby guide is... messed up. I kinda lol'd at it.

EDIT! Do you know any good compilers? I have the XCode kit but I've explored less than 5% of it...

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 9:03 am UTC
by btilly
Tide-Arc Ephemera wrote:
btilly wrote:I would strongly suggest that you start with a scripting language such as Perl, Python or Ruby instead of Java...

Programming languages sure have fun names, so you suggest learning those? Are they particularly simpler? I think I'll give those others a look. Go-go wikipedia...

Um, "strongly suggest" means that I do, indeed, suggest. :lol:

It is not that they're simpler languages. It is that it is simpler to get things done in those languages. For instance your basic Hello World example in Perl is:

Code: Select all

print "Hello, world\n";

which I'm sure you will agree is loads easier than the equivalent example is in Java. Which makes your initial learning curve a lot easier.
Tide-Arc Ephemera wrote:That Ruby guide is... messed up. I kinda lol'd at it.

That's part of the reason why I linked to it. :D

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 9:30 am UTC
by evilbeanfiend
you want religious wars for discussions on which language is best to learn (though i'd say python is probably the consensus)
using a gui toolkit to make a simple gui is a great way to start programming (scripting languages usually come with a gui toolkit nowadays such wxWidgets or tk, they do all the boring job of making stuff look (more or less) as you would expect for different operating systems.

if you are of a more mathematical bent you could check out project euler for things to program

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 10:59 am UTC
by JamesCFraser
In my opinion, Pascal is the best language to start with. It's a standard imperative high-level language, but enforces the use of entirely logical operations. It also forces you to get into a good mind set. As for things to program with Pascal, if you do some tutorials, and then try USACO training (just Google USACO for the website), that will set you on the right track for learning about programming and how to create and describe your algorithms the right way. There are a lot of challenges on the USACO site, and you're only meant to do about two a week (or more, if you want), if you haven't done much programming or maths, though, it could be a steep learning curve (though, two a week certainly ought to be manageable).

Re: Need help learning... let alone starting...

Posted: Sat Apr 12, 2008 12:54 pm UTC
by Hammer
I suggest you start by reading one of the many variations on this thread that already exist. [/cranky mod]