Archives
Pushd
April 30th, 2003
I wonder who knew this? Apparently it's possible to use UNC names in your command prompt, only the MS Gods have decided that you should use pushd instead of cd. Mysterious ways.
In case you're wondering why I should need this: I've just finished working on some utility that accesses the Windows registry via regedit, which only accepts files, and that file comes from an UNC location. After that, an .exe on your local machine is started. And that all from within your browser. I do feel a bit dirty now...
Re: dumb-ass
April 29th, 2003
Seems like I have some explaining to do: Outer Web Thought Log: False modesty. I didn't say that I felt a dumb-ass, I only meant that by the other guy, and any occasional innocent bystanders for that matter, I must have been perceived that way. Moreover, the time nor the context didn't allow us to go into an intellectual arm-wrestling to see who actually was more knowing, it only went "Hmm, yeah, Cocoon was hard to learn in those days." "No it isn't." "Yeah it was." "No it isn't." "See ya."
Now is this "Java" or "Personal"? Or "XML"?
Later: Oops, almost forgot: Thanks for the compliment, Steven!
Apple and its tune
April 29th, 2003
Funny funny: all the Americans hail Apple with its iTunes service, but as always, they forget that they're not alone on the world. Accepting non-US credit cards shouldn't be any harder than accepting US ones. In fact, that's the added value of credit card companies. And it's not that there are extra transportation costs involved.
Conclusion: Apple gets a tiny bit of it. But that's still more than one can say of most other "internet-minded" companies.
Cocoon flow
April 26th, 2003
To read: CocoonWiki: GettingStartedWithFlow (via various blogs). To hope: get a chance to do something with Cocoon again. It's been over a year and a half that I haven't been doing any real development in Cocoon. I'm still trying to keep up though. Pure love.
Side note: on a recent conversation, I mentioned the fact that Cocoon was hard to learn when I learnt it (somewhere in 2000, I think). The other guy didn't agree, and thought it was easy. He probably stepped in recently, and had tons of Wiki at his disposal. Anyway, I came out as a complete dumb-ass. Good news for Cocoon.
java.blogs going berzerk?
April 25th, 2003
Could you either categorize your blog, or remove it from javablogs. When I go to javablogs, I'm not interested in your exercise postings. :pWell, first off: maybe most Java hackers can do with some more exercise :p Second: I agree. That's why I categorized my blog some time ago, during the first stir in the java.blogs community about just this issue. My first conclusion was that I made a mistake, so I checked my java.blogs profile. And what do you know? The URL provided for the feed is this one. As you see, this doesn't contain the exercise entry. But it got picked up nevertheless by java.blogs. So I'm guessing java.blogs is still using the old URL... Anybody knows about a solution to this? Is there a "flush cache" button somewhere I can press, or should I delete the blog profile alltogether, and create a new one?
Exercise
April 24th, 2003
This sounds like something I might want to try. I've been trying to figure out how to get some exercise into my life, but with a 1-hour commute, a baby son, and a girlfriend who works irregular hours, it isn't so easy. But I know I feel better when I exercise (from the few times I've tried it), so I dearly long to do it. If you exercise in the morning, you get all this stuff they call oxygen in your blood, and that gives you a multi-hour rush. It surely beats caffeine.
Composing Strings
April 22nd, 2003
An entirely non-issue, but I'm curious nevertheless: What do you, Java programmer, use to create sentences while looping through a list? Often, you have to generate some String based on the contents of some Iterator (to generate output, or an error message, or whatever). In most cases, this asks for some kind of separator, which should be between two elements, but not in the beginning nor the end of the resulting String.
The construct I like most till now, is
StringBuffer sb = new StringBuffer();
String and = "";
for (Iterator iter = myList.iterator(); iter.hasNext();) {
sb.append(and);
sb.append(iter.next().toString());
and = " and ";
}
I've also seen boolean to keep track of whether you're handling the first element or not, and I've seen StringBuffers loosing their tails after the loop... The above is quite nice, but the scope of the and String is too large.
Anyway, consider this an exchange of taste: what construct do you usually use to achieve this?
PHPer goes Java
April 22nd, 2003
Record locking
April 22nd, 2003
Matt Raible asks how to lock a DB record in a webapp. A method that always works (I learnt it from a VB guru (yes, those do exist)), is a very bare-bones optimistic locking. On each table, add a column LAST_EDITED, of date type. Now, whenever you do an update, include the LAST_EDITED in your WHERE clause, and fill in the local time. So you get:
UPDATE my_table SET blah='bluh', LAST_EDITED=now WHERE blah='bleh' AND LAST_EDITED=time-you-got-from-your-select-queryIIRC, the "now" is a function in Oracle. The alternative is to provide another time (System.getTimeInMillis()), but this will only work for 99.99% of the cases (granted, if you happen to have 2 updates on the same split millisecond (according to 2 different machines), you'll probably get gray hair trying to solve it anyways).
As always, I'm not sure if I made myself clear. Drop a comment if I didn't.
USB Tootbrush
April 18th, 2003
Gizmodo : A USB toothbrush. And I thought I was geek with my USB Light. (Coming to think of it, that light has already proven its value during a power outage in our house. Replacing fuses by the light of a laptop powered USB light... who said I was losing my geekiness?)
They put everything on the net these days...
April 17th, 2003
During college, I've spent quite some hours playing Frozen Bubble. IIRC, it's even one of the first games I've played over a network. And now, it's an applet. Enjoy :-)
Thanks to atog for mailing me the link. Apparently, he believes I don't read his blog.
Damn the spam!
April 17th, 2003
Apparently, one or the other spam tycoon has finally developed a program to send MSN Messenger messages automatically. This day alone, I've gotten one invitation to visit big tits, one to visit teens, and one to visit something I don't even remember. On one hand, I'm astonished that it has taken them so long to catch on. On the other hand, I wish them very short arms and lots of itches.
So much for trust. Now where can I turn the "allow everybody to send you a message" feature off....
Mind games
April 17th, 2003
These are fun mind games. Read it before you continue here. I'll wait.
Have you read it? Now, extra game: produce an example that demonstrates the same issue(s). Really, try it. I'll wait again. I've got time.
Not as easy as you thought, hein? Thàt ability, my friend, is what makes a good engineer a great teacher...
Various bloggies
April 17th, 2003
- Compress your data: Seems like a good idea. Every browsers supports compression AFAIK, and the client machines usually have CPU to spare to do some decompression. What I'm not entirely sure of, is that every RSS aggregator supports zipped streams. Well, they should, of course. People are kind enough to provide you with free content, you could be at least so polite to not drain their bandwidth. And CPU usage (to do their compression) is not billed.
- Classifying programmers, or how terminology gets obfuscated over time. I've read the same discussion about "programmer" vs "architect" not so long ago (sorry, I don't think I can Google the link back up). A related issue: should you present yourself as "Software Engineer" or as "Senior Software Engineer", with "senior" in the meaning of "knowledgeable"? It sounds weird to be active in a field for 5 years, and call yourself "senior" already. OTOH, 5 years experience in one specific IT domain is very likely to make you the oldest one in that domain ;-)
- Vera, a New Free Font Family From Bitstream: cool. Looks like a clean font (to somebody who can hardly make the distinction between Serif and Sans Serif). The only problem of course: how an I use fonts? When I think "font", I think "improve the look of a web page", but I don't know of any method to force a user to download a font to look at your page. (I might be wrong about this -- tips&hints as always welcome). As a side thought: nice to see that an open source community can convince a commercial entity to release something under a *PL. Even nicer to see that a commercial entity lets itself be convinced to release something under a *PL.
Mit
April 17th, 2003
Blogging is popular
April 8th, 2003
Shower thought
April 4th, 2003
Scary referers
April 2nd, 2003
Blog overload
April 1st, 2003
You're looking for something older?
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
