Ika's Weblog XML
Architecting the Thought.

After a very painful data-migration process

The blog has moved to a new location: www.freshblurbs.com

Please, kindly update your RSS Reader with the new URL:
http://www.freshblurbs.com/rss.xml

I apologize for the temporary inconvenience but in the long run the new server is going to be much more featue-rich and comfortable, benefiting both me and my kind readers.

01/21/07

Thank you, Motime!

We have enjoyed our time with Motime and thank its owners for their nice, free service but this blog has graduated from the standard services and has been moved to a more feature-rich environment. Visit us at the new location: www.freshblurbs.com

posted by irakli, 19:18 | link | comments

01/20/07

Disabling MySQL and FTP in XAMPP on Linux

XAMPP is one of the greatest (i.e most useful) bundled open-source packages that gives an easy, rich LAMP installation in seconds.

If you have tried it, you know that installing many different PHP extensions is neither easy nor fun on Linux. Well, except, maybe on Debian/Ubuntu where you can easily add components with apt-get. Alas, a lot of corporate production systems run RedHat and there XAMPP comes as real life-saver.

One thing about XAMPP though - it installs a whole bunch of stuff like Apache, PHP, MySQL, Proftpd, Webmin etc. I never use or enable FTP because I think it is insecure, legacy protocol that should never be used. Use SSH instead. As for MySQL, I like to install it myself from official MySQL binary distribution. It's a database server, hence - tricky and needs more attention than a vanilla installation. At least - that is my taste.

So, how do we disable FTP, MySQL and WebMin in XAMPP installation and use it only for Apache/PHP/Perl (we could install Python add-on, too) ?

It is actually, very easy. This is what you need to do:

  1. Edit /opt/lampp/lampp script. In start,stop and reload options comment-out everything except apache-related calls.
  2. Copy /opt/lampp/lampp script to /etc/init.d/httpd to make sure it start during operating system startup. Do not forget to put symlinks in default runlevels.
  3. Default XAMPP PHP installation will try to use default MySQL installation's socket and since we want to use "our" MySQL and do not even start XAMPP MySQL, will be unable to connect. To fix this, edit /opt/lamp/etc/php.ini and change the appropriate line to read:
    mysql.default_socket = /var/lib/mysql/mysql.sock
    whereas /var/lib/mysql/mysql.sock is the location of socket file for your custom MySQL installation.
Enjoy

Special note for all Drupal users out there: Drupal is known to have sesion problems on PHP5 in some configurations. Due to the problem, Drupal will keep logging you out at every page request. It has been reported for XAMPP/PHP5 (default config), too. If you intend to use XAMPP for Drupal, at least for the time being, we recommend to switch to PHP4. To do so just run once:

/opt/lampp/lampp php4

posted by irakli, 15:15 | link | comments

01/19/07

Language Wars Contd.

Bjarne Stroustrup: "The purpose of a programming language is to help build good systems, where "good" can be defined in many ways. My brief definition is, correct, maintainable, and adequately fast."

Let's see...

We will skip the "adequately fast" part since I have no idea what adequate would be for Mr. Stroustrup and besides fast/slow is determined by language compiler/interpreter implementation not by language syntax. We will assume Bjarne is just trying to off-handedly dismiss scripting and VM languages,

Moving on...

What does "correct" mean? In line with all those patterns and "best-practices" they try to teach you in all the "right" books? And, of course, maintainable goes hand-in-hand with that, too?

Well, I will have to disagree here. First of all, contrary to the popular misconception it is not "maintenance" that modern businesses care about. Thirty years ago, maybe, they wanted systems that last forever in the original version but not anymore. We live in a fast-phase business environment where demand changes all the time and so should the software that supports it.

It is not "maintenance" that you should care about but ease of future modifications! And these two are by far not the same thing.

People who think the "maintenance" way usually spend a lot of time finding "ideal" architecture that, in their minds, will serve all future needs (alas, the exact same ones they have no idea about right now) and end up with half-baked, useless monster, way late than originally planned .

People who think "ease of modifications" way employ agile methodology, write unit-tests and continuously refactor the code.

Big difference.

In my personal opinion, "good" code is way more about the personality of the developer than underlying programming language or technology. Some people are tidy, some people are mess. Period.

Have a nice weekend!

P.S. I give all the respect to Mr. Stroustrup for his success but other than that, let's just say - he is not my hero and C++ is not my favorite language :)

posted by irakli, 18:33 | link | comments

01/18/07

"Managing" Innovation

"Innovation is "a meta-stable entity". Nothing will kill it faster than trying to manage it, predict it, and put it on a timeline."

Vishva Dixit, vice president for research of Genentech

posted by irakli, 04:10 | link | comments

Legal Definition of the Copyright

