Posted by: Dasha on: January 30, 2010
Step 1. Installing Mercurial
Download the suitable version of Mercurial from http://mercurial.berkwood.com/ (for Mac OS X 10.4 download Mercurial 1.2.1). After installing type ‘hg’ in the Terminal to check if Mercurial was installed successfully. If Terminal says ‘Command not found’ then add the path to Mercurial installation (/usr/local/bin) to your ~/.profile file:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
To check if directory is in your PATH now type the following in the Terminal:
echo $PATH
The directory in question should appear in the list
$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Step 2. Configuring Mercurial
Before making commits it’s required to setup the username of Mercurial user. To do this open ~/.hgrc file for editing. If the file is not visible in Finder do the following in terminal to make hidden files visible or alternatively just edit the file in terminal:
To make hidden files visible in Finder:
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder
Then add username to the [ui] section of .hgrc file:
[ui] username = dashas
Step 3. Setting up an initial repository
Go to your webroot folder (~/sites) and make sure it doesn’t already contain the folder with the same name of the repository you want to create (MediaAlbumWeb).
To set up a local repository you have to clone it from the existing one. If you don’t have such a repository available for cloning then you will have to create one.
If there is a latest Mercurial repository available to clone then go to the step 7.
Then in the Terminal do the following:
$ cd ~/sites/ $ hg init MediaAlbumWebServer
Using Finder copy files you want to store in the repository to the newly created MediaAlbumWebServer repository and run the following command in terminal:
$ cd MediaAlbumWebServer $ hg add
Then make a commit to the repository:
$ hg commit -m 'Initial commit'
Step 4. Installing Eclipse
Download and install Eclipse from http://eclipse.org/downloads/ or find it on Taopix DataShare/Eclipse.
For Mac OS X 10.4 download Mac Carbon version.
Step 5. Installing Mercurial plugin for Eclipse
First install Mac GnuPGP. Download the files http://sourceforge.net/projects/macgpg2/files/ or take it from Taopix DataShare/Eclipse folder.
Install the package from http://hge.javaforge.com/hgeclipse using Eclipse Help->Install New Software option.
For Mac OS X 10.4 install Mercurial Eclipse plugin instead from http://www.vectrace.com/eclipse-update/.

Select HgEclipse -> HgEclipse (uncheck Mercurial executable for Windows).
Step 6. Configure Eclipse plugin for Mercurial
Go to Eclipse Preferences -> Team -> Mercurial and specify the paths to hg and gpg2 files on your local machine.
Step 7. Setting up a local repository
To create a local repository open Eclipse and go to menu File -> Import -> Mercurial -> Clone repository using Mercurial and click Next button. Select the location of the repository to clone and enter your authentication details if applicable. In the clone destination enter the path where you want your local repository (MediaAlbumWeb) folder to be created. And then click Finish.
Then when you see the list of folders in your repository, mark what files and folders you would want to exclude from repository. For example, right click on ‘parsed’, ‘templates_c’ folders and config/mediaalbumweb.conf file and mark them as ignored.
Step 8. Installing Fogbugz plugin
Install the plugin (Help -> Install New Software menu) from http://eclipsebugz.sourceforge.net.
In order to work Fogbugz plugin needs a Fogbugz RSS feed. To get one go to Fogbugz Filters -> Manage saved filters saved filters and click on RSS icon. If you don’t have any saved filters create one and you will see an icon.
As an example, feed:https://taopixdasha.fogbugz.com/default.asp?pg=pgRss&ixPerson=2&ixFilter=1

Posted by: Dasha on: September 20, 2009
An interesting fact – efficiency of most of Russian organisations nowadays is only 30-50% due to the low productivity of the staff. Which means every full time employee wage is for less than a half of possible work done. And the more money you pay to a worker – the more money you lose. As statistics says the average wage in Russia now is about 18,000 roubles then the employer could lose up to 9,000 per person per month. This turns into 108,000 roubles a year. Huge amount of money if you have, say, 10 employees…
Motivate us!!!
Posted by: Dasha on: September 12, 2009
On the 9th September I did my first public speech at the Microsoft local club. I spoke on ASP.NET MVC framework.
Have to say it was a great experience! And I guess I would want to try it again!
There are also a few pics from there:


Posted by: Dasha on: July 27, 2009
Today looking through the logs of my payment script I found a new response status for myself – OK REPEATED!
I knew SagePay keeps sending posts until they finally reach you (not exectly so but they keep posting for quite a long time) but in the Integration guide I could find only one place mentioning OK REPEATED status.
Though on the SagePay Support forum I found another one – OK FAILED, which I don’t know what could mean even…
Don’t know why SagePay team didn’t describe all the possible statuses and how we should handle them in the manual and in the example files, but it would be a great help if they did. Seems like these two should be treated as an equivalent to OK response.
Please let me know if you know more on the topic. Thanks!
Posted by: Dasha on: July 27, 2009
Weird thing happened to my GData application – it started throwing “Unable to readresponse, or response is empty” error on upload. The only thing to matter seemed to be a file size.
After some time of serching the Internet found the solution – try to increase timeout limit in Zend/Htt/client.php script. It set to 10 seconds by default. I changed to 20 and it solved the problem.
Hope it will help someone too!
Posted by: Dasha on: June 28, 2009
A few days ago I have found out for myself about one more difference between PHP and C# OOP impelentations. Look at the following code snippet in PHP:
class ParentClass {
public $val = 'Parent';
public function GetValue()
{
echo $this->val;
}
}
class ChildClass extends ParentClass {
public $val = 'Child';
}
$a = new ChildClass();
$a->GetValue();
What do you expect it to show – ‘Parent’ or ‘Child’? The PHP manual says the result will be ‘Child’. And it seems quite logical to me as I would expect public property to be overridden.
Now rewrite the same code to C#:
class Parent {
public string val = "Parent";
public void GetValue() {
Console.WriteLine(this.val);
}
}
class Child:Parent {
public string val = "Child";
}
Child child = new Child();
child.getValue();
Run the code and you will get ‘Parent’…
Change access modifier of val to private in the parent class. Now both PHP and C# outputs the same – ‘Parent’. Why?
First thing to mention is that unlike PHP, public identifiers cannot be overridden in C#. Calling GetValue(), this points to parent object and returns “not overridden” value of val as a result. Private identifers inside parent are not accessible for the child and therefore are not overridden so everything becomes clear.
To make C# behavior similar to PHP you should either add a method with the same signature and with override keyword to Child class and mark parent method as virtual:
class Parent {
public string val = "Parent";
public virtual void GetValue() {
Console.WriteLine(this.val);
}
}
class Child:Parent {
public string val = "Child";
public override void GetValue() {
Console.WriteLine(this.val);
}
}
or use overridden public properties to access the val value. This will work correctly as unlike public fields, public properties can be overridden.
class Parent {
private string privateVal = "Parent";
public virtual string val
{
get { return privateVal; }
}
public void GetValue()
{
Console.WriteLine(this.val);
}
}
class Child : Parent {
private string privateVal = "Child";
public override string val
{
get { return privateVal; }
}
}
I couln’t find any “standard” behaviour for this case. So I guess it was up to C# and PHP teams how to implement this.
Posted by: Dasha on: June 27, 2009
Today my client wanted to update a text on the page with DreamWeaver… just a text and it ended up with the whole page screwed up…
There is no reason to blame DreamWeaver of course – it does its job.
My advise for customers – if it’s possible use CMS next time.
Posted by: Dasha on: June 27, 2009
I spent a few hours today searching for a good free PHP helpdesk system. Most of those that I found threw all sorts of php and javascript errors. I already started picturing the rest of my day fixing those errors.
Then bumped into Hesk. It turned out to be a quite nice and easy to install/use script. In case you are surfing Internet in vain (like I did) have a look at my working copy of Hesk here.
A few screenshots:


Posted by: Dasha on: June 26, 2009
For the last years people were thinking where WEB is going to and what it will be its nearest future. Seems like now it’s getting more and more obvious that with services like www.wix.com WEB will soon become really just a tool for both business and personal activity.
You may say that it’s flash and not so many people would prefer (as we can see all over the WEB now) it to HTML websites. We all know what advantages and disadvantages of flash are and I won’t repeat them all over again. But taking into account wide bandwidth connections and how easy WIX made it to use the tool my opinion is that it’s perfect for private and small business use. And plus Google analytics, unlimited bandwidth, backups and only for $12.42 per month you can have it all on your own domain name and with no ads.
Another thing I was thinking of is if it’s possible to combine FLASH and HTML version? Say you already have a HTML website with a domain name and interesting content, can WIX host this version too? If they do that would be brilliant as you will have to pay only for the hosting services and get a flash version of website for free! But this have to be confirmed.