Blog Projects Publications Contact About

Archive for the ‘Programming’ Category

Is closed-source project like CMSity doomed to the death nowadays?

Tuesday, April 28th, 2009

Seems it is very hard to spread the news about CMSity around the world, and acquire some user base of this project. Till now I did few commercial deployments of CMSity, however the cmsity.com page hits look really miserable.

I wrote mails to many CMS magazines asking to drop a note about my project. However only two of them replied and posted something on their sites about CMSity. So I still miss some more reviews that can put a breathe into the project. But it seems my mails are ignored by majority of big CMS related sites making very hard to promote new project like CMSity nowadays.

Since I believe this software presents great value and outperforms other popular solutions I consider releasing it as open-source, however probably not GPL but some license that will force the code to stay by the author (me), deny all the forks, making all community changes happen to be included in the source code base.

Open-source is a great idea, but I have seen too many projects that were just bloated, forked and spoiled by masses of developers that were just about put something of themselves in the project regardless of quality of the included changes, missing overall sense and directions of the project itself. That is why I decided to keep the code closed initially, while giving the licenses for free, but it seems non-open source project are just kicked out of the focus today, and releasing the source code is a “must” to gain the momentum.

Haml + Gettext = automagic translation

Monday, April 13th, 2009

Haml logoI was rather sceptic to Haml once I have first time read about it. But after recently playing a while with it I can frankly express that it is simply outstanding template engine for Ruby. What I miss about Haml is some seamless integration with some i18n framework (gem).

So I decided to create Haml “mod” that uses GetText (FastGettext alternatively) to automagically translate static texts from Haml templates during precompilation stage. So something that you don’t see and you don’t need to worry about. (more…)

Opening specified path in Terminal’s new tab

Tuesday, March 24th, 2009

Updates

  1. It uses now click menu instead of keystroke “System Events” command, because in some cases when you had this script assigned to shortcut that used Ctrl or Shift modifiers, those modifiers were sent together with Cmd to “Terminal” producing invalid behavior.
  2. It waits 0.5 second when window is busy just in case Terminal.app was not running and it is just loading the shell which makes it busy for short while too. Fixes incorrect behavior of opening extra tab when Terminal.app was not running.

If you ever wondered how to open specified path in new tab of Terminal.app or reuse current one if it is not busy (running a command), here’s a script you may use:

tell application "Terminal"

    activate

    set windowCount to (count of the windows)

    -- Terminal may be just launched loading the shell, wait a bit
    if windowCount is greater than 0 and first window is busy then
        delay 0.5
    end

    -- Still busy / no windows? open new tab
    if windowCount is greater than 0 and first window is busy or windowCount is 0 then
        tell application "System Events" to tell process "Terminal"
            click first menu item of first menu of second menu item of first menu of third menu bar item of first menu bar
        end tell
    end if

    do script "cd #{e_as(e_sh(dir))}" in first window

end tell

Where #{e_as(e_sh(dir))} is your desired folder. This is modified chunk of TextMate‘s command script found at Mark Eli Kalderon’s Blog. Thanks Mark!

Note: Mark’s TextMate command script does not open anything when Terminal.app has no windows or it is not running.

MinGW on Mac, hell yeah!

Thursday, March 19th, 2009

GCC LogoWant to build some small/or not, neat Windows/or Linux application on your Mac? Just use MinGW/Linux GCC cross compiler package from Pierre Molinaro. Those were recently updated to GCC 4.2 and do cross-compile really fast, especially when using make -j2.

It is hard to be Switcher and totally forget/abandon Windows projects, since most of my clients… well almost all of them are on *indows. So since I switched, I am constant user of VMWare Fusion + XP (Win7, Win98) as a guest OS having Visual Studio installed inside. But sometimes if you want to create small cute application for *indows I prefer do it 100% on Mac with TextMate, then just test it on Windows. This is what MinGW cross compiler is perfect for. Not to mention I did Miranda’s MinGW Makefile that successfully builds miranda on Linux/Mac using cross-compiler, so it can be queued for nightly builds on SF.net servers.

No more free lunch, maybe a pie for free?

Thursday, March 12th, 2009

How to survive computing paradigm shift

We cannot count on free “performance lunch” anymore, but how about at least a pie for free? Do we need to throw all our old source-code into the trash bin and start over again? 

Certainly, not. We may think of our old software as a zombie of the new multi-core era. Still there is a way to make the zombie walk, even walk faster. Of course we will need to rewrite our code sometime, but we may postpone this nasty need for a while. 

The computing paradigm shift is now a fact we need to learn how to live with. It is unquestionable that processor manufacturers hit the barrier of 3 GHz. There pretty many news about spinning the CPU up to 5 GHz or so, but do not try to do so at home unless you got liquid nitrogen cylinder around. Over 3 GHz heat emission grows unreasonably making the CPU economically worthwhile. 

So the only sensible way is now horizontal performance improvement, doubling the number of processing units. This means we can expect soon 128 core CPUs. Oh, wait they are here already; nVidia GeForce 9 series are perfect example of 128 core streaming processor. 

Now how to keep up with things that happen so fast. First we need focus more on performance of our code. Something that was not important before, now cannot be ignored.
(more…)