Archive for July, 2008

Jul 30 2008

Using Flex Builder 3 to compile Flex 4 applications

Published by under Flex

Flex 4 SDK is available for download now, even though it will be a lot buggy i suppose, nevertheless i decided to play with it and try it out. Flex 4 applications work with Flash Player 10 only and I didn’t want to install it since it can’t co-exist with other FP versions. Also i love FB eclipse plugin and wanted to write Flex 4 code using that. Here is how i achieved my goal, 

 

PS: I am assuming that you are fairly familiar with Flex Builder or the Eclipse FB Plugin

 

Downloading the Flex SDK:

They have started releasing nightly builds of Flex SDK and i downloaded the latest one. Get it.

It doesn’t matter where you save the file. Once you download the file, go to your Eclipse Preferences and then in Flex Settings, select add this SDK. I keep Flex 3 as my default SDK and then we will choose this SDK specifically for Flex 4 projects.

 

Setting up a Project:

Create a standard Flex project as you would normally do in FB. Lets not worry about the main application file for now, first we need to change some settings for our project.

 

Right Click the Project and then select its properties. Go to Flex Compiler option and Select use a specific SDK. 

Choose Flex 4. Also I select the wrapper to have required player version to 10.0.0 even though i will be running swf directly. For my browsers the FP version is still 9.0.115.

I use the following sample code, it is taken from Adobe site,

 

 

<?xml version=”1.0″ encoding=”utf-8″?>

<Application xmlns=”http://ns.adobe.com/mxml/2009

             xmlns:mx=”library:adobe/flex/halo

             layout=”flex.layout.VerticalLayout” backgroundColor=”white

             width=”800” height=”600” xmlns:ns=”library:adobe/flex/gumbo” xmlns:skin=”flex.skin.*>

    <Ellipse width=”10” height=”10” y=”3>

        <fill>

            <mx:RadialGradient>

                <mx:GradientEntry color=”0xAAAAAA/>

                <mx:GradientEntry color=”0x336699/>

            </mx:RadialGradient>

        </fill>

    </Ellipse>

    <mx:Button label=”halo button/>

    <Button label=”gumbo button/>

</Application>

 

 

Note: This is all you have to do if you already have FP 10 installed. 

 

Since i don’t have FP 10, I just have to do a minor modification. FP 10 also comes bundled with your Flex SDK, if you look into flex_sdk_4/runtimes/player/mac, there should be a zip file. I have associated all the swf files with this app. So whenever i click on swf, it opens up with this version of Flash Player. 

 

We can do that change in our project by selecting the Run/Debug Settings for the project and then clicking the edit button.

if everything goes well the next time when you run this project, it will run in FP 10 application and you are all set for writing Flex 4 applications.

No responses yet

Jul 28 2008

Diving San Clemente

Published by under Diving

After a long hiatus in my diving, I finally decided to dive on Sunday 27th July. Sundiver was headed off to San Clemente (SC henceforth) and Kim from ValleyScuba was going to get her AOW (Advanced Open Water), so i decided to join that boat.

 

SC is a 5-6 hour boat ride on Sundiver so we were supposed to get on the boat saturday night. Packed my stuff and got ready to leave my place at about 8.30ish pm and finally after one u-turn i reached Alamitos Bay landing where the Sundiver is located. Completed the paperwork, met Kim and checked out the bunk assignments, we were supposed to share bunks and i was assigned the lower one which was closest to the bow. I checked out the bunk and it was pretty comfortable, more than what i expected. I managed to sleep well and didn’t have any problems as such.

 

Woke up early at about 6.30 am and we were already there, for me the breakfast was a bagel and banana. The first dive was going to be a deep dive and i was looking forward to hitting 100ft and beyond but alas that wasn’t the case to be. We all got geared up and since i didn’t have any buddies i wasn’t sure with whom i was going to dive. I assumed that i will dive with the folks taking advanced class so it will be easier for me, but i decided to be the nice guy and buddied up with Derrek who was from Missouri.

 

