Jump to content

Recommended Posts

Posted

Well i know a lot about computers, and basically my life revolves around mine. I am an avid gamer, forum junky, photoshop and lightwave 3d artist, and i also make a movie from time to time. In any case, i know a lot about computers, but one area i am trying to break into is programming. So i signed up for a programming class at my highschool to try and learn. Well we are learning Java in the class, and i have a few questions...

 

1. Can you compile java programs into a .exe or are they always going to be bytecode files that need an interpreter?

2. Is Java a good first language?

3. What are some of the main differences between Java and say C++?

4. How hard is it to go from Java to C++ or some other OOP language?

5. Do you know any languages? If so, which ones, and what do you like the most and why?

 

Just wanting some opinions about it all and to see what my next step will be.

Posted

1) whilsts normally they need an interpreter, i have seen .exe files, not very often, so maybe it is hard to do....

 

2) what do you mean by 'good'?

 

3) dunno, they're just different languages... which makes them different

 

4) the same as it is for going from any language to another! so long as you have a memory, i tend not to get confused!

 

5) i know HTML, a bit of Java, a bit of javascript, i can work in DOS [but i dont know all the advance commands] and a bit of actionscript [used in flash MX]. constantly expanding my knowledge on all of them.

 

what kinda stuff do you hope to make in java?

Posted

Java and C++ share a lot of commands.

In fact you can mechanincally convert working code from one language into the other without much difiiculty.

If you know Java you would not spend much time in mastering C++ and vice versa. As far as "good" is concerned it depends on what parameters you use for measuring. Certain aspects in java are much more cleaner and easier to understand than in C++ (I personally think that pointers lie in this category). But number of checks at compile time are far greater in Java than in C++ which makes it much slower than C++ in that aspect.

 

I know Java, C++, sml (a functional programming language) and currently trying to master assembly language.

Posted

I've only done VB and Flash basics, but they're fun as hell. If you need to write a calculator or want to make a small game, Flash is the way to go as it takes nearly no time to complete a working program.

 

I'm obviously not a serious programmer, but that's my two cents.

Posted

Since pulkit summed it up nicely I'll just answer your questions one by one instead...

 

API = Application Programming Interface: A feature built in to an OS providing programms with a way to send instructions to hardware indirectly(= to OS which then uses drivers to pass the instruction on to the hardware). It is very useful as you don't need to know the hardware on which your software will be running on.

 

JRE = Java Runtime Enviroment: Allowes to run Java applications on an OS by becoming a 2nd middleman(API) in software <-> hardware communication, it is deployed between a Java application and an OS' API.

Java app <-> JRE <-> API <-> Hardware. :)

 

1. You can convert jar files into exe files using software like J2Exe, it's no big deal really but keep in mind that you can only run exe's on Windows based platforms. See # 3

 

2. If I understood your question correctly then yes it is because java based software can be run* instantly on multiple platforms, and the language has a similar syntax to that of C++, it seems to be a better "investment" to learn java first.

 

* JRE required

 

3. The main difference is probably that jar files do not rely directly on the OS but rather on a JRE which is kind of an API on top of an API. Java programs don't make any calls directly to the OS API but to the run-time enviroment instead which then translates the calls to ones that the current OS' API understands. On the other hand software written in C++ can only run on one platform as it makes calls to the operating systems API. If you want your program to run on another platform you have to modify the code to fit that platforms API.

This means that while Java apps can be run on multiple platforms with no modifications a C++ app will run much faster (the differance in speed will only be noticed with demanding software).

I might be a little off track here but that's how I understand the system. :)

 

4. Rather easy. As mentioned befor Java and C++ have a similar syntax and of all the OOP languages I know, they all use pretty much the same stuff, like pointers and arrays, so...

 

Hope this helps...

  • 3 weeks later...
Guest Smersh2000m
Posted

Greets everybody,

 

Well, if you want to learn programming - the most important thing is to understand the concept of the programming. The ideas of algorithm, code efficiency etc. Here are my ideas:

 

