Category Archives: Web

SSL to the people

I have lost count of how many hours, days and even weeks I’ve wasted because of un-trusted self-signed/generated certificates in my time as a developer. Some util always trips up, makes me add a flag and then still fails. Trying to install custom root certificates works for some software, not all. It’s a complete mess and I long for the day it will be over.

Now, there is a solution: Let’s encrypt. Just get trusted certificates everywhere. Free, quick and easy. This will not give you all the levels of verification and trust that you can get from an SSL certificate; but it gives you an encrypted connection to every server out there. It’s way better than just HTTP, and it’s quick and easy.

Still beta, but took me about 10 minutes to set it up for this blog. Run, answer a question, check something and answer another. Bam! Encrypted! 🙂

Some thoughts and further links from Schneier.

Abstractions always leak

A quote of a quote in a InfoQ article on the release of GWT 1.5:

Key point: GWT gives you a lot of leverage, but it isn’t intended to be a “walled garden” in any way. Abstractions always leak, so it’s better to embrace that fact. We intentionally make it easy for you to punch through the abstractions and get down to the nuts and bolts JavaScript environment so that you can integrate with any other technology you like. That flexibility is a sort of insurance policy for both GWT itself and GWT users: you can be sure that you’ll be able to combine any client-side technology you want with GWT, and we (the GWT development team) don’t feel as if we have to explicitly provide integrations for an open-ended set of things, because you can always do it yourself without waiting on us. For an example of the kind of flexibility I’m talking about, check out Ray Cromwell’s Syndroid work.

This is a key aspect for good frameworks. Not only because abstractions leak, but also because sooner or later someone will discover a bug or a missing feature. Making it easy to fix or extend the framework for those special cases is essential for a good framework to live and to be adopted.

Synced again

Ever since I upgraded to Firefox 3 I have been missing the good old Google browser sync extenstion for Firefox. Google decided to discontinue development of it, so there will never be a version that supports F3.

Enter Mozilla Weave. It basically does the same as Google Browser Sync, but is especially useful in F3 because of the search in history, bookmarks and bookmark tags. I can now usually get back to somewhere I have been through searching in the location bar.

Initially it worked just fine, but after the word spread their servers has had way too much load. This has resulted in syncs just hanging or in best case taking a loooong time. So after a little mess I started doing some research and found that you can configure your own weave server. All it takes is basically WebDAV and password protection.

With Dreamhost being my primary provider it was really easy. The following steps were taken:

  • Create a new subdomain (ex: sync.mydomain.com)
  • Create a folder called user/myusername. Weave always looks in a user subfolder
  • Click goodies -> webdav and set password and enable webdav for the user/myusername folder

That’s just about all it took and my syncs are againg working with a much better speed. Because of the loads they’re not taking on new users, so setting up your own server is also a way to test the extension for new users.

Update: The newest version of Weave tries to do some sort of bookmark/link exchange between users. This fails as it requires some kind of script on the server, which I naturally don’t have. It manifests itself as a warning on the lower bar, but can safely be ignored. To get completely rid of it, just create an empty file under api/share/get.php . It won’t enable the feature, but at least you get rid of the warnings.

The backups you never make

So my harddrive for my home-server crashed. Seems like it short-circuited or something. Any tips for restoring would be appreciated. 🙂 I had devised some sort og backup mechanism, that obviously didn’t work. Lost about a years worth of posts. 🙁

Have signed up to Dreamhost now which offers 200GB diskspace on the cheapest plans. Finnally we are seeing hostingplans that are viable for my hosting. My first impression of their controlpanels etc. are really good too. Some minor glitches, but seems like a well thought through product.

UPDATE: Think I retrieved most my content from some caches. It’ll be a fair bit of job to put it back into wordpress, but at least it’s not lost. 🙂

Character conversion in J2EE webapps

A little over a year ago I linked to a couple of articles regarding internationalisation and charactersets here. Now I’m doing the same thing all over again, and I of course forgot one small step. For a really extensive and good overview of everything check out this excellent article, read it for in depth info. What I had to do was:

  1. Always use UTF-8 codes in your property files. JRC Editor will help you with that.
  2. Create a ServletFilter that sets the character encoding for each request: req.setCharacterEncoding(“utf-8”)
  3. Set the encoding for the JSP compiler: < %@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8" %>
  4. Set the encoding for the browser to interpret: meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″

That should be it. 🙂

Blogs and careers

Wow, blogs can help your career. I never knew. 😉 We’ll I did. And I guess most people that follows blogging a bit knows. Especially within the high tech industry where the web/google/blogs are used as a main information source. I google for information that is pretty technical each day, and I probably find around 40% or something of what I need on blogs.

I do this mainly out of interest, a small bit of fun (hey, I can’t deny it’s gratifying to see the stats go up) and a small bit of self promotion. Sometimes I blog a lot, and sometimes less. What I would really like to do is turn it towards a lot more content than just linking. That is my goal, but time rarely permits.

Rands is an excellent example of a good blogger. He really is one of my favourite bloggers in tech. Of course he blogs mostly management, but related to the software industry.

Maybe adding a bit of attitude to my blog would make it better? Nah, don’t have it in me. Maybe after a couple of beers like Matt suggests. 😉