Google Chrome – a new punch in the browser fight

For the last few days, the biggest thing in the technical news is Google Chrome browser (check the comics book, introducing the browser, download beta).  Sure, we had our share of browser wars, and we still do, but this is something completely different.  Most of today’s browsers started back in the days when the Web was totally different.  Since then, some browsers changed more than others.  Some new ones appeared.  But there was no a big break through.  It was mostly an evolutionary approach.

I’m glad to see these big news from Google, that they decided to create a new browser from scratch.  They built it with solutions to many of the today’s problems.  They’ve put some flexbility for the future.  And it seems like they’ve thought a lot about it.

I absolutely support their choice of open source in this matter.  Nobody, not even Google can build a browser that will satisfy everyone and everything, and then keep developing and maintaining it.  That’s not possible with the current state of the Web affairs.  The only way to pull it off is to open source it, so that the Web itself could help them with this mega task.  Also, it’s nice to see that they don’t want to reinvent the wheel either – taking both WebKit (open source web rendering engine) and V8 (open source JavaScript implementation) is smart decision.

It’s nice to see some real competition in the browser world.  Microsoft’s Internet Explorer has changed a lot in the last few years, and the biggest reason for those changes was Mozilla’s Firefox.  Firefox changed a lot too, but it sure could use a push from another open source product.  Google’s Chrome could be exactly that product.

Also, for once it would be nice to see a browser built by someone who knows the Web, and not how to build software.  Yes, browser is a software, but it’s not on its own.  You need to know more and have access to a lot more data to build a good browser.  In particular, what, who, and how uses the Web.  Neither Microsoft, nor Mozilla, nor Opera Software have these information.  Or at least not on the scale that Google has.

And, of course, there always will be downsides to any good initiative.  In the case with Google Chrome, my biggest concern is the situation with themes and extensions.  Firefox has an excellent community in this regard.  This community has built all possible and impossible thems and extensions for practically anyone anywhere.  And it still continues to do so.  Google Chrome starts from scratch, so there won’t be anything for some time.  And since the whole browser thing is new, it’ll need to start with a new set of developers, testers, users, and so on.  And so it will take them some time build that all up.

As with anything, there are a billion of other ways to look at Google Chrome, the way the Web is going, the way Google is going, the way software development in general and IT as a whole is going.  But I’ll leave that up to you.  Here are, however, a few links to get you started.

mp3 collection maintenance

I have a rather large MP3 collection.  The directories and files are named correctly more or less, but ID3 tags used to be a mess until very recently.  Two applications helped me to bring some order in that mess.

EasyTag, a GUI application, that helped me to fix lots of broken and add lots of missing comments to my MP3 files.  The smart thing about this program is that it can figure out a lot of data from the names of the files and directories, and that it can grab and replicate partial data from within the albums.

The second program that I wanted to mention, I just found out about today (thanks to Michael Stepanov’s delicious bookmarks).  It’s called tag2utf.  It’s a little Python script that converts the encoding of ID3 tags from koi8 or cp1251 (two most widely used Russian encodings) to utf8.  It’s very easy to install (the only requirement my system needed was python-eye3d library, which exists in Fedora repository) and use.  Just run it from the command line with no parameters and it will recursively look in the current directory for any files that have ID3 tags in non-utf8 encoding.  It will then give you a choice of two encodings to select from (koi8 or cp1251), a “skip” option, and a “manual” option.  All you will have to do is take a quick look at the files, and chose to either convert them from one of the two options, skip them or convert manually one by one.  You will have to make this choice for every directory with non-utf8 files.  Optionally, you can specify on the command line which directories to scan.  In case you need to convert from some other non-Russian encoding to utf8, the script is trivial to modify.

Both tools are excellent pieces of software.  It took me practically no time at all to fix my mp3 collection.  Now I can search it better, and all files display nicely in any mp3 player.  Brilliant stuff!

SugarCRM deployment efforts

Since we started working on SugarCRM in the office, one of the hardest tasks that we had was solving the deployment issue.  On one hand, SugarCRM comes with some really nice GUI tools, such Studio and Module Builder.  On the other hand, the system is large and complex and should be developed and tested in a separate, non-production environment.

We’ve spent a lot of effort over the last couple of month trying to solve the puzzle.  The problem is that there is a tricky combination of files updates and database changes, some of which can be just copied over while others have to be executed from the destination machine’s administration.

So, what we did first was complete separation of environments.  Each developer had his own machine on which he could install and configure as many instances of SugarCRM as he saw fit.  Also, each developer had a separate branch in the Subversion, so that he could work on his own stuff without being afraid to run into conflict with anyone.

