Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tycheong

macrumors member
Original poster
Jul 31, 2008
44
0
so I'm in eighth grade right now
and the high school I'm going to go to teaches java and computer science AP
I'm really interested in beginning to program (i don't have experience) and my parents also want me to get a bit of a head start in java or any programming language (my mom wants me to do robotics club :p ).
some of my high school friends have got internships at the apple campus (my school is very close to the headquarters) from computer related classes at school and from robotics club and i want to have the opportunity for an internship...etc
but i have no experience
what are some simple or easy programming languages?
is java a good beginning?
what can you do with java?
thanks!
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
so I'm in eighth grade right now
and the high school I'm going to go to teaches java and computer science AP
I'm really interested in beginning to program (i don't have experience) and my parents also want me to get a bit of a head start in java or any programming language (my mom wants me to do robotics club :p ).
Good for you. Initiative and a self-starting attitude will take you far.

<snip>
what are some simple or easy programming languages?
This might not be the right question to ask. Better might be "What's a good language to start with?" or "What's a good language to learn if these are my goals?". It might be easy to learn some sort of BASIC variant, but perhaps not best in the long run. I always think a strong foundation in C will go a long way, but there are many that will disagree.
is java a good beginning?
It can be. Java FORCES Object-Oriented Programming from your first program. To write "hello, world" in Java you must make a class, write a method (with a number of keyword modifiers like "public" and "static" that you may not understand at all), and either import a few levels of the System package, or write out a long series of package references... all just to print a line to the console. In reality, this isn't a big deal, and you're likely to just copy the code from someplace, but my point is that you can't take things gradually, really.

With Java, you have to start:
1) Learning how to think about programming and problem solving
2) Learning about control structures, and procedural programming
3) Learning about variables, and assigning values to them
4) Learning about objects, how they are declared, etc.
5) Learning about class vs. instance methods
6) Learning about packages
7) ..., etc.

This isn't much more than a slightly lower-level language like C, or an OOP language that doesn't force Objects from the get-go (Objective-C, C++, Python, Fortran 95+, etc.), where you can cut your teeth on some of the above topics without having to take them all on at once. I think there are a lot of benefits to this, but if you start with java you'll pick it all up eventually.

what can you do with java?
thanks!

You can do almost anything with Java. It is a general-purpose language, and has a wide set of applications. There are a few things that you can't do directly with Java (generally low-level system interaction), but you can normally access such functions with C, then access them from Java using the Java Native Interface (JNI). That's not something you have to worry about yet, but I just wanted to give an example of something that's a little more difficult with Java. Otherwise there are desktop applications, embedded applications, complex server-side software systems, and everything in between written in Java. Anywhere that a JVM will run, you can use Java.

Whether you go with Java or another language, get programming. If you take to it, it will be a great benefit for you to get such an early start.

Good luck!

-Lee
 

ManWithhat

macrumors regular
Jun 24, 2008
220
0
At UW-Parkside, we learn Java as our main language. Anyways, after completing the program (graduating in December), I think Java was a great choice for a first language.

Although syntactically similar to Java, I like C# quite a bit better. I will also suggest that after you program quite a bit with Java, that you start learning C/C++. It's not that it's more difficult (more tedious maybe), but it has concepts that C#/Java don't use in the same way such as pointers, passing by reference vs. passing by value, etc.

A few tips for learning:
1. Find a site with some programming projects or exercises. Learning it just isn't enough. You need to practice.
2. If you learn the basic concepts of programming, you can easily learn any language after your first. Don't try learning them all at once. Concentrate on one, the others will come easily afterwards.
3. Theory. Learn it. While associate degrees might give you more of a technical experience, the theory gives you a much better understanding. My operating systems class where we learned threading (among many other things) was quite an eye-opener.
4. Have fun with it. If you get frustrated, that's part of programming sometimes. Working through something is how you learn. Doing a fun project gives you the motivation to work through such problems. To learn Objective-C and Xcode's interface, I made my Dad a Harley Calculator.
 

Aea

macrumors 6502a
May 23, 2007
838
208
Denver, Colorado
I would choose PHP or another non-OOP enforcing high level language, with the reason being is that you can make very functional programs without getting into all the complexities of languages like C, or Java. You'll get PHP down quickly, and it will help you learn Java in the process.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
I would choose PHP or another non-OOP enforcing high level language, with the reason being is that you can make very functional programs without getting into all the complexities of languages like C, or Java. You'll get PHP down quickly, and it will help you learn Java in the process.

I mean no offense, but a language with no formal specification, with weak typing, etc. frightens me for beginners. PHP has its place, but I don't feel like it is as a learning language. Obviously others will disagree, but I feel that it lacks rigor that a beginner needs.

-Lee
 

