|
|
||
Evan Summers's BlogCommunity: Java Web Services and XML ArchivesNetbeans, my weblogging toolPosted by evanx on June 07, 2006 at 05:31 AM | Permalink | Comments (6)
Java.net weblogs is my newest nail, and i've been hammering it. With Netbeans. In particular for my last two articles, namely "Swing and Roundabouts 1: Event DTs" and "Bean Burd 2: The SQL". The last article was a long one. I knew it was gonna be. The web browser is killer for reading, but not for writing, not long articles anyway. The "any internet cafe" convenience of gmail and blogger is great. But when I'm at home, I want something rich and fattening!
In the past I used jEdit to edit my articles in HTML. I like HTML because it reminds of me a LaTeX, which I used for years before there was HTML, and years after HTML came along too. But in the new millenium I switched to HTML with CSS. HTML and CSS are great because your style and content are separate, so you can focus on your content, just like LaTeX. For example, you can define a style for your code samples as follows.
.code {
font-size: 9pt;
font-family: courier;
background: #fcfcfc;
padding-top: 0px;
padding-left: 15px;
padding-bottom: 15px;
margin-top: 2px;
border: 1px dashed green;
border-style: dashed dashed dashed dashed;
page-break-inside: never;
color: black;
}
Add a few other styles, eg. for document title, subtitle, section headings, subsections, and you're good to go. You can change the style in one place, and your whole document automagically falls in line. That's how it should be! Blindingly simple, yet incredibly powerful :)
I've found with long articles, it takes a day to write two pages. I wrote this Swing article last year. The first draft took 5 days, and was 12 pages. I was bored so I decided to extend it. To cut a long story short, it ended up being 45 pages, and took about a month, ie. 22 days. And this 15 page SQL article took me 8 days. So that's two pages a day, by all accounts.
Eric Raymond is really a great guy. How do i know? He stayed with me, in my house! Actually, very small apartment. He was visiting Cape Town, and our LUG appointed me to accomodate him. My impresssions of him before I met him was that he was an arrogant gun-toting guy. Then you meet the chap, have a few lunches with him, and you quickly realise why he is leading our movement. He is a diamond twinkling in the rough. Not arrogant at all. A humble, extremely knowledgeable person that you wish you could marry so that you could listen to him all the time. Because he is so fastinating to listen to, about anything and everything. Besides computers I mean! Throw a dart at wikipedia and you'll enjoy his input on the subject of whatever your dart hits. OK, lemme focus. It's difficult to stay on track today... well, most days actually.
So this long 45 page article that I was writing, I edited in jEdit as an HTML document, with a few lines of CSS at the top, and used Firefox to preview it. You know the drill, Ctrl-S Alt-Tab F5. And then I used PDFCreator to print it from Firefox to a PDF file. PDFCreator is the dogs!
But that wasn't why I was writing it in HTML. I was writing it in HTML because HTML/CSS is my first choice of document formatting language these days. True Story.
Now, I've written a few blogs along the lines of "Netbeans is my hammer." You could say that this is a common thread running through all my blogs. Some of them are about "IDE vs non-IDE" and others about "IDE-exploiting designs vs non-IDE-exploiting ones." I don't wanna get too deep into that here and now... Ok I will, I can't resist it. These days I'm finding myself designing for IDEs. I guess in the past, software/language design didn't consider "IDE-leveragability" and refactorability, i mean as crucial factors to weigh in? I'm a fairly recent IDE convert. I spent 20 years programming without an IDE and then the past 2 years with a IDE. And you know what they say about religious converts. Something about them being the most zealous advocates of IDEs. I've always been obsessive-compulsive about code. It must look beautiful, and be consistent. I don't want any broken windows. Not even one. If i find one broken window, I gotta fix it immediately. So IDE refactorings are the bomb for me. Actually mostly just the renaming. OK, so that's why i like IDEs, and design for IDEs. Now, back to the main thread.
The Rub
In general I prefer to use rich desktop applications, rather than pedestrian web-based ones. Actually pedestrians aren't lame, so maybe that's not a fair analogy ;) For example, I use Thunderbird, Open Office, and jEdit. And Netbeans.
So try this. In Firefox, view the "Page Source" of one of your published weblog articles, and cut and paste all the buff up to where you start your blog eg. "Once upon a time, on a webserver far far away..." Cut and paste all that into an HTML file in Netbeans, and start writing your blog below that. And then you use my favourite keystrokes in the whole world after F6, that is Ctrl-S Alt-Tab F5. Finally, when you're finished the endless cycle of editing and previewing your long article, you cut and paste your content into your blog entry and publish!
Having completed this story, i have realised that this really is much a blog about nothing. Self indulgent, pitchy in parts, and i didn't work it out at the end. Sorry about that! It seemed like a good choice of song at the time.
| ||
|
|