Jump to content

Java or Ruby


scart
 Share

23 posts in this topic

Recommended Posts

Karel The Robot actually.

 

it teaches you how to program in java. Like, you just have to make a world, then make a Karel, then tell him what to do.

 

If you add the karel library (download it somewhere) in bluej, you can run this simple code:

import kareltherobot.*;
/**
* Write a description of class Hbot here.
* 
* @author (your name) 
* @version (a version number or a date)
*/
public class Hbot
{
public static void main(String [] args)
{
	World.setVisible(true);
	UrRobot Allout = new UrRobot(1, 1, Directions.North, 7);
	Allout.turnLeft();
	Allout.turnLeft();
	Allout.turnLeft();
	Allout.putBeeper();
	Allout.move();
	Allout.move();
	Allout.putBeeper();
	Allout.turnLeft();
	Allout.move();
	Allout.putBeeper();
	Allout.move();
	Allout.putBeeper();
	Allout.turnLeft();
	Allout.move();
	Allout.move();
	Allout.putBeeper();
	Allout.turnLeft();
	Allout.move();
	Allout.putBeeper();
	Allout.turnLeft();
	Allout.move();
	Allout.putBeeper();
	Allout.turnLeft();
	Allout.turnLeft();
	Allout.move();
	Allout.turnLeft();
	Allout.move();
	Allout.turnLeft();
	Allout.turnLeft();
	Allout.turnOff();
}
}

Link to comment
Share on other sites

neither.

 

For a beginner, use like runtime revolution or some {censored} like that. You have to understand how coding works for you to really be able to do it well. After that, get kareltherobot for java, and expiriment with that

I don't think it's necessary to learn some non-standard language before learning a "real" language. I've never even heard of Revolution. I think Java is just fine as a beginning language. It's more forgiving than most other languages, has excellent documentation with the Java API, and is pretty easy to make basic GUI apps with it.

Link to comment
Share on other sites

Ruby's the way to go if you're going to be developing on OS X. Apple deprecated the Java-Cocoa bridge with Leopard and is now providing Cocoa bridges to Python and Ruby. If you're going to branch out into OS X app development later on, Ruby and Python are going to be an easier way to get there than Java.

 

The book Learn to program will teach you basic programming concepts and a little about Ruby at the same time. I highly recommend it; you can get it in print or as a PDF online.

 

If you want to check out Python instead of Ruby (both are good languages for beginners), try reading dive into Python. It's available in print or for free online.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

This is a really difficult question to answer. The real question here is: how much time and effort are you willing to put into this endeavor? Do you want to do something specific or are you contemplating a career in computer science? It's like learning to play the guitar. Some just want to learn to play some tunes but others want to really understand music and use the instrument professionally.

 

If you really want to learn to program, I'd recommend you take some lessons for beginners (maybe at your school or community college). That way you won't spend time reading boring stuff from books, you'll have some sense of direction and will be able to ask questions (you will have them). Working in a group will also keep you motivated, since you'll be able to share first hand experience with others at your level.

 

There are some good books for beginners out there, but nothing compares to the efficiency of a tutor, IMO (even Jimi Hendrix learned to play his guitar from somebody!).

 

Good luck!

 

hecker

Link to comment
Share on other sites

  • 2 weeks later...

For people brand new to programming who just want to see if it's something they enjoy I recommend JavaScript as their first programming language. Requires no special tools and everything you learn is useful no matter which direction you choose next.

 

Between just Ruby and Java.. I recommend Java since there are so many free tutorials, development tools and even free university classes online. Here are the Sun tutorials, for example: Java Tutorials

Link to comment
Share on other sites

The first language I learnt was Turing. I found that it crossed over into other languages.

 

The thing is -- before even learning a whole language, you need to know the very basics and concepts behind programming. Cross-language functions like Arrays, counters, loops, etc... you need to know why they exist and what you can do with them. Then you can imagine the program and work towards the dream.

 

By the way, that Chris Pine ebook looks like a good first step -- I just downloaded a copy off of TPB (ahem). Be sure to buy the book if it's useful to you!

Link to comment
Share on other sites

  • 3 weeks later...
For people brand new to programming who just want to see if it's something they enjoy I recommend JavaScript as their first programming language. Requires no special tools and everything you learn is useful no matter which direction you choose next.

I am very proficient in Applescipt and auto-it and I agree wholeheartedly with you: scripting languages are the best start if you don't have any time limits and are doing it for yourself.

The thing is -- before even learning a whole language, you need to know the very basics and concepts behind programming. Cross-language functions like Arrays, counters, loops, etc... you need to know why they exist and what you can do with them. Then you can imagine the program and work towards the dream.

And I learned what all of these are because I needed to use them while creating scripts and whatnot that do things for me. With scripting languages, you can just pick up and write a modest useful utility and learn as you go. You also don't need to worry about things like memory allocation. And some can actually lead you unknowingly to Object-Oriented Programming before you even know what it is!

Link to comment
Share on other sites

  • 11 months later...
Java?? Ruby?? Python??

 

What is becoming of the world. Learn C++

 

Oh wow... just wow.

 

C is by far the easiest programming language to learn

 

:):wacko:

 

OP learn python, it's easy assembly and powerful. Once you have that learned up, read SICP and learn C.

Link to comment
Share on other sites

  • 5 months later...
Java?? Ruby?? Python??

 

What is becoming of the world. Learn C++. C is by far the easiest programming language to learn and use and C++ makes it more efficient. cplusplus.com

 

-_- I hope it's a joke ...

Well, on my mind, Pascal, OCaml,B are good for learning

And Ruby/Python for high level programming/learning

Link to comment
Share on other sites

 Share

×
×
  • Create New...