"The primary objective of copyright is not to reward the labor of authors, but [t]o promote the Progress of Science and useful Arts." "To this end, copyright assures authors the right to their original expression, but encourages others to build freely upon the ideas and information conveyed by a work. This result is neither unfair nor unfortunate. It is the means by which copyright advances the progress of science and art."

-- US Supreme Court Justice Sandra Day O'Connor

posted by irakli, 02:42 | link | comments

01/16/07

Drupal 5 Released!

Today is the day!

After much waiting Drupal 5 is released. This is smoking hot release of a great open-source portal system and I have no doubt it will make Drupal even more popular.

posted by irakli, 14:18 | link | comments

01/15/07

Drupal and Eclipse PDT

Drupal files have .module and .install extensions. Eclipse PHP Development Toolkit (PDT) does not recognize those extensions as PHP files so you have to tweak couple of settings to make PDT be more helpful when you develop with Drupal.

  1. In Preferences - General - Editors- File Associations, associate *.module and *.install with PHP Editor.
  2. In Preferences - General - Content Types, add *.module and *.install to Text -> PHP Content Type
And, of course, make a habit of using PHP Explorer, it's much better than Navigator, for PHP projects!

cheers.

posted by irakli, 05:41 | link | comments

Practical Common Lisp

Even though I have some Assembly language under my belt and have worked with, what I like to see as, wide variety of programming languges, I am still from the spoiled generation that learnt object-oriented programming before calculus and got on Java bandwagon early on.

I was fortunate to have had privilege to work with a wonderful group of programmers. In my earlier days, one of them was kind enough to spend some time (and I imagine patience) to argue with me that Java is not panacea and '"hard facts" that "best-practice" literature tries to feed us is just one side of the truth. An often-used example was dynamic vs static and strict vs lose typing. Lisp would come up in the discussions habitually.

Lisp is one of those languages that may be regarded as a dinosaur one but people with more insight know it is too important to simply disregard or ignore.

There is a wonderful review of Common Lisp by Peter Seibel, given at Google, that gives some insight in Lisp, but more importantly - in software architecture generally and how patterns in different programming languages relate.

I think it is a great video. Highly recommended.

 

posted by irakli, 01:48 | link | comments

01/12/07

No Fight - Just a Slice [of the Cake]

So, apparently the main intention of Cisco, in regard with the controversy surrounding Apple's use of Cisco brand - iPhone, is not cash.

According to Chandler, the SVP of Cisco they want interoperability in exchange. Interoperability in exchange of brand sharing? Wow. Have you ever even heard something like that?

I think it says a lot about the potential of [Apple] iPhone and the recognition/respect everybody in the industry has for it.

Again - wow!

posted by irakli, 12:08 | link | comments

01/09/07

A Little Bit of Pre-MacWorld Spirit :)

posted by irakli, 07:38 | link | comments

01/07/07

Sony LF-B20

Sony's new LocationFree Wireless Base Station looks like the sexiest gadget of the new year.

Finally, something original and nice in the mobile home entertainment :) Well done, Sony!

posted by irakli, 23:56 | link | comments

01/01/07

Boss

"A boss isn't paid more than a subordinate because he or she is better. A boss is paid more than a subordinate because the boss has greater responsibilities. One of those responsibilities is to stand up for people when it's necessary and to shield them from things they shouldn't have to deal with."

Fiorina, Carley, Tough Choices: A Memoir, New York: Portfolio, 2006, p 54.

posted by irakli, 23:10 | link | comments

12/28/06

Was Your Santa Good to You? :)

I hope everybody had a good Santa this year and if it was not what you haped - just remember, it can always be worse :)

A little smile from the past to you, from me

posted by irakli, 19:50 | link | comments

A Geek's Guide To File Sharing in OS X

If you want full control and flexibility over sharing folders from OS X to Windows:

sudo vi /etc/smb.conf
Add new section:
[Hawaii]
comment = Hawaii Photos
path = /Volumes/Smth/subfolder
browseable = yes
read only = no
create mode = 0750
Uncheck/check Windows File Sharing in System Preferences->Sharing, Services tab to restart it.

posted by irakli, 05:56 | link | comments

12/19/06

JSCalendar Bug in Drupal/IE

Internet Explorer is the worst browser ever, no doubt about that, yet, alas, it is still the most used one.

If you use Drupal you probably want to use the neat JSCalendar plugin, since it creates a nice date-picker for date fields. Unfortunately, the out-of-the-box version of it does not show datepicker icon in IE (it works just fine in Firefox/Safari etc.).

Apparently, the solution is to remove the following from jscalendar.css:

text-indent: -1000em;

 

posted by irakli, 09:58 | link | comments

12/16/06

Round Cube - Amazing Web2.0Mail

I was looking for a small, nice, light, PHP-based IMAP webmail, today. Open-source, of course. I have been using SquirrelMail for the past couple of years and it was doing a decent job, more or less. For some completely unknown reason it stopped functioning, last week, though. We could still check e-mail but Compose screen would never open anything more than a blank page.

Too lazy to debug 2-years old code, I decided to either upgrade SquirrelMail or find an alternative. That's when I got fortunate enough to stumble upon: Round Cube

THIS THING IS AMAZING. Not just as far as webmails go, but it's an amazing example of Web 2.0 design and user-friendliness at its best! It's one of the most clean, professional code I have ever seen; And the amazingly well-thought through, rich set of features, that the code implements.

Even if you do not need a webmail, you have to see this toy, to once again re-affirm how beautiful, simple, elegant and comfortabel a web 2.0 app can be (there is a demo on the website).

I have no doubt that Round Cube will make a lot of buzz and will soon (give it a year?) become de-facto standard, role-model for webmails.

Two thumbs up!

posted by irakli, 21:58 | link | comments

12/15/06

Firefox Hashing

One of the most useful Firefox plugins for a developer:
https://addons.mozilla.org/firefox/3208/

posted by irakli, 13:08 | link | comments

12/11/06

Thank You, Marc

I was messing with some more sophisticated Drupal modules, today, on my Mac.

Usually, I try to have minimalistic configuration of PHP on my computer to make sure whatever i write is fairly portable. The PHP4 installation that comes with OS X Tiger falls under such classification. So I had the default. But I had to make the aforementioned module work. It was not for hobby - it was work, so I had to upgrade my PHP, ASAP. Most importantly I needed some PHP modules like mhash and GD that do not come with the base installation.

Recompiling PHP is a pain. No offense but especially so on a Mac (at least for me) since Mac has non-standard Unix layout and it is not an orthodox Unix system, anyway.

That's where Marc Liyanage's wonderful package saved my day - Enthropy installer upgraded my PHP to ver 5 with a wealth of modules installed (all that I needed) and did so in Universal binary. Furthermore, it did not ruine my existing Apache installation (I had to back up config and restore but that's it).

Thanks, Marc - you really made my day! Your package rocks.

posted by irakli, 16:21 | link | comments

12/08/06

Lose That Buggy Browser, Yo!

This appeared on my Google home-page this morning, when i tried to open it in IE:

"Google recommends upgrading to the new, safer Firefox 2.0"

google

Cheers, Google! Not bad, not bad, at all :)

posted by irakli, 09:11 | link | comments

11/24/06

Spreading the Message of (Red)

We are humans because we care. Please, spread the message:

posted by irakli, 23:02 | link | comments

11/23/06

Quick Comment on MySQL Clustering - master.info

Let's consider a relatively typical scenario: MySQL with clustering, Master instance and Slave instance. The master processes day-to-day operations and Slave is in standby to kick-in if something happens to the master.

Let's now imagine a stormy, cold Monday that Master decided to die on. Sysadmin quickly re-configures slave to kick-in as Master. Another sysadmin figures-out the problem with ex-master and reincarnates it. However, Manager decides that the swap-back can not be allowed until the weekend (4 days left, huh?). Sysadmin decides that to minimize the risks, it's the best to setup ex-master as the slave of the now-master (ex-slave). Who knows if the current master decides to die, too? What will we fail-over to, in that case?

Pretty reasonable assumption and come weekend the sysadmin re-configures my.cnf files, once again - restarts servers + some magic that goes with it and proud of himself goes home...

Alert: bad move. It may be too late but eventually the sysadmin will find out that even though he re-configured ex-slave to be master now, it still continues to be slave, as well. He will be very surprised because he definitely edited my.cnf and made sure that it removes all slave properties makes the server purely master. So - what the heck?

MySQL creates master.info file for a slave database. Even if you edit my.cnf and remove all traces of the instance being slave, it will still remain to be slave unless you delete the master.info file.

Do not forget to remove master.info if you do not want a MySQL instance to be a slave, anymore.

posted by irakli, 08:01 | link | comments

11/20/06

Data-Bound GUI Components

In almost any GUI framework (and hence accompanying visual IDE) you will most certainly find a set of visual components that work with an RDBMS. Furthermore, most "regular" components (like edit-field or listbox) have the ability to bind to the database fields, as well. I think such components are referred to as "data-bound" components. It may have been championed by Visual Basic, but I am not sure.

It's nothing new, of course. The reason i remembered about them is - I stumbled upon them, once again, today when I was playing with one of such framework/IDEs.

I really never understood why people bother to create such things. Except the marketing buzz (or bull) about Rapid Development - I see exactly zero sense.

Firstly, such components are in direct conflict with well-adopted and recognized principle of Model-View-Controller separation. Then, even if you do not care about MVC (why?) I honestly have never seen an application that had a logic so simple that such components made its development any more rapid, than it would be without them.

So, why do IDE/framework designers bother? Who are they trying to fool? Are they just waisting their time?

posted by irakli, 23:56 | link | comments

11/17/06

Drupal 5.0 beta - First Impressions

I finally got to install the new 5.0 beta1 of Drupal, today.

I have not played with it enough to get a full impression but there are several nice things that strike immediately:

  • Smart and nice, web-based installation script.
  • New, beautiful, highly ergonomic and very clean, amazingly appealing default theme - Themetastic. AND IT IS LIQUID!

    I can not help admiring how good this theme is. Especially since I have, myself, participated in the creation of default themes for several portal and other content-management systems and I know very well what a tough job it is.

  • Revamped Admin panel looks much better than in previous version. In addition, it's separate from main site's template which is very good - no need to fit to into one.

    I still like Google control panel (as featured in Gmail, for example) approach more but I can not ignore the fact that not only Drupal's new panel looks better it's much more intelligent, as well. I was pleasantly surprised by a collection of guiding alerts and messages. These messages look pretty, too, by the way.

Overall - great job! I am very excited with Drupal 5, personally and look forward to using it in production.

posted by irakli, 22:08 | link | comments

Microsoft Zune on CNN

You should watch it to the end, even if you are an iPod fan :)

posted by irakli, 20:11 | link | comments

11/11/06

Shut Up and Sing

I was never Dixie Chick's fan because I am not fan of Country music, but I AM HUGE FAN OF FREEDOM OF SPEECH, so after what happened to Dixie Chicks and after even the promo trailer for a documentary about it was banned from several TV networks, I am going and buying their albums - for the sole reason of supporting those who are opressed for expressing their beliefs.

Do the same or copy this clip on your blog

posted by irakli, 23:16 | link | comments (2)

11/09/06

Web 2.0 - Cubism of the Web

I can not help the feeling of tremendous similarity between Cubism in art and Web 2.0 culture.

Apart from the similarity in aesthetics of the visual presentation (main principles: simplicity, clarity), even conceptually there is too much in common.

Here is how Wikipedia defines cubism: "In cubist artworks, objects are broken up, analyzed, and re-assembled in an abstracted form — instead of depicting objects from one viewpoint, the artist depicts the subject from a multitude of viewpoints to present the piece in a greater context. Often the surfaces intersect at seemingly random angles presenting no coherent sense of depth. "

Sounds familiar? :)

posted by irakli, 14:39 | link | comments

11/08/06

It's a Beautiful Day

Democrats won both House and Senate.

This is a very nice day and I am very happy with the outcome of the elections. Not because I believe there is huge difference between the parties but because I believe consolidation of power within one party (which was the case up to now) is BAD. I also happen to enjoy more liberal ideas so I am a little bit more sympathetic to Democrats than to Republicans.

Well done!

posted by irakli, 21:06 | link | comments

11/03/06

How to Select Large Blocks of Text in Safari

Although you can't see a cursor when you click on text in Safari, it seems that one might be there. If you click on a position in a line of text in Safari, and then Shift-click somewhere else in the page's text, it will select all of the text from the first place you clicked to the place you Shift-clicked, despite the lack of a visible cursor.

This makes selecting really big clumps of text a lot easier, as you can drag your scroll bar to get from one end of the selection to the other, rather than dragging the cursor and waiting for it to autoscroll. Just be sure not to click anywhere on the page between your first click and the Shift-click!

source: http://www.macosxhints.com/

posted by irakli, 10:15 | link | comments

11/01/06

Apple :(

Just installed latest iTunes update and my interface became German all of the sudden

WTF? :(

posted by irakli, 16:37 | link | comments

10/28/06

Null values in Mysql Not-In Queries Cause Trouble

I was debugging a piece of code today and stumbled upon a non-trivial problem, that IMHO is worth a post about.

Let's take a "simple" example where you want to find records in one table that are not present in another table. "Present" or "Non-present" is determined by comparision against a single column, in both tables.

Sounds like a query as simple as they come, right? Well, not really. Let's look at a sample query:

select * from TMP_USER where UID not in (select EXT_ID from USER )

What does it return? The correct answer is: in MySQL, depends whether there are any null values in EXT_ID. If there are - it returns an empty set!!!

Not too easy to believe, huh? But running the same query with a slight modification:

select * from TMP_USER where UID not in (
select EXT_ID from USER where EXT_ID is not null
)
you empirically get 116 results, none of which have UID null. Furthermore:
select * from HV_TMP_USER where CUID is null
returns empty set. so - believe it or not - that's how "select .. not in" works in MYSQL.

Conclusion: watch-out for "not in" queries in MYSQL on a column that may contain null-values. The resul may be empty set, when you least expect it.

posted by irakli, 21:49 | link | comments


Copyright (C). Irakli Nadareishvili. Picktek Ltd.