• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help my java instructor is an Ahole !!

I have taken a VB.net course with a great professorI know and everything went so smoothly my questions were being met with a nice style and illustrations, but now I want to learn Java and I am taking an introductory course to java and the professor that I have now is a complete a$$hole he never answers questions, but when he does he just gives you a circular definition he is annoying everyone, and I am pissed that he is teaching all the sections for java this semester , so I would like to know if anyone here that have learned java / still learning java can guide me to a nice website with a fair amount of illustrations and examples so I can get through this semester with a good background in Java.
Also any hints and tips about learning Java from personal experience are appreciated

And thank you in advance.
 
Java = erection for objects

I always hated Java until the whole idea of the object oriented paradigm hit me. Now I love Java.

Sun has a good set of tutorials if you re willing to read.

Remeber - everything is an object. All objects have attributes.

When all else fails declare it as static.

 
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.

That said, read the Sun tutorials and pick up O'Reilly's Learning Java and Bruce Eckel's Thinking in Java. Those resources plus the excellent Java API documentation should get you through.
 
There is quite a jump from procedural to OO languages though. It took me a while to 'get' it at the time.
 
Originally posted by: znaps
There is quite a jump from procedural to OO languages though. It took me a while to 'get' it at the time.
I somewhat agree, though used properly (without religious fanaticism) an object is really just a way to bundle up functions and a set of data that belong together, with the added trick of inheritance for specialization.

So anyone who started with procedural programming that learned to use and group functions and to create structures when appropriate is already halfway to making OOPlarity ensue.

 
Originally posted by: MrChad
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.
I guess that raises the question of whether VB is a real language or not 😛
 
Originally posted by: n0cmonkey
How's the course book? Any chance of making a Java study group or something?

The course book sucks it's called Java Java Java by morelli 2nd edition the professor never used the book in class and never means never he tells us to follow along in the book in accordance with his lectures, I can't see anything useful in the book it's not friendly and has zero illustrations the code isn't broken down into main ideas it's just hard code plain and simple.

Study groups are not possible due to conflicting scheduels with classmates.

Originally posted by: MrChad
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.

That said, read the Sun tutorials and pick up O'Reilly's Learning Java and Bruce Eckel's Thinking in Java. Those resources plus the excellent Java API documentation should get you through.


Yes the O'reilly is a good idea I will be ebaying for that ASAP.

Originally posted by: znaps
There is quite a jump from procedural to OO languages though. It took me a while to 'get' it at the time.


I feel you, I had a very nice experience learning how to program in VB.net 2003 I was in a matter of half a semester able to creat my own windows apps and alot of them weren't just for fun or practice, I was using them to save my self some time on procedures that require the same type of calculations over and over, but Java doesn't look that way to me and building a window app in it doesn't sound like a fun idea to me, the IDE eclipse is kind of retarded compared to Visual Studio.net , and in Java simple mistakes such as system.out instead of System.out cause a crash, while in VB which will detect similar errors and correct them automatically.
 
Originally posted by: MrChad
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.

That said, read the Sun tutorials and pick up O'Reilly's Learning Java and Bruce Eckel's Thinking in Java. Those resources plus the excellent Java API documentation should get you through.

I agree. If you've successfully completed a VB.NET course, picking up Java shouldn't be too bad. It's more complicated, but only because (I think) the .NET platform is a little more programmer-friendly.

Pick up the two books MrChad recommended as well as reading Sun's tutorials (which might be overkill after reading the books), and you'll be ahead of most of the professionals 😉 .
 
Are you all using websphere ? I actually prefer java in websphere 5.1 to VB.net anyday ! (I have 2 semesters of java under my belt)
 
Originally posted by: The Linuxator
... and in Java simple mistakes such as system.out instead of System.out cause a crash, while in VB which will detect similar errors and correct them automatically.
The majority of languages that I've ever worked in have been case sensitive. Better get used to it. And it doesn't crash, it just fails to compile.
 
Originally posted by: jm0ris0n
Are you all using websphere ? I actually prefer java in websphere 5.1 to VB.net anyday ! (I have 2 semesters of java under my belt)