Derrek had an interesting experience when he came aboard Sundiver, he was expecting to rent all his gear on the boat and then dive. He didn’t realize that he had to go to the shop i.e Ocean Adventures and get his gear. I guess the folks on the boat managed to find him spare gear to dive in but he was wearing a 3mm wetsuit. He would normally freeze in Cold Calif water but today it was 67 F on the surface so he supposed he could handle the cold. Also he wasn’t AOW but he told me that he had been in 100 ft of water, i decided to stick a depth of 60 or less even though ended up going to 68. Before getting into water, this another girl comes up to me and asks if it would be cool for her and her buddy to follow us since it was their first time diving in Calif and she was afraid of getting lost in the Kelp. It was fine with me and told her that i might get lost too :D.

 

So after doing the routine checks, I got into water first and then the rest of gang followed me. We decided to just explore the reefs which were in about 30-40 ft of water, I descended, Derrek followed immediately but out of the two girls only one of them descended the other was nowhere to be seen. After spending couple of minutes in about 20 ft of water, we decided to surface to find the remaining of our party, this girl had some problems since it was her first dive in cold calif waters. She was mainly scared and not confident enough to dive, so we took our time at the surface and with about 2000 psi remaining (in my tank) we decided to give it another try. This time the only people at 25 ft was me and Derrek, I decided not to surface again and we continued our dive.

 

For a change my dive light was functioning properly and I was able to use it, found quite a few lobsters lurking in the cracks. A group of fishes feasting on a dead sea urchin didn’t mind us. Nothing too exciting just saw the usual california marine life, i need to refresh my Fish ID knowledge to put in a few more names out here :). About 25 minutes into the dive Derrek was feeling cold so we decided to end the dive and after the safety stop we were out of the water.

Lobster Family

Family of Lobsters, chilling in the crevices.

 

The usual

Sea Fan????????

 

Feasting on Urchin

Urchin feast, seemed yummy for them.

Dive 1: (this is all i get from my computer without downloading dive log)

Max Depth: 65 feet

Total Time: 30 mins.

After the first dive, I hydrated myself ate some just the usual. It seemed that the class doing advanced dove to about 81 ft only because that was the deepest they could go, so even if i hadn’t buddied up with Derrek i wouldn’t have gone beyond 81 ft. We moved to a different spot which had underwater caves and i was excited by it. Derrek spotted a sea lion and told me that he wanted to go after it, his whole intention of diving in Calif was to swim with Sea lions, bad choice buddy SC is not famous for Sea Lions, SB or Anacapa is. This time around the two ladies were going to dive on their own and not going to follow us or something. 

 

We decided to head in the direction of the caves and they were amazing. We were able to go underneath them and take a closer view and stuff like that. The structures wouldn’t be even classified as caverns in terms of diving, just some overhead reefs and passages through which we could swim. It was really cool. The marine life was usual and i think Derrek wanted to find that sea lion so he headed off towards the sands. He saw a ray pass by and i just caught a brief glimpse of it. We then explored the reefs little bit more and saw the usual critters. We ended the dive soon. I had some problems with my ear during this dive and i wasn’t sure if i could make it the next dive. My main concern was equalizing my ears.

Unknown

Unknown Entity

 

Dive 2:

Max Depth: 68 Feet

Dive Time: 25 mins

We now moved to a different side of the island and as we were moving i could see the water changing colors, it was getting more blue and clear as well. When we reached the calm waters near the Fish eye rock, the conditions were simply amazing. We were able to see the bottom from the boat i.e the visibility was 60 feet easily and the sun also had come out, it was simply amazing. I really hoped i would be able to equlize my ears during this dive, i just didn’t want to miss it. Derrek spotted a couple of sea lions chilling on the rock and he wanted to swim out there, I wasn’t too excited about the idea. I would explore the kelp rather than chasing sea lions. 

 

I reluctantly agreed to his idea of going after the lions on the rock, he got into water and i soon followed. Instead of swimming over the kelp i decided to head for the rock from underneath so i dove to about 20 ft, Derrek was on surface and i followed him. It was a totally different growth closer to the rocks, no kelp but lots of grass and stuff which was really cool. When we got to the rock, i surfaced and we saw that the lions had vanished and they went over to the other side. There was no way that i was going to follow them out there, so i convinced Derrek to continue the dive and explore the kelp rather than to chase the sea lions. So we headed back and were exploring the kelp all the time. Came across a couple of lobsters, there was so much junk at this location. Various steel boxes, exhaust pipes etc were littered on the ocean floor. We came across a tiny little nudibranch which was cool, i tried photographing those juvenile Garibaldis but they would run away from me the moment i got closer. We were 43 minutes into the dive and i still had about 800 psi left in my tank, at this moment Derrek signalled he was at 500 psi so we decided to end the dive.

 

It was so amazing out there that i decided to snorkel, it was relaxing just to lay out there and watch the ocean floor from the top. I must have snorkeled for about 10 – 15 mins and then called it a day with one of the best dives i have done. The last dive made the whole trip totally worth it.

The Greens

The Greens, you can see sun rays.

 

Kelp Forests

The Kelp Forest.

 

Nudi

Nudibranch

Dive 3:

Max Depth: 53 Feet

Dive Time: 44 mins

There wasn’t anything special as such for me to have for lunch but i managed to survive on mashed potatoes, salad and the chocolate cake which was awesome. Had a brief nap on the way back and when i woke up we had reached Catalina and there were another 2-3 hours left before we reached land. Just did timepass on the boat in general and when i turned on the cell phone there was a message from Cory (my supervisor at work). 

 

I had to get in the office and figure out an issue we were having. We took sometime to dock because there was another small boat docked in our place, the harbor patrol came and towed the boat away. So finally at about 8.15 pm we docked and i reached my place at about 9pm. Dumped everything in the tub and then headed off to work to fix that small problem. It wasn’t big of deal to get it fixed and then after having pizza for dinner , I finally dozed off at about 12. It was end to a very long and satisfying day of diving.

9 responses so far

Jul 23 2008

Reducing Main Application file size in Flex

Published by under AS 3.0,Flex

I know you might have come across the usual posts for reductions of file size of a Flex swf. Some of them are listed below incase if you don’t already know about it.

  • Use the optimize parameter for the compiler.
  • Don’t embed images, load them during runtime.
  • Use only classes which are required, import only single class instead of the complete package.
  • try using modules instead of developing one single application.
There is one more thing which is really useful if you are looking to  and i haven’t it being discussed that much.
 
Convert your CSS files into SWF files and then load during runtime.
 
When you use stylesheets to customize your Flex application, we usually import it in the mxml using the <style> tag. I would recommend using StyleManager class to load the styles swf file during pre initialization of your application.
 

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” width=”1024″ height=”768″ preinitialize=”applyCSS()”>
 

applyCSS would look something like this,

private function applyCSS():void{
StyleManager.loadStyleDeclarations("styles/mystyles.swf")
}

 

To convert your CSS into SWF in Flex Builder simply right click on it and then select convert to swf file. 

Overall ofcourse your will be still loading in that styles swf file, so the bandwidth usage will remain the same but the initial load time will be less. 

 

You might argue that it will be the same wait time for user to interact with the application but atleast the initial preloader will be on screen for less amount of time. 

 

Also depending on your application you can break it into multiple stylesheet documents and then load the required styles when a particular module loads thereby getting a lot of leverage from this technique. Hope this helps :)

One response so far

Jul 21 2008

References and how they work in Actionscript

Published by under Flash,Flex

This tutorial/article is mainly for newbies/intermediate programmers. Someone who is writing Actionscript code without coming from C or Java background will benefit from this. 

A quick test to find if this article is for you, without executing this piece of code can you predict what will be the trace statement will output,

function referenceTest():void {
var mainArray:Array = new Array("1","2","3","4");
var tempArray:Array = mainArray;

tempArray.pop();

trace(mainArray.length + " is the length ");
}

 

Be honest and if you think the answer will be 4 then you definitely need to read this article and understand it. Still confused???? now you can run this piece of code and then you will find that the answer is 3.

