August 16, 2010
Have you ever wanted to see what kind of computer desktops other people have? Even if you haven’t, why not waste some time browsing and rating them at Desktops51 – a new project of mine!
Desktops51 is a free website that allows users to upload and browse computer desktops. No registration is required to browse or upload, either!
So hop on and browse some wallpapers. And why not upload one while you’re at it?
And now for the technicalities
Desktops51 is developed with the Ruby on Rails web framework. PostgreSQL is used for data storage, and nginx is used with Phusion Passenger to run the website. For hosting, a simple Linode 512 VPS is used (they’re the best VPS host in the whole world, but that’s a story for another day!)
Images are currently stored locally and processed using RMagick (a Ruby ImageMagick frontend) into numerous thumbnail sizes for use throughout the site. In case the site gets more popular, I will have to look into other options like Amazon S3.
In summary
Desktops51 has been a fun project to implement in the past week. But we’re not done yet – here’s some ideas that I have:
- The ability to give sources to wallpapers; one should be able to give a link or upload it directly
- Notifications: get an e-mail if someone comments on your desktop, etc.
- Better administration tools: the moderation features are very minimal at this point
- A “Desktops51 e-mail newsletter”: users can opt in to receive one every week with the most popular wallpapers and more!
I hope to get all this done soon!
May 16, 2010
It’s been nearly two months since I released the first version of Clipper, my freeware application for Google’s Android smartphone operating system.
During that time, Clipper has had over two thousand (2000) downloads: check out this graph:
At the time of writing, the download tally is now at 2067 total downloads and 1212 active installations. Over a thousand people are using my application!
You can find more details about Clipper from its website. Clipper is supported on phones running Android 1.5 or above (practically any Android phone).
Developing the application has been a pleasant experience in general. I’ve received a lot of useful user feedback and encouraging comments via mediums like e-mail and Twitter!
One tiny problem I’ve had while developing is that I don’t own an Android phone: although the emulator works well, it’s not very fast and makes it hard to design functional touch-screen interfaces – in fact, a recent update to Clipper completely changed the way the main screen functions when I realized how unintuitive the previous behavior was.
In any case, I look forward to developing more applications!
May 13, 2010
If you’ve ever visited my website before, you’ll probably notice that the template has changed once again. But that’s not all – some major changes have also been made under the hood…
My website/blog-that-I-don’t-write-on-very-often is now powered by nanoc, a static site generator. What this means is that nothing dynamic happens when you load a new page – it’s all been generated beforehand. I already had experience using nanoc with the website for my “brand name for freeware projects”, rojekti, so this wasn’t a very difficult process.
There wasn’t anything wrong with my previous blogging softawre, WordPress – I just find nanoc more comfortable to use, and writing is much easier to do in vim instead of a WYSIWYG editor.
In any case, here’s a small outlining of the steps involved.
Creating the new layout
Some experimenting with gradients and color schemes in Photoshop, and a couple of hours to write the markup and stylesheet.
Nothing special here.
Creating the nanoc website
But this is where things get interesting. First off, I adapt the new website layout to the nanoc project, and I enable and configure some things like the blogging helper.
But what’s a blog without posts? I obviously want to have the old posts I had on the WordPress installation to be on the website.
Well, in the one and a half years I’ve had this blog I haven’t written that much, so I “migrated” new posts completely by hand. This was a good idea in any case, because it gave me the opportunity to rewrite the posts in Textile.
And once I’m done, I add an Atom feed and a sitemap file for crawlers. I make the front page display the latest 5 posts and the rest in a simple list: I’ll have to look at generating real pagination later.
But what about comments?
Of course, when your blog is statically generated, a dynamic commenting system might be rather difficult to implement. Fortunately, there are services to provide commenting for websites.
One of them is Disqus. Many WordPress/Blogger/whatever users actually use it instead of their built-in comment systems because it’s better.
And best of all, Disqus can be embedded to any page using a few lines of JavaScript – so that was easy!
…But what about the existing comments?
Not that my blog has ever been a very popular internet destination, but there are some useful comments on the posts I’ve made. So how do I migrate them into Disqus?
Disqus provides an API. It has a function to create new comments. And to make things even easier, someone’s made a Ruby wrapper for the API!
So I export comments using phpMyAdmin to CSV, and write a quick Ruby script to read them in and send them to Disqus. Easy!
What else?
I really like the “new workflow” of writing posts – it could actually inspire me to write more often. A major problem I had with WordPress was the WYSIWYG editor: it’s just painful to use. This is obviously a problem common to any publishing application.
I already mentioned this before, but by default nanoc processes my blog posts as Textile. Textile is a simple markup language designed exactly for the purpose. And if I never need HTML, mixing it with Textile is very easy.
Using a static site generator feels just right to me, but having to execute nanoc create_item posts/hello-world might not be fit for everyone. And that’s exactly why software like WordPress exists. Use the right tool for the job!
Oh, and one last thing – I also version the blog using git. A great example of how versatile modern DVCS’s can be.
April 9, 2010
Being a big fan (and user) of the Ruby programming language, one of the first things I install on a new computer/OS is obviously the Ruby interpreter. However, on Ubuntu, some things are more difficult than usual. RubyGems doesn’t work as expected: new gems don’t go to the PATH. Thus, if I were to install Rails or nanoc using RubyGems, their executables wouldn’t work on the command line.
The Debian/Ubuntu way is to install these gems using their own package management. Personally I don’t think that this is such a good idea – the Ubuntu repositories obviously don’t have nearly every gem and if they do, it might not be up to date.
There are obviously many ways around this, and the simplest one is to add the RubyGems “binary” path to the user’s $PATH variable. However, this doesn’t change the fact that other Debian modifications still exist in the Ruby installation (for example, gem update --system is disabled.)
A nice solution is Ruby Version Manager, which is a simple command line application to manage different Ruby installations on the computer. RVM will compile the specified Ruby version for you and handle integrating it with your environment. And since it’s a version manager, switching from 1.8.x to 1.9.x to JRuby to whatever is also easy to do.
So, in order to install rvm, do the following:
bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head)
On-screen instructions will follow. Afterwards, let’s install Ruby 1.9.1. First we have to install some dependencies, though:
sudo apt-get install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core
If you’re not using Ubuntu, there are dependency listings for other distributions in rvm’s website. As an example, the previous link goes to the Arch Linux page.
Next:
rvm install ruby-1.9.1
This will download the Ruby 1.9.1 source code and compile it. You could obviously replace ruby-1.9.1 with ruby-1.8.7 or ruby-head to get 1.8.7 and the cutting edge version. In any case, we’ll want to set our new installation as the user default:
rvm --default ruby-1.9.1
And now, we have a fully functioning Ruby 1.9.1 installation. Any new command line window will use that Ruby install by default. Now go build the next revolutionary web app or something!
March 26, 2010
Continuing the saga of Clipper, my Android freeware app: I’ve just released version 1.0.3 that adds support for Android notifications. There are two modes of operation: a permanent notification that will never go away or a notification that shows up whenever a new clipping has been added.
I’ve also built a new website for Clipper using nanoc. See it here. nanoc is a very useful tool, and it works perfectly for the purpose. No need to set up some complicated CMS!
265 downloads.