SLVR L7 PR Reviews

<1 min read

I'm so tired of reading PR Reviews. Enough already.

Take this First Look: Motorola SLVR iTunes Phone review for example.

This guy is just rehashing the official press release. He's never actually seen the phone. What are we? Stupid?

Well, maybe…

Quick HTTP POST request

<1 min read

Have you ever wanted to quickly send a POST request to a HTTP server? It's pretty easy to do using curl.

For example to send XML via a POST request, you could use the following:

curl --header "Content-Type: text/xml" --data "…." http://www.foo.com/

I use this method for testing almost every day. Saves a lot time.

There's a tip entry in the wiki too.

[@693]

Another curl command I use often is:

curl -I http://www.example.com/

to get a HEAD request.

[@699]

And:

curl --header "Accept-Encoding: gzip" http://www.foo.com/ | gunzip

to get the compressed request.

IE7, the feed master.

<1 min read

I've been playing with IE 7 Beta 2 preview for a few minutes. I does a terrific job with feeds. Wow!

Regardless of how good it really is, I suspect people are going to flock back to IE in mass. Firefox days in the limelight are up.

[@635]
Ed jolted down his first impressions. Including some visual problems with Eclipse.

Joey is complaining that IE7 beta still can't handle port numbers, which bugs me too.

PMD

<1 min read

I submitted a small documentation error report to the PMD project, and got a very nice response from Tom.

As I mentioned in my response, the linkblog would not be as stable as it is without PMD.

Comments Enabled

<1 min read

I've finally got around to implements comments on the blog. I'm not quite done yet, I have to create the feeds, and provide a way to view all the recent comments. But it's a pretty good start.

Feel free to click on to leave a comment.

Incidentally this my 1000th blog post. Befitting.

[@869]
I just added a Recent Comments page.

[@353]
The feeds and Comment API support are done.

I couldn't find anything definitive about the Atom Comment API, so that'll have to wait until more info is available.

Java2Html and IntelliJ IDEA

<1 min read

IDEA can export Java source code to HTML, which I find quite useless. I really like the way Java2Html works but there is no integration with IDEA.

You can easily setup an External Tool in IDEA using the Java2Html command line options.

The problem is that I also wanted to:

  • View the generated HTML code right away.
  • Discard the resulting HTML file when done. I usually only need to copy/paste elsewhere.

I created a simple batch file to help me accomplish my goal…

java2html4IDEA.bat
@echo off
setlocal
set TMPFILE="%WINDIR%\temp\%~n1%~x1.html"
java -jar java2html.jar -srcfile %1 -targetfile %TMPFILE%
notepad %TMPFILE%
endlocal
@echo on

What does it do?

  1. Passes the first argument (the path to the Java source file) to Java2Html.
  2. Instructs Java2Html to save the resulting HTML file directly to the Windows temporary files directory.
  3. Automatically opens the HTML file with Notepad.

To use it, simply place it in the same directory as the Java2Html jar, in my case C:\java2html.

The only thing left to do was to create the External Tool entry in IDEA, as follows: