Time Machine with Network drive

•December 10, 2007 • 25 Comments

I just upgraded my mac book pro from tiger to leopard and was very excited about TimeMachine (only to find out moments later that it only works with attached drives – USB or firewire). After struggling a little and googling, I found following solution. Although, it worked for me, its not a documented way, so be careful and try it at your own risk.0. Make sure that timeMachine is set to off

1. Mount your network drive (check step-5 if you are getting error in mounting)

2. Change the preferences by running following command (open iTerm or other shell)
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

3. Now activate the time machine

4. You will now be able to select your network drive.

5. In case, you loose your network mount, you will need to reset the preference set in step-2, by running following command (open iTerm or other shell)
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 0

For more detail, read this

Zephyr in public

•October 24, 2007 • Leave a Comment

With a promise to reinvent test Management, Zephyr made its debut (demo) in Startwest. Read its press release

PRWeb, Yahoo news

Be it the slick UI or functionality, you will certainly find something that will keep you hooked to it. If you are at starwest, dont miss out the Zephyr booth. Check it out here.

EventDispatcher in Flex is single threaded

•September 14, 2007 • Leave a Comment

This may be a very little futile detail and may be commonly known. But being a flex novice, it bothered me for a while when I was trying to find out when events are dispatched, in which order the listeners get called. It specially becomes important when you are overriding a framework class and want to override the default event listener behavior.

Event dispatcher is single threaded and all the listers for a particular event in LIFO order they were added, in other words last one being called first and next after execution of first finishes and so on.

Example

Class A{
public function init() {
foo.addEventListner(event.Type, callBack);
}

public function callBack(event:Event):void{
//implementation…
}

}

Class B extends A{
public function init() {
foo.addEventListner(event.Type, localCallBack);
}

public function localCallBack(event:Event):void{
//implementation…
}
}

In this example, localCallBack will be invoked before callBack() and if you want to stop the execution of super listener, you can set a property from the subclass listner callback on the event and check that property in the super callBack method.

This is the same mechanism framework uses in variety of events in Tree, Datagrid etc (event.preventDefault()) and is guaranteed to work because of the event dispatcher being single threaded.

Performance optimization techniques in flex

•August 20, 2007 • Leave a Comment

Are you developing enterprise application in flex or writing a social meshup or just playing with RIA for your personal website, some day you will be worrying about the way your mission critical application performs and scales. There have been various talks on performance and where do you get the biggest bank for your buck. If you have something that you have done on your project or some ideas that you feel worth sharing, pl share them with David or post them here.

In flex world, David needs no introduction. His involvement with community, “The Joy of Flex” and his inimitable style of presentation is remarkable.

Flex Builder Error in debug mode

•July 20, 2007 • Leave a Comment

If you are struggling with following error in Flex builder, or having issues in opening your flex app in debug mode

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at com.adobe.flexbuilder.project.internal.FlexProject.trimSeparators(Unknown Source)
at com.adobe.flexbuilder.project.internal.FlexProject.getDefaultLaunchURL(Unknown Source)
at com.adobe.flexbuilder.debug.launching.FlexLaunchConfigurationWorkingCopy.populateDefaultLaunchConfiguration(FlexLaunchConfigurationWorkingCopy.java:111)
at com.adobe.flexbuilder.debug.ui.launching.FlexLaunchShortcut.createConfigurationWorkingCopy(FlexLaunchShortcut.java:309)
at com.adobe.flexbuilder.standalone.actions.LaunchApplicationAction.<init>(LaunchApplicationAction.java:53)
at com.adobe.flexbuilder.standalone.actions.AbstractLaunchAction.run(AbstractLaunchAction.java:108)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:223)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at com.adobe.flexbuilder.standalone.FlexBuilderApplication.run(FlexBuilderApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

Here is the quick fix, Open flex builder set up and make sure Output folder url is set (shown below)

flex builder setup

Installing Mysql gem on CentOS

•May 17, 2007 • 13 Comments

Migrating from Debian to CentOS was certainly not pleasant one. But slowly I am getting used to yum (I still miss my apt). Recently I faced an issue installing mysql gem. Here is short description of problem followed by solution.

[root@VMVSOCT02 /]# gem install mysql
Need to update 0 gems from http://gems.rubyforge.org

complete
Select which gem to install for your platform (i386-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation
> 3
Building native extensions. This could take a while…

ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lz… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lsocket… no
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lnsl… yes
checking for mysql_query() in -lmysqlclient… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir

Installation Steps


1. yum uninstall mysql
2. yum install mysql
3. yum install mysql-devel (to install development libraries, For Debian, Knoppix, Buildix user apt-get install libmysqlclient15-dev)
4. gem install mysql
[root@VMVSOCT02 /]# gem install mysql
Need to update 1 gems from http://gems.rubyforge.org
.
complete
Select which gem to install for your platform (i386-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation
> 3
Building native extensions. This could take a while…
Successfully installed mysql-2.7

Create database users
octopus/octopus
grant permission on octopus_development, octopus_test

Ruby: Love in first glance; What happens in second

•April 14, 2007 • Leave a Comment

Ruby certainly has got that instant gratification factor, you can reap the fruit of (not so) hard work very quickly. Once you are pass that phase, there are tonnes of big and small pits waiting for you. Moving to Ruby is a big jump especially if you are jumping from very descriptive programming languages such as Java. This blog is a working draft to capture a list of all such pit falls and (hopefully) save you from learning it the “hard way”.

http://rubylearning.com/blog/2007/04/11/ruby-quirks/

http://rubyssimo.blogspot.com/2007/04/ruby-scoping-shocker.html

Candy for Appfuse, ROR, Flex

•April 11, 2007 • 3 Comments

Proud Mac Owner

•April 8, 2007 • Leave a Comment

After drooling for six months over it, I finally got a MAC, Mac Book Pro, to be precise. This is my first experience with apple and I am not shy to confess that I am a newbie when it comes to os-X, slowly but surely, I ’ll get there. If you are a mac stud, pl suggest good mac sites.

It drives me nuts when my wife calls it ”your new laptop”.   I am like, honey, “Its not a laptop, its a MAC” and she is like, “yeah, but its a laptop”… and the debate goes on.

Finally to Blog

•March 19, 2007 • Leave a Comment

Its been over a year since I have been contemplating over the idea of writing for one, I love writing by nature and second I wanted to time box my thoughts as the frivolous mind changes so much and so quick.

I discovered a whole new set of bloggable ideas when I started working on “cutting edge” 2.0 technologies. Lotmore coming on this in future entries. One thing that will not happen on this blog is very long entries. what is long… well, depends on the subject, sometimes a page is short for complex subject and four lines are too much for simple ones.