Apr
30
2009
One of the cool features about Ubuntu is the way you can maintain your installed packages. And what about updating a whole distribution? It is pretty much as simple as it is with normal packages.
Yesterday I updated my Intrepid (8.1) development server to the new Jaunty (9.04) release with 4 easy steps:
- Install the core of update-manager and the release upgrader (not aptitude) with the following command:
sudo apt-get install update-manager-core
- So now you’ve got the release upgrader installed, let’s upgrade your system:
Now the installer is might gonna ask you a couple of questions, depending on the installed packaged on your system:
“Running services and programs that are using NSS need to be restarted, otherwise they might not be able to do lookup or authentication any more”
Services to restart for GNU libc library upgrade include “rsync” and “cron” as defaults. If you don’t do too much of crazy things on your server, you can probably use the default values.
NOTE: When it comes to remote server administration (through SSH), as Rugmonster pointed out at the #slicehost channel on Freenode, the ssh service will keep working as it is used to be. Also, even if sshd restarts, your existing connection won’t be killed.
- After the upgrade process is done (took me about 15 minutes from Intrepid to Jaunty – this may vary depending on your connection speed and the number of packages installed) the installer will finish and reboot your system.
- Log in to your system again through SSH (use your previous settings, those have been kept) and check your system information:
You should see something like this:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
NOTE: I have to add that some people had to re-compile their MySQL binaries after the release upgrade. This happens when you have manually compiled binaries and not the official releases through apt-get. Then you might gonna need to recompile those after the upgrade process. I haven’t expected any problems myself, tho.
971 views | no comments, yet | tags: administration, ubuntu
Mar
11
2009
Recently I was asked on IRC what are the main traps if you want to migrate your application to Rails 2.3.
(NOTE: At the time when I’m writing, Rails 2.3.1 is available which is actually Rails 2.3 RC2. This is a release candidate beta, so even if it is fairly stable, you need to consider using it in production environment or not.)
I am going to collect the list of changes to watch out for with Rails 2.3:
1: Renamed Application Controller
If you have and old Rails project and you are already using Rails 2.3, you may encounter the following problem when you are loading up your console:
$ script/server
Loading development environment (Rails 2.3.1)
/opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:443:in `load_missing_constant':NameError: uninitialized constant ApplicationController
This is because DHH introduced a backwards incompatible change with the Application Controller. He renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version.
Another NOTE: Please do me a favor and leave your comments if you encounter other non-obvious changes while you’re working with Rails 2.3.
1,824 views | 3 comments
Oct
21
2008
I’ve reinstalled my system a few days ago and upgraded all ports on my Mac.
Set up the new SVN server, created new repositories to store and keep my applications under version control. I’ve restored my folder from Time Machine which included the old .svn folders. Of course I wanted to remove all those ones before I import them to my new repository, so after some “googling” I’ve figured out how to do this from Terminal in the most efficient way.
Rather than going to each folder and delete all the old .svn folders and all the junk which had been left from my previous install, I managed to remove all these with one single command:
sudo find ~/Sites/myapp/ -name ".svn" -depth -exec rm -rf {} \;
If you are hardcore enough, you can also delete .DS_Store and .gitignore files too:
sudo find ~/Sites/myapp/ -name ".svn" -o -name ".DS_Store" -o -name ".gitignore" -depth -exec rm -rf {} \;
Article which helped me finding this method: find at dmiessler.com
Now you have a clean folder structure so you can start importing your application to your SVN repository
937 views | no comments, yet | tags: svn, terminal, tip
Oct
7
2008
I am just in the middle of a huge code re-factoring. I am dealing with a huge amount of code which was previously made by someone else. Most of you probably know that working with someone else’s code is most of the time a pain in the ass. It gets even worse when it leaks in documentation.
So, for this really simple reason I decided to start writing quick-tips about coding which will hopefully help keeping your code clean and easy to understand. Here’s the first one.
Use sensible and self-explanatory variable names
Think about how much time you often spend on figuring out what a variable is used for or what it is supposed to be. There are some bad examples:
# a lot of code before...
$b = SomeObject::getByID(12);
$na = "Cutting Edge";
$nu = 12;
$c = array('Audi', 'BMW', 'Mercedes', 'Aston Martin');
# a lot of code after...
Could you explain what those variables are meant to be? You will probably need to find the answer for that some other part of your code. A better way is to indicate the types and use self-explanatory variable names:
# a lot of code before...
$oBox = SomeObject::getByID(12);
$sName = "Cutting Edge";
$iNumber = 12;
$aCars = array('Audi', 'BMW', 'Mercedes', 'Aston Martin');
# a lot of code after...
In this example, the first characters indicate the data types of each variable (“o” means that the variable in subject is an object, “s” stands for strings, “i” indicates integers and so on. Pretty straight-forward.)
You may ask why this is a big deal. I tell you:
- Easier to understand,
- You know what to expect from a variable,
- Others will understand the structure of your code a lot faster,
- Also, it will be even easier for you too to maintain if you need to get back to your own code after a while.
So guys, please remember: Keep your code clean and sensible.
793 views | 1 comment | tags: tip
Oct
6
2008
A couple of months ago I’ve published our TextMate theme file which turned out to be really popular. Since that I’ve started experimenting with XCode but I could not get used to any of its default color themes.

XCode using the ECLM Color theme
I started to port our original TextMate theme to XCode. This is a quick screenshot of it, download will be available soon.
1,416 views | 3 comments | tags: XCode
Dec
6
2007
I usually check several development forums and I’ve found a thread on Rails Forum about development environments where people share a screenshot about their tools. I did this too, after several examples. Since my TextMate Theme got so many respects I decided to share it with the public.
One of its main benefits is that it separates the different data structures, functions, variables, comments, etc. So it is easier to look up your code.

So, if you like it, it can be found here.
Copyright: This theme was originally improved from the one what we can see in Ryan Bates’ Railscasts.
3,600 views | 5 comments | tags: environment, productivity, textmate
Oct
28
2007
In April 2007, A List Apart and An Event Apart conducted a survey of people who make websites. Close to 33,000 web professionals answered the survey’s 37 questions, providing the first data ever collected on the business of web design and development as practiced in the U.S. and worldwide. Now the results just became public.
The findings they present here have never been seen before, because until now, no one has ever conducted public research to learn the facts of our profession.
Take a quick look at the website, read the article and check out the results which are available in different formats, such as Adobe PDF. (1.6 megabytes)
1,028 views | no comments, yet
Jun
28
2007
eclips3.media (ECLM) is a group of young guys who are interested in technological issues.
We have just started our tech blog which we want to use to collect and share all those useful informations which can help out everybody who is interested in these kind of developments.
The planned topics are…
- Front-end web development
(Mostly XHTML, CSS and Javascript topics with best practices)
- Ruby on Rails
(Ruby on Rails is an open-source web framework that is optimized for programmer happiness and sustainable productivity.)
- Adobe Flash (formerly Macromedia Flash)
(Strictly speaking, Adobe Flash Professional is an integrated development environment (IDE) while Flash Player is a virtual machine used to run, or parse, the Flash files.)
- Hosting
(All about hosting development, mostly FreeBSD based, with security issues, useful features, etc.)
We hope that these informations will be helpful for other people as well who are interested in these kind of topics just like us. Happy browsing!
More can be found on the about page.
575 views | no comments, yet