After that, we created a development server with a checkout of common trunk.  For extra insurance, we did a checkout from a system user, who does not have any write permissions in the repository.  In this case, even if someone will accidentally try to commit from the development server, we would be sure that it fails.

Now, each developer had to merge his changes into trunk, and then test them on the development server.  This procedure is very similar to the production deployment and consisted of two parts.  Firts part was updating all the relevant files (a bit more on this in a moment) with svn update.  Second part was logging into SugarCRM and doing Admin -> Repair -> Quick Repair and Rebuild.

The graphical tools that come with SugarCRM are powerful, but a bit confusing.  The biggest confusion for me was (and maybe still is) between Module Builder and Studio.  Studio can be used to customize core modules that are shipped with SugarCRM.  The results of these customizations are stored in custom/modules directory, and when loaded into the database, can be observed in _cstm tables (for example, accounts_cstm).  This is where new custom fields and things like that are going.  Module Builder is a tool which can help you customize existing modules or build the new ones. The confusion here is because both of these tools can be used to do the same things.  But with Module Builder you’d be working closer to the core system and modifying “original” functionality.  You can build your own modules too, by the way.  The results of the Module Builder work with go into modules/ directory, and changes in the database will take place in the original tables.  One thing to remember though, is that you’ll need to push Save & Deploy button every time you are finished with changes in Module Builder.  This is like compiling and building a module.  If you forget this step, then your module will hang in its source somewhere around custom/modulebuilder directory.

Another thing to keep in mind is the sillyness of the machine trying to figure out another machine.  Meaning that Subversion will often have issues trying to figure out the changes from the last commit, and these issues would be often caused by a lot of automatically generated code by SugarCRM.  In most of these problematic cases, Subversion will just merge the changes, and this would often result in a broken system.  I’ve found at least two reasons behind these: small context size that Subversion uses (3 lines or so) confuses it sometimes, bringing it to a wrong place in the file to do the merging; and rather messy automatically generated stuff by SugarCRM – unnecessary reordering and mixed (DOS and UNIX) ends of lines in a single file.  These problems are mostly related to vardef files (vardef.php and anything *def.php) and language dictionaries (anything with *en_us*php, or whatever your locale is).  The solution we are using at the moment is simple, although a bit heavy on the manual work – instead of merging the changes and checking them every time we simply remove old versions of files and add the new ones in two separate commits.  These way Subversion treats the files as completely different ones and real removes and re-creates them instead of trying to merge.

We follow exactly the same procedure now to deploy to the production server.  We just merge code from trunk/ to branches/stable , commit, then update the files on the production server, and then do the Quick Repair and Rebuild.

The thing about Quick Repair and Rebuild is that it takes the update definitions of your forms and layouts and rebuilds compiled templates.  It also compares the structure of the database with the update definitions in the files and, if needed, updates the database scheme too.  Sometimes you’d get an error of missing table (usually custom tables with _cstm suffix) – just create an empty table manually.  Put a couple of standard fields like id_c, date_modified, and date_entered.  After that, field modifications should be OK.  In case you run into a problem with updates to several fields at once, make sure that SugarCRM put a semicolon (;) at the end of each SQL statement that it shows you in a popup window.  For some weird reason, sometimes it just works, and sometimes it tries to execute several queries without separating them one from another.

So far the setup seems to be working for us just fine, but I’m sure that we’ll have a few changes here and there.  I’ll let you know once we find any better way of doing things.  In the meantime, here are some links that might help your development efforts:

There is hope for KDE 4

Here is the story about openSUSE 11 with KDE 4.0.4 in KDE.news.  Do you want to know what I thought was so special about it?  I’ll tell you.  It features screenshots of the KDE desktop with some icons.  Yes, this is the first bunch of KDE 4 screenshots with desktop icons that I saw.

Sounds surprising?  Well… imagine how surprised I was, when after seeing dozens upon dozens of KDE 4 screen shots and then trying it out myself I realized that one part of it that was totally unusable was the desktop and its icons.  After I tried it, I was trying to remember any screenshots that had icons on the desktop, and I could not.  There was everything from the “amazing” new menu and lighter file browser to configuration tools and updated tools.  But there were no desktop icons.  And now they are there.  So, I guess, there is still hope for KDE 4.

Toolbox : WordPress, CakePHP, SugarCRM, RT

Over the last couple of years I’ve been working a lot with these four applications – WordPress, CakePHP, SugarCRM, and RT.  Each of these is beautiful in its own way.  Each of these tools is an Open Source Software. Each of these tools has a large community. Each of these tools has a free and commercial support and development. Each of these can be used in a number of ways to solve a whole range of problems.  Let me briefly introduce each one of them.

Continue reading Toolbox : WordPress, CakePHP, SugarCRM, RT