Feb 2007
Java: The Language of the Future
02/28/07 09:13 AM Filed in: Technology
// Yes,
this will run if you compile it
import javax.swing.JOptionPane;
class LanguageOfTheFuture
{
public static void main(String[] args)
{
JOptionPane.showMessageDialog(null, "If Java is truly the " +
“\"Language of the future\" like it's worshippers claim, we'll” +
all be speaking in code soon enough.”, "Java", JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
}
Of course, I still prefer civilized conversation with my friends.
For those of you who don't know what I'm talking about, Java has nothing to do with coffee. It's a programming language created in 1991 by James Gosling (yes, he is Canadian) of Sun Microsystems. The original project name was Oak, but the release name was Java.
So what's so beautiful about this language that leads programmers to believe it's the "Language to end all languages"? Let's start with a crash course on the fundamentals of the Java language.
Sun Microsystems implemented the first public release of Java in 1995. The Java language is derived (to an extent) from the C/C++ language. The common goal of the Java language was to provide a more simplified language than C++ that was object-orientied, would allow one file to be viewed on multiple operating systems, and would have easy-to-use built-in server-side functionality. One of Java's biggest advantages is the ability for cross-platform support. That is to say, I could create a file in the Eclipse Software Development Kit (SDK), compile the program to an executable Java Archive (JAR) file, send that JAR file to another computer with another Operating System (OS) on it, and run the program without any errors. This cannot be done with a .exe from Windows, .app from Mac, or a Linux executable (which doesn't have an extension). These executable formats are native to their OS. A JAR file can be run on any OS (Windows, Mac, Linux, or Solaris) that the Java Runtime Environment (JRE) is present on. Unlike an executable JAR file, the JRE is native to the OS you're running. You must download and install the JRE for your OS before you can execute a JAR file.
Java has three different "types." Java Standard Edition (SE), Java Enterprise Edition (EE), and Java Mobile Edition (ME).
Another huge advantage to Java is server-side functionality and simplicity. Java SE supports server functionality, but Java EE enhances this functionality a great deal. I could take that same application I just compiled and, instead of making it an executable JAR file, I could compile it to an Applet and upload it to a web server. You could then create a web page that would implement that Java Applet and, there you have it, you've just put your application on the internet for viewing anywhere in the world using any browser that supports Java.
Java was also designed to be highly portable. What you may not realize is how often you use Java applications. Your cell phone, your PDA, your MP3 player, your cars MP3/CD player, and yes, the new iPhone. Most of the applications running on your mobile devices are probably programmed with Java ME.
Another big advantage to the Java language is... it's FREE! Everybody loves free, right? The JRE is free, the Java SDK is free, and you can always find a free compiler. The Java language was designed to be Open Source; the code shared freely for learning purposes and better development.
Let's walk through the creation of a simple Java stand-alone application. I go to www.Eclipse.org and download the editor/compiler for my system: Mac OS X. After installing, I run Eclipse and create a new project. Let's just use the simple program I wrote above. I plop that into a .java file that I've created in my project and save it. I compile my program and run it. It seems to work fine, so now I want to send the program to one of my buddies for them to check out. Can I send the file I just created when I compiled the program? No! In Java, when you compile you do not make an executable. You make a .class file, which can only be viewed by people with the Java SDK. The SDK is a fairly large download, and unless you're developing Java applications, there's no use for it, so the average person won't have it. When I compiled the application, all I created was some byte code. Byte code is interpretted by JRE and converted into machine code to run the application on the OS you're currently running on... that's why they have platform specific JREs. But still, my .class is byte code, but the JRE can't run it without the SDK to help it. If I want to make an executable I have do one more step. I must "Export" my project from Eclipse. Using Eclipse, this process is far more difficult than it should be, but it works out in the end. Eclipse will then build a JAR file which can be executed on any computer, any operating system, that is running the JRE.
Still... the end user must have the JRE.
Sure, Java makes pretty GUIs. And the language, in most cases, is a heck of a lot more clean and pretty than C++ (minus formatting). But that's a hassle... it takes me longer to compile, and I can't guarantee you will be able to view the file immedietly after you recieve it. And the JRE is no small file! It's not a "quick download."
C++ may be an older language, but it is NOT a dead language, so quit saying that! C++ has features that Java decided to drop because they were too confusing, or Java just didn't want to handle them. (Pointers CAN be useful, people. They're not always a headache once you figure them out.) C++ still communicates with hardware better than Java. C++ does formatting of output WAY better than Java. I don't know why Java made formatting such a headache when they were stealing the language from C++. They simplified so many things, but formatting they unsimplified! It was simple in C++...
I like the idea of passing one file around to four different OSs. I also like the idea of sending an executable JAR file through email so Gmail doesn't gripe about me sending an "executable file" (refering to a .exe). C may be dead, but C++ is still alive and well. Java has a lot of nice things, don't get me wrong. In general, I like Java better than C++. But C++ is still a more powerful language. The code and final application of Java are far prettier than C++.
Still... in the words of Joel Whitehouse, "Yah, Java has a better syntactical design. But gosh darn it. I like that I can compile a 3k executable in C++!"
Still... as my Java teacher says frequently, "No, it's not magic... it's just Java."
import javax.swing.JOptionPane;
class LanguageOfTheFuture
{
public static void main(String[] args)
{
JOptionPane.showMessageDialog(null, "If Java is truly the " +
“\"Language of the future\" like it's worshippers claim, we'll” +
all be speaking in code soon enough.”, "Java", JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
}
Of course, I still prefer civilized conversation with my friends.
For those of you who don't know what I'm talking about, Java has nothing to do with coffee. It's a programming language created in 1991 by James Gosling (yes, he is Canadian) of Sun Microsystems. The original project name was Oak, but the release name was Java.
So what's so beautiful about this language that leads programmers to believe it's the "Language to end all languages"? Let's start with a crash course on the fundamentals of the Java language.
Sun Microsystems implemented the first public release of Java in 1995. The Java language is derived (to an extent) from the C/C++ language. The common goal of the Java language was to provide a more simplified language than C++ that was object-orientied, would allow one file to be viewed on multiple operating systems, and would have easy-to-use built-in server-side functionality. One of Java's biggest advantages is the ability for cross-platform support. That is to say, I could create a file in the Eclipse Software Development Kit (SDK), compile the program to an executable Java Archive (JAR) file, send that JAR file to another computer with another Operating System (OS) on it, and run the program without any errors. This cannot be done with a .exe from Windows, .app from Mac, or a Linux executable (which doesn't have an extension). These executable formats are native to their OS. A JAR file can be run on any OS (Windows, Mac, Linux, or Solaris) that the Java Runtime Environment (JRE) is present on. Unlike an executable JAR file, the JRE is native to the OS you're running. You must download and install the JRE for your OS before you can execute a JAR file.
Java has three different "types." Java Standard Edition (SE), Java Enterprise Edition (EE), and Java Mobile Edition (ME).
Another huge advantage to Java is server-side functionality and simplicity. Java SE supports server functionality, but Java EE enhances this functionality a great deal. I could take that same application I just compiled and, instead of making it an executable JAR file, I could compile it to an Applet and upload it to a web server. You could then create a web page that would implement that Java Applet and, there you have it, you've just put your application on the internet for viewing anywhere in the world using any browser that supports Java.
Java was also designed to be highly portable. What you may not realize is how often you use Java applications. Your cell phone, your PDA, your MP3 player, your cars MP3/CD player, and yes, the new iPhone. Most of the applications running on your mobile devices are probably programmed with Java ME.
Another big advantage to the Java language is... it's FREE! Everybody loves free, right? The JRE is free, the Java SDK is free, and you can always find a free compiler. The Java language was designed to be Open Source; the code shared freely for learning purposes and better development.
Let's walk through the creation of a simple Java stand-alone application. I go to www.Eclipse.org and download the editor/compiler for my system: Mac OS X. After installing, I run Eclipse and create a new project. Let's just use the simple program I wrote above. I plop that into a .java file that I've created in my project and save it. I compile my program and run it. It seems to work fine, so now I want to send the program to one of my buddies for them to check out. Can I send the file I just created when I compiled the program? No! In Java, when you compile you do not make an executable. You make a .class file, which can only be viewed by people with the Java SDK. The SDK is a fairly large download, and unless you're developing Java applications, there's no use for it, so the average person won't have it. When I compiled the application, all I created was some byte code. Byte code is interpretted by JRE and converted into machine code to run the application on the OS you're currently running on... that's why they have platform specific JREs. But still, my .class is byte code, but the JRE can't run it without the SDK to help it. If I want to make an executable I have do one more step. I must "Export" my project from Eclipse. Using Eclipse, this process is far more difficult than it should be, but it works out in the end. Eclipse will then build a JAR file which can be executed on any computer, any operating system, that is running the JRE.
Still... the end user must have the JRE.
Sure, Java makes pretty GUIs. And the language, in most cases, is a heck of a lot more clean and pretty than C++ (minus formatting). But that's a hassle... it takes me longer to compile, and I can't guarantee you will be able to view the file immedietly after you recieve it. And the JRE is no small file! It's not a "quick download."
C++ may be an older language, but it is NOT a dead language, so quit saying that! C++ has features that Java decided to drop because they were too confusing, or Java just didn't want to handle them. (Pointers CAN be useful, people. They're not always a headache once you figure them out.) C++ still communicates with hardware better than Java. C++ does formatting of output WAY better than Java. I don't know why Java made formatting such a headache when they were stealing the language from C++. They simplified so many things, but formatting they unsimplified! It was simple in C++...
I like the idea of passing one file around to four different OSs. I also like the idea of sending an executable JAR file through email so Gmail doesn't gripe about me sending an "executable file" (refering to a .exe). C may be dead, but C++ is still alive and well. Java has a lot of nice things, don't get me wrong. In general, I like Java better than C++. But C++ is still a more powerful language. The code and final application of Java are far prettier than C++.
Still... in the words of Joel Whitehouse, "Yah, Java has a better syntactical design. But gosh darn it. I like that I can compile a 3k executable in C++!"
Still... as my Java teacher says frequently, "No, it's not magic... it's just Java."
Comments
Why I Like Work
02/16/07 11:01 AM Filed in: Indiscriminate
It seems to me that
people complain about their jobs a lot. While I do
enjoy shows like The Office, movies like Office
Space, and Hoops and YoYo e-cards from Hallmark about
how terrible working in an office and, even worse, a
cubicle is, I don't actually mind it myself. In fact,
I rather enjoy it! And maybe you think I'm crazy, but
that's OK... I probably am.
When I'm at work, I actually feel like I'm accomplish something; like I'm actually needed for something, and what I'm doing is important to somebody. Which is a good feeling!
At work, somehow I can forget about all my homework and the large amounts of studying which loom over me before I can fall asleep later in the evening. Instead I occupy my mind with my current project, or I just think about anything or anyone not reminding me of a school or homework. At my job I'm not allowed to do homework if they don't have anything else for me to do, so I just don't!! And I don't think about it either. I don't think about the test I have coming up, or the homework due tomorrow, or anything like that. I just think about my cube and the comics, valentine, and some ghostly white thing made out of Kleenex that I have hanging up in it!
Maybe this post shouldn't be called, "Why I Like Work," and it should really be called, "Why Work Is Better Than School." Work doesn't loom over you all week long, leaving you stuck in it's shadow. When I leave work, I leave all of my work. I don't take it home with me, and I generally don't think about it when I'm sitting at home... doing homework. Except sometimes I do think, "I wish I was at work..."
You make money at work. You pay money for school. End of discussion.
You work to accomplish a common goal with others around you at work. At school, you work to accomplish a good grade for... yourself. Sometimes in vain.
At school, if you miss a day because you're sick or something, you're expected to figure out everything you missed on yourself. You're generally told to "read your book" or "ask friends for notes." Well, Kirkwood isn't exactly the most social college in the world, so you don't necessarily HAVE friends in every class. And your book? Well... never let it be said a textbook actually explained something clearly!! At work, if you miss a day, your project may go on without you, OR it may wait for you! If it goes on without you, you will be informed what you missed, or you will at least be informed where to easily find this information.
At school you're expected to learn. At work you're exactly to know. However, if you don't know, you will be shown. (This is, of course, coming from the perspective of an intern.) If you still don't understand, they help you understand because your project may not be able to go on until you do. If you still don't understand at school, you just get a bad grade. (What happened to the days when teachers actually answered your questions?)
Overall, I think it has to do with a sense of belonging. Of course, not everyone works at a job that they enjoy. For some reason, some people actually choose a profession or job that they can't stand... I still haven't figured that one out. There are tons of jobs available out there, just choose one that interests you! Of course, I guess interests change. Currently, I'm interested in computer engineering, software engineering specifically. And I love my job because that's what I'm doing :)! I'm delegated tasks, I can accomplish them, if I can't I'm shown how; If I'm out sick for a day, it will be waiting for me when I get back. And I'm sure it missed me too.
In short, I like my job! I don't like school! Except Java and C++... I like them.
(Some of this may or may not have been sarcastic... except the part about not liking school. That was true. And I'm not anti-education or anything, I just don't like Kirkwood. I'm sure I'll love Cedarville :)!!)
When I'm at work, I actually feel like I'm accomplish something; like I'm actually needed for something, and what I'm doing is important to somebody. Which is a good feeling!
At work, somehow I can forget about all my homework and the large amounts of studying which loom over me before I can fall asleep later in the evening. Instead I occupy my mind with my current project, or I just think about anything or anyone not reminding me of a school or homework. At my job I'm not allowed to do homework if they don't have anything else for me to do, so I just don't!! And I don't think about it either. I don't think about the test I have coming up, or the homework due tomorrow, or anything like that. I just think about my cube and the comics, valentine, and some ghostly white thing made out of Kleenex that I have hanging up in it!
Maybe this post shouldn't be called, "Why I Like Work," and it should really be called, "Why Work Is Better Than School." Work doesn't loom over you all week long, leaving you stuck in it's shadow. When I leave work, I leave all of my work. I don't take it home with me, and I generally don't think about it when I'm sitting at home... doing homework. Except sometimes I do think, "I wish I was at work..."
You make money at work. You pay money for school. End of discussion.
You work to accomplish a common goal with others around you at work. At school, you work to accomplish a good grade for... yourself. Sometimes in vain.
At school, if you miss a day because you're sick or something, you're expected to figure out everything you missed on yourself. You're generally told to "read your book" or "ask friends for notes." Well, Kirkwood isn't exactly the most social college in the world, so you don't necessarily HAVE friends in every class. And your book? Well... never let it be said a textbook actually explained something clearly!! At work, if you miss a day, your project may go on without you, OR it may wait for you! If it goes on without you, you will be informed what you missed, or you will at least be informed where to easily find this information.
At school you're expected to learn. At work you're exactly to know. However, if you don't know, you will be shown. (This is, of course, coming from the perspective of an intern.) If you still don't understand, they help you understand because your project may not be able to go on until you do. If you still don't understand at school, you just get a bad grade. (What happened to the days when teachers actually answered your questions?)
Overall, I think it has to do with a sense of belonging. Of course, not everyone works at a job that they enjoy. For some reason, some people actually choose a profession or job that they can't stand... I still haven't figured that one out. There are tons of jobs available out there, just choose one that interests you! Of course, I guess interests change. Currently, I'm interested in computer engineering, software engineering specifically. And I love my job because that's what I'm doing :)! I'm delegated tasks, I can accomplish them, if I can't I'm shown how; If I'm out sick for a day, it will be waiting for me when I get back. And I'm sure it missed me too.
In short, I like my job! I don't like school! Except Java and C++... I like them.
(Some of this may or may not have been sarcastic... except the part about not liking school. That was true. And I'm not anti-education or anything, I just don't like Kirkwood. I'm sure I'll love Cedarville :)!!)