Perhaps the easiest way IMHO would be to get Visual Basic 6.0 (VB.NET, is more complicated), get some book with 50% pictures/50% text about it.

This way will give you the fastets "product" - your program will look much closer to any Windows application than any other. The downside is: you won't learn the concepts as much, your program will not be efficient, and you will have to work your way "down" - getting deeper and deeper into the basics.

 

The opposite way - from bottom up. You start with language like Pascal ( a lonely nostalgic tear is running down my cheeck :P ), this is not the very hardcore, but it is simplified enough, and at the same time - there is not much code between you and machine, as it is, say, in Java (which means that if you start pushing stuff really hard, there is not that much that can go wrong). This type of programming will require more sleepless nights, coffein, and desire to get your hands really dirty. If you really feel suicidal - you could try Assembler, but i've never been there (besides writing mouse module for pascal), so i can't tell you. I went this way - and can't complain.

 

Java, IMHO is a little too complicated than necessary. One thing i learned so far - you learn how to write programs in the class, and then throughout your life you learn new languages with their shortcuts and tricks. But the class will put the foundation for the good programming practices.

 

Personally i started with Basic, then Pascal, then C++ and VB at the same time, then Java. All of these were in the Windows world. Now, due to my position, i have to work in both Windows and Linux - and i get to code in VB, Perl, PHP, Shell scripts. Cannot say that it wasthat hard to learn new language.

 

But for the future reference: when you get into stuff like Data Structures, and when difference in iterations of your loop will matter to you - get this book "The Art of Computer Programming" by Prof. Knuth, if you are still interested - if this book was a standard texbook in the college for basic programming classes - the world would a beautiful place (aight, not that - but the code that we see would be much more efficient, faster and safer :P )

 

But again, this all is just my opinion. :)

 

Good luck with your study, and if you have questions - don't hesitate to ask - Internet was created in order to exchange ideas (even though lately people tend to believe it was made to advertise new male enhancement pills as well low mortgage rates)

 

Best regards,

 

TS

  • 3 months later...
Posted

I hear that Java is gaining popularity as a serious programming language, plus I'm sure it would be easier to start of with than something like C++. Also, with Sun making Solaris open source now there could be even more excitement. I think I've even heard of an OS being written in Java.

 

I've dabbled in C++, but I'm pretty proficient in PERL. I'd say I'm pretty beastly on those TI calculators with a BASIC-like languag.

  • 2 weeks later...
Posted

Go with C - not only does C (which can be ugraded to C++) work extremely well with Win32 (for Windows programming, or Qt+ for Linux programming) but OpenGL is the preferred choice of major graphics programming (sharply in debate with DirectX, also C++ tradition). Java is more for small web apps. Nothing serious is made in Java.

Posted

welcome to the wonderful world of programming!

 

1.) see 3

2.) i'd say yes :) it's easier than c++ imo

3.) java is platform independant. meaning the same code runs everywhere. c++ is not. but that has its price: java is way slower than c. when you compile an exe you link platform-dependant material into it so with some tools its possible to create exes but you will lose independance - what java is actually famous for.

4.) not difficult - java is very similar to c++ and to many other higher languages.

5.) wow.. now i can finally boast on this board :)) ok: c++, java, php, sql, delphi, pascal, matlab, html/javascript, perl - and some other but these are the ones i know well. what i like most is php since the possibility to program webpages far beyond html is just awesome. sql is nice too of course, crawling in databases is fun :) and i also used to like delphi because you are able to program simple applications reeeally fast. my favourite for general purposes is C++ though.. raw and clean

 

but remember: programming is like hell and heaven. you go NUTS when u dont find an error for 2 weeks, but live in blissfull heaven when everything finally works perfect.

Posted

heh, listen to fariychild, programming a perfect program is a very religious experience.

 

oh, I forgot to answer your question 5: C/C++ including Win32, (X)HTML, XML (and related technologies), PHP, SQL, Perl (not much but enough from learning C first), Javascript, a little VB, and ...well, I guess that's it! My favorite is C, although I use C++ much also.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.