Well, if you're referring to Webshere Application Developer 5.1, it's based on Eclipse. And I agree - many coders who do both .NET and Java prefer Eclipse to VS.NET (u said VB.net but I'm assuming you meant VS.net) 😛
 
Originally posted by: MrChad
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.

Sort of. But if you started by learning VB.NET, you're going to have issues with C++. While the basis is the same, but with a language so simple you may not even get the fundamentals of programming. VB.NET looks like English sometimes. It really depends on how you code it and how advanced you're talking about. I think VB.NET is more like a script in style. For example:

MessageBox.Show("Text here")

I'm willing to bet you some people don't know that Show is a function of the MessageBox object. They just think there's a period inbetween the two words. When you're good at VB.NET, you won't have too many problems though, unless we're talking about garbage collecting which the .NET CLR does all for you whereas C++ does not.
 
Originally posted by: xtknight
Originally posted by: MrChad
A programming language is a programming language. Once you understand the basics of how to program, you should be able to learn almost any language on your own.

Sort of. But if you started by learning VB.NET, you're going to have issues with C++. While the basis is the same, but with a language so simple you may not even get the fundamentals of programming. VB.NET looks like English sometimes. It really depends on how you code it and how advanced you're talking about. I think VB.NET is more like a script in style. For example:

MessageBox.Show("Text here")

I'm willing to bet you some people don't know that Show is a function of the MessageBox object. They just think there's a period inbetween the two words. When you're good at VB.NET, you won't have too many problems though, unless we're talking about garbage collecting which the .NET CLR does all for you whereas C++ does not.

That's true. I think it's unfortunate that many college programs are teaching their introductory courses in managed languages like .NET and Java. C++ is more difficult to grasp, but the fundamental skills you learn (memory management, pointers, etc.) are invaluable and make you appreciate just how nice managed languages are. 😉
 
Originally posted by: MrChad
That's true. I think it's unfortunate that many college programs are teaching their introductory courses in managed languages like .NET and Java. C++ is more difficult to grasp, but the fundamental skills you learn (memory management, pointers, etc.) are invaluable and make you appreciate just how nice managed languages are. 😉

It's what separates the boys from the men. I still don't appreciate managed languages that much, and my dad, a veteran C'er and brother who uses assembly frequently, hate them as well. I like to do things my own way. It's impossible to write any real-time program in a managed language. It's slow as molasses. I quickly realized this in my supersampling program (recent thread on here). You may find me writing one just to test a concept (because I want to make it QUICK to see if my idea works), but never will I use it in a "final draft". Infact I don't even like C++ that much. I like good old C. Easy to read and it gets the job done. The final draft goes something along the lines of C with inline SSE optimizations, if I ever get there. 😛

You won't be surprised I also hate bloated web services and content management systems. Then again I hate a lot of things...

I'm glad C/C++ is still the standard, and I hope that never changes to be honest.

If I were a professor, I'd first torture my students with the managed languages then move them to a real language like C. 🙂

VB.NET is good for simple programs like a weather forecast program I made in half an hour. All it did was interpret the HTML from weather.com and grab the image for weather. Something along the lines of PictureBox1.URL="http://....gif" Come on, that's way too easy.

After all this I'm going to put on my flame-retardant suit. Sorry I went off on a tangent there, tihs really has nothing to do with Java.
 
Originally posted by: xtknight
I'm glad C/C++ is still the standard, and I hope that never changes to be honest.

After all this I'm going to put on my flame-retardant suit. Sorry I went off on a tangent there, tihs really has nothing to do with Java.
I'll take the first shot 🙂

I don't see how c/c++ is "the standard". For the majority of applications programming they're just painful and really not appropriate. If you're doing anything on the desktop in windows you're going to be using .NET or possibly something as old as Delphi (before Borland got into .NET). If you're on the web you'll be using .NET or java. I can't imagine the hideousness of trying to make a large, secure web application in c++, although I hear they used to do it 😛 Btw, I'm still in university but I've been doing coop/intern positions in this area for the last 3 years or so.

I realize you're talking about a different area of programming than me and to be honest, I expect c/c++ will last longer in it's area than java will in it's area. I just wanted to flame you for making such a blanket statement 😉
 
Originally posted by: kamper
I realize you're talking about a different area of programming than me and to be honest, I expect c/c++ will last longer in it's area than java will in it's area. I just wanted to flame you for making such a blanket statement 😉

It's fine...it's constructive criticism not flaming (OMGWTFBBQNOOBSPACEODDYSEY2001).

I don't see many .NET apps today. Tons of freeware apps are all still C++. .NET apps I can think of?

Sony SoundForge/Vegas (I think)
ATI CCC
mencoder and avi.NET off the doom9 forums
in Microsoft SDKs
...
?

If you're skilled enough, you can make a large secure web app in C++. It shouldn't be that hard. I don't know why you consider C++ insecure unless you're talking about the buffer overflows which XP SP2 fixes with the NX bit emulation (if you don't already have an NX CPU). Lets say the errors are a little prettier in .NET than C++'s illegal operation greeting, but it pays off for speed. I want a web site my end-users will enjoy, not sit there and wait while the .NET machine chugs out a mess of code.

I view .NET as training wheels (virtual machine) for amatuer programmers (including me). There's a reason nothing real-time is made in .NET. Not even the higher-level GUI of Windows! I hate slow web servers.

I hate cliches, but we can agree to disagree.
 
We can agree to disagree, but there's a few things I want to point out...

Originally posted by: xtknight
Originally posted by: kamper
I realize you're talking about a different area of programming than me and to be honest, I expect c/c++ will last longer in it's area than java will in it's area. I just wanted to flame you for making such a blanket statement 😉

It's fine...it's constructive criticism not flaming (OMGWTFBBQNOOBSPACEODDYSEY2001).

I don't see many .NET apps today. Tons of freeware apps are all still C++. .NET apps I can think of?
No, .NET doesn't seem to have a great open source community. Java's is much better though. But I think that in the grand scheme of things, the open source community is pretty far behind the business community when it comes to adopting the next generation of languages. Microsoft is on an excellent path with .NET in many ways and I can only hope that things like mono and the free java implementations improve and gain more acceptance.
Sony SoundForge/Vegas (I think)
ATI CCC
mencoder and avi.NET off the doom9 forums
in Microsoft SDKs
...
?

If you're skilled enough, you can make a large secure web app in C++. It shouldn't be that hard. I don't know why you consider C++ insecure unless you're talking about the buffer overflows which XP SP2 fixes with the NX bit emulation (if you don't already have an NX CPU).
Nobody in their right mind is going to start a business oriented web application in c++. The ideas of raw pointers, unsafe typecasts and unchecked buffers are just painful and there's no way you want to let a team of average programmers loose on that when there's better alternatives. It'll cost you in security and it'll cost you in development time. Besides which (and as a direct side-effect), java and .net have far, far better toolsets available for building data moving applications.
Lets say the errors are a little prettier in .NET than C++'s illegal operation greeting, but it pays off for speed. I want a web site my end-users will enjoy, not sit there and wait while the .NET machine chugs out a mess of code.
That's a silly myth. Yes, managed languages have a higher initial startup time and memory usage, but once a server application gets running, there is very little difference. When it comes to pure crunching, managed languages are already very close to the performance of pure machine code because the JIT compilers can do much smarter optimization than a one time compiler. Things like instruction set usage, optimizing to the cache size, inlining methods, and analyzing actual logic flow in real time where a one time compiler can only make a guess. As the technology progresses, managed languages will be faster.
I view .NET as training wheels (virtual machine) for amatuer programmers (including me). There's a reason nothing real-time is made in .NET. Not even the higher-level GUI of Windows! I hate slow web servers.
Of course, there will continue to be many applications for which managed languages are innapropriate. But there's a huge section of the market for which they are much, much better.

Do you find anandtech to be a slow web server? Given the insane amount of traffic, I think it performs exceptionally well.
I hate cliches, but we can agree to disagree.

 
Originally posted by: kamper
That's a silly myth.

It's not a myth. It's the truth and unmanaged languages will always be faster because they don't have to catch exceptions on everything. The amount of speed difference may get down fairly low though. Isn't .NET basically a script that runs on a virtual machine, or is it actually compiled?

I find Anandtech to be fine, but I've seen my share of yawn sites. Whether it's because of .NET or if the slow sites I'm talking about even use .NET I don't know, but I highly suspect it.

.NET doesn't seem as bad as some PHP/Postnuke sites. 90% of Postnuke sites are god-awful (relatively).

If you know what you're doing, C isn't dangerous. There are so many programs coded in C. I don't think you'll see Adobe converting Photoshop's image processing functions to .NET any time soon.

I'll tell you what, I'll write the same program in C (using VS2005 8.0 C compiler) as I do in VB.NET 2005 Express then report the results. I'll use ticks to measure time. This will just be a big loop increasing i. I'll see if it's worth my time to convert my program to C. Maybe this will change my mind, or maybe it will further prove my point.

I'll do it in a few...I'm off to Battlefield 2 on 64-bit for the moment. 😀
 
Originally posted by: xtknight
Originally posted by: kamper
That's a silly myth.

It's not a myth. It's the truth and unmanaged languages will always be faster because they don't have to catch exceptions on everything. The amount of speed difference may get down fairly low though. Isn't .NET basically a script that runs on a virtual machine, or is it actually compiled?

I find Anandtech to be fine, but I've seen my share of yawn sites. Whether it's because of .NET or if the slow sites I'm talking about even use .NET I don't know, but I highly suspect it.

.NET doesn't seem as bad as some PHP/Postnuke sites. 90% of Postnuke sites are god-awful.

If you know what you're doing, C isn't dangerous. There are so many programs coded in C. I don't think you'll see Adobe converting Photoshop's image processing functions to .NET any time soon.

I'll tell you what, I'll write the same program in C (using VS2005 8.0 C compiler) as I do in VB.NET 2005 Express then report the results. I'll use ticks to measure time. This will just be a big loop increasing i. I'll see if it's worth my time to convert my program to C.

I'm interested to see your results...

I'll give my f''(x^.02) cents... I'm not much of a programmer (I did know a ton of C++, but haven't done anything in years) but I feel like I've noticed a trend particularly in apps coded in C/C++ and apps coded in Java. I can't exactly put my finger on it, but the Java apps just seem slower, less responsive, and just don't feel "right." I often dig around on Sourceforge.net and at this point I pretty much avoid anything billed as written in Java like the plague. To the contrary, C/C++ apps just feel better.

I don't know, however, if this is all actually due to the language or the fact that the experienced/veteran programmers are more confortable with C/C++. At this point however, I give preference to C/C++ written apps and hope that it remains the dominant language.
 
Originally posted by: Brazen
I'll give my f''(x^.02) cents... I'm not much of a programmer (I did know a ton of C++, but haven't done anything in years) but I feel like I've noticed a trend particularly in apps coded in C/C++ and apps coded in Java. I can't exactly put my finger on it, but the Java apps just seem slower, less responsive, and just don't feel "right." I often dig around on Sourceforge.net and at this point I pretty much avoid anything billed as written in Java like the plague. To the contrary, C/C++ apps just feel better.

lol, don't let me get started on Java. 🙂
 
Originally posted by: xtknight
Originally posted by: kamper
That's a silly myth.

It's not a myth. It's the truth and unmanaged languages will always be faster because they don't have to catch exceptions on everything.
Exceptions only cost you when you throw them. Besides which, c++ has exceptions. Are you suggesting we stick with just c forever then?
The amount of speed difference may get down fairly low though. Isn't .NET basically a script that runs on a virtual machine, or is it actually compiled?
I don't know the internals of .NET (and I don't think it's actually a contractual part of the platform) but I'll give a little run down on how a java runtime might work. I suspect a .net implementation would operate similarly.

So first you compile your code to byte-code. This is is sort of like assembler for the virtual machine, but it's not necessarily optimized. At runtime, the virtual machine loads this code and can do a number of things with it. At the simplest, it will work like an interpreter, just reading the byte code and executing actions on behalf of your program. Of course, that's really slow because it requires re-interpretation every time something is executed.

The vm might start by interpreting all code and then noticing when stuff gets executed multiple times. That code it will then compile into native machine code and store it so that it can be run again at no cost next time. There might be several levels of compilation, each with more agressive optimization. More optimization takes more compilation time so only code that runs very frequently is given (and needs) the highest level.

A vm can perform much more agressive optimizations than a one time compiler because it knows certain things that won't change. It knows the cache size, it knows which methods are worth inlining (because it's observed them being run many times), it doesn't have to worry about portability at all and it can unroll as many loops as it likes because it'll only cost a little extra memory. Furthermore, if the data being processed changes over time and the current optimizations become no longer ideal, the vm can just toss what it's done and reoptimize.
I find Anandtech to be fine, but I've seen my share of yawn sites. Whether it's because of .NET or if the slow sites I'm talking about even use .NET I don't know, but I highly suspect it.
That's pretty weak. Seriously, a .NET or java written site, as a baseline, can return a page just as fast as anything else. If you notice a slow site, it's more likely the fault of the developer. Anyways, you can tell pretty easily what a site is running as .NET sites will almost always use the .aspx extension.
.NET doesn't seem as bad as some PHP/Postnuke sites. 90% of Postnuke sites are god-awful (relatively).
Point in case.
If you know what you're doing, C isn't dangerous. There are so many programs coded in C. I don't think you'll see Adobe converting Photoshop's image processing functions to .NET any time soon.
Of course c is dangerous. How many systems do you know that are really free from buffer overflow vulnerabilities or any of the other stuff that can be done when you have direct access to a processor. No offence, but you've obviously never worked on a team of paid programmers doing business applications. Paid being the operative word there, because employers don't want to shell out for the extra time it takes you to get it right in C, plus the extra time you'll spend debugging mysterious errors. If the .net/java app happens to be a bit slower, it's far cheaper to pay for more beefed up hardware than for extra programming hours.

No photoshop probably won't be changed, but remember that adobe has a huge investment in that code and has little reason to change it. They also have to worry about portability to macs and they probably have linux in the back of their minds. But really, I wouldn't be surprised if they, or others, did start writing more in .net.
I'll tell you what, I'll write the same program in C (using VS2005 8.0 C compiler) as I do in VB.NET 2005 Express then report the results. I'll use ticks to measure time. This will just be a big loop increasing i. I'll see if it's worth my time to convert my program to C. Maybe this will change my mind, or maybe it will further prove my point.

I'll do it in a few...I'm off to Battlefield 2 on 64-bit for the moment. 😀
Even if performance was always a concern for managed languages, it's still where the world is going because development is way easier and way safer.
 
Originally posted by: kamper
No offence, but you've obviously never worked on a team of paid programmers doing business applications. Paid being the operative word there, because employers don't want to shell out for the extra time it takes you to get it right in C, plus the extra time you'll spend debugging mysterious errors. If the .net/java app happens to be a bit slower, it's far cheaper to pay for more beefed up hardware than for extra programming hours.

No, I haven't. I'm far from knowing a decent amount of C/C++. I'm going off my personal observations of .NET.

Even if performance was always a concern for managed languages, it's still where the world is going because development is way easier and way safer.

I agree strongly with Brazen's post. Java programs always seem slow to me, and I do avoid them like the plague. Maybe it's just the GUI or the placebo effect.

I plan on testing a whole array of languages for speed. I'll update my thread shortly with new slightly more accurate results using QueryPerformanceTimer and VC7.1 Optimizing Compiler. My previous results were with VC8.0 Nonoptimizing compiler. You're saying that, in best case scenario, the VB.NET code will be faster than the optimized C++ code because the VM can optimize better?

I don't have an axe to grind with .NET, but I still think it should be avoided for "real" code (that actually performs something vs. GUI code). I love it for simplicity.
 
Back
Top