<font><font>I'd like to say that I pretty much hate Java as well, however, I give it credit where credit is due.
@Savior
You are really attacking this the wrong way. If you want to vent, fine, but do some research man!
Poorly written applications aren't the fault of the language if the
programmers do a bad job. Take a look at Teamspeak. It's written in
Java and works pretty well. You don't even need the JVM installed! Yo
Ho Ho Pirates is a Java game that performs really well for using 2D
graphics in Java.
</font></font><font><font>A. Westhauser
This guy needs to stop whining. If
he's going to bash Java, he needs to come up with some valid
complaints, instead of resorting to name calling and the like. He
points his finger at things that both Java and .Net have in common, but
then falls back to .Net as an example!
John Carmack doesn't hate Java. He had a bad experience with Java on
cell phones, which is a very hardware dependent group of platforms
(standards? ha!). Cell phone development is still very immature, you
can't reasonably blame Java or Brew for their shortcommings this early
on.
Right now I write my code on a PC, and then I FTP the stuff over to a
Sun machine. Runs 100% ok, no hitches at all. I just make sure my JVM's
match and I'm good to go. Don't like different VM versions running
around? Wait til 2.0 of .Net comes out, you'll have the same thing.
As for Swing, non-religious Java programmers will admit that it's
clunky and slow. Most of the time this can be sped up by taking code
out of your events though. I think Java is getting away from the
desktop stuff, and moving to high end web development.
I use Java at work everyday. I hate it, but I realize it has strengths.
I really like the .Net stuff, but I'll admit that the differences are
very small.
Here's some things I don't like:
Multiple Inheritence - From a C++ background, this is very useful to
me. Java I can compose some pretty powerful classes, but only implement
the code for specific interfaces once. Java (and C# as well) allows
inheriting one class, and indefinite amount of interfaces (which you
must implement). I feel that this makes you duplicate code if you want
an interface to have a common/default implementation.
JavaBeans - This isn't so much Java's fault as a language, but a part
of the Sun. This is a good example of an anti-pattern IMO. Throw your
data in, pass the bean, pull it out. Simple, right? Wait, you forgot to
give it a variable or two? Hurray for catching errors in runtime! At
work, I see Javabeans as an assistant to ORM (which could be done
better with a hashtable) and to pass data from one section to the
others (Look Ma! No parameters!). Java doesn't force you to use beans,
so the point is moot.
It's slow - I hear this complaint a lot. I do gave development, so for
me, it IS slow, but then again it's the wrong tool for the job in that
case. For desktop/web development, it's good enough. It's a balance
between programming time and processor time. .Net will have the same
problems here.
OOP - It's completely shoved down your throat (same with .Net). Hello
World shouldn't have a class in it. At work I have some older code, and
it's all OOP, but it's still writen procedurally. Classes just serve as
namespaces. Is OOP bad? Should we do everything procedurally? Of course
not. However, if I want to make a simple program that parses some text
or something, I don't need a huge class hierarchy. I just need a
function or tow. I realize it's a hard and fast rule to make things
more simple, but I vent either way.
The libraries treat me like an idiot - Maybe this is better for when
you have a big team of developers and they can't stumble over each
other, and tight order must be maintained. However, it would be nice to
have an easier way to open files for text reading, for example. If Java
could take some tools that are pretty much required in any medium size
project and stuff them in the core library, that would be great. As it
stands right now, I have to include a library just to parse XML. If I'm
going to use a high level language, it means I don't have time to dick
around. I just want to glue stuff together and call it a program.
With all of this in mind, do I think people should never use Java? Of
course not. It's served many people well over the years. It's come a
long way too. I really like how they recently came out with generics.
As a finishing note, if someone would like to show me a good way to use
JavaBeans, I'm all ears. Until then, it's filed in my anti-patterns
section (: I'm open to discussion on any of my points. I think you'll
agree that there are problems with any language. They are tools. Like
it was said above, you don't use a hammer to put screws in something.
</font></font>
SurfaceTension
@SurfaceTension
Best posts made by SurfaceTension
-
RE: The "I hate Java club"?
Latest posts made by SurfaceTension
-
RE: Too much of a good thing?
I agree with dhromed
on comments. Providing a quick outline of a function can really help
clear things up. When I'm starting to write a function, sometimes I'll
write the comments first as steps, and then I'll fill those steps in
with code. It can make for a very easy time coding, plus your docs stay
in sync on your first write.
If it were up to me, ALL documentation would be in the code. Tools like
doxygen are so helpful for building your docs from the comments, and it
seems like a hassle to do it any other way, as both code and
documentation are right at your fingertips as you do your work.
</span>
-
RE: Is IsNothing() really a wtf in theory?
@travisowens said:
PRIVATE FUNCTION IsNothing(Obj)
IF Obj Is Nothing THEN
IsNothing = TRUE
ELSE
IsNothing = FALSE
END IF
END FUNCTION
This is... horrible idea.
What do you gain from writing this method? Do you hate the syntax of
"if (myObject is nothing) ..." ? I think it's a WTF because you're
wrapping functionality that exists as a readible one-liner. As
mentioned, someone could come in and really mess with what IsNothing()
does, which makes it decievingly ambigious with the "is nothing"
built-in comparison. If the compiler wasn't smart, you'd also be
de-optimizing your code. You call IsNothing(), it checks the variable
and returns the output, then your code must check the output. If you
left it alone with the normal "is nothing", it would simply check the
variable and be done with it there.
With methods like this, you might as well have the other stuff we've seen on the boards like IsTrue() and IsFalse().
-
RE: The "I hate Java club"?
<font><font>I'd like to say that I pretty much hate Java as well, however, I give it credit where credit is due.
@Savior
You are really attacking this the wrong way. If you want to vent, fine, but do some research man!
Poorly written applications aren't the fault of the language if the
programmers do a bad job. Take a look at Teamspeak. It's written in
Java and works pretty well. You don't even need the JVM installed! Yo
Ho Ho Pirates is a Java game that performs really well for using 2D
graphics in Java.
</font></font><font><font>A. Westhauser
This guy needs to stop whining. If
he's going to bash Java, he needs to come up with some valid
complaints, instead of resorting to name calling and the like. He
points his finger at things that both Java and .Net have in common, but
then falls back to .Net as an example!
John Carmack doesn't hate Java. He had a bad experience with Java on
cell phones, which is a very hardware dependent group of platforms
(standards? ha!). Cell phone development is still very immature, you
can't reasonably blame Java or Brew for their shortcommings this early
on.
Right now I write my code on a PC, and then I FTP the stuff over to a
Sun machine. Runs 100% ok, no hitches at all. I just make sure my JVM's
match and I'm good to go. Don't like different VM versions running
around? Wait til 2.0 of .Net comes out, you'll have the same thing.
As for Swing, non-religious Java programmers will admit that it's
clunky and slow. Most of the time this can be sped up by taking code
out of your events though. I think Java is getting away from the
desktop stuff, and moving to high end web development.
I use Java at work everyday. I hate it, but I realize it has strengths.
I really like the .Net stuff, but I'll admit that the differences are
very small.
Here's some things I don't like:
Multiple Inheritence - From a C++ background, this is very useful to
me. Java I can compose some pretty powerful classes, but only implement
the code for specific interfaces once. Java (and C# as well) allows
inheriting one class, and indefinite amount of interfaces (which you
must implement). I feel that this makes you duplicate code if you want
an interface to have a common/default implementation.
JavaBeans - This isn't so much Java's fault as a language, but a part
of the Sun. This is a good example of an anti-pattern IMO. Throw your
data in, pass the bean, pull it out. Simple, right? Wait, you forgot to
give it a variable or two? Hurray for catching errors in runtime! At
work, I see Javabeans as an assistant to ORM (which could be done
better with a hashtable) and to pass data from one section to the
others (Look Ma! No parameters!). Java doesn't force you to use beans,
so the point is moot.
It's slow - I hear this complaint a lot. I do gave development, so for
me, it IS slow, but then again it's the wrong tool for the job in that
case. For desktop/web development, it's good enough. It's a balance
between programming time and processor time. .Net will have the same
problems here.
OOP - It's completely shoved down your throat (same with .Net). Hello
World shouldn't have a class in it. At work I have some older code, and
it's all OOP, but it's still writen procedurally. Classes just serve as
namespaces. Is OOP bad? Should we do everything procedurally? Of course
not. However, if I want to make a simple program that parses some text
or something, I don't need a huge class hierarchy. I just need a
function or tow. I realize it's a hard and fast rule to make things
more simple, but I vent either way.
The libraries treat me like an idiot - Maybe this is better for when
you have a big team of developers and they can't stumble over each
other, and tight order must be maintained. However, it would be nice to
have an easier way to open files for text reading, for example. If Java
could take some tools that are pretty much required in any medium size
project and stuff them in the core library, that would be great. As it
stands right now, I have to include a library just to parse XML. If I'm
going to use a high level language, it means I don't have time to dick
around. I just want to glue stuff together and call it a program.
With all of this in mind, do I think people should never use Java? Of
course not. It's served many people well over the years. It's come a
long way too. I really like how they recently came out with generics.
As a finishing note, if someone would like to show me a good way to use
JavaBeans, I'm all ears. Until then, it's filed in my anti-patterns
section (: I'm open to discussion on any of my points. I think you'll
agree that there are problems with any language. They are tools. Like
it was said above, you don't use a hammer to put screws in something.
</font></font> -
RE: Deduplication Standards
You could geocode a street address. I think those give you back a
validated response if the geocode goes through. If it doesn't go
through, it needs fixing anyways d: -
RE: Resize desktop in c#.net?
To keep other windows from maximizing over your window, take your
parent form and set the AlwaysOnTop property to true. As far as forcing
other windows to conform to some size constraint that you specify, I
don't think it's possible short of changing the resolution of the
desktop, but that's not really what you want, is it?
-
RE: Argument of using boolean datatype...
I don't have a lot of experience with the various databases out there,
but I could have swore I saw at least one with a 'bit' field type. Can
any SQL junkies comment on this? -
RE: States.
@AJR said:
I'd say your cow-orkers should go back to orking
their cows, and let sane people like you look after things [;)]
I wish this was possible!
I've been put in a similar situation. I'm taking the stance of saying
"we could do this", and maybe try to defend it (if it gets reasonably
shot down, great, it wasn't a good idea to begin with), but if they
oppose it for "just because" type reasons and the like, I just step
back and let them fly the application straight into the ground. It's
hard to get fired for doing what you're told.
I'm not really sure if that's a good long term solution or not, but
having to maintain and clean up someone else's mess does give us job
security d:
-
RE: Best practices...?
Yes, you can use singletons inside of ASP.Net. How exactly do you
validate this language code? Is it parsed within the text itself?
How to make a singleton:
Inside the class you want to make a singleton, create a static reference to that class.
Create a protected or private constructor for that class.
Create a public static method that returns the singleton class.
Here's where things vary a bit. Some programmers like to create methods
that are used specifically for creating, using, and destroying the
singleton instance. I prefer to create it when I first use it, but
there is no silver bullet for it. Use your judgement here.
Example:
class Singleton
{
private static Singleton _instance;
private Singleton() {}
public static GetInstance() {
if (_instance != null)
{
_instance = new Singleton();
}
return _instance;
}
}
All of your other methods can be non static, but you have static access to everything.
Example:
Singleton.GetInstance().DoSomething();
If your ASP.Net code uses the VB version of .net, you can do that as well, but I'm not as familiar with the syntax.