I need to learn Java

Knowing C gives programmers a knowledge of where stuff is in memory ???
HAHAHAHAHAHAHA :p Learn Assymbly language. THAT is the "best" lower level language...or better yet why not binary ??? :p (on an asside note I am learning assebly now)

On the flush() comments, those points are well taken. I prefer java to anything else. It is simple, no C hassles like alloc and free and things not working. C just doesnt do it for me.

On C#, too little too latem BUT with its inclusion in M$'s .net strategy it "might" take off (too many people are M$ zombies these days lol).... In my opinion its goot to know C# just to know it, other than tha foh-get-bout-it.


one last thing ...

I LOVE JAVAAAAAA!!!!!!!!! (can I get a mocha double latte with half skim and half full foam, with vanilla, coconut and extra chocolate caramel please ? :p)


Admiral
 
Why do I love C so much? basically because it is as low level as you can go WITHOUT programming in assembly (though you can embed assembly in C).

This means that the compiler doesn't restrict you in what you can do. This is a plus and a minus. If you know what you are doing C can let you do very very powerful things. But because of this freedom with C then a inexperienced or unknowledgable programmar (your typical java programmar) can get himself into a awful mess. C forces you to understand your computer because it lets you play around with things like memory. You can learn how to impliment data structures like tree's linked list's stacks queue's etc etc not just use a something in a class that you have no idea what it does.

I actually use the C++ compiler to compile my C code as C is basically a subset of the C++ language. My reasons are that it forces you to write neater C.

The OO model of programming is a flawed model. It is very hard to write GOOD re-usable OO code. Structured programming tends to be faster to write neater and more maintainable especially if more that one person is working on a project.

There is a reason why 90% of the open source comunity writes in C. It is the standard and it is still the best language for robust maintainable code.

if you don't believe me count the most used UNIX apps and see how many of them ARENT written in C.

"And god made C and saw that it was good"
 
OOP is not as reusable ??? ROTFLMAO :p
Obviously you havent done extensive coding in java :p
Just face it.. C is *your* domain and not necesarily the domain of others/
 
As i said in my previous post. Count the most widely used UNIX apps. See how many of them are written in any other language than C. Then get back to me.

OO that people write themselves is hardly ever if ever reused. Mainly because the people that wrote the code are unskilled in the are of writing generic class's.

I don't expect non programmars like you to understand this concept. You can roll around on the ground laughing what ever you have off as much as you like. But I have 10 years commercial UNIX programming (C/C++/Java/Pascal/Fortran/etc) experience backing me up as well and the vast vast majority of UNIX developers. Who have you got. You have a hobby and Scott McNealy.

Saying that Java is a fine language for a hobby. If you want a real UNIX job and you don't know C don't come knocking on my door.
 
I would thank you not to make assumptions about me! :eek:
You don't know me and don't know what I am and what I do.

I am not a commercial programmer for I am "only" 20 years of age but in a few years I will join the ranks of "commercial programmers".

You are right in saying that most, of not all, programs in a UNIX enviroment are writen in some C variant.

you are wrong in assuming that most java programmers are "non-programmers", and you are also confusing widespreadedness with efficiency. :eek: Just because most programs for unix are written in C doesnt mean that some other language cant do things better.

I respectfully tell you to Get over yourself and C.



Admiral
 
My assumptions were based on reading your posts throughout macosx.com. And they turned out to be correct. I didn't mean any offence by making the assumptions though and i apologies if any offense was taken :)

Your right indeed, some languages can do stuff better and more efficiently than others take A.I languages for example. Doing list processing and predicate calculus are perfectly suited for languages like Lisp and prolog (respectivly). C is inappropriate choice for these tasks.

Java has no advantage over C in any task where as the C has many advantages over Java.

I would be happy to take any example of where you think Java has advantages over C.

Don't say automatic garbage collection and no pointers cause thats a load of rubbish.
 
I agree with Admiral on this one. Assembly is definatly the best way to learn the inards of a computer. Besides, you are practically writing the code in machine language.