how is this possible? We are not modifying mainArray at all, yes we are not modifying the reference to the array but then we are creating another reference to this array and then using it to modify the array. confused still, i need to explain it in more simple terms.

Lets take a look at the picture below, forgive my drawing skills but i think it serves the purpose,

 Pointer example

var mainArray:Array = new Array(“1″,”2″,”3″,”4”);
this line of code actually creates a reference which we have called mainArray. This reference points to an array class.

 

var tempArray:Array = mainArray;
one would expect this to create a duplicate array but no, we are just creating a new reference to the
same memory block, this reference is called tempArray.

 

tempArray.pop();
now we are using this reference called tempArray to modify the block of memory its pointing at, and hence that block of memory changes and we have only 3 elements in this array now.

Since mainArray is a reference pointing to the same block of memory as tempArray is, whenever we use mainArray reference it has changed now and its length is no longer 4.

 

if we do something like this, var tempArray:Array = new Array(“1″,”2″,”3″,”4”);
then we are actually creating a new block of code in memory and any changes to tempArray won’t affect mainArray.

hope now your doubts have cleared.

Remember, In Actionscript all complex data types are passed by reference and not by value.

 

Another test to find out if you understood how this works, try the following code, I am not including the graphical elements and i shall leave upto you to fill out the code for that.

package {

package {
    public class SampleClass {

        public var value:String;

        public function SampleClass() {

        }
    }
}

A sample test class to be used in our example, I am copying this code from Flex so will include only the actionscript code, you need to do proper initialization etc.

public var dataArray:Array;

//initialization function with an array holding the sampleclass instances
private function init():void{
    dataArray = new Array();
    for (var i:Number= 0;i&lt; 6 ;i++){
        var tempSample:SampleClass = new SampleClass();
        tempSample.value = String(i);
        dataArray.push(tempSample);
    }
}

//this function is called on button click
private function findSample(event:MouseEvent):void{
   
    //call the getSample function
    var tempClass:SampleClass = getSample();

    //if we find a match then we will change its value
    if (tempClass){
        trace(" found something lets change value");
        tempClass.value = "found yay";
    }

    for (var i:Number = 0; i &lt; dataArray.length ;i++){
        //what do you this this trace statement will output
        //will it show the modified value or will output 0 through 5
        trace(dataArray[i].value);
    }
}


//this function is called from the findSample
private function getSample():SampleClass{

    var foundSample:SampleClass;

    //get the string on which matching is to be performed
    var findSample:String = sampleText.text;

    for (var i:Number = 0; i &lt; dataArray.length ;i++){
        if (dataArray[i].value == findSample){
            foundSample = dataArray[i];
            break;
        }
    }

    return foundSample;
}

Once you get run this modify the getSample function as shown below and compare the results. It should give you a better idea.

//this function is called from the findSample
private function getSample():SampleClass{

    var foundSample:SampleClass = new SampleClass();

    //get the string on which matching is to be performed
    var findSample:String = sampleText.text;

    for (var i:Number = 0; i &lt; dataArray.length ;i++){
        if (dataArray[i].value == findSample){
            foundSample.value = dataArray[i].value;
            break;
        }
    }

    return foundSample;
}

 

hope this article was useful, as usual questions, comments always welcome :) 

 

No responses yet

Jul 19 2008

Creating a SVN repository

Published by under Server Side

I had found this awesome tutorial online to create svn repository and how to use it but i couldn’t find it again. I had to work hard and google a lot to get the repository working as i wanted it to be.

 

In end it was very easy to get it going and i would like to share with everyone. I won’t go into the installation procedures, i expect you have all the tools up and running. By tools i mean svnadmin, svnserve and svn installed.

 

I did this procedure on a Fedora 6 linux server and am assuming it should be the same for all unix systems.

Disclaimer: I am using svnserve for svn, it is not a secure way to implment svn and if you want security then i suppose you should stop reading this further 😀

 

svnadmin create /myreponame/mainfolder

 

That is it, the repository is created, its a blank one but then its taken care of. We need to add something now to the repository. So we will import something from the server. 

 

svn import projects file:///myreponame/mainfolder -m ‘initial import’

 

projects is the folder which has all the files you want to import, I had two Flex builder projects inside this projects folder and they were imported into the svn.

 

At this stage the svn is ready, by default the anonymous access is enabled and we need to change that. The configuration files exist in /myreponame/mainfolder/conf folder. We need to modify svnserve.conf and passwd which holds your svn access passwords. type in whatever username and password you need and then save it. The authz file controls the various read/write property and i don’t bother with it since it is for personal use.

 

just one final thing before we are ready to hold the repository, svnserve is the server for svn access, to start it as a daemon just type the following,

 

svnserve -d -r /myreponame/mainfolder

 

we need to point it to the correct folder, that is it you are all set with your repository.

 

svn co svn://www.yourdomain.com/mainfolder will download the repository and then you can use it.

 

I have used the above procedure to create a working svn repository and its for personal use only.

No responses yet

Jul 15 2008

Silverlight v/s Flash

Published by under General

Being a Flash/Flex developer i am prejudiced towards Flash but Microsoft really amazes me. The websites they develop or endorse are made using Flash and not Silverlight. I would expect Microsoft to go full on with Silverlight or is it because I am using Safari to visit this website. 

So much for a Flash killer, oh wait i forgot Zune is the IPod killer isn’t it???????? What next? are we going to see IPhone killer as well. 

I have to admit i don’t like MS at all, I have been a Mac user for over 3 years now. 

http://www.worldwidetelescope.org/ this is the website i am talking about, I think the MSN video player is made using Flash. 😀

I will be updating this as i feel to rant about MS :)

No responses yet

Jul 14 2008

Cairngorm and Remote Object

Published by under AS 3.0,Flex

I have had opportunity to use Cairngorm with Webservices, Httpservice and Remote Object as well. I had some difficulty passing variables to the amfphp backend but ultimately resolved it. here is how,

public function execute(event:CairngormEvent):void {
           
    product = event.data.product;
    responderObj = event.data.responderObj;
    productId = product.products_id;
    var service:RemoteObject = ServiceLocator.getInstance().getRemoteObject("getProducts");
           
    var operation:Operation = service.getOperation("get_colors") as Operation;     
   
    //this method of sending arguments wasn't working, it was sending undefined.       
    //var dataArray:Array = new Array({productId:"93"});
    //operation.argumentNames = dataArray;
   
    var token:AsyncToken = operation.send(productId);
    token.addResponder(this);
           
           
}

For some reason operation.argumentNames i thought would take the array and then send the objects in this array as variables, but it was sending undefined as the value for the variable.

I resolved the problem by sending the variables in send function and i am sure you can send more than one variable in the send function.

2 responses so far

Jul 09 2008

Catalina Long Weekend Trip

Published by under Diving,General,Hiking

I was kinda desperate to get out of the city for 4th of july long weekend and was trying different options but nothing worked. Finally due to last minute cancellations a campground at Catalina was available so i booked it. Bhanik, Amrish and Rajesh (henceforth referred to as BAR :) ) decided to join me on this trip. They were made aware that there was a hike of 12 miles involved on the final day. Here is how the trip went by. 

Pre-Trip Preparations. 

I went to REI to pick up some cookware since i didn’t have any for backpacking. I found something useful Kitchen Cupboard (which i didn’t take completely) and Cooking system (which was very useful). I also picked up some food items and desert for our dinner. 

Headed off to USC to Amrish’s place to pick everyone and after making sure they packed properly we went to Paru’s for dinner. Dinner at Paru’s was awesome as usual and then came back to my place after stopping at Ralphs and finally after packing my stuff i dozed off at about 12.30.

 

4th July

We had to take 7 am Catalina Express from San Pedro so had to wake up at 4.30 am to get everyone ready and then drive to the terminal. We made it to the terminal at about 6.45, just in time, we reached Avalon at about 8.15 and immediately stored most of the stuff in locker just outside the dock. We decided to take the shuttle bus to BlackJack campground since BAR wanted to take Introduction to Scuba and i was planning to dive along with them. So we got our campsite details, booked the 4 pm bus to Blackjack junction and since the Scuba was going to be at noon we had some time to kill before that. 

Golf Cart to the rescue, We rented a golf cart to go around Avalon and since i was the only person above 25 i was the lone driver. Amrish and Rajesh wanted to drive it but it was supposed to be $850 ticket and I didn’t want to take that chance. We took the scenic route on the island and stopped for sometime in between to take pictures and stuff, an hour well spent. Since it was almost time for BAR scuba lessons we headed off there and I also decided to rent BCD, Regulator etc so that i could also dive. Yes, I would be diving Solo. I have got my certification at Casino point and also have dove there before so I was completely comfortable diving on my own.

View of Avalon from the cart

View of Avalon from top.

Since i wasn’t sure if i could equalize my Ears, I decided to head out and see what happens. The water wasn’t as cold as i am used to, it was about 64F on the surface. I descended down the buoy and wasn’t sure in what direction i was gonna go but i found myself at the Plague. I was surprised at the marine life, It was different than i have seen here before. Plenty of different fishes and I also saw a Bat Ray zoom by. The Kelp Bass were huge, they seemed to have grown in few months. I ended the dive after consuming 1000 psi of air and didn’t go more then 40 feet deep.

Once comfortable with the fact that i could equalize my ears, I got more confident. This time Bhanik and Amrish got ready to go in the water and I followed them 10 mins after they got in. Bhanik had a leak in his tank and Amrish without the hood was having hard time getting comfortable in water. The instructor had to get him out since he wasn’t completely comfortable. Bhanik did a dive to about 12 ft, I followed him for a while and then decided to head off on my own. My camera stopped working too and that was sad since i saw a lot of critters. I didn’t wander too far from the buoy and just decided to explore the reefs and the kelp. As mentioned earlier the Kelp bass were huge and there was a big lobster hiding in the reef. I was down to 600 psi and i decided to end my dive. Amrish, this time with a hood and Rajesh were getting ready to dive, I thought with little air left i could take a look at them but I had too much water in my BCD and hence i decided to call it a day. Amrish and Rajesh stayed in for a long time and i was getting little worried but it seems they dove to about 30 ft. It was already 2.45 pm by the time the dives ended and we had to take the 4 pm bus so we had to hurry up.

Amrish and Myself decided to go and pick up the stuff from the lockers while Bhanik and Rajesh went to get firewood etc. Initially we planned to have dinner directly but then after the dive everyone was hungry so we decided to get something on the go. I finished my burger in less than 2 mins, was i hungry or what. We had two firewood bundles and it was a 1.5 mile hike from the junction to the campground, it would be suicide carrying them so we decided to return one of them. So at Blackjack junction, I decided to carry that firewood bundle and the 1.5 mile hike to campground was gentle uphill climb. It was a killer, specially after all the diving we did. Bhanik decided to carry the firewood after a while and finally we made it to the campground at about 6pm. The sun was brutal all along the way and i got some burns on my hands. Returning that one bundle of firewood and that burger were the smartest decisions of the day.

View from Blackjack Campground Junction

View from Blackjack Campground Junction

We found out site fairly easily and there was already a tent erect out there, I thought it was the one we had rented. I immediately crashed and took a brief nap for more than an hour and was woken by the chatter of ranger. 

Campsite

Campsite

Gilligan, the ranger. He was cool and very helpful. He gave us the tent and also propane since we had rented a stove but he didn’t have it on him. He left and we started pitching the tent only to discover that it had one of the poles missing and hence we called the ranger. He was back very soon and handed us another tent, apologizing and stuff. The other tent he gave us, its poles were also messed up but then we managed to combine poles from two tents and have a tent pitched up. The ranger was about to leave and while backing up he slammed into the trash can and made a mess of it. He seemed to be amused by it and he had an extra trash can which he kept there.

It was about time to make dinner and get a fire going. We had chana masala for dinner and cheesecake for dessert. It was good even though i messed up making of the cake. It was a long day with two more long ones ahead and we all slept well.

 

5th July: Hike to Little Harbor

 

We had already planned to do 7 mile hike to Little Harbor. I decided to take it easy and not wake up early for the hike. So we all got up at like 9.30, had our breakfast which was coffee and bagel. We started the hike at about 10.30 and it was downhill for the first 3.2 miles till we reached the ranch. The cotton wood trail we took was going to take us all the way to the wrong beach but fortunately for us we met couple of people on the way who told us that we missed the diversion to the ranch. So after correcting ourselves and getting on the right path again we reached beautiful little harbor campground at about 2 pm. Since we didn’t book snorkel rentals in advance, there was nothing to do. No one was interested in Kayaking out there. 

First View of Little Harbor

First View of Little Harbor

Since the hike on the way back was going to be continuos uphill, we decided to take the bus back to Blackjack junction and do the 1.5 mile hike to campground. It was 4 pm bus so we just relaxed at the beach, played some cards and just walked around. We took the 4 pm bus and the hike to Blackjack was lot easier than the previous evening. All of us took showers that evening and it was indeed refreshing. 

Dinner was beans and rice though the pack had some fancy name for it and the dessert was strawberry crumble. I preferred the previous night’s dinner and dessert as well. Since we were planning to get up at 4 am  and leave as early as we could, everyone went to bed early.

 

6th July: The long hike to Two Harbors

 

It is 11.8 miles hike from Blackjack campground to Two harbors and we woke up early at 4.30 am to pack everything and leave as early as we could. Breakfast was again coffee along with Bagels and by the time we left the campsite it was 6 am. We had to pack up the tents and clean up everything so it took us a lot of time. The climate was amazing by the time we got at the Blackjack junction it was foggy and the visibility on the road was about 30 feet. It was really a pleasant walk despite the fact that i had about 25-30 pounds on my back, its not that much but still. As we got closer to the airport, yes there is airport on top of catalina island, we saw a heard of wild buffalos which seemed ready to attack us if we got any closer to their young. 

Heard of Wild Buffalo

Herd of Wild Buffalo

Dew Flower

Advantage of Hiking Early.

We took the airport trail loop, there is a sign which says private road no admittance but the trail goes on that road itself. On this trail there was a split which i was tempted to take but we were supposed be on this trail for 1.6 miles and it didn’t seem that we walked for that long. So we continued on this airport loop trail and met someone on the way who confirmed that we were on the right path. We hit another junction, where one of the signs said cross catalina trail and other was small one with EL 1.5 miles. Emerald Landing (EL) trail was the correct one to take and it would be another 1.5 miles before we hit next junction but how wrong we were….

After walking for about half hour we hit another junction and it was very tempting to take that supposedly short cut trail to the left, we met one more person who told us we would be fine on the left but he didn’t seem that sure. The right path would slowly but surely take us on the right path, how ironic :) but we decided to continue on the left steep trail. We continued on it for another half hour or so and hit a dead end. I could see a trail continuing in my head and went on, others weren’t so sure and they were correct, something which i realized after another half hour. Traversing this sloped hill, we hit a ridge line, i kept on going along that ridge with others complaining to me behind and being afraid that we won’t be able to turn back etc.

My sense of adventure/willingness to experiment/over confidence whatever you want to call it got better of me at that time and i kept on going until we saw ocean and guess what it wasn’t two harbors but it was little harbor. how fascinating, jaana tha japan pahuch gaye chin (wanted to go to japan but reached china), its an old hindi song. 

Steep Hill

It all went wrong at this point. Yes I had carried my Fins and Snorkel gear :)

It wasn’t a pleasant feeling at all and with almost an hour lost turning back didn’t seem an option. We contemplated going to little harbor and then taking shuttle to two harbors but we couldn’t speak to a representative and get confirmed tickets on the bus. Also it seemed that we were about 4-5 miles away from two harbors anyway, our boat left at 2.45 pm and it was about 9 – 9.30 so we had plenty of time as well. We decided to get off this hill and on the road which was visible to us at the bottom and take it from there. With no visible trail to get off this mountain i just took the route which was less steep and seemed easier until we reached a small trail. Even though this wasn’t going to take us exactly where we planned on going it would still lead us to the dirt road connecting little harbor and two harbor. 

Once at the bottom of this hill, we had to cross a muddy marshland where we had to trample some of the plants to avoid getting into the mud. Bhanik managed to get one of his feet into the mud and it was messy. He decided to ditch his socks (no we didn’t throw them there, they were dumped in LA) and wear a plastic bag instead of the sock. Once on the dirt road, I wanted to maintain my rhythm and didn’t take a break along with BAR. I told them to hitch a ride in the first vehicle they could find and make it to two harbors, it was going to be a 4 mile hike in the sun on this dirt road. I kept on going at my pace which wasn’t that much at all, about half an hour into this walk i saw Bhanik get a ride and he stopped to get my backpack. I decided not to hand my pack since i would need water etc on the way but got rid of my tent, event though it didn’t seem that much of difference to me i am sure it helped a lot. Rajesh and Amrish also caught up with me by that time but they again decided to take a break after sometime and i kept on going. It wasn’t exactly a pleasant walk in the park but the ocean views all along the final few miles made it worthwhile. I met up with Bhanik at Two harbors at about 12.15 pm, the ranger had refused to give ride to Amrish or Rajesh but they got ride from USC Wrigley dudes and we all were in Two Harbors by 12.30 pm.

Bhanik wanted to snorkel from the start itself and after the hike, Amrish and Rajesh didn’t want to. I rented a wet suit (i was carrying my fins, mask etc) and Bhanik complete snorkeling gear  and we jumped into the water to snorkel for about an hour. There wasn’t much to see on the beach but then when we went to one side which had some kelp, we saw garibaldis, few more fishes. Also spotted a tiny Spanish Shawl (nudibranch) and a sea slug. It was surprising that i managed to free dive with a 3 mm wet suit and no weights. 

The 2.15 pm boat took a long while to unload and departed late and hence our boat also got delayed. We reached San Pedro and after a short drive, we reached Amrish’s place at about 5.15 pm. That was it, our really long long weekend had ended. It was a very nice one too. 

 

More Pictures

Bhaniks’s Album

Rajesh’s Album

Rest haven’t uploaded their pics, My camera was in water proof case but it stopped working.

www.visitcatalinaisland.com For all information regarding Catalina, ofcourse you can always contact me as well.

4 responses so far

Jul 03 2008

Advantage of using Static classes for constants

Published by under Flash

Static classes for defining constants, wait what?????. You might have come across classes like StageDisplayState in flash.display package and it doesn’t contain any useful methods except for constants which are used for setting the state of stage. This is not exactly a static class but if you remove all the methods it would be one. 

Why do we need this class when we can set the stage property like this in AS 2,

Stage[“displayState”] = “fullScreen”;

where as in AS 3/Flex its wise to use something like,

Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;

It might seem unnecessary to create an extra class to define variables but its helpful. 

  • A programmer might decide to change the string instead of fullScreen it will be now FullScreen, dumb but it can happen. If it does happen then there won’t be any errors at compile time but you might get run time errors.
  • By same argument as above, if we decide to change StageDisplayState.FULL_SCREEN to StageDisplayState.FULLSCREEN we will get a compile time error and we can fix it.
So its mainly to fix problems during compile time rather than run time the above method is useful. Hope it makes sense. I should probably come up with a more concrete example i suppose.

No responses yet

Jul 01 2008

Flash SEO optimization

Published by under Flash

Finally Google and Yahoo we spiders are able to index swf file. It is a great news, here is the link to the entire article, Google Blog. They don’t specify how exactly one would increase chances of been found since its proprietary but i would love to explore that.

 

I can imagine there would be a new breed of SEO optimizers specifically for Flash, let keep our eye out. I might jump on the bandwagon as well if i figure out something 😀

No responses yet