NickFalk

macrumors 6502
Jun 9, 2004
347
1
Actually I think learning a non-OOP language is the worst thing you can do. I grew up with Basic and Pascal and when I returned to programming after several years of abscence, OOP was really hard to get to grips with.

Apart from that I don't think it matters much where you choose to begin. As long as you learn the basic concepts, learning a different syntax isn't that hard.

Now, I finally got to grips with OOP through BlitzMax, a little known basic-dialect. It's a really nice modular variation, and I believe well suited for beginners. (The good thing about basic is that the syntax resembles normal English). Now, some will argue that this is one of the reason why BASIC is the wrong path go go down.

So, my advice is to try your hand at Java first. If you find Java too hard to wrap your head around BlitzMax might ease your way into the wonderful world of programming. :)
 

TheReef

macrumors 68000
Sep 30, 2007
1,888
167
NSW, Australia.
I'd recommend REALbasic, it's object orientated and uses BASIC.

I mean no offense, but a language with no formal specification, with weak typing, etc. frightens me for beginners. PHP has its place, but I don't feel like it is as a learning language. Obviously others will disagree, but I feel that it lacks rigor that a beginner needs.

-Lee

I feel PHP is pretty easy to get to grips with. The main problem is needing a local web server, the whole browser based experience might hinder your creativity (ie refreshing page to get results and the limited things you can do with web pages - ok somebody's going to prove me wrong ;)).
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
I'd recommend REALbasic, it's object orientated and uses BASIC.



I feel PHP is pretty easy to get to grips with. The main problem is needing a local web server, the whole browser based experience might hinder your creativity (ie refreshing page to get results and the limited things you can do with web pages - ok somebody's going to prove me wrong ;)).

I'd stick to either C or Python myself for a learning language. C because it is the foundation of just about every major language in use today and Python because it is a well respected object orientated interpreted language.

PHP, REALBasic and others of the ilk are not the kind of language that will teach you the necessary skills that people like Apple will be impressed with in my opinion.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
I'd recommend REALbasic, it's object orientated and uses BASIC.

Since you don't have enough opinions yet, I'll throw mine in. :D
First, I'd say stay away from BASIC. I haven't used REALbasic, so I don't know if you'll avoid the problems by going with it instead of another BASIC. But anyways, I started with a BASIC background. It was very easy, which was awesome. But when I moved to a serious language, (ObjC) I found things so different, and found that BASIC is so messed up with naming conventions, that I nearly gave up. The object oriented part was fairly easy. It was getting over what I learned in learning BASIC that was hard. So, no no no no no. Don't do it.


C is probably your best bet.
1. It's the most common language. Almost every programmer knows it.
2. It's the base for ObjC and C++, should you choose those languages.
3. It's a procedural language, so you don't need to worry about OO stuff.
4. There's so many examples, so many tutorials, so much free code you can see that it should be a breeze to learn.
5. You don't even have to learn more than C... you could stop there and be a professional. Most people don't, (I heard one programmer say you're not a programmer unless you learn a new language each year) but you could.
If you want to learn C, go to http://www.cprogramming.com. It's the BEST place to learn C, and you can learn C++ too.

Something that wasn't mentioned about Java is that it is cross-platform.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
I don't think you will ever regret learning Java or C. They will always be really useful to know and will open up more avenues and possibilities in the future. I'm not a big fan of PHP. You can run it from the command line but it doesn't really offer anything in particular that other languages don't, plus it has all the problems that Lee gave (which some people would argue are desirable features). As for RealBasic, you could have real fun with it. It will get you up and running fast and producing GUI applications in no time. In my opinion RealBasic is a pretty good and complete oop language.

I wouldn't worry too much about which language to invest your time in. If you get hooked on programming you'll probably end up knowing 3 or 4 by this time next year!

b e n
 

ManWithhat

macrumors regular
Jun 24, 2008
220
0
So is C technically. As long as there is a compiler for that platform and you stick to standard C there is no reason why your code should not work.

If that's the case, C# is also multi-platform now. :p

Anyways, I stand by Java. C is more complex, and teaches similar concepts. Start with the easier and work your way to the hard.
 

eviltobz

macrumors member
Nov 12, 2007
76
0
if you want to get into apple then objective-c and cocoa would obviously be a good combo to impress them, and c would be the ideal first step along that path.

c is a great language to understand imho. it is far enough away from machine code that you don't get bogged down in the finest of details like moving data back and forth between ram and registers, but it does make you understand a lot about what the computer will do as a program runs in terms of allocating memory, copying data around etc all of which can be useful when writing code in higher level languages.

i worked as a visual basic programmer for quite a while, during which i saw some nasty inefficient code from people who obviously weren't used to thinking about what was going to happen when it was used in anger by a bunch of people simultaneously because at the higher level it just looks like you're doing something a nice easy way: get some data, get another bit of data, add it on to the first bit, loop around about 100 times and you've got the data you need, and a system that is ground into the dust. re-arranging that into get a bunch of data in one hit, then arrange the big load into the format needed made the code a bit less simple to understand but speeded it up by a factor of about 100. getting that good understanding of code at a lower level means that you're less likely to design horribly inefficient apps.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Since some BASIC dialects have been discussed here, it seemed like it was a good time for this:

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
-Edsger W. Dijkstra

Source: How do we tell truths that might hurt? in Selected Writings on Computing:A Personal Perspective.

We have obviously seen a few examples here that not everyone is mutilated beyond regeneration, but BASIC definitely stunts one's growth as a programmer, in my opinion.

What I am willing to bend on is some assertions that it's better to start OOP, rather than build towards it. I don't think this is unworkable, but I feel that when one is first starting to program, there's so many new things that must be learned. I think that adding concepts that aren't particularly applicable for small programs as one is beginning to learn can muddle things. I feel that learning how to work with objects, how their methods work, etc. is much easier once you know what a function is, etc. If one picks a language by which OOP is supported, but optional, the pathway is more direct when one is ready to learn about objects, and they don't need to adjust to a new environment. On the flip side, if one learns a pure OOP language, then moves to a procedural language, a lot of knowledge will transfer, but some problems may seem more daunting when one is unfamiliar with things like structs to transport a "bundle" of data, since they are used to doing so with Objects.

Also, starting with Java I feel that some concepts get missed. Is Java pass-by-reference or pass-by-value, or can you do both? So often people are passing around objects, that this can get muddled and lost. It's strictly pass-by-value, but so often that value is really a pointer to an object. But you don't really know it's a pointer, since there aren't pointers in Java. Perhaps some think it is archaic to deal with passing conventions, pointers, memory-allocation, etc. but I think that these concepts make you well-rounded, and do apply to higher-level languages where these things aren't immediately applicable.

As eviltobz stated, knowing these things can help you be more careful with your algorithms because you have some idea about what's going on "underneath", and might have a better idea of the complexity of, say, inserting an element into a dynamic data structure. Without knowing the specifics, one might think that every insert into a balanced binary tree has O(log(n)) complexity, or not think about the complexity at all. In reality when the tree needs to be rebalanced, an insert can be an O(n), so the true complexity of such an operation is amortized O(n). Just knowing about pointers isn't going to teach you that, but there are plenty of other examples where low-level knowledge makes for a better high-level programmer.

I suppose one example is assignment, with or without something like clone. It seems like a pretty basic operation. In some OOP languages, assignment of an object results in a user-authored or system-generated copy of all of it's fields, perhaps even a deep copy of dynamic data structures stored in the object. This can be very costly, but how would one expect that with a simple assignment statement? Understanding the difference between a single value that is pointed to by many pointers vs. making many copies can be helpful in deciphering this sort of situation.

This ended up much longer than I intended. I guess my main argument for avoiding object-orientation up front is to save complexity. Especially languages that allow operator overloading, like C++, you can be very surprised by what a simple x = y + z; operation actually does when these are not primitives.

To the OP: You've now been told to use a great many modern languages, and not to use each as well. If Java is going to be of the most use to you in the near future, it isn't going to hurt you to start there. The learning curve might be a little steeper, but you'll get there. I would highly recommend learning straight C sometime in the future, though, as I think it forces a stronger understanding of how the machine works, and other important programming concepts that are hidden away from you in higher-level languages.

-Lee
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Since some BASIC dialects have been discussed here, it seemed like it was a good time for this:


-Edsger W. Dijkstra

Source: How do we tell truths that might hurt? in Selected Writings on Computing:A Personal Perspective.

We have obviously seen a few examples here that not everyone is mutilated beyond regeneration, but BASIC definitely stunts one's growth as a programmer, in my opinion.

-Lee

That quote is I think at least 30 years old. To compare RealBasic to the BASIC of those days is pointless.

b e n
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
BASIC is BASIC... it never had any set standards, but if you call your language a BASIC language then that's what it is. And if that's what it is, then in my opinion it's not good. Like I said before, the biggest problem in moving to ObjC/C/Cocoa from BASIC was naming conventions. The major languages as far as I know all use the same names... but to me a method was a function, because that's what they were called in BASIC. Or, sometimes even a subroutine. Anything I wrote that the compiler understood was a command. Different name there too. That's just two little examples.
And modernizing BASIC doesn't help, that's what I've used *professionally* and I had the problem. I've used old BASICs, new BASICs, BASIC with GUI, advanced BASIC, whatever you want to call it. All told, I've used 5-6 BASICs. And all of them got in the way of me learning a "professional" language.
[/rant]
 

mufflon

macrumors 6502
Sep 15, 2006
264
2
something that hasn't been aired is the fact that the OP is in the 8th grade. Programming, atleast to me has a strong correlation with "fun" - I'm only at uni, so I haven't experienced the nerve wracking outside world. Self studies might be dentrimental as what one learns might be irreversable views of the programming vocation.

I would rather propose the OP gets a lego programmable robot and gets the industry standard (+/-) -a good and reasonable initiation into OO and object interaction.

If programming with instant gratification seems too easy then java is also a good inlet into OO
 

cube

Suspended
May 10, 2004
17,011
4,972
You can program LEGO in Lisp/Scheme and Prolog. Haskell seems more tricky to find currently.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
*raises hand* I didn't REALLY get into it, but I have tried REALbasic. The language, which I barely touched, actually wasn't that bad. But I would avoid it just for the IDE interface. It was horrible. Give me xcode, instruments, and IB any day over REALbasic.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
I will readily admit my prejudice. All I have to read is that REALBasic is a dialect of BASIC, and I'm done. It may barely resemble the "old" BASICs, but I have a guttural reaction that prevents me from taking any dialect of BASIC seriously.

The quote may be 30 years old, but having had discussions with "modern" BASIC users (or former users) recently, I think it is still applicable. REALBasic may be the best thing since sliced bread, and I may be greatly narrowing my horizons as a programmer by avoiding it, but it's a chance I am willing to take. It may not warp and derange the mind of a new programmer like it's forefathers, but I still can't recommend it.

-Lee

P.S. Will a (the?) REALBasic compiler compile "classic" basic, or have the syntax rules actually changed rather than simply evolved? I would still be quite scared if it will allow for the old constructs. A brief anecdote to explain why:
My company has a 20-some-odd year old product originally written in Fortran 66/77. As time went by, new compilers (f90, g95, gfortran, etc.) became available, and the language was modernized. But the new compilers (and the language itself) still allowed for Fortran 66 and 77 constructs/style. As such, people (and not grizzled old programmers, these are 20-somethings) continued to use them because they could, and it's what they were used to. New loop control constructs, internal subroutines, etc. were ignored in favor of goto and its wretched ilk.
This is why REALBasic concerns me. If it allows any of the tomfoolery of its ancestors, that allows the sins of the past to be repeated.
 

rev316

macrumors regular
Nov 7, 2004
156
0
Java.

You don't spend the time to knock down syntactic issues that you'll probably spend with C.


If time permits, I'd just go to C++.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
C++? Isn't that the worst language to start in? I've never tried it, but I've heard things... :eek:

I'm actually kinda glad I've gone through BASIC. I now know better than to use it, I probably wouldn't have understood other languages back then so I couldn't have started as soon, and I can now warn others :cool:
 

ChrisA

macrumors G5
Jan 5, 2006
12,609
1,744
Redondo Beach, California
so I'm in eighth grade right now
and the high school I'm going to go to teaches java and computer science AP
I'm really interested in beginning to program (i don't have experience) and my parents also want me to get a bit of a head start in java or any programming language (my mom wants me to do robotics club :p ).
some of my high school friends have got internships at the apple campus (my school is very close to the headquarters) from computer related classes at school and from robotics club and i want to have the opportunity for an internship...etc
but i have no experience
what are some simple or easy programming languages?
is java a good beginning?
what can you do with java?
thanks!

The exact language hardly matters. What you need to do is learn to write programs. This means decomposing problems into smaller problems and so on many steps. To write complex things like games or robot controlers most of what you need to learn is not the language so much as the "environment". The OS and all the libraries (and the guts of a robot) are much more complex then any language. It's like writing a novel or a movie script. It is not enough just yo know how to type in English, yo need something to say.

Ok but you do ned to say it in some language. Start with C. C++ and Objective C are both super-sets of C. Start by writing simple programs that run at the command line. Move to C++/Objctive C later. The move will be natural. Java is "C-like" and if you know C++ you can adapt quickly.

I was once hired to program in Ada. I told the interviewer flat out that I did not know Ada becaue it was new. It worked out OK. I just read a book and kept the refference manual open. Once you understand how to write software, then with some new language you can just look up the syntax for (say) a switch or case statement or whatever.

BTW, I started in the 8th grade also. That was before there was an IBM PC. back in the punched card era, before glass screens. But even there there were robots and asembly language. You would learn a lot it you worked on a micro-controller. Like a PIC or AVR and directly controlled hardware and leard how software can interact with a transitor switch to control a motor. But learn C first. I started over 30 years ago. One would think a lot has changed from 1970 but no. The only change is cheaper hardware.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.