Admiral: What are you studying? Do you know assembly language? It seems to me that anyone who knows assembly also knows that you can just as easily convert it to hexadecimal, which can just as easily be changed to binary. Provided you have LOTS of time though :D

MrJohns: I disagree with you on the OOD. Damn OO is so sweet! Come on, don't tell me you don't use it, what about making a GUI? Java is practically all OO for the little I know.

I'll admit that when you have a profound knowledge of a language, it might be easier to code all in a stuctured programing method. But it seems to me that OO is far easier to understand for anyone (including new employees you might hire). It's also much more manageable for me. I guess if you like it old fashioned style, fine but it will get harder and harder for you to hire some good C programers because everyone is now learning C++.

As for C#, it's a lame attempt by M$ to limit our choice of OS. If all apps where written in Java, no one would need to buy a Win pc anymore. That make Billy boy scared :p
 
Assembly is the best way to understand what you computer is doing. I agree. I don't disagree. But nobody programs in Assembly these days because it is too slow to write anything useful. But by all means learn it. It will teach you at least one thing.... that you don't want to write anything in assembly ;)

OO sucks arse. Thats not to say that i do not on the occasion have to use it. i.e with any Java i write it has to be OO (no choice Java is only OO). But I work on large projects with many programmars OO in that enviroment would be a nightmare. Mainly because it would take twice as long for new programmars to become productive and it would take twice as log to write applications.

as C++ is only a superset of C then I would quite happily employ C++ programmars.

Its people that have no C or C++ that i cannot even contemplate giving a job to in UNIX development. as i said before UNIX is written in C 90% of all open source projects are in C. If you don't know C get a job on windows platform.
 
I missunderstood what you said a bit. I though you were saying that C is what needs to be learned and not C++. I totally agree with you though, a programer who doesn't learn C/C++ is a like a painter who only learns pencil. I'm pretty clueless in C, maybe not because I know C++, but appart from OO I don't really know the difference.

I don't know of many Universities that only teach Java. In engineering at least, you learn C++ first and then you either take a course on Java packages (the syntax can be learnt in a weekend if you know C++) or you learn it on your own. Maybe they only teach Java in computer science? What diplomas do the people you interview usually have?
 
Example of when Java is better than C++:

- When making a multiplatform product
- Time to market is faster because there is less platform specific tweaking
- Java is free (not a very good argument but it's still free for the tools and all)
- Languages are better supported with letters stored in 16bit instead of 8bits like in C++. This is better for everything that is not based on our alphabet. This can also be done in C but not out of the box.
-Java is very safe and the security level is easily configurable
- Java is very network oriented

When C++ is better:

- Games and CPU intensive apps. C++ is just faster than Java.


Except for performance, I don't really see why Java isn't better than C++.
 
Assembly language is still used. Many embedded controls are still being programmed in Assembly. Colleges are teaching more than Java, as well. I am currently in a C++ class (which I already know). Later I will need to take Java, Assembly language, FORTRAN or LISP (Don't remember which), and Perl (I think). I also skipped out of a VB class (It was intro to programming).

-James Rantanen
I already know:
BASIC and REALbasic
C++ (enough to make sophisticated command-line apps)
PHP--the coolest language!!
javascript, HTML, etc. (non programming languages)
 
- When making a multiplatform product

Let me be clear... there is NO thing in the Java language.

Java has a set of standard class libraries for doing this.Just like C has a standard library on ALL platforms write a program using those libraries on any platform and it will work on any platform that has C. just a recompile away.

Now GUI development is different. There is no standard GUI library for C. Microsoft has a cross platform (mac and PC) GUI library and so does metroworks.

On UNIX there is a standard GUI library called X which allows cross platform GUI development accross all UNIX that can compile the X librarys (this includes solaris linux BSD AIX and Mac os X). These C GUI librarys compile to native code and they run much much faster than java.

- Time to market is faster because there is less platform specific tweaking

wrong. Java is really bad at working cross platform and has been since day 1. Sun wrote Java yet their Java development enviroment written in Java only works on Solaris and Windows.

- Java is free (not a very good argument but it's still free for the tools and all)

C C++ Java Fortran Pascal are all free. see gcc

- Languages are better supported with letters stored in 16bit instead of 8bits like in C++. This is better for everything that is not based on our alphabet. This can also be done in C but not out of the box.

This is done via class libraries. it is nothing to do with the language and their is equivilent Libriaries in C.

-Java is very safe and the security level is easily configurable

As a applet yes. As a application No. But Again this is nothing to do with the language.

- Java is very network oriented

So is C.


jarinteractive: You are right that embeded systems use assembly. There will always be a need for assembly in lots of areas of computers. But it is not main stream and the vast majority of code is written in a higher language.
 
In response to MrJohns, using the same/similar outline points he did:

- Multi-platform

Are you honestly trying to say that C has equivalent capabilities to Java in terms of multi-platform development? Are you nuts?

It is fairly easy to create a C program that will run on multiple platforms, if you stick to a very limited subset of what can be done in C and have machines available to compile for each target platform. Beyond that, you're in trouble. Yes there are cross-platform GUI frameworks for C and C++, but none approaches the cross-platform capability of Java.

Our product is written entirely in Java and uses Swing (JFC) for the GUI stuff. It runs on Mac OS 8.1 through Mac OS X, Windows 95-XP, Solaris, Linux and IRIX without a code change or recompile. And those are just the operating systems we've tested it on.

- Time to market

Ok, now you're really convincing me you don't have any practical, hands on experience with Java. Many studies of proven that time improves time to market because most of the stupid memory issues you normally have to deal with in C/C++ are eliminated (though there are still things you should do as a good programmer to help the garbage collector and VM). Additionally, Java's class library is very rich so you don't have to spend digging for the right 3rd-party library to do what you need.

Early on, Java did have many cross-platform issues when it came to developing sophisticated applications. However, most of those have been eliminated and the good Java programmer knows how to address the other issues that remain (differences in things like fonts across platforms).

When you say Java development environment, I'm not sure if you're referring to the JDK or their Forte IDE. If you're referring to Forte, it runs on my Mac under OS X just fine. Ran in Linux too. If you're referring to the JDK, they also provide a Linux JDK.

Although Sun doesn't provide an Apple JDK directly, Sun does have employees on staff at Apple assisting with Apple's implementation of Java. That was a decison made early on, let the experts (people at Apple) develop the JDK for the Macintosh and assist them. Unfortunately, Microsoft doesn't know how to play well with others and Sun had to keep developing the compliant Windows JDK.

- Java is very safe

Although applets are safer, Java applications are still much safer than their native C counterparts. Many of the things that computer viruses take advantage of in C are not possible in Java because of the inability to access memory directly.

- 16 bit letters

Yes, Java's 2-byte unicode storage of letters is technically provided by class libraries. Libraries that are guaranteed as part of every compliant Java implementation. In C you have to add a third party library on. You might learn one C class library for unicode, then take a job somewhere we you need to learn a separate class library because they use something else. Java doesn't have that problem.

- Java is network oriented

There is not a single thing about the core of C that is network oriented. Everything must be provided through clas libraries. Java provides built in networking features. Through a class library? Yes. But a class library that is guaranteed to be part of any conforming Java implementation.
 
Originally posted by mrjohns

OO sucks arse. Thats not to say that i do not on the occasion have to use it. i.e with any Java i write it has to be OO (no choice Java is only OO). But I work on large projects with many programmars OO in that enviroment would be a nightmare. Mainly because it would take twice as long for new programmars to become productive and it would take twice as log to write applications.

You're suggesting object oriented programming is bad in an environment with many programmers on large projects? That's absolutely crazy. What could possibly lead you to believe that?

Object oriented programming, Java or otherwise, is perfect for that environment when used properly used. Why should I need to know anything about Johnny's code? All I need to know are the classes Johnny provides and the public APIs I can access. Everything is nicely encapsulated, Johnny does his thing and I do mine.
 
Originally posted by mrjohns
As i said in my previous post. Count the most widely used UNIX apps. See how many of them are written in any other language than C. Then get back to me.

OO that people write themselves is hardly ever if ever reused. Mainly because the people that wrote the code are unskilled in the are of writing generic class's.

I don't expect non programmars like you to understand this concept. You can roll around on the ground laughing what ever you have off as much as you like. But I have 10 years commercial UNIX programming (C/C++/Java/Pascal/Fortran/etc) experience backing me up as well and the vast vast majority of UNIX developers. Who have you got. You have a hobby and Scott McNealy.

Saying that Java is a fine language for a hobby. If you want a real UNIX job and you don't know C don't come knocking on my door.

After everyone gets done counting the most widely used UNIX apps and what they're are written in, why don't we count market share of the top 10 UNIX apps in comparison to the top 10 Windows apps? Then, just for fun, let's start counting the number of paying jobs open for UNIX programmers as compared to similar job openings for people who can program for Windows, or Macintosh computers. Heck, let's compare job openings for Java programmers to UNIX specific programmers.

I personally hate Windows, but needed to make a point of how small the UNIX market is compared to the PC market or even Java market.

I also have 10 years of commercial programming experience. The first 5 mainly in C, the last almost exclusively in Java (I must admit that I had to use Visual Basic part-time during a dark period in my life during the mid-1990s).

If Java is just a fine language for a hobby, then I've got a great paying hobby. And so do a lot of other Java programmers. Whether you want to admit it or not, it's a serious language with real capabilities that isn't going away anytime soon.
 
Basically largish development teams write code as individuals. They don't generally know what classes johnny has to do what and in the end it just seems easier to write your own. Or you hear about someones class that does something and you want to change it to do something else, You spend the rest of the day searching through header files trace what these damn objects do... in the end you give up and write your own class. In the end there is 15 million different classes all of which the people who didn't write them has no idea what the do and how they work. unmaintainable. Very few people have the skill to write clean good OO. When people use function overloading, virtual class's template class's, multiple inheritance etc etc all very handy things to the person that understands the code and has a map in his mind of how it all fits together. But this is bad for a team of programmers who all have to work in the code.

The same can be said about structured programming code too but to a lesser extent. see obfiscated C contest.

Its alot easier to write crap OO than crap structured code.
 
Originally posted by bewshy
Maybe this is a dumb Q..but what is the difference between Java and Java2? THe last time I programmed was when I was 16 and that was in C for UNIX and some cheesy BASIC on the Mac under 7.1/7.5


thanks ericb

Not a dumb question at all. As Java has evolved so quickly over the past 6 or so years (since the cat got out of the bag, not counting when Gosling was pontificating), it can be hard to keep up.

Java 2 means JDK versions 1.2 and above, including the current 1.3 JDK and the beta 1.4 JDK. From outward appearances, Java 2 was primarily about adding a lot more APIs to the Java library. Some of these APIS, such as Swing (JFC) and Collections, could be added to JDK 1.1 versions by downloading them.

Aside from the new APIs, Java 2 also included the HotSpot compiler. HotSpot is used to take Java code and convert it into native code on the fly. It uses sophisticated algorithms to control what is and isn't compiled into native code. Hotspot has really started to mature, and anyone who compares JDK 1.1 to JDK 1.3 and 1.4 beta will see a significant performance difference.

Java 2 also marked the point where Java really became a mature platform with the inclusion of new APIs, increased performance, and new Enterprise level features.

If you're new to Java and don't have to program for Mac OS 9.2.1 or below, focus on Java 2. If you need to support Mac OS 9.2.1, get a detailed understanding of API changes and such.
 
call me a bigot if you like but I don't consider PC (mac or windows) serious programming. Sure you can do fantastic things on these platforms but its just not where you write serious code.

I work for enterprises. I write serious sized applications on very serious hardware.

If you read what I said:
If you want a real UNIX job and you don't know C don't come knocking on my door.

If you DONT want a real UNIX job then do what you like.

If you own mac osx and you don't wanna get into the UNIX side of it then you don't understand why OSX is very very cool. And you might as well stick to OS9 cause its a better GUI operating system at the moment (yes even after X.1) or switch to windows.

To get into the UNIX side of macosx you should get to know C. Java is not a factor.

And as for Java being unstoppable.... hrmm we will see. The hype is wearing off.... C# is here to compete... we will see.
 
Originally posted by mrjohns
Basically largish development teams write code as individuals. They don't generally know what classes johnny has to do what and in the end it just seems easier to write your own. Or you hear about someones class that does something and you want to change it to do something else, You spend the rest of the day searching through header files trace what these damn objects do... in the end you give up and write your own class. In the end there is 15 million different classes all of which the people who didn't write them has no idea what the do and how they work. unmaintainable. Very few people have the skill to write clean good OO. When people use function overloading, virtual class's template class's, multiple inheritance etc etc all very handy things to the person that understands the code and has a map in his mind of how it all fits together. But this is bad for a team of programmers who all have to work in the code.

The same can be said about structured programming code too but to a lesser extent. see obfiscated C contest.

Its alot easier to write crap OO than crap structured code.

Well, a lot of the arguments you bring up are valid, but are related to a generally uncohesive team, lack of design ahead of time (I'm not design crazy, but defining public APIs upfront helps OOP work a lot better), or not using the tools available. That is, many of those things you mention go wrong, but shouldn't.

For instance, Java provides Javadoc which, when used properly, eliminates searching through code to find out what objects do. That kills searching through header files. The contract for the API is all there, hopefully the programmer used some sensible naming scheme for their objects and methods. ;-)

Large teams will write code as individuals (unless they are into extreme programming, which I'm not sold on), but that doesn't mean they shouldn't define APIs as a group before hand. Example, we agree Johhny is writing the checking account code and we need a deduction method/function/procedure. I don't care what's inside that method, I just need to know the contract for the method/function/procedure. What do I need to supply to his code and what can I expect back?

I agree that OOP seems to be difficult for many. I find it quite natrual myself, but can still handle procedural C code. Only thing I hate programming is SQL code for relational database stuff.
 
Originally posted by mrjohns
call me a bigot if you like but I don't consider PC (mac or windows) serious programming. Sure you can do fantastic things on these platforms but its just not where you write serious code.

I work for enterprises. I write serious sized applications on very serious hardware.

If you read what I said:


If you DONT want a real UNIX job then do what you like.

If you own mac osx and you don't wanna get into the UNIX side of it then you don't understand why OSX is very very cool. And you might as well stick to OS9 cause its a better GUI operating system at the moment (yes even after X.1) or switch to windows.

To get into the UNIX side of macosx you should get to know C. Java is not a factor.

And as for Java being unstoppable.... hrmm we will see. The hype is wearing off.... C# is here to compete... we will see.

Serious code can be written on any platform. It's not about the platform at all. At one time, some very serious and tight code was written on Apple II computers. Apple II programmers, and I used to be one when young, knew how to push the limits of the hardware like most new programmers cannot understand today. They didn't have the luxury of "add more memory".

Believe me, I understand the technology under the hood of Mac OS X and why it's cool. That doesn't mean I intend to program it as if it was a Solaris or IRIX box. I code stuff that people see for the most part (interactive stuff), and when I'm doing backend stuff I can still use Java for servlets and JSP (an area where Java really signs is server side stuff).

As a side note, I disagree that the OS 9 GUI is better than OS X 10.1. Although I have always been a Mac guy at heart, I would have never spent $3,000 on a Mac if it wasn't for the beautiful new Aqua interface. That's what caused me to leave Linux behind.

I don't think I claimed Java was unstoppable. I did say it wasn't going away any time soon. Yes, the hype is wearing off, but the programmers aren't going away. Look into the continued growth rate of Java conferences, even in this down year for the industry. Hype should go away with maturity.

C#, I perdict it's dead out of the gate unless there really are that many people in the world who can't see beyond Microsoft.
 
Back
Top