First, I read in Ed's personal blog this weekend that someone gave him a link to a wired.com article about the next generation of digital cameras. I actually read a much more in-depth article about that in Discover magazine a few months back, and that stuff looks really cool. I can't wait to get my hands on one of those, although I'll probably have to wait a few years until the prices come down.
Second, I was converting a cassette tape to CD this past weekend, and I thought I'd share my experience. I wasn't doing it out of any desire to violate copyright laws or because I thought that cassette tapes will become an outdated media format any time soon, but simply because I have a tape that my 2-year-old son loves to listen to, and I know it's going to get worn out pretty soon. Unfortunately, it's an old Woody Guthrie tape that's probably way out of print and really hard to get another good copy of. And besides, I wanted to be able to listen to it in the CD player in the car (my wife's car, anyway -- someday maybe I'll have a CD player too).
Fortunately, I'm no stranger to transferring tapes to CD, because a couple of years ago I did this with an old demo tape of my band from college that I found in the attic (I was the bass player, by the way, albeit not a cool Chapman Stick player as I'm sure Ben would have me be). So I wasn't intimidated by the process, although the last time I did it I used an old copy of CoolEdit, and this time I wanted to try to use the ahead Nero Wave Editor software that I've already got on one of my computers (CoolEdit is a fantastic piece of software, by the way, so if you're looking for a WAV editor you should look there first).
It turns out that Nero Wave Editor was not only easy to use but quite fast, so it was an enjoyable experience. If you want the step-by-step of what I did, I went ahead and typed it all up and posted it here to the site. Of course, if you're going to undertake such an activity, I'd also recommend reading the instructions at cdrfaq.org, because they know a lot more about this sort of thing than I do.
So after a few hours of recording and fiddling, I ended up with a nice copy of the tape on a CD-R that I can easily copy and play all over the house. Yay for me. Do other people do this sort of thing on the weekend too, or am I just weird?
Even more exciting is that the main blog link now points to a page that always has the latest blog entries on it. For now, I'm showing the last 15. The reason I did this is because I was finding myself intentionally not posting things that I thought were important on the last few days of the month because I knew they would fall off forever as soon as the next month began. The thing that held me back from that until now was having to programmatically deal with anchor links, to make sure that anything that was using an anchor link would still point to a valid entry once the anchored article fell off the current page. And I had to keep my old permalink structure intact for other sites that were pointing to old entries on my site.
Okay, too much information. Let's just say I got everything working the way I like it. For archival purposes, I get to keep my individual entries on monthly pages (which I like because the entries that refer to each other are likely to be together, and they can maintain a little more relevance that way), and on a daily basis you can read the latest stuff all together. I went ahead and modified the RSS feed to do the same thing, for convenience.
So maybe this is the last time I have to remind everyone to make sure that their nsftools blog bookmark is set to http://www.nsftools.com/blog, to make sure you're always getting the current blog. Thanks for reading, keep on comin' back.
<?xml version="1.0" encoding="ISO-8859-1"?>
and I'm validating again. Johan told me that I also could have used ä for ä and å for å, but what's the fun in that?
Back when I was a young, naive programmer (two days ago), I thought that %REM blocks in LotusScript were pretty simple things. You start with %REM, type a bunch of comments, and close with %END REM. Piece of cake. But now that I'm programmatically parsing script with ls2html, I'm discovering that there's more to it than that. For example:
So anyway, I updated the ls2html family of scripts (again) to account for my newfound knowledge of LotusScript comment blocks. What a strange little language. If you notice anything else I need to change, please tell me about it.
Oh yeah, and if you're using the ls2html script library in a database, don't forget to modify and re-save the forms and agents that are calling the script library, to make sure they're also using the newer version of the scripts. If you want a shortcut for your agents, you can download and use my ScriptSearch utility, which has an option to automatically recompile agents that contain a certain search term (like, say, 'Use "ls2html"').
Sadly, I'm sure there will be a few more of those kinds of tweaks as more people use the scripts. That's good, though. All part of the process.
(By the way, this is pretty funny.)
In other news, a new DominoPower article indicates that most Lotus Business Partners that were surveyed by GSS still aren't using Java. To quote:
"The survey results showed that about two-thirds of Domino-focused IBM Lotus Business Partners actually aren't using any Java technologies at all. Of those respondents, about half have no plans to start using Java in the next six months. The balance of those not using Java say they expect to use at least one Java-based technology in the future."
Fascinating, and somewhat disheartening. You'd think that the BP community would be all over Java, especially with the push towards Websphere and all the Java that it entails. Oh well, that doesn't mean that we can't beat them to the punch. If you still haven't started playing with Java, you can download my Java Sample Code Database to help you get started.
My feeling is that both things have their place, and there's a lot of overlap among the two mediums. The primary difference in my mind is that blogs have a direction set primarily (or entirely) by a single person, which tends to make them rather proactive in the information they present. Technical forums, on the other hand, aren't led by anyone and they tend to be fairly reactive in nature (valuable information comes from answers to questions, so if a question isn't asked then the information isn't usually offered). This is a generalization of course, and there are plenty of exceptions to this rule, but in my experience this is essentially how it works.
Naturally, blogs and forums each have their place in the world, and as I said, there's a lot of overlap. You can easily find great information in both places, and you'll often find yourself drawn more to one or the other based on your personality. If you find a few blogs that really appeal to the way your mind works, read them and read them often -- you'll probably get a lot of information that way over a period of time, from the blog itself and from the links it contains. If you find yourself coming back to the forums time and time again, keep on going back -- there's good stuff there too.
I think the argument that blogs are a waste of energy because the information isn't centralized is a little off the mark. First of all, I think that the type of people who want to run their own blogs or websites in the first place are creative sorts who don't want to be constricted by the format of someone else's forum or site. The type of creativity that goes into building your own site is exactly the kind of thing that makes the site valuable in the first place. Second, the feeling that having all of the information in one place makes it easier to search isn't entirely accurate. Over time, an active forum will have so much "noise" that it becomes hard to search for useful information about anything but very specific and slightly obscure things. If you want to search across blogs and personal websites, I've got one word for you: Google. Third, I think the question is one of economics. The flow of information on the Internet has always come from a free market of individual contributions from many different places. It's the Adam Smith theory that individuals working on behalf of their own self-interest will ultimately contribute to the common good.
So when it comes to blogs versus forums, there's really no battle. Value is where you find it.
I just wanted to take a moment to comment on how impressed I've been with the Lotus Notes/Domino blogging community so far. And it's not the attitudes that people have or quality of the site designs or anything like that; I've been most impressed with the information sharing that's really started to take off. People posting code and giving tips and tricks and being open about their knowledge. I think that aspect of the community has gotten a lot bigger, just in the past 6 months.
That's not to downplay the Sandbox, which is okay for somewhat finished applications (not that I can seem to get mine posted on there, but after over 6 months I've given up hope that any of my submissions will ever get posted), or the Notes.net/LDD forums, which are good for question-and-answer type knowledge, but I think what the blogging sites have brought to the table is a different type of knowledge sharing. It's not giving you a specific tool for a specific job or answering a specific question that someone happens to have, it's providing pieces to a puzzle that you can put together in any way you'd like. There's more creativity in the process of absorbing the information, because you don't have the black and white "That'll fix the problem I've been having" or "That doesn't apply to me", but rather "I wonder how I could take all these bits of information and apply them in an interesting/useful way?"
Added to that is the personalities of all the bloggers, which makes it more of a community and less of a help desk. That part really appeals to me because I've been the only Notes developer on all of my projects for all but about 3 months of the past 5 years. You really get to a point where you want other Notes people around who can relate to your situation. Even if you're just getting the "virtual personalities" of other people in a rather one-sided conversation, that's a lot better than working in a total vacuum.
Now, that being said, I probably remove myself from the rest of the community a little more than I should at times, since I don't have comments on my site, and I tend to post information more about what I'm doing than what's going on in the rest of the community, and I kind of just put my head down and work on the site instead of interacting very much with other people. But that's my personality, and that's part of what makes this site mine. That's also part of what makes this community useful -- if a lot of us are doing our own things, then that gives everyone else more things to think about and a greater variety of code and information to use.
For example, there was a tremendous amount of discussion over at Mike's site about open-source and building a "standard" Notes blogging template, and that spilled over to some of the other blog sites as well. As neat as that would be, I actually like having several different blogging templates to look at, all of them completely different. That gives me the opportunity to look at the same thing done in different ways, which in turn makes me think of different ways I can do the things I'm doing. It's all part of the creative process, absorbing all that knowledge and putting pieces of it back together for yourself to build something that fits your own needs.
So to everyone else out there, keep up the good work, and I look forward to seeing more code and information from you in the future.
That seemed like a nice default option to set, so I added it to the ls2html and ls2rtf files that are available for download here (as well as the sample FormatLS.nsf database). With the minor updates, we're now up to version 1.0b. I may add some functionality soon to change the case of the keywords that are found to the case that Notes is expecting (i.e. -- "dim" will become "Dim"). That's pretty easy to do, and I know how I'm going to do it, but I probably won't have time until next week or so.
By the way, I know I've been writing some pretty boring blog entries for a while, so if you want something a little less technical and a little more fun, check out my friend Tom's site at TomsRant.com. He's a Domino developer buddy of mine in Atlanta, and I'm always amused at the stuff he ends up blogging about. Some of his stories are just pure entertainment.
I really need to get some other hobbies...
(NOTE: I made a small update to this database early on Monday morning, so if you downloaded before 6:30 AM EST on Monday, please re-download)
operators("#") = "" functions("Line") = ""
I also added the line "Dim style as StyleDef" to the short example code in the ls2html library, because I mistakenly left that out before.
The nice thing is, none of those changes are "critical" to the operation of the scripts, so even if someone downloaded the scripts yesterday and never re-downloads them again, everything will still work (except a line like "Line Input #fileNum, text$" won't get formatted quite right). It also shows how easy it is to update this script as new keywords and classes are added to LotusScript in the future. Naturally, I'll try to maintain the scripts as best I can, but you can also make your own additions simply by adding elements to the lists in the Initialize section. Piece of cake.
By the way, the script I used to format the two lines of LotusScript above was simply this:
Use "ls2html" newStuff$ = |operators("#") = ""| & Chr(10) & |functions("Line") = ""| Dim style As StyleDef Call GetDefaultLsStyleDef(style) style.script = style.script & "background: #FFDDFF; padding: 15px 15px 15px 15px;" Print ConvertStringEx(newStuff$, style, False)
Then I ran the script in debug mode, set a breakpoint at the end of the script, and copied the output to the clipboard. It would have been even shorter if I didn't want the funky purple background color. Then it would have just been:
Use "ls2html" newStuff$ = |operators("#") = ""| & Chr(10) & |functions("Line") = ""| Print ConvertString(newStuff$)
Pretty easy, huh?
Also, I've got to say that I'm impressed with Joe Litton, who sent me an e-mail less than 3 hours after I posted the code yesterday with a wrapper to the ls2html library. Amazing speed.
What would be really cool is if someone (like LDD?) took this script library and made a simple web form where a user could paste in some raw LotusScript code, click a button, and have it transformed into HTML -- that would be awful handy for including LotusScript in a discussion forum. Of course, if anyone decides to use this code like that, I hope that they make mention of where they got it from... :-)
The complaint alleges that IBM made concentrated efforts to improperly destroy the economic value of UNIX, particularly UNIX on Intel, to benefit IBM's new Linux services business.
Of course, they're only asking for $1 billion, so IBM may want to just write a check and avoid the hassle of a lawsuit.
PreciseJava site (several articles)
older JavaWorld article
Jonathan Hardwick's notes about the subject
As with anything of this nature, make sure you verify the results in your programs before you blindly implement the recommendations. There are always cases where something is technically more efficient to do in a general case, but not necessarily better for your specific situation. Also (my personal opinion), keep in mind that minor optimizations that make your code harder to follow usually aren't worth making.
As an example, I was reading through the great O'Reilly book Java Cryptography today and playing around with the built-in Java crypto functions, and I found out that it takes exactly 3 lines of code to hash a String using MD5 or SHA-1. All you have to do is:
import java.security.*; import sun.misc.*; //initialize your code... String hString = "This is a string I'm gonna hash"; MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.update(hString.getBytes(), 0, hString.length()); byte[] md5Hash = md5.digest();
If you replace getInstance("MD5")
with getInstance("SHA")
, you get a SHA-1 hash. And then you can get the message digest of an entire file like this:
FileInputStream in = new FileInputStream(fileName); byte[] buffer = new byte[4096]; int length; while ((length = in.read(buffer)) >= 0) md5.update(buffer, 0, length); byte[] md5Hash = md5.digest();
It doesn't get much easier than that. If you're doing any kind of hashing in Notes, all the classes are already included (much less overhead than using LotusScript implementations of these things).
So anyway, I started working on a multi-part MIME-parser class, and then I shelved it, and I recently pulled it back up and finished it for sentimental reasons. In case anyone else in the world has a need for it, the SimpleMimeReader class is now available for your downloading pleasure. Handy for use with raw e-mail messages, file-uploads to servlets, and multi-part SOAP responses, among other things.
I actually sat down to write an explanation about why I do it a few months ago, but after I wrote this page-long essay I let it sit for a few days, and when I came back to it I realized that none of the reasons really hit the mark. Sure, they were all good and logical reasons (good for the resume, learning experience, the satisfaction of helping other people, blah-dee-blah), but they just weren't quite right. They didn't really explain it.
Then, after reading Mike's entry, I've been really thinking about it again, and I think I have the answer (at least for me):
It's a creative outlet.
That's it. That's the big reason. It's not ego or money or some caveman tendency to hide behind the computer when I get home. It's a creative outlet. Some people paint, some people work on old cars, some people read a lot of books or watch a lot of movies -- I write little bits of code and maintain this website. It's one of the things I do to keep my brain from decaying into a lump of mush.
Some people don't understand, and that's okay. My website/blog fills a void for me, and if other people happen to like it too, more power to it. The more personal, the more universal (I think that's a William Blake quote, but you'll have to check it).