Heh… Not sure why it would do that. Code of that size should compile almost instantaneously.
If I can make a suggestion - download and install Eclipse. It is in my honest opinion the absolutely best Java IDE you can get - and it’s free.
One of the great features of Eclipse is that it compiles your code as you type. When you make a mistake, it will flag the faulty line (using a mark on the margin). If you click on it it will recommend a solution for you. So, for example it can surround your code in try-catch block, declare thrown extensions, insert appropriate import statements and etc… As soon as you finish typing a line, the code is compiled and ready to go - and it does it so seamlessly that I was able to run it on my ancient 160MHz laptop with only 256 MB of RAM without feeling any slowdowns.
Btw, what do you use for code highlighting? Is it a Wordpress plugin? Which one?
Java doesn’t compile to a native executable, it compiles to an intermediate bytecode so all the processing actually has to be handled by the compiler rather than being able to fob off a load of work onto the CPU, and the compiler uses the Java runtime, so effectively every time you compile java code, you’re running a java programme (this is simplified).
Eclipse is a fine IDE if you have the RAM for it. Otherwise just use your favourite syntax-highlighting editor and learn what you’re actually doing
I will give Eclipse a try - it is seriously pimped by IBM (but I am suspicious of the heavy IDE… I’ve already ditched Dreamweaver and don’t really want to go down that route again )
I think it might be slow because the compiler for Java might be a little bulkier than gcc, and so the wait may be it being loaded into the RAM. It’s only a second, but you feel it when you’ve been using gcc.
The constant-compiling does sound rather cool, although I do love my TextEdit and hotkey compiling with tooltip Terminal readouts. I might actually do a screencast on that one, too.
Phil - that machine was running Debian with Fluxbox and a very stripped down OS optimized for performance. Eclipse was running at about the same speed as Firefox or OpenOffice.org on that machine - show. But, it was bearable. It actually performed much better than most of the Swing based Java apps that I have tried.
But yeah, if you are not a big IDE person then it might nor be good for you. I mean, I did a fair share of coding using just vi. Hell, I knew a guy who refused to use anything but Emacs for all his coding. I guess it’s a matter of personal preference.
But IMHO, a nice IDE can really make things easier and faster for you.
Luke, you seem to sound like you think Emacs is a strange thing to use! Emacs is a full-featured IDE, although fairly crusty and idiosyncratic at times. I know a few people, including myself, who use Emacs for all our coding, except Objective-C which I do in Xcode.
Saying that, if I was starting now, I’d probably learn Eclipse instead. It’s just that I’ve been using Emacs since 1995, and I’m so invested in it, it would be hard to change over now.
I think that Emacs is awesome. I have nothing for utmost respect for the Emacs hackers out there. What I’m saying is that today, Emacs is a little bit counter intuitive at first, and not easy to pick up for some people. As a result relatively few people use it as their main development editor of choice.
Those who do however, are either old school programmers with tons of experience, or people who took time to learn Emacs because they realized it’s potential. If you are hiring developers, I would say that most of the time the Emacs user it would be a better hire than an eclipse or netbeans jokey.
But, if you are learning a new language having an IDE that can detect errors and suggest how to fix them as you type is a really nice thing to have. This is why I recommended eclipse.
Personally, given a choice between using Eclipse and Emacs I would choose Eclipse because I know I would be more productive with it. But an Emacs user can be equally productive or even more productive than me. It’s all about what you are used to, and what makes writing code easier for you.
Nice discussion , and i was just dropping by , your way and here is what i am giving you , from my experience .
Initially , a first time java programmer , should use the best coding utility on the planet for programming , namely the Notepad .
it is barely minimal and thus lets you to learn the language better than anyother IDE .
Java compiles so slow , because the whole of the Java Runtime Environment(JRE) , has to be loaded in order to compile the java code into bytecodes .
Actually , the JRE , in itself is a Virtual machine , and thus bytecodes are native code for that VM .
And fintan , believe me , i got the same experience like you did , when i shifted ( actually tried to shift ) from C to java .
C , being compiled , ran like a mad horse , and java was a snail to see . Though java users say that , well written java code can compete with C , i accept that , i cant accept what they say :S .
Java , though highly elegant than C , makes me stare at my monitor for minutes until finished compiling . But compared with C , no other language even comes near to its sheer power .
Now that i am trying to drain my hands with PHP , have left those old dreams of mine , to here . ( Python seems to be better in coding with discipline )
And many people , including me , accept that Java “Bloats” with features . ( though views change )
So , after much of fighting and thinking , i settled with this , namely , if Portability is your need , nothing beats java , but if Performance is what u want , nothing beats cold old C .
I currently use windows for my needs , and as far as i know , TextMate seems to be the best friend of a programmer from the Mac side .
People , beg for a windows alternative , but they say “NO” for an answer .
Heh… Not sure why it would do that. Code of that size should compile almost instantaneously.
If I can make a suggestion - download and install Eclipse. It is in my honest opinion the absolutely best Java IDE you can get - and it’s free.
One of the great features of Eclipse is that it compiles your code as you type. When you make a mistake, it will flag the faulty line (using a mark on the margin). If you click on it it will recommend a solution for you. So, for example it can surround your code in try-catch block, declare thrown extensions, insert appropriate import statements and etc… As soon as you finish typing a line, the code is compiled and ready to go - and it does it so seamlessly that I was able to run it on my ancient 160MHz laptop with only 256 MB of RAM without feeling any slowdowns.
Btw, what do you use for code highlighting? Is it a Wordpress plugin? Which one?
Java doesn’t compile to a native executable, it compiles to an intermediate bytecode so all the processing actually has to be handled by the compiler rather than being able to fob off a load of work onto the CPU, and the compiler uses the Java runtime, so effectively every time you compile java code, you’re running a java programme (this is simplified).
Eclipse is a fine IDE if you have the RAM for it. Otherwise just use your favourite syntax-highlighting editor and learn what you’re actually doing
Oh, and if Luke can use Eclipse on a machine with that spec without feeling slowdown, then he must code really, really slowly.
I will give Eclipse a try - it is seriously pimped by IBM (but I am suspicious of the heavy IDE… I’ve already ditched Dreamweaver and don’t really want to go down that route again
)
I think it might be slow because the compiler for Java might be a little bulkier than gcc, and so the wait may be it being loaded into the RAM. It’s only a second, but you feel it when you’ve been using gcc.
The constant-compiling does sound rather cool, although I do love my TextEdit and hotkey compiling with tooltip Terminal readouts. I might actually do a screencast on that one, too.
Phil - that machine was running Debian with Fluxbox and a very stripped down OS optimized for performance. Eclipse was running at about the same speed as Firefox or OpenOffice.org on that machine - show. But, it was bearable. It actually performed much better than most of the Swing based Java apps that I have tried.
But yeah, if you are not a big IDE person then it might nor be good for you. I mean, I did a fair share of coding using just vi. Hell, I knew a guy who refused to use anything but Emacs for all his coding. I guess it’s a matter of personal preference.
But IMHO, a nice IDE can really make things easier and faster for you.
Luke, you seem to sound like you think Emacs is a strange thing to use! Emacs is a full-featured IDE, although fairly crusty and idiosyncratic at times. I know a few people, including myself, who use Emacs for all our coding, except Objective-C which I do in Xcode.
Saying that, if I was starting now, I’d probably learn Eclipse instead. It’s just that I’ve been using Emacs since 1995, and I’m so invested in it, it would be hard to change over now.
Tom,
I think that Emacs is awesome. I have nothing for utmost respect for the Emacs hackers out there. What I’m saying is that today, Emacs is a little bit counter intuitive at first, and not easy to pick up for some people. As a result relatively few people use it as their main development editor of choice.
Those who do however, are either old school programmers with tons of experience, or people who took time to learn Emacs because they realized it’s potential. If you are hiring developers, I would say that most of the time the Emacs user it would be a better hire than an eclipse or netbeans jokey.
But, if you are learning a new language having an IDE that can detect errors and suggest how to fix them as you type is a really nice thing to have. This is why I recommended eclipse.
Personally, given a choice between using Eclipse and Emacs I would choose Eclipse because I know I would be more productive with it. But an Emacs user can be equally productive or even more productive than me. It’s all about what you are used to, and what makes writing code easier for you.
Mmm.. I think so too. I know some Emacs users who would disagree with me, as we tend to be stick-in-the-muds, but I do see Emacs as legacy software.
Hi “Nice” guyz .
Nice discussion , and i was just dropping by , your way and here is what i am giving you , from my experience .
Initially , a first time java programmer , should use the best coding utility on the planet for programming , namely the Notepad .
it is barely minimal and thus lets you to learn the language better than anyother IDE .
Java compiles so slow , because the whole of the Java Runtime Environment(JRE) , has to be loaded in order to compile the java code into bytecodes .
Actually , the JRE , in itself is a Virtual machine , and thus bytecodes are native code for that VM .
And fintan , believe me , i got the same experience like you did , when i shifted ( actually tried to shift
) from C to java .
C , being compiled , ran like a mad horse , and java was a snail to see . Though java users say that , well written java code can compete with C , i accept that , i cant accept what they say :S .
Java , though highly elegant than C , makes me stare at my monitor for minutes until finished compiling . But compared with C , no other language even comes near to its sheer power .
Now that i am trying to drain my hands with PHP , have left those old dreams of mine , to here . ( Python seems to be better in coding with discipline )
And many people , including me , accept that Java “Bloats” with features . ( though views change )
So , after much of fighting and thinking , i settled with this , namely , if Portability is your need , nothing beats java , but if Performance is what u want , nothing beats cold old C .
I currently use windows for my needs , and as far as i know , TextMate seems to be the best friend of a programmer from the Mac side .
People , beg for a windows alternative , but they say “NO” for an answer
.
x86 Assembly beats cold old C…
My first Java program :
________________________________
package synchronize;
class Parentheses {
synchronized void display(String s){
System.out.print(”(”+s);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
}
System.out.print(”)”);
}
}
__________________________________
package synchronize;
public class MyThread implements Runnable {
String s;
Parentheses p;
Thread t;
public MyThread(Parentheses p,String s){
this.p=p;
this.s=s;
t=new Thread(this);
t.start();
}
public void run() {
p.display(s);
}
}
____________________________________
package synchronize;
public class Jbl {
public static void main(String[] args) {
Parentheses p=new Parentheses();
MyThread m1=new MyThread(p,”odise”);
MyThread m2=new MyThread(p,”keyhan”);
}
}