Now blogging at diego's weblog. See you over there!

software as sound

via Slashdot, The Sound of iPod, or how to extract software by sound. A really cool hack (as if dual-booting an iPod wasn't cool enough!). Reminded me off Matt's body-chemistry-based iPod music.

Categories: soft.dev
Posted by diego on January 30, 2005 at 10:04 AM

myEclipse: slow

And continuing with the "Eclipse" theme this morning... :)

In contrast to PHPEclipse, myEclipse actually has a nice, straightforward installer, and at the beginning everything seems to be fine. But eventually things st-art-to-slow-down. The pages I was editing include JSP tags, that seemed to confuse the JSP editor to no end, and over about two days things started to get slower. The only reason I can think of for why this started happening is that the JSP pages I was editing got progressively bigger, with more tags and commands to verify. Restarting Eclipse didn't help. Changing the memory settings (giving Eclipse 384, 512 megs of RAM) didn't help either.

The "hot deploy" feature of myEclipse is nice: it allows you to specify a variety of app servers and hot deploy to them. But. But. It severly constrains you from actually tailoring what is deployed and how, pretty much forcing you to create a certain structure in your source tree so that the deployment process works well. If you do that, however, you get some pretty good functionality.

Slow though, very slow. At least on my P4 with 1 gig of RAM. It was slo slow in fact, and I was getting so little benefit from it (I couldn't use the hot deploy, etc) that I just had to uninstall it and go back to just Eclipse.

Btw, when I say "go back to Eclipse" I mean that I had to reinstall Eclipse, since myEclipse left trash everywhere in the .metadata and .plugin directories and was making certain things fail (e.g., the Ant build) in Eclipse after the uninstall. In particular, the Ant build problem had to do with invalid settings under the workspace removing the directory workspace/.metadata/.plugins/org.eclipse.debug.core/.launches solved that.

Next up to try: Eclipse Web Tools project. For now, though, back to work.

Bonus: Over at the PHPEclipse site I learned about the "-clean" Eclipse launch option (There's also "-initialize"). Good for when you change install directories, etc., and it is not documented in the page I generally end up at when looking for Eclipse command line options (is is mentioned here though).

Update (a week later): Here's a follow-up to this entry, where I finally got myEclipse to run properly.

Categories: soft.dev
Posted by diego on January 30, 2005 at 9:42 AM

PHPEclipse: a good start

In my recent post about Zend Studio, Gerd mentioned PHPEclipse, a PHP development plugin for Eclipse 3.x. I didn't know about it, and it is pretty good.

The setup is still pretty rough around the edges, particularly when going beyond just PHP and into the MySQL/Apache/Debugger stuff (basically you need separate plugins for each). I wasn't able to actually make the debugger work, but then again I didn't have a lot of time to spend on that.

In comparison, Zend Studio is well integrated and works really well, and at this point it blows PHPEclipse out of the water (Zend also has a built-in advantage since it's not only a company, but the founders are the creators of PHP). Zend does cost $249, as Gerd noted, so it's nice to see that in PHPEclipse there's a good option in the pipeline.

Categories: soft.dev
Posted by diego on January 30, 2005 at 9:32 AM

protected does what?

Okay, quick, what's the effect of adding the protected qualifier to a class variable in Java?

If you're like me (and many others) you'd say: "protected allows only subclasses to access the variable".

Wrong!

At least according to Java 1.4 and Java 5...

We discovered this a few months back while chatting with Erik and I forgot to blog about it. Today I remembered it in a conversation with Martin.

Let's look at the Java Language Spec section for protected access, 6.6.2.1 "Access to a protected Member", it states:

"Let C be the class in which a protected member m is declared. Access is permitted only within the body of a subclass S of C."
Hm. That sounds like only subclasses should be able to access it, doesn't it. But try this code. Create package "x". Then create two classes in there, test1 and test2, with the following contents:

test1.java

package x;

public class test1
{
protected String hello = "TEST";
}

test2.java
package x;

public class test2
{
public static void main(String[] args){
test1 xx = new test1();
System.out.println(xx.hello);
}
}

Not only that will compile, but also running java x.test2 will print "HELLO". Which means that protected is giving package-wide access, not just subclass access. If you read the first definition in the spec:
A protected member or constructor of an object may be accessed from outside the package in which it is declared only by code that is responsible for the implementation of that object.
It seems to be loose in specifying only access-denied for non-package classes that do not inherit (a "negative right"), rather than only for inheriting classes (a "positive right", or is it the other way around? nevermind).

Okay, so what do you think? Does the Java Lang Spec contradict itself by not spec'ing out completely access in the first paragraph? Or is section 6.6.2.1 enough to say that this is a bug? (And I have confirmed this behavior in JDK 1.4.x and Java 5 as well).

Update: Juha, in the comments, notes that section 6.6.1 (a little before the section I referenced) makes the package-distinction clear. Martin agrees. Me? I agree that putting sections 6.6.1 together with 6.6.2 gives us the behavior we're seeing. I might be wrong in reading the text like I am (eu mentioned that in the comments), but I can't quite see it that way. I still think that Section 6.6.2 reads as if it's an all-inclusive rule, particularly since it doesn't reference section 6.6.1, only two paragraphs above, and thus sec. 6.6.2 appears to contradict both the spec from Section 6.6.1 and language behavior.

In any case, there's no mystery. At most, I'd say that section 6.6.2 has to be clarified to avoid appearing to contradict 6.6.1. Or rather, the whole section might be rewritten for clarity...

Or, I should change the grammar/parser in my head and read the spec differently (admit it, that's what you think we really needed, don't you!). Then all problems would be solved. I'll see if I can call the factory and get an upgrade or something. :-)

Categories: soft.dev
Posted by diego on January 29, 2005 at 7:57 PM

another microsoft gem

I read this first over at the Wall Street Journal but then found a CNET article on it.

Last year Microsoft actually lost a court case, against the EU, for predatory practices (sounds like something from the Discovery Channel, doesn't it?) in the market for media players/formats. Essentially the EU forced Microsoft to distribute Windows without forcing Windows Media Player to be bundled with it, essentially allowing customers to choose.

So what did MS do? It said "fine". Then it went and called this product "Windows XP Reduced Media Edition". Then it also removed the ability to do some basic things, such as playing music CDs (something that even Windows 95 could do).

If you are a consumer, and are offered, for the same price, a machine with "Windows XP Home Edition" and another with "Windows XP Reduced Media Edition", which one are you gonna get? I can hear the Shadow-like laugh in the background when the MS representative says (in the article) "We believe this name complies with the commission's orders".

You know, it's stuff like this that pisses people off about Microsoft. Maybe you could argue that it's MS's "Darwinian" attitude that allows it to post record profits and market gains, even when most in the tech industry consider it passé.

But isn't there a point when MS just has to say, "okay guys, we've misbehaved, how do we make things better?" instead of fighting tooth and nail for every single tiny scrap of whatever. I have stated more than once here that Microsoft's desktop monopoly is not necessarily illegal in itself, it's the predatory practices and the illegal actions taken to maintain and defend that monopoly that are the problem (sadly, it's also in question whether the monopology would have gotten this far without those illegal actions). Maybe if MS started to differentiate the monopoly itself and what they do to maintain it, then things would get better, don't you think?

No, I'm not holding my breath. But hey, it's Saturday morning. I thought it was Friday. Let's give the lad some leeway.

Bonus: a post from November 2003, where I wonder if WinFS will be delayed again ("never say never" eh?), some more day-dreaming about MS embracing, or at least not actively attacking, the Web (sure), and some Descartes thrown in for good measure.

Categories: technology
Posted by diego on January 29, 2005 at 12:55 PM

spamassassin and comment spam

I have the blog set up (as most others I suspect) to email me when a new comment is pending for moderation. Main reason for this being, of course, comment spam. Now I get lots of comment spam, but it's easy to ignore.

But I also have spamassassin set up to dump any email that scores 5 or higher (I think). And SA learns. Put two and two together and it turns out that after a while SA apparently came to the conclusion that any email that came from comments on the weblog was spam. Now I don't get notified of any comments at all. I'll have to dig into the SA config and figure out which rule is triggering this, or how to override it. I'm not even sure how it's separating them, since the trackback notifications are still arriving, and they have a similar message pattern.

You know, I'd be pissed at SA if it wasn't that it's pretty much on the mark in its decision. Hopefully eventually we'll have SA connected to something like Cyc so that it knows a bit more about the world. Now wouldn't that be a treat.

Categories: technology
Posted by diego on January 29, 2005 at 12:41 PM

today is saturday?!?

So I'm on the phone with a friend this morning and I'm asking if he's ditching work today (since he's telling me how he's going to the beach with wife & family and all) and he laughs quietly. "No, I'm not working today." A few confused moments later and it turns out that this is reasonable, you know, because it's Saturday!

Damn. So I tell him how yesterday night I had ordered some stuff through the internet from Tesco (big items that I can't carry easily, paper towels, that sort of thing) and how I was pissed at them because they had only set a Saturday delivery date for me. I spent the entire day yesterday absolutely convinced that it was Thursday. And this entire morning convinced that it was Friday. Plus today I was even more confused since I went to sleep at 2 am and woke up at 5 , then unable to sleep just got to work and chat with Russ, who was recovering his system from an attack yesterday morning (and hopefully he'll be back up soon).

Then after some well-deserved heckling my friend says, "well, you should know the date because of your blog. You post there after all." But then, in one of those moments when the words are out of your mouth before you know what you're saying, I reply: "my blog knows the what day it is. *I* don't."

We depend on software do we not. And there's the extent to which it is true.

Plus: if anyone can tell me what happened to last week, I'd be grateful. January, too.

Categories: personal
Posted by diego on January 29, 2005 at 12:23 PM

tomcat & Java 5 rant

So I go over to Jakarta this morning to get the latest stable Tomcat. Spend some time, as usual, browsing through the bewildering array of choices, until I find that the latest stable version if 5.5.4. But wait! There's also 5.0.30! Both seem to be parts of branches that are currently maintained. So what's the difference?

5.5.4 is compiled against Java 5. So to run it under JDK 1.4.x, you need a special "binary compatibility package". Do you want to bet that the 5.0.x branch is going to get less attention now that the 5.5.x branch allows Tomcat devs to play with the latest language toys?

This is not just a Jakarta issue, btw. Java 5 naturally breaks compatibility in several areas. Yeah, yeah, I know. Evolution of the language and all that. But, I don't know, I'd much prefer it if I could choose when to migrate, rather than have the choice eventually forced on me because good open-source projects start to migrate as well. Bleh.

Categories: soft.dev
Posted by diego on January 28, 2005 at 11:58 AM

my next question...

"My next question... starts as a question... and then turns into a statement... and then becomes an exclamation... and then sort of degenerates into, um, just random profanity... and noises, ok?"

A reporter on The Daily Show with Jon Stewart, Jan. 25 2005.

LOL. Or as Skinner would say: Oooh, mercy. :)
Categories: art.media
Posted by diego on January 27, 2005 at 4:50 PM

Zend Studio: PHP for Java developers

Well, almost. :) I've been learning PHP recently and while at first I was a bit lost (what with coming from an all-encompassing IDE like Eclipse and all), fortunately I quickly switched to Zend Studio, which completely rocks.

Ted recently had a cool post on the IDE issue related to Python and Java, and I think that his comments (and some of the underlying discussion linked from his post) also apply to PHP.

Zend is really great as an environment in that regard (plus the environment is written in Java, using Swing. The first clue was the menu-border bug in WinXP, they should be using winlaf for an easy fix!). Because of its integrated debugging and execution environment (even installs Apache & PHP and allows you to work against that), and things like autocomplete, it feels very close to what Java people (read: me) are used to, and it surely makes things easier for newbies as well.

Anyway, if you use PHP or are interested in working with it, give Zend a try if you haven't yet, you will surely find it useful.

PS: I've been using their Zend Studio 4.0 Beta. I can't speak for 3.5 but I don't think it's that far in terms of functionality from 4.0. And, even though 4.0 is beta, I haven't had any problems with it , it's been pretty solid so far.

Categories: soft.dev
Posted by diego on January 27, 2005 at 2:14 PM

the daily wtf

I was just introduced to this site: The Daily WTF "Curious Perversions in Information Technology." I would start pointing to each good entry but I can't, they're all hilarious (or sad, depending on which side of the fence you're on). The main page is (as far as I can see) a blog-like rendering of the Daily WTF Forum from the forums on the site (check out the other forums too). Most excellent--subscribed.

Categories: soft.dev
Posted by diego on January 26, 2005 at 11:49 PM

update: setting up apache, tomcat, and mysql

tc-ap.png

One of the most visited entries from last year was my configuring apache 2 + tomcat 5 + mysql + jdbc access on linux and windows post. However, after a few months there was a change in the default Tomcat configuration (as well as changes in the connectors) that rendered the Tomcat/Apache connection part nearly useless. That is, it does apply to those specific versions, but no version of Tomcat after 5.0.18 (which is the one I used there) matches the description in the post, even though the Tomcat major version --5.x-- hasn't changed. Sigh. Those are the problems that open source creates sometimes, constant changes in tiny things, config or code, that break a lot of stuff without a clear reason (maybe there is a reason, but it's usually not communicated properly, or at all).

Anyway, I've recently done a new configuration using the latest tomcat, so here's an update to that post on that section. The other sections (that deal with Apache installation, MySQL and so on) have remained largely relevant.

The tomcat config

As far as tomcat itself is concerned, the main change was the configuration for the Context. My post says that you should look for the line "<Context path="" docBase="ROOT" debug="0">" which in the newer default server.xml config files doesn't exist anymore. So where does the context line go? It turns out that the new server.xml includes a default config for a Host. Within the host there's a Logger element set up. After that is where I've now included the context path. Similarly, I've added a Resource tag after the Context for the JDBC connection. Summarizing, After the Logger tag in the Host I've added the following:
<Context path="/appPath" docBase="APACHE_DIR/htdocs" debug="0" reloadable="true" crossContext="true"/>
<Resource name="jdbc/mysql"
auth="Container"
type="javax.sql.DataSource"/>

The connector config

I'm still using JK2. The main difference is that instead of adding the connection point in workers2.properties I am now adding it in jk.conf (which I think is a new file in the recent versions of jk2). I added the following line at the end of jk.conf

JkMount /appPath/*.jsp ajp13

Note that "appPath" is the context that was defined above.

So, I think that's it as an update. It's not a huge difference, but judging from my experience (and from emails I keep getting on the topic) this was more than enough to complicate usage of the old instructions.

Configurations are always a problem, no matter how many HOWTOs you've got, but I hope this makes things at least a bit easier!

Categories: soft.dev
Posted by diego on January 26, 2005 at 5:40 PM

old shoe, new shoe

For some reason I just remembered an exchange between Dennis Leary and Willie Nelson in "Wag the Dog" where Dennis Leary's character utters those words. That's how random my brain is.

Dylan, a good friend whom I stayed with in California (the first few days I was there at the beginning of January), has retired his weblog. He has a number of excuses (I mean, reasons!), which I want to ignore and hope he'll get back to blogging at some point, even if haphazardly. Dylan's foray into blogging is one of the reasons why I'm blogging, so at the very least, here's a digital Guinness raised in Warmbrain's honor. :)

On the new shoe front, Martin, another friend, has finally acquiesced to my constant babbling about blogs (and my usual "start a weblog! now!") and started a weblog :). He's one of the best developers I know, so he's sure to post some interesting stuff. Check out his wide range of interests (and knowledge) in some of his initial posts, from Keystroke emulation in Win32, to Java Swing Tips to Stack trace annotations. If my brain wasn't fried (18 hour day so far and all) I'd make some interesting comments on those, but for the moment I'll just link to them. Welcome Martin! :)

Categories: technology
Posted by diego on January 26, 2005 at 12:05 AM

and the next big thing is...

Errrr... can't say yet. Stealth-mode and all that. :)

Okay, I'll leave this topic for now. Other things to blog about. I've been incredibly busy the last few days, but that's how it goes. More in a bit.

Categories: personal
Posted by diego on January 25, 2005 at 11:57 PM

clevercactus: so long, and thanks for all the fish!

Today we removed most of our stuff from the clevercactus office, in preparation for a full shutdown early next week. I've already switched over the server to a placeholder page. Email will still work, at least for a while, and we'll do our best to ease the transition for our current users. We apologize to them in particular, but there was no way to keep the service running without significant investment in time and money, and we just couldn't handle it. That's how things go sometimes.

The last two and a half years have been an incredible experience, and I'm thankful for everything. To my business partner, Paul, and to everyone that was with us along the way, our families, friends, the design team at huskit, and of course the users: thanks. Really.

And now on to the next big thing...

Categories: clevercactus
Posted by diego on January 21, 2005 at 9:08 PM

web technologies: a first step towards biomimetism?

Reading Jon Udell's comments on his recent conversation with Adam Bosworth (and Jon's own musings on Alchemy and related ideas: a next-gen client that would include an XML store and the means to manipulate it) I suddenly remembered a conversation I had with Russ last weekend about the usage of tags: Flickr's, Technorati's, Del.icio.us', everyone's. And I started to think about how all of this stuff is emerging at about the same time, and not by coincidence. This is all related.

It seems that I'm pulling the connection out of thin air, but not really. Consider the infrastructure on which the most innovative apps are currently being built.

What I'm thinking is that, through web technologies (by which I mean DHTML, Javascript, scripting, XML, REST, etc), we've spent the last few years walking back from decades of "hardening" of runtime environments and development tools, and consequently of applications.

By "hardening" I mean static checking (of which Java is a good example), fairly strict runtime checking, strict parameter and I/O checking, etc. The cost of which is, of course, the need for a fairly complex environment in which to run those applications. Complex, and delicate, in a sense. Easy to "break".

Many people have been talking for a while about the need for software to become more biomimetic, at least in the sense that systems in biology appear to deal fairly well with unpredictability, failure, and interaction without strong interdependencies.

Consider: to run certain apps (say, Windows, or Java) you need certain versions of DLLs, OSes, etc. Without those, the app doesn't run at all. Java bytecode is way more portable (and portable into future platforms) than, say, an i386-optimized EXE, but it's still tied to platform and libraries. This is the equivalent of an organism dependent on a certain type of plant to survive: remove the plant and the organism dies (i.e., the app doesn't run).

But (before you call the analogy police!) look at DHTML, XML, and web technologies in general: from the start, they can run in vastly different environments. If we look again at the app as depending on and adding to the ecology of its runtime environment (instead of viewing it as a static element that just sits on it), web technologies are fairly flexible creatures: they can survive on many types of environments, both server and client. Sure, they break easily, but they can be fixed almost as easily, and, more importantly, they evolve quickly, mutating, sometimes unnoticed (Google doesn't have versions, that doesn't mean that it hasn't evolved).

So a lot of web tech is so "flimsy" (at least when looking at it through the lens of static/strict checking). But I think that's it precisely why it works. And why, where things like applets (and, yes, ActiveX controls) failed, DHTML, JavaScript, XML, and simple REST interfaces are succeeding in creating a rich ecosystem of apps that build on each other.

PS: I have to think about this a bit more, certainly to come up with a better explanation. Hopefully it makes some sense though. But is this one of those great/crazy 3 am thoughts or what? :)

Categories: soft.dev
Posted by diego on January 21, 2005 at 2:50 AM

...but a new research center opens: CTVR

This is something I forgot to mention recently, which is as good an antidote as any to the news regarding MLE: on the upside for Ireland (and Europe), there's the Centre for Telecommunications Value-Chain-Driven Research (CTVR) which started operating recently, run as a partnership between various Irish institutions, including TCD, and Bell Labs, and directed by Prof. Donal O'Mahony (my thesis supervisor at Trinity).

Don't let the Centre's unwieldy name fool you, they're going to be working on some pretty cool stuff, including cutting-edge optical networking, ad hoc networks, and more. Plus, they're looking for people.

Categories: science
Posted by diego on January 21, 2005 at 2:25 AM

media lab europe closes...

Failing to summon sleep, I started catching up with news/blogs in the last few days (travel affects reading as well as writing, I've found). And eventually I found this news item of the "WHAT?!?" type: Media Lab Europe is shutting down. That's really too bad. Here's some comments on the closing from David Reitter, who worked there until recently.

Categories: science
Posted by diego on January 21, 2005 at 2:12 AM

ipod photo: first impressions

ipod-dock.jpgOkay, so I was going to do this all at once but I realized that it would end up being an impossibly long post. Better to split things up. This is stuff that I wrote down as I started using it, about a week ago.

but why oh why?

While you'd think this question has an obvious answer (e.g., hype, the "cool" factor, "just because"...), in my case it's not so obvious. You see, I generally prefer solid-state electronics over anything with moving parts, and that meant that for a while I was skeptical of an iPod for myself (even as I knew the value they had for most others). It's one of those techno-snobbish things.

In any case, what happened is that I realized that over time I started to view my digital music collection as one "set" or "unit" rather than as disjointed playlists. No doubt iTunes has a big role to play in that, but it's a natural evolution IMO. Once you have 20 gig of music on your machine you get used to selecting anything, anytime. And once you're used to that, it's pretty hard to use puny 1/2 gig flash players or whatever: you never know what to choose "for the road". My first MP3 player was the original Rio 300, then a Rio 600, then a Rio 800. I knew the flash-player use case, and in the last couple of months it became obvious that it just wouldn't cut it anymore.

In fact, not even the iPod mini (or similar) would cut it. I wanted a player that would let me take all my music with me. So last week as I walked around the Apple Store in Palo Alto, I kept drifting back to the little pile of iPod boxes in one corner. I knew that I was getting an iPod mini from Feedster soon, but I thought that they would be useful in different cases.

Eventually, I gave in. :)

Package, installation

Everyone gives points to Apple for design, but not many comment on the packaging, which I always think is an integral part of the "experience". The iPod is no exception. The little cubic box opens like a book in half and for some reason by the time you get to pulling cables out of it, you're already smiling. It's design genius.

The package includes pretty much everything you need to get started, and the included carrying case is good, but not great since you can't use the controls with the iPod in it. But still useful when the playlist has been set, or if you get a remote. As far as accessories, the iTrip (FM radio broadcast direct from the iPod) looks pretty sweet, but I didn't get it. :) Also the docks with built-in speakers.

Set up is pretty easy--the only wrinkle is that it piles on a couple of installations of different things (iTunes, Quicktime, iPod updater) and it's less simple than it should be, but still manageable. The fact that iTunes still has to be installed separately is kind of a pain, even afterwards updating iTunes is still a full download and install. Maybe it's time for Apple to come up with a Windows version of OS X's Software Update feature?

Taking it for a spin

Anyway, you're up and running fairly quickly. Copying songs over USB isn't bad (and USB2 is great, I haven't been able to try FireWire but I have no doubt it will also work well). In the case of plain-old-USB, you just have to wait a couple of hours until all those GB are transfered.

One slight issue with the dock (which comes bundled in the iPod photo, I think other models don't include it, but I might be wrong) is that while it's docked you have this message on screen of "do not unplug" or something. Which is a problem, because you don't really think about looking at the iPod's screen before pulling it out of the dock. I think that this doesn't necessarily create problems, but it might when a transfer hasn't finished... maybe better sync in the software (so that the device is released as soon as possible) and some notification at the OS level for moments when you absolutely-positively-can't-unplug it would work.

The headphones are fantastic. I am not a fan of earbuds, but the iPod's are really comfortable and sound incredibly good. Apparently the drivers are built out of Neodymium, as opposed to the more common aluminum, cobalt, or ceramic. I definitely think that there's a difference. In any case, difference or not, they sound great, and they're the first earbud earphones in years that I've used for more than a few hours without them bothering me.

Battery life is pretty good, I've definitely gotten over 10 hours but I'm not sure if I reached the advertised 15 for this model. This is also hard to gauge since battery usage varies wildly with use (ie., times the hard drive has to spin up, backlight on, etc). But I definitely had no problems with it this monday/tuesday with a nearly 20-hour trip. The battery was almost exhausted at the end, but it still had some juice.

So far so good

So, quick conclusion: it's a pretty great product. Already I've listened to stuff that I hadn't listened to in a while, just because the opportunity doesn't present itself (or rather, when it does, you're nowhere near the music you'd like to hear). I gave the output-to-TV feature (with included AV cable) a quick try and it's great, but that, and the photos (Along with the extras, calendar, notes, games, etc. :)), is something for next time.

Categories: technology
Posted by diego on January 20, 2005 at 8:56 PM

in a letter I received today...

"Trinity College Dublin / University of Dublin

Dear Mr. Doval,

I am pleased to inform you that the University Sub-Committee of Council and Board at their meetings of 18 January 2005 have accepted the recommendation of the examiners that you be awarded the degree of Ph.D."

Yes!

Categories: personal
Posted by diego on January 20, 2005 at 5:13 PM

happy birthday russ!

Today is Russ's birthday! Go send good wishes to his weblog. :)

Categories: technology
Posted by diego on January 20, 2005 at 5:11 PM

a few books

I stayed at Russ's place for the last two days of my trip (thanks Russ! :)), and on Sunday morning we wandered around a bit and ended up at a Barnes & Noble. Part of the reason we went there was to see if they had the book Mind Hacks, co-authored by Matt, which I had been babbling about earlier. Matt gave a great talk at EuroFoo on topics covered in the book, including how reading certain things could affect your mood, and after the talk he made another interesting observation: that when breezing through spam and quickly deleting messages, we are actually reading the subject lines to a degree, and that affects our mood. Considering that they aren't precisely upbeat, this can be a factor, at least for brief moments of your day.

Anyway, so we each got a copy and then I got other books as well, including Collapse, Guns, Germs and Steel: The Fates of Human Societies, both by Jared Diamond, Hitler's Scientists: Science, War, and the Devil's Pact by John Cornwell, and finally iPod & iTunes: the missing manual, which I got mainly because I want to expedite the process of understanding what the iPod can do, extensions people are writing, etc, and I have no doubt that most if not all of this information can be found online, but it's all dispersed and if I can get a good chunk of it in a couple of hours, then all the better.

You could say that all of this plus the iPod was some sort of delayed self-Christmas present. You could also say that I went on a binge. But I prefer the first explanation. :)

PS: Throughout the trip I've been raving about The Curious Incident of the Dog in the Night-time, which I read a while ago and is truly fantastic--but I hadn't commented on.

Categories: art.media
Posted by diego on January 19, 2005 at 2:32 PM

iCaved

ipod.png
Yes. Yes I did. Review upcoming. :)
Categories: technology
Posted by diego on January 19, 2005 at 8:41 AM

</trip>

Got back to Dublin yesterday night, after a fairly exhausting 20-hour trip (lots of waiting around for planes. For example, I got to Heathrow at noon but arrived in Dublin at 6 pm!). It didn't take long to start missing CA weather... now I'm battling the usual post-travel cold+jetlag that follows traveling east across more than 4 or 5 timezones (and wondering what jetlag will feel like once we start with interplanetary travel).

A few things to comment on today, mostly what I didn't get to write during the trip (the "radio silence" of airplanes isn't a big problem--until you have to travel several days a week that is).

So: more throughout the day. :)

Categories: personal
Posted by diego on January 19, 2005 at 8:08 AM

a quick update

I'm now in LA (Pasadena actually) in between meetings, and I have a few minutes so I decided to post something because clearly I'm not going to have time until next week to really sit down and collect my thoughts on all that's going on. So this is going to be one of those "weather reports" kinds of posts.

I was in the Bay Area until yesterday leaving pretty much with the rain (was that crazy weather or what? Thunderstorms in SF last Saturday! mudslides in LA! Today though it's clear skies and 60 F so it's all a-ok :)), flew down to LA and I'm here until tomorrow, when I fly up to ... Seattle. Yeah, Seattle! And the weather forecast says that it'll be sunny then (I said I was going to talk about the weather didn't I...) which is not what you'd expect from Seattle. :)

Then from Seattle on Saturday back to the Bay Area and back in Dublin next week. Yes, the schedule became more packed than was originally intended, and it all happened in the couple of days before last thursday (when I left). Very intense. Now I'm running up and down the West Coast and it's just crazy the amount of activity I'm seeing, even in the limited time I have and only talking to what are relatively small groups of people. The boom might not be back, but things are definitely happening.

I took a couple of pictures that I'd like to upload at some point but now I'm out of time. Maybe later I'll be able to log in from the hotel, but I'm not holding my breath: signal strength was pretty bad last night, and I couldn't get online, and when I do get online I need to do things more urgent than this. I ocassionally use the phone to check things, but it's both slow and expensive, so that's kept to only the minimum necessary.

More later, hopefully before next week. Tons of things I've wanted to blog about, including Apple stuff and other things. Stay tuned. :)

Categories: personal
Posted by diego on January 12, 2005 at 11:20 PM

outputting dates in RFC822 and ISO8601 formats

Okay, this is something else that is simple but generally requires to look at specs just to see how to do it properly. And these days, what with everyone generating RSS and such, creating properly formatted RFC822 and ISO 8601 dates is important to make sure the feeds validate. So here's the code, using Java's SimpleDateFormat, to output both formats properly.


import java.util.Date;
import java.text.SimpleDateFormat;

//... class definition here...

public static SimpleDateFormat ISO8601FORMAT
    = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
public static SimpleDateFormat RFC822DATEFORMAT
    = new SimpleDateFormat("EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US);

public static String getDateAsRFC822String(Date date)
{
  return RFC822DATEFORMAT.format(date);
}

public static String getDateAsISO8601String(Date date)
{
  String result = ISO8601FORMAT.format(date);
  //convert YYYYMMDDTHH:mm:ss+HH00 into YYYYMMDDTHH:mm:ss+HH:00
  //- note the added colon for the Timezone
  result = result.substring(0, result.length()-2)
    + ":" + result.substring(result.length()-2);
  return result;
}


Later: Aside from some fixes due to comments (thanks!), Erik, via IM, notes that RFC 822 has been superseded by RFC 2822, in which years on dates use four digits rather than two. The RSS Spec actually encourages the use of four digits from RFC 2822 (even though it explicitly mentions RFC 822 only). So I modified the code for that.

Also, Zoe, via email, notes that a cleaner way of generating ISO 8601 dates is to use the UTC designator "Z", which has the added advantage of making dates easier to parse back in Java. Clearly this is a better solucion when possible, however, this means that all times have to be changed into UTC, something that might not be desirable in many cases where you want to maintain Timezone information. The parsing of an ISO 8601 date with the colon is similarly "dirty" by having to remove the ":" by hand before being able to parse it from Java.

Categories: soft.dev
Posted by diego on January 4, 2005 at 2:26 PM

hiding mailto: addresses with javascript

Making it harder for crawlers to discover email addresses is something that is not hard to do, but it's one of those things that I at least keep redoing just because it's so easy to do. But it should be instantaneous! :) So here's some code, which I've written in different forms over the years, neatly packaged.

What the code does is run a simple substitution cypher on the address, then shows all the code you'd need to include on a page to make it work (using simple CSS/DHTML tricks, making a layer visible). It also lets you include text to put on the links, so that a single Javascript call put anywhere on the page generates the full mailto: link.

By changing the ordering of letters in the key variable, you can change the way it encrypts things for your page. Okay, "encryption" maybe a bit of an overstatement here, but technically... :)

Just for clarity, here's the link again. It's all under an MIT License, so you're free to do with it as you will. Hope this is useful!

Categories: soft.dev
Posted by diego on January 4, 2005 at 12:57 PM

in the bay area this thursday!

I'm going to be traveling to the SF Bay Area this Thursday for a few days (I'll be there until early next week). I'm going to, um, interview with a certain company :), but that aside, I'm traveling with a bit of slack to actually spend some time with people. I'm really looking forward to it. And no, not only because I expect the weather to be much better than Dublin. :)

PS: who else will be there around that time? Let me know, I'll try to make time at least for a coffee and a chat.

Categories: personal
Posted by diego on January 3, 2005 at 5:13 PM

new design

I have succumbed to the temptation! Yes! A few weeks ago I spent some time playing around with new designs, but none of them really convinced me. I was looking at them again this morning, though, and I realized that one of them wasn't too bad, and it could be a good starting point, considering also that the previous design was nearly a year old. So here it is... let's see how it works out. I still have some pages to update, particularly for the individual entries.

The new design is not that different really, mostly it reduces clutter and organizes things a bit (and gets rid of time-dependent elements in individual entries). One "feature" I like about it is that while it uses CSS, there is some structure maintained through tables (which the CSS kinda overrides). Purists will probably scoff at this, but I did it to maintain the design parameters when looking at the site with the venerable Lynx and older browsers. Lynx-compatibility is a crucial feature! Heh.

PS: you might need to do a hard-refresh in your browser to reload the CSS. Let me know if you see problems in a particular platform. Thanks!

Later: Holy Cow! Now that each individual page doesn't include links to archives and such, the rebuild process is about two orders of magnitude faster. It's now rebuilding some 20 pages per second, whereas before it used to take 5 seconds per page (Rebuild of a single entry on its own takes longer because it also rebuilds all associated indexes, but it's also much faster!). I've just rebuilt the entire site in like 4 minutes! That was all I had to do to get it to run faster? This makes me think that maybe the default entry/daily/archive templates for MT should not include so many dynamically generated links. Another lesson there somewhere...

Categories: technology
Posted by diego on January 3, 2005 at 2:35 PM

my dream portable for 2005

frontview.png

Okay, since I'm tired of waiting for someone at some PC manufacturer to come up with what I really want, and since they don't appear to have developed mind-reading yet, I thought I'd spec it out here, including some quick sketches :) (click on the images to see a larger version).

I often think about what I'd really like in a portable and surprisingly my thoughts have been pretty consistent of late. Before you start saying that this already exists, read through the specs--the devil is in the details!

The basics

To start, I don't want anything that doesn't exist today. It's all a matter of packaging and connectivity. Fairly obvious things that my dream portable should have are:

  • Decent processor, 1 Gig of RAM.
  • (Relatively) small built-in hard disk. A 40 Gig 2 inch platter (like what the iPod has in its drive) will do.
  • High-res TFT (Widescreen would be nice but not necessary).
  • WiFi, Bluetooth, Ethernet, a couple of USB2 connectors, and a couple of FireWire connectors, although I'd be happy with at least one of each of those. Throwing in GSM and CDMA chips for cell connectivity would be a plus. :)
  • Touch sensitive screen (ie., Tablet mode, including display rotation).
  • 2.5 pound basic package, without keyboard, 3 pound package with keyboard, and 4 pound max with the storage & adaptor (I'll get to what I mean by "storage" in a bit). Keyboard should be separate from the machine, connected to it via bluetooth, with built-in trackpoint or similar.
Some issues with this machine is that as you get lighter you need more on the base, which is why in my design the base flips and locks with the hinge to provide support for the screen.

So far I imagine few people would disagree with me, except maybe on the size of the built-in disk. Ah, but here's where what I want differs from what's out there. I separate between base storage and personal storage. Let me explain.

The Key: Storage

Base Storage is what's required to run the OS and applications. It's not your data, it's something that is machine-dependent (mostly) and relatively stable. For this, 40 gigabytes is pretty good for today's needs.

Personal Storage is for my data. These days, when we're running around with tens of gigabytes of MP3s, videos, and such, not to mention the rest of the stuff (my personal data store, not including media, is about 4 gigs), we need a lot more than what portables require, additionally, synchronization between our devices is a nightmare. Data ends up duplicated for no reason. So what I think is that we should decouple our storage from everything else, and that's where things get interesting.

This personal storage device would be reasonably big, 250 gigabytes minimum, maybe reaching into a terabyte by the end of the year on single platter drives (on multiple 3.5 inch platters we're probably there by now). Yes, I know that the idea of "Brick PCs" has been floated in the past, but I don't want a PC on a brick. I just want a drive on a brick.

More on the 'Storage Brick'

So were does the personal storage go in my dream laptop? Look at the back view:


The personal storage unit "docks" into the back. That is, instead of docking the machine into an expansion unit, just dock the drive into the machine!

This approach has several advantages. First, I should be able to selectively synchronize some important data into the permanent storage of the portable, for when portability is more important and I don't want to carry the storage brick around. Second, I should be able to dock the storage into my desktop PC, making it easy to move between machines. Third, using the PC's larger internal storage to automatically sync (i.e., backup) my personal storage brick with the local drive we'd get automatic backups! Yay! :)

Also, by splitting up the machine into more parts, you get more choice in portability. Need to minimize weight? Just take the screen and base unit and use it in tablet mode. Need more space? Plug in the brick. Easy.

What's crucial here is not the idea of portable drives, but the simplicity of "docking the drive" into the portable and into the desktop PC. Alternatively, instead of docking you could do a USB2 or FireWire connection, and handle the integration in software.

If we lived in a perfect world, we should be able to just buy a storage brick from one manufacturer, the base from another, the keyboard from someone else... but that's for later. All the technology required for this already exists. All that's required is the integration work, and, yes, the sync software for the drive dock would be a sticky point, but certainly nothing insurmountable.

Some day...

Categories: technology
Posted by diego on January 3, 2005 at 9:23 AM

meeting martin

So yesterday evening while I was waiting for tech support to reply and in the midst of work I took a break and went up to the Gravity Bar, in the Guinness Storehouse (part of the tour thingy), and met fellow mobitopian Martin and his girlfriend for a drink. (Interestingly enough, I was supposed to pay for entering, a tiny fact I remembered after I got there, but I must have walked in with such determination that they let go by even as they stopped other people to ask for "tickets"). Anyway, we had a good chat and it went by pretty fast. We were there for about an hour, and it seemed like a few minutes! Excellent. :)

Categories: personal
Posted by diego on January 3, 2005 at 9:12 AM

mini-outage

Yesterday I had a strange outage on the site, connection started to get really slow until it was impossible to connect. Ping was reporting 85 percent packet loss. And so on. I tried a few things, stopping and starting services, to no avail (nothing seemed to be wrong *in* the machine). In the end I just contacted tech support at my hosting company and in a couple of hours they figured it out (all the signs pointed to some problem just "before" my machine). Then I spent some time last night restarting the stuff I had stopped and checking nothing bad had happened. Now it's all back to normal. "Or as normal as it gets..." :)

Categories: personal
Posted by diego on January 3, 2005 at 9:10 AM

how microsoft will take over the world (according to Cringely)

A couple of weeks ago Cringely was more locuacious than usual with his article "Between an xBox and a Hard Place." He is generally entertaining and well-informed, but sometimes his machinations show an excessive fear of Microsoft. Example:

Take a long look at xBox development, the evolving PC and consumer electronics markets, and Microsoft's own need for revenue growth, and figure what that means for the xBox 3, which should appear around the end of this decade. My analysis suggests that xBox 3 will be a game system that's also a media receiver and recorder and a desktop workstation. Not that you'd use one box for all three things, but that you'd buy three essentially identical boxes and use them for all three functions. And of course you'd buy extra units for kids and spare TVs, etc. In short, xBox 3 will be Microsoft's effort to extend its dominance of the PC software industry into dominance of the PC hardware, game, and electronic entertainment industries. At that point, even mighty Dell goes down.
While there is no question that xBox3 might be that and more, and that the IBM/Lenovo deal elements he discusses are interesting, the problem with his logic is that it assumes that nobody else does anything. "At that point, even mighty Dell goes down," because, you know, Dell will stand still for five years as Microsoft supposedly prepares to anihilate its business. So will anyone else, btw, including HP.

Right.

Never mind as well that the industry is becoming much more complex, with different products and price points, multiple devices (smartphones anyone?) so that the battle for xBox and PlayStation might be more of a sideshow than anyone anticipated. After all, my phone is with me 24 hours a day, while I might be in my living room only ten percent or less of that time. And a place in which, I might add, the TiVos of the world will be comfortably settled in by 2010. The problem with multi-function devices like that is that they have "multi-competition" too.

Or maybe someone will come out with a WiFi transmitter that can connect directly to the TV from the PC and bingo, you don't need to move the PC below the TV and paint it black, just leave the TV where it is, the PC where it is, and connect them, and everything else, wirelessly.

Oh, but wait, we're already doing that! And I think that Microsoft does understand it, certainly at some levels. So how much of the possible xBox 3 grand plans is just keeping up? Especially since we may not yet have WinFS by then...

Nevertheless: entertaining. :)

Categories: technology
Posted by diego on January 2, 2005 at 11:02 AM

2K5!

Happy new year everyone! :)

skynyd.jpg

Day's been tempestuous so far... cold, gale or near-gale force winds, and lots of rain... but sometimes it clears up for a while and the sky turns into deep shades of blue, like in the picture.

Today I'll be working for a good while, but then I'll take some time to read, catch up with some weblogs, make backups (yes, make backups!), write, and hopefully go out for a walk, assuming it's not too cold. The world feels quiet. Kinda nice.

Categories: personal
Posted by diego on January 1, 2005 at 9:17 AM

Copyright © Diego Doval 2002-2011.