I did some nice charts for the indi admin pages; worked out really nicely thanks to Gruff + RMagick.
I did have a spot of trouble getting the fonts working at first, but once that was fixed, it was easy to create some nice charts with very little code.
> the compiler's optimizer needs some improvement.
Quite true! But until Sun improves the Java compiler, it's nice to have PMD around to catch such things. And anyhow, the readability improvements might make that change worthwhile, regardless of bytecode savings.
Hm, I'm not too familiar with that, but yes, I think class files do keep some debugging info. With JDK 1.5 you can add annotations that are retained in the bytecode as well.
> I'd like to know how you figured that code would have saved you "4 bytes"
Good question:
$ cat Bar.java Bar1.java && javac Bar.java Bar1.java && ls -l Bar*.class public class Bar {
public boolean foo(int x) {
if (x>2) {
return true;
} else {
return false;
}
} } public class Bar1 {
public boolean foo(int x) {
return x>2;
} } -rw-rw-r-- 1 tom tom 244 Mar 6 11:53 Bar1.class -rw-rw-r-- 1 tom tom 248 Mar 6 11:53 Bar.class
That's JDK 1.4 on Linux, perhaps newer javac versions do a better job...
I've worked on an open source Java code analysis project for the past few years; static analysis can be a very handy tool. Having an automated check for things that aren't even bugs, but are just overly wordy code blocks:
public boolean foo(int x) {
if (x>2) {
return true;
} else {
return false;
} }
is quite helpful. Changing the above code to "return x>2" will save four bytes and will read a bit smoother, too. There are many other examples of this sort of thing.
Lots more on all that in my book - there's a downloadable free chapter there on using static analysis to improve JUnit tests if you want to get a feel for things.
There are huge gaps in open source, it will be a long time before open source becomes popular for what we call mission critical database applications.
I think "mission critical" is supposed to evoke Walmart-sized behemoths, or perhaps the stock market. But isn't "mission critical" just anything that a particular business can't live without? Because indi is running on lots of open source, and it's pretty "mission critical" for our small company...
We put Hearts and a couple of version of Solitaire in the first beta of indi and that was the thing that got the most "wow" - not the instant messaging, not the calendar stuff we'd labored over, but the multiplayer Hearts. Ah well.
Too bad they didn't use Ruby on Rails...
on
Foundations of Ajax
·
· Score: 1
...InstantRails makes it easy to get it up and running, and Rails definitely has AJAX support built in.
I'm using AJAX a fair bit (mostly on the admin pages) on getindi; it's very handy stuff!
The Japanese economy is struggling against their own demographics; there are fewer and fewer young people to support more and more older folks. Hard to say how that's going to sort itself out... but seems like a vacuum is opening there that will be filled by someone.
....Keith Casey, blogged about his trip to Startup School here. There's an interesting note in his post about one of the speakers talking about how nervous CFOs feel about Sarbanes-Oxley.
> I bet you could easily hire aware the developers of that project.
Right, that comes up occasionally: the "what if someone hires Tom Lane" (*) question. It's a legitimate concern. But it'd be hard to hire all the PG core developers since they don't all work for one company.
Also, what's the chance of a core guy taking a job that requires him to stop working on PG? On a much smaller scale, I wouldn't take a job that required me to stop working on PMD; there are lots of other jobs out there. Don't want to damage my book sales, either!
...from these things since no one entity owns it. I'm running a Jabber server with PostgreSQL as the data store and it's been quite solid... good times.
....right here had an interesting comment from Bruce Momjian:
It is interesting that they are purchasing companies that almost fully control the software but give it away free as open source: Sleepycat, JBoss, and Zend. Oracle's purchase months ago of InnoDB used by MySQL was a similar move. What they are _not_ getting involved in is software that is community controlled, like PostgreSQL or Linux, because it much harder to see how a purchase would allow tight control of the software, resulting in revenue.
Rather well said.
I've been pleased with Oracle's JDeveloper; writing an extension for it has been interesting and the Oracle folks have been quite helpful.
Rails and unit tests
on
Beyond Java
·
· Score: 2, Informative
One nice thing about Rails is that the unit tests are built in. Rather than having to go out and use JUnitWebTest or whatever, once you start writing Rails code the basic tests are generated for you and writing new tests involves fairly readable code, like this:
It seems like the folks who are writing Rails are aware of the whole web development picture; not just getting a web app up but also making sure it's well tested. It's certainly making RubyForge much busier...
I did some nice charts for the indi admin pages; worked out really nicely thanks to Gruff + RMagick.
I did have a spot of trouble getting the fonts working at first, but once that was fixed, it was easy to create some nice charts with very little code.
"invitation only" makes a lot of sense... it helps you throttle the initial flood of folks until you've sorted out what people like and dislike.
We're using it for indi (built with Rails, w00t!) and the waiting list keeps growing, good times...
> the compiler's optimizer needs some improvement.
Quite true! But until Sun improves the Java compiler, it's nice to have PMD around to catch such things. And anyhow, the readability improvements might make that change worthwhile, regardless of bytecode savings.
Hm, I'm not too familiar with that, but yes, I think class files do keep some debugging info. With JDK 1.5 you can add annotations that are retained in the bytecode as well.
Good question:
That's JDK 1.4 on Linux, perhaps newer javac versions do a better job...
Cool, thanks very much! And nice ion cannon walkthrough :-)
Lots more on all that in my book - there's a downloadable free chapter there on using static analysis to improve JUnit tests if you want to get a feel for things.
....he makes some polite, reasonable replies to the answers to his post. Nice to see.
Right on! And with PostgreSQL as a Jabber backend, it scales quite well.
It's certainly working out fine for indi so far... routing multiplayer hearts games over Jabber, good times!
...are interesting to folks.
We put Hearts and a couple of version of Solitaire in the first beta of indi and that was the thing that got the most "wow" - not the instant messaging, not the calendar stuff we'd labored over, but the multiplayer Hearts. Ah well.
...InstantRails makes it easy to get it up and running, and Rails definitely has AJAX support built in.
I'm using AJAX a fair bit (mostly on the admin pages) on getindi; it's very handy stuff!
If you want a high ranking for "charts and graphs with Ruby On Rails", why not just blog about it? Is it really that hard to write something?
> for an economy struggling against a weak Yen.
The Japanese economy is struggling against their own demographics; there are fewer and fewer young people to support more and more older folks. Hard to say how that's going to sort itself out... but seems like a vacuum is opening there that will be filled by someone.
That's because the body of the post was a continuation of the subject line. Try reading it thataway and see if it don't sound right.
....Keith Casey, blogged about his trip to Startup School here. There's an interesting note in his post about one of the speakers talking about how nervous CFOs feel about Sarbanes-Oxley.
Incidentally, Keith also reviewed my book.
Yup, and we at RubyForge got together with them to add some searching capabilities for the projects in RubyForge. Pretty cool stuff.
getindi!
...is Linux Server Hacks. Just to "turbo mode ssh logins" hack (#67) is worth the price alone.
Oh, and, book plug!
> I bet you could easily hire aware the developers of that project.
Right, that comes up occasionally: the "what if someone hires Tom Lane" (*) question. It's a legitimate concern. But it'd be hard to hire all the PG core developers since they don't all work for one company.
Also, what's the chance of a core guy taking a job that requires him to stop working on PG? On a much smaller scale, I wouldn't take a job that required me to stop working on PMD; there are lots of other jobs out there. Don't want to damage my book sales, either!
(*) Tom Lane is a PostgreSQL uber-guru
...from these things since no one entity owns it. I'm running a Jabber server with PostgreSQL as the data store and it's been quite solid... good times.
My, that was a yummy slime mold!.
Hm, I'm not sure which once Bruce was referring to...
I've been pleased with Oracle's JDeveloper; writing an extension for it has been interesting and the Oracle folks have been quite helpful.
Argh, so much for my JBuilder duplicate code detection plugin. Such is life...
One nice thing about Rails is that the unit tests are built in. Rather than having to go out and use JUnitWebTest or whatever, once you start writing Rails code the basic tests are generated for you and writing new tests involves fairly readable code, like this:
It seems like the folks who are writing Rails are aware of the whole web development picture; not just getting a web app up but also making sure it's well tested. It's certainly making RubyForge much busier...
Oh, and, book plug!