Jump to content

Java or Ruby


  • Please log in to reply
22 replies to this topic

#1
scart

scart

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 210 posts
I have been reading couple things about ruby and java, which one is better for a beginner programer?

#2
alloutmacstoday

alloutmacstoday

    InsanelyMac Deity

  • Donators
  • 1,817 posts
  • Gender:Male
  • Location:Abbey Road
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

#3
ElectroG

ElectroG

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
  • Gender:Male
Wait what is kareltherobot for java?

#4
alloutmacstoday

alloutmacstoday

    InsanelyMac Deity

  • Donators
  • 1,817 posts
  • Gender:Male
  • Location:Abbey Road
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();
}
}


#5
ElectroG

ElectroG

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
  • Gender:Male
I just looked it up didnt find anything, where could i find it?

#6
alloutmacstoday

alloutmacstoday

    InsanelyMac Deity

  • Donators
  • 1,817 posts
  • Gender:Male
  • Location:Abbey Road
http://wol.pace.edu/...ckage-tree.html

#7
sarahbau

sarahbau

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 903 posts
  • Gender:Female
  • Location:Raleigh, NC

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.

#8
alloutmacstoday

alloutmacstoday

    InsanelyMac Deity

  • Donators
  • 1,817 posts
  • Gender:Male
  • Location:Abbey Road
ya, it is, and it does. It also can be very annoying though. It was my first real language, and I turned out fine :D

#9
FUKKU

FUKKU

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 227 posts
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.

#10
ElectroG

ElectroG

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
  • Gender:Male
to program with python, is that its own language? or what do you use?

#11
dnm

dnm

    InsanelyMac Protégé

  • Members
  • Pip
  • 43 posts
ruby, really good tutorials for that

#12
radov4n

radov4n

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 195 posts
  • Location:Siberia
Get JRuby and you can have the best of both worlds - Ruby and Java. Ruby calling / using Java or vice versa.

#13
hecker

hecker

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,669 posts
  • Gender:Male
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

#14
Synaesthesia

Synaesthesia

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 3,168 posts
  • Gender:Male
  • Location:South Africa
Well said!

#15
1stmac

1stmac

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
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

#16
Suhail

Suhail

    Love is Gone...

  • Retired
  • 7,411 posts
  • Gender:Male
  • Location:London
  • Interests:PHP Coding
    Trance Music
    Xbox 360 :)
    Web Designing
Remember, Java != Javascript. They are totally different languages.

#17
CLiDE FTW!!1

CLiDE FTW!!1

    Lay off the pipe.

  • Members
  • PipPipPipPipPipPipPip
  • 871 posts
  • Gender:Male
  • Location:Canada, eh?
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!

#18
Urbz

Urbz

    La cr�me de la cr�me...(?)

  • Retired Developers
  • 837 posts
  • Gender:Male
  • Location:Montreal, QC, Canada

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!

#19
annliu

annliu

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts
Hi,there are many computer ebooks free download.

free ebook download

such as:c++,csharp,adobe,ajax,asp.net,head-first,java,linux,my sql,oracle,perl,ruby,rails,python,acess,visual basic

#20
m16

m16

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 282 posts
  • Gender:Male
  • Location:Oregon,USA
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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy