<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32350163</id><updated>2011-12-24T08:44:36.410+08:00</updated><category term='mobile'/><category term='ruby'/><category term='barcamp'/><category term='yahoo pipes'/><category term='WebSecurity'/><category term='portlets'/><category term='design patterns'/><category term='MVC'/><category term='ec2'/><category term='phpunit'/><category term='beanshell'/><category term='monit'/><category term='selenium'/><category term='geeks'/><category term='social'/><category term='elastic ips'/><category term='puzzle'/><category term='algorithms'/><category term='memcache'/><category term='phpfpm'/><category term='Australia'/><category term='gridsphere'/><category term='GIT'/><category term='Singapore'/><category term='OWASP'/><category term='frameworks'/><category term='python'/><category term='biology'/><category term='spring'/><category term='nginx'/><category term='Static vs Dynamic typing'/><category term='haskell'/><category term='IRC'/><category term='video'/><category term='aws'/><category term='ebs'/><category term='linux'/><category term='facebook'/><category term='mysql'/><category term='CSS'/><category term='java'/><category term='technical'/><category term='webtesting'/><category term='Subversion'/><category term='php'/><category term='talk'/><category term='Closures'/><category term='music'/><category term='logrotate'/><category term='meta programming'/><category term='dynamic typing'/><category term='Conferences'/><category term='Changi'/><category term='Functional Programming'/><category term='brisbane'/><category term='datastructures'/><category term='mac'/><category term='OOP'/><category term='random thoughts'/><category term='fun'/><category term='VIM'/><category term='JavaScript'/><category term='j2ee'/><category term='xcache'/><category term='static typing'/><category term='UandMe'/><category term='talks'/><category term='duck typing'/><category term='OSDC'/><category term='google'/><title type='text'>ÇÖÐÊSHËþHÈRD's Garbage Collector</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32350163.post-1458980328345428574</id><published>2010-11-01T21:39:00.004+08:00</published><updated>2010-11-01T22:18:22.268+08:00</updated><title type='text'>php-fpm with nginx on macosx</title><content type='html'>PHP 5.3.3 is bundled with php-fpm, however the macports version doesn't have a fpm variant yet. There are very few blogs that talk about setting up php-fpm with nginx on macosx. So I have documented here the steps I have followed to get them working. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1)port uninstall installed and php5&lt;/div&gt;&lt;div&gt;2)port selfupdate&lt;/div&gt;&lt;div&gt;3)edit /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/php5/Portfile&lt;/div&gt;&lt;div&gt;and add   "--enable-fpm" option to the configure.args. More details about this can be found at &lt;a href="http://serverfault.com/questions/170394/nginx-and-php-fpm-on-os-x"&gt;http://serverfault.com/questions/170394/nginx-and-php-fpm-on-os-x&lt;/a&gt;&lt;/div&gt;&lt;div&gt;4)Install the fastcgi variant of php "port install php +fastcgi"&lt;/div&gt;&lt;div&gt;5)Check if you have /opt/local/sbin/php-fpm binary&lt;/div&gt;&lt;div&gt;6)Configure /opt/local/etc/php-fpm.conf&lt;/div&gt;&lt;div&gt;7)Create a plist file called org.macports.phpfpm.plist. I created a simple plist file with &lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;/opt/local/sbin/php-fpm as the only string tag. I suggest that you read about plist files and create a proper plist file. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;8)copy the plist file to &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;/Library/LaunchDaemons/org.macports.phpfpm.plist&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;9)add the plist to file to startup "sudo launchctl load -w /Library/LaunchDaemons/org.macports.phpfpm.plist"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;10)reboot the machine,  verify if php-fpm is running. "ps aux | grep fpm"&lt;/span&gt;&lt;/div&gt;  &lt;title&gt;&lt;/title&gt; &lt;meta name="Generator" content="Cocoa HTML Writer"&gt; &lt;meta name="CocoaVersion" content="949.54"&gt; &lt;style type="text/css"&gt; p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Georgia} &lt;/style&gt;   &lt;div style="text-align: -webkit-auto;"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1458980328345428574?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1458980328345428574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1458980328345428574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1458980328345428574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1458980328345428574'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2010/11/php-fpm-with-nginx-on-macosx.html' title='php-fpm with nginx on macosx'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6835675506390240243</id><published>2010-09-07T17:30:00.014+08:00</published><updated>2010-09-08T14:57:48.530+08:00</updated><title type='text'>Bangalore-Yercaud-Bangalore Cycle Ride</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dplBFYIA6gU/TIczZplrZtI/AAAAAAAAAwg/EqmTl572ZoU/s1600/after_reaching.jpg"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dplBFYIA6gU/TIczO3_Ci7I/AAAAAAAAAwY/qIhud4UMab4/s1600/walk_thru_jungle.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dplBFYIA6gU/TIczDAu7cwI/AAAAAAAAAwQ/mkc_BB5RiHA/s1600/nice_group_pic.jpg"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dplBFYIA6gU/TIZskY4qHVI/AAAAAAAAAwI/pzBkv0ZJBEo/s1600/Salem_from_Yercaud.jpg"&gt;&lt;/a&gt;For those who don't know this yet, five of us rode from Bangalore to Yercaud on Saturday. Here is the ride report for the benefit of others interested in riding to Yercaud. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My alarm went of at 2:00am on saturday morning. I finished my morning chores and started from my home at 3:15am. After just a few meters of riding I got a call from Shashi confirming that all other rides have started and were on their way to Silkboard. I started pedaling slowly and met Ramey (another rider in crime) less than a kilometer from my home. After a brief conversation, he cruised ahead to silkboard. I was riding slowly. The road was mostly empty except for the night patrol. I reached Silkboard and waited for Shashi and other riders from Kanakapura road to join us. Shashi, Harisha &amp;amp; Prakash arrived at Silkboard a few minutes later. Myself, Shashi and Ramey were on hybrids, Harisha and Prakash were on mountain bikes.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_dplBFYIA6gU/TIczDAu7cwI/AAAAAAAAAwQ/mkc_BB5RiHA/s400/nice_group_pic.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5514432395567919874" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;We all started from Silkboard at 4:05am. The road was lit up with streetlights till Electronics City after which it was dark. We rode mostly on the service roads till we reached Hosur, where we stopped for tea at around 5:15am. By the time the sun came up, we were half way between Hosur and Krishnagiri. The route from Hosur to Krishnagiri was full of downward slopes. We stopped for breakfast at 7:30am at Krishnagiri near the Krishnagiri-Chennai diversion. We rode at an average speed of 32km/hr from Hosur to Krisnagiri.  Shashi had convinced his brother Sridhar and his friend Sandeep to come to Yercaud in a car. Special thanks to them for carrying our bags. Sridhar and Sandeep arrived at our breakfast place just before we finished our breakfast. &lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;We left the restaurant at 8:30am and headed toward Dharmapuri. We stopped for tea somewhere before Dharmapuri. I don't remember the time we crossed Dharmapuri, but we reached a place called Deevattipatti around 2:30pm. We stopped for snaps at multiple places before Deevattipatti. We decided to take a shortcut to Yercaud avoiding Salem. Harisha had a puncture before Deevattipatti. Luckily there was a puncture shop close by and we got it fixed quick. We took a diversion from Deevattipatti towards a place called Danishpet. The road from Deevattipatti to Danishpet had only a single lane. It was surrounded by a few streams and lakes. We stopped at Danishpet before a railway cross for tea. Danishpet to Yercaud base was around 25km. Taking that route turned out to be the biggest blunder we made. The route was full of mud and stones. There were no roads at all in some parts. We had to lift our cycles and walk  to cross one of the small streams. It is worse than the worst road you would find along the Anchetty-Hogenakkal route.  Luckily none of us were on road bikes. I wonder why Google maps lists these roads. Every local we asked said the main road was 2-3km away at every point. But we never seemed to hit the main road. After cycling around 25km we reached the main road. We took almost 3 hours to cover those 25km in jungle. My front tire was flat once we crossed the forest region. I didn't have the patience to fix the puncture. So we just changed to the spare tube and headed to Yercaud base.&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_dplBFYIA6gU/TIczO3_Ci7I/AAAAAAAAAwY/qIhud4UMab4/s1600/walk_thru_jungle.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_dplBFYIA6gU/TIczO3_Ci7I/AAAAAAAAAwY/qIhud4UMab4/s400/walk_thru_jungle.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5514432599378004914" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We reached Yercaud base at 6:30pm. We took a few snaps at the 1st hairpin bent. It was already dark and we had 21km with 1594 meters of ascent to climb. Unlike Nandi, the hairpin bends were smoother, but the straight roads were steeper. I climbed along with Harisha and we took breaks almost every couple of kilometers. There were lot of monkeys along the way. We ran out of all the water we had and there were no places along the way to get water from. It drizzled for a brief period, and we stopped under the shelter of something that looked like resting place for travelers. Couple  of other people stopped at the same place and shared their water with us. We were only half way to Yercaud and we were extremely hungry. Luckily Harisha had some dry fruit. Shashi was hitching along with a moterbike and came to the top. Shashi mentioned that one of the police guys said that there was a bison roaming around, but we never encountered the bison. Three of us started climbing together. After another couple of kilometers we ran out of water again. At the same spot we found a hut in one of the coffee plantations and filled our water bottles there.  After having water and dry fruit, we started climbing again. Ramey and Prakash boarded a lorry that was climbing up. At 6km point the lorry caught up with us. The lorry guys offered to give us a lift, but we declined and continued to climb. At around 10:15pm we reached the top. We rode the Lake Forest resort from the top. We had covered 236km in total. Sridhar and Sandeep had arranged for a nice dinner. We freshened up, had dinner, and dozed off. &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_dplBFYIA6gU/TIczZplrZtI/AAAAAAAAAwg/EqmTl572ZoU/s400/after_reaching.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5514432784492095186" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The next day we went around Yercaud for sightseeing on our bicycles. Shashi went to Salem with his brother to meet his relatives. The rest of us went to couple of temples, and went boating. I roamed around one of the coffee plantations. I dozed of at about 8:00pm. I guess everyone else had dinner after that. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We started back from Yercaud at 4:15am on Monday. We rode slowly till the base. Stopped multiple times for snaps. The sky was clear and the stars were clearly visible. The moon was yet to rise, I guess. The horizon was also clearly visible. It is one of the best places for star gazing. I wished I had woken up couple of hours earlier to gaze at the sky. BAS (Bangalore Astronomical Society) members would love the place. The view of salem from the top was also awesome. We met a few people jogging at the base, took a few snaps at the last hairpin bent.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_dplBFYIA6gU/TIZskY4qHVI/AAAAAAAAAwI/pzBkv0ZJBEo/s1600/Salem_from_Yercaud.jpg"&gt;&lt;img src="http://4.bp.blogspot.com/_dplBFYIA6gU/TIZskY4qHVI/AAAAAAAAAwI/pzBkv0ZJBEo/s400/Salem_from_Yercaud.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5514214166172933458" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 267px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ride from Salem was uneventful till the Dharmapuri ghats. We stopped for tender coconuts at multiple places. Sridhar and Sundeep were on their car and caught up with us close to the toll booth before Dharmapuri. Harisha had a puncture at the toll booth. We removed his tire and I took it to the nearby puncture shop to fix. One of the moterbikers offered Harisha a lift and he came to the puncture shop carrying his bike. We got the puncture fixed and went to A2B before Dharmapuri. Shashi and Prakash were done with breakfast by the time we reached and they started riding ahead of us while we had breakfast. After breakfast we started climbing the Dharmapuri-Krishnagiri ghats. It was a steep upward slope and we took multiple breaks. We reached Krishnagiri at 1:30pm. Shashi and Prakash had also arrived a few minutes before. All four of us had lunch and started riding towards Hosur. Krishnagiri-Hosur route was full of steep ascents. We had cruised the same route at 32km/hr during our onward journey; on the way back we stopped multiple times. I guess we were riding at 15-18km/hr. Shashi had a puncture and fixed it with Prakash while Harisha and I stopped at a dhaba and had some food. At around 5:30pm they caught up with us at the dhaba. Hosur was around 20km away from us from where we were. We started riding and reached hosur around 7:00pm. Hosur has some of the worst possible roads. The local traffic mixes with the highway traffic and there were lot of people riding on the wrong side. It was very difficult to cross Hosur. Me and Harish reached Silkboard at 8:45pm and parted ways to our homes. At around 9:15pm I reached my home. The 470km ride was over! Got a call from Shashi at 9:30pm informing that he has reached home.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6835675506390240243?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6835675506390240243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6835675506390240243' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6835675506390240243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6835675506390240243'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2010/09/bangalore-yercaud-bangalore-cycle-ride.html' title='Bangalore-Yercaud-Bangalore Cycle Ride'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dplBFYIA6gU/TIczDAu7cwI/AAAAAAAAAwQ/mkc_BB5RiHA/s72-c/nice_group_pic.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5831683844105119081</id><published>2010-08-02T13:41:00.011+08:00</published><updated>2010-08-03T19:21:39.445+08:00</updated><title type='text'>My First Ride To Nandi Hills - Biking Carnival</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs149.snc4/36829_434961197148_536682148_4967189_7848527_n.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs231.snc4/38864_434962422148_536682148_4967208_6859626_n.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 604px; height: 453px;" src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs231.snc4/38864_434962422148_536682148_4967208_6859626_n.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;It has been a week since I bought a &lt;a href="http://www.trekbikes.com/us/en/bikes/bike_path/hybrid/7100/"&gt;trek 7100&lt;/a&gt;. I have been waiting for an opportunity to go for a long distance ride. Bikers from &lt;a href="http://groups.google.co.in/group/Bangalore-bikers"&gt;Bangalore Bikers Club&lt;/a&gt; (BBC) were organizing the month end long ride to &lt;a href="http://en.wikipedia.org/wiki/Nandi_Hills,_India"&gt;Nandi hills&lt;/a&gt;. So I decided to bike along with other bikers to Nandi on 1st of August. More than 100 people signed up for the ride.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I woke up at 4:00am on 1st August, took a shower, drank two liters of water, finished my other morning rituals and went to Cubbon park at 5:30am along with &lt;a href="http://rampr.net/"&gt;Ram&lt;/a&gt;. We were the first two bikers to reach Cubbon park. During the next few minutes, bikers started to pour into Cubbon park. Ram borrowed a hand pump from one of the riders and inflated both of his tires. There were roughly 30 bikers at Cubbon park by 6:15am. &lt;a href="http://jace.zaiki.in/"&gt;Kiran Jonnalagadda&lt;/a&gt; and Nitesh were also there. Yogesh from BBC made few announcements about support vehicles, safety measures and emergency contact numbers. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At 6:15am we left Cubbon park. I was riding with Ram and Nitesh until Yelahanka. After reaching Yelahnaka, I broke away from the group and started riding ahead. I met Yohesh on the way, had a small chat with him and broke away from him. We had Army trucks, and jeeps riding along with us. There were few guys distributing juice to riders on the way. We were riding in the airport road on the shoulders. Around 7:30am or so I reached Bangalore International Airport, which is 40km away from the city. I took a diversion there that led to Devanahalli. The road to Devanahalli was less crowded. I overtook two fellow bikers somewhere between BIAL and Devanahalli and one of the bikers shouted Deepan. It was Venugopal riding his Btwin sports bike. I had a small chat with him and cruised to the front. I overtook a long truck along the way and the truck again overtook me. I smiled at one of the guys in the truck and he smiled back. I guess I was at Devanahalli at around 8:00am. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There were few riders at the Nandi road diversion in Devanahalli chit chatting. The road to Nandi from Devanahalli was little narrow, but was almost empty. The ride to idly point from Devanahalli was uneventful. There was a billboard on the way that said: "The Falcon is coming". I reached idly-point at around 8:30am. I stopped for breakfast. The idly shop ran out of idlies because of the biking crowd. I had rice bath and started again. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;img src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs149.snc4/36829_434961197148_536682148_4967189_7848527_n.jpg" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;I reached Nandi statue at the base of Nandi hill at 9:05am. Riding until this point was quite easy. I guess I rode at an average speed of 25km to 30km per hour. I remember at one point my speedometer read 44km per hour. Now I changed my gears to 1-3 and started climbing up the hill. Within the first few hundred meters I realized that it is excessively difficult for me to climb at 1-3 gear. I changed to 1-2 combination and started pedaling. Opendro was climbing along with me. He said that this was his second Nandi ride. My bike was making some noise at 1-2 gear. He suggested that we fix my gears. So we stopped and Opendro fixed my gears. We started riding again, and the noise from my gears was gone. We came across another rider fixing his bike. Opendro stopped to help him and I continued. The ride up the hill was the most difficult part. I was riding almost at walking speed. There were few riders riding downhill at full speed. Almost every rider riding downhill was smiling, encouraging uphill rider. Almost after half an hour of pedaling up I saw the Nandi signboard that said 5km. There few people and parked cars on the way. Some of them were posing for pictures. Somewhere along the  way I changed to the lowest gear possible. I was pedaling uphill through the clouds. I badly wanted to stop, but resisted in order to not lose the momentum. A government jeep overtook me somewhere close to the top. It read RTO on the back. The acronym RTO stands for Road Transport Officer. The RTO of Devanahalli was driving to Nandi top to greet all the riders. The RTO was smiling at me when the jeep overtook me. I saw the 2km signboard sometime after that. There was a rider coming down and he said: "You are almost there". I felt encouraged. The last two kilometers ride on the top seemed to be going forever. I was probably riding slower than walking speed. I remember the speedometer reading 5km or 6km per hour. I was pedaling at 1-1 combination in standing position at one of the U-turns at top. There were moments when I felt that the cycle was standing still. After that I saw the arch on top of Nandi. I was very happy. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;img src="http://sphotos.ak.fbcdn.net/hphotos-ak-ash2/hs143.ash2/40488_434961517148_536682148_4967202_2979778_n.jpg" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I entered the arch there were few people distributing juice. They said there was breakfast on top. I enquired how long it is. The guys said two kilometers. It was disappointing to know that I have to climb two more kilometers for breakfast. Fortunately the road further was not that steep. I rode to the top and RTO was greeting everyone. He had also arranged free upma, lemon rice, coffee and tea for all the riders. I was cursing myself for having had breakfast at the idly point. I had breakfast once again.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After breakfast, I tried calling Ram to figure out where he was. He was not reachable. So I decided to ride back searching for him. I crossed the arch and rode few hundred meters. In one of the hairpin bends I saw Ram coming up. He said his thighs were paining. Together we walked up the last few hundred meters and reached the arch. We walked uphill after a stopping briefly for pictures. We reached breakfast point. I had a coffee again while Ram had breakfast. After resting for an hour or so, we started riding back. The downhill ride was awesome. Unfortunately one of the riders met with a small accident. One of the fellow riders was hit by a rogue motorbike rider.  We stopped there and called for the medics where riding along with us. Within moments the army jeep was there at  the accident spot with the medic and first aid kit. I met Barani at this point. The injured biker left in the army jeep. We started riding back. We reached Nandi base within few minutes. My speedometer was reading 40km on the downhill at multiple spots. Brigadier Vijay had arranged for lunch at the base. We stopped for lunch at the base and started riding back. Riding back was very difficult since I was very tired. I remember reaching Devanahalli at 2:00pm. I was riding at an average speed of around 13km until BIAL. After that my average speed declined further to 10km per hour. Along the way I had jackfruit and tender coconut. I reached Hebbal flyover at around 4:15pm. I reached home at 5:15pm. I cycled 130km in a span of 11 hours. I took a shower again and had dinner. I went to bed at 8:30pm and slept for next 10 hours like a baby. It was a wonderful experience.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will try to ride to Mysore soon. Stay tuned. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;img src="http://sphotos.ak.fbcdn.net/hphotos-ak-ash2/hs109.ash2/38778_434962307148_536682148_4967207_4331173_n.jpg" /&gt;&lt;br /&gt;&lt;img src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs224.snc4/38547_434961667148_536682148_4967203_1864316_n.jpg" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5831683844105119081?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5831683844105119081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5831683844105119081' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5831683844105119081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5831683844105119081'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2010/08/my-first-ride-to-nandi-hills-biking.html' title='My First Ride To Nandi Hills - Biking Carnival'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5305717842538596058</id><published>2010-07-07T20:48:00.004+08:00</published><updated>2010-07-31T19:45:29.879+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webtesting'/><category scheme='http://www.blogger.com/atom/ns#' term='selenium'/><category scheme='http://www.blogger.com/atom/ns#' term='phpunit'/><title type='text'>Testing your webapp using Selenium and PHPUnit</title><content type='html'>&lt;div&gt;For a long time we have been testing our websites manually. Finally, we have decided to put in some effort to automate part of this testing. After a little bit of research, we found that &lt;a href="http://seleniumhq.org/"&gt;Selenium&lt;/a&gt; could test any website in any set of browser-operating system combinations. There are some other equivalent tools, however selenium seems to be the most robust.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Selenium has many sub-projects. Selenium IDE is the best place for novices to start. Selenium IDE is a Firefox plugin that lets you record events in Firefox and replay them. Events can be like entering text in an input box. You can record a bunch of events like entering username, entering password, clicking on submit, etc. and replay them. Selenium has client libraries in almost all prevailing languages. You could record set of events in Selenium IDE and export the scripts to any of the supported languages. Java, Python, PHP, Ruby are some of the supported languages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Replaying a script in Selenium IDE will execute the script inside Firefox. If you wish the execute the script in other browsers, then you will have to use a tool called Selenium RC. The acronym RC stands for remote client. Selenium RC is a jar file which can invoke any browser of your choice and execute the commands that you pass to it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have several instances of Selenium RC running, one in Windows, one in Mac and one in Linux. When I execute the PHP test scripts, they connect to Selenium RC running in various machines over the network and execute the scripts on a specific browser. This way you could test your website on all major browser and operating systems.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5305717842538596058?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5305717842538596058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5305717842538596058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5305717842538596058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5305717842538596058'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2010/07/testing-your-webapp-using-selenium-and.html' title='Testing your webapp using Selenium and PHPUnit'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5557130146379773851</id><published>2009-10-23T12:29:00.002+08:00</published><updated>2009-11-19T12:16:56.698+08:00</updated><title type='text'>Forking in  PHP on Mac OSX using pcntl_fork</title><content type='html'>1)sudo port selfupdate&lt;div&gt;2)sudo port update outdated&lt;/div&gt;&lt;div&gt;3)sudo port install php5-pcntl&lt;/div&gt;&lt;div&gt;4)Try the following example&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;$pid = pcntl_fork();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if($pid) {&lt;/div&gt;&lt;div&gt;  // parent process runs what is here&lt;/div&gt;&lt;div&gt;  print "parent\n";&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;else {&lt;/div&gt;&lt;div&gt;  // child process runs what is here&lt;/div&gt;&lt;div&gt;  print "child\n";&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;?&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5557130146379773851?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5557130146379773851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5557130146379773851' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5557130146379773851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5557130146379773851'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2009/10/multithreading-in-php-on-mac-osx.html' title='Forking in  PHP on Mac OSX using pcntl_fork'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-2341979703192595781</id><published>2009-06-09T07:39:00.004+08:00</published><updated>2009-06-09T07:50:59.860+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='elastic ips'/><category scheme='http://www.blogger.com/atom/ns#' term='ebs'/><category scheme='http://www.blogger.com/atom/ns#' term='ec2'/><category scheme='http://www.blogger.com/atom/ns#' term='aws'/><title type='text'>Init script to mount EBS and attach elastic IPs to EC2 instances</title><content type='html'>Modified init script to mount EBS automatically to your EC2 instances.  It also dynamically attaches your instances to an elastic ip.  You have to provide both EBS volume id and elastic ip as userdata separated by pipe symbol for this script to work.  Sample userdata &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;vol-12345678|171.213.234.123&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You have to use &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;update-rc.d mountec2vol start 47 S . stop 35 0 6 . start 37 6 .&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;to add this script to startup. This script also additional code to mount mysql data directory and nginx directories from EBS. You can skip that part.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;#! /bin/sh&lt;br /&gt;#&lt;br /&gt;# /etc/init.d/mountec2vol&lt;br /&gt;#&lt;br /&gt;# chkconfig: 234 20 50&lt;br /&gt;# description: Assigns an EC2 EBS Volume to a device and mounts the device&lt;br /&gt;#&lt;br /&gt;# To add this as a service run:&lt;br /&gt;#   /sbin/chkconfig --add mountec2vol&lt;br /&gt;#&lt;br /&gt;# VARS&lt;br /&gt;#&lt;br /&gt;DEV="/dev/sdh"&lt;br /&gt;MOUNT_POINT="/vol"&lt;br /&gt;EC2_LOG='/var/log/ec2.log';&lt;br /&gt;SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)&lt;br /&gt;&lt;br /&gt;export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13/&lt;br /&gt;export EC2_PRIVATE_KEY=/root/.ec2/pk.pem&lt;br /&gt;export EC2_CERT=/root/.ec2/cert.pem&lt;br /&gt;export EC2_HOME=/usr/local/src/ec2-api-tools-1.3-36506/&lt;br /&gt;PATH=$PATH:$HOME/bin:$EC2_HOME/bin&lt;br /&gt;MAX_TRIES=60&lt;br /&gt;&lt;br /&gt;attach_ebs()&lt;br /&gt;{&lt;br /&gt;/bin/echo "=====================================" | tee -a $EC2_LOG&lt;br /&gt;/bin/echo "Date: "`date` | tee -a $EC2_LOG;&lt;br /&gt;/bin/echo "Attaching Elastic Block Store Volumes." | tee -a $EC2_LOG&lt;br /&gt;ec2-attach-volume $VOL -i $INSTANCE -d $DEV 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;CTR=0&lt;br /&gt;while [ ! -e "$DEV" ]; do&lt;br /&gt; /bin/sleep 1&lt;br /&gt; CTR=`expr $CTR + 1`&lt;br /&gt; if [ $CTR -eq $MAX_TRIES ]&lt;br /&gt; then&lt;br /&gt;  /bin/echo "WARNING: Cannot attach volume $VOL to $DEV -- Giving up after $MAX_TRIES attempts" | tee -a $EC2_LOG&lt;br /&gt;  exit 1&lt;br /&gt; fi&lt;br /&gt;done&lt;br /&gt;}&lt;br /&gt;mount_ebs()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Checking if $MOUNT_POINT is present" | tee -a $EC2_LOG&lt;br /&gt;if [ ! -d $MOUNT_POINT ]; then&lt;br /&gt; mkdir $MOUNT_POINT 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;fi&lt;br /&gt;/bin/echo "Mounting EBS to /vol " | tee -a $EC2_LOG&lt;br /&gt;/bin/mount $DEV $MOUNT_POINT 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;mount_mysql_dirs()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Mounting mysql dirs" | tee -a $EC2_LOG&lt;br /&gt;/bin/mount /etc/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;/bin/mount /var/lib/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;/bin/mount /var/log/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;/bin/mount /usr/local/nginx/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;unmount_mysql_dirs()&lt;br /&gt;{&lt;br /&gt;set +e;&lt;br /&gt;/bin/echo "stopping mysql" | tee -a $EC2_LOG&lt;br /&gt;/etc/init.d/mysql stop;&lt;br /&gt;set -e;&lt;br /&gt;/bin/echo "Unmounting mysql dirs" | tee -a $EC2_LOG&lt;br /&gt;/bin/umount /etc/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;/bin/umount /var/lib/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;/bin/umount /var/log/mysql/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;unmount_nginx_dirs()&lt;br /&gt;{&lt;br /&gt;set +e;&lt;br /&gt;/bin/echo "stopping nginx" | tee -a $EC2_LOG&lt;br /&gt;/etc/init.d/nginx stop;&lt;br /&gt;set -e;&lt;br /&gt;/bin/echo "Unmounting nginx dirs" | tee -a $EC2_LOG&lt;br /&gt;/bin/umount /usr/local/nginx/ 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;unmount_ebs()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Unmounting Elastic Block Store Volumes." | tee -a $EC2_LOG&lt;br /&gt;/bin/umount $MOUNT_POINT 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;detach_ebs()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Detaching Elastic Block Store Volumes." | tee -a $EC2_LOG&lt;br /&gt;ec2-detach-volume $VOL 1&gt;&amp;amp;2 2&gt;&gt;$EC2_LOG&lt;br /&gt;}&lt;br /&gt;populate_aws_data()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Populating AWS data" | tee -a $EC2_LOG&lt;br /&gt;INSTANCE=`curl http://169.254.169.254/latest/meta-data/instance-id 2&gt; /dev/null`&lt;br /&gt;USERDATA=`curl  http://169.254.169.254/1.0/user-data 2&gt;/dev/null`;&lt;br /&gt;}&lt;br /&gt;parse_user_args()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Parsing user_args " | tee -a $EC2_LOG&lt;br /&gt;VOL=${USERDATA%|*};&lt;br /&gt;IP=${USERDATA#*|};&lt;br /&gt;echo "usedata vol ip";&lt;br /&gt;echo $USERDATA;&lt;br /&gt;echo $VOL;&lt;br /&gt;echo $IP;&lt;br /&gt;}&lt;br /&gt;bind_ip()&lt;br /&gt;{&lt;br /&gt;/bin/echo "Associating  ip address: $IP to $INSTANCE" | tee -a $EC2_LOG&lt;br /&gt;ec2-associate-address -i $INSTANCE $IP;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# start/stop functions for OS&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;&lt;br /&gt;start)&lt;br /&gt;populate_aws_data;&lt;br /&gt;parse_user_args;&lt;br /&gt;bind_ip;&lt;br /&gt;attach_ebs;&lt;br /&gt;mount_ebs;&lt;br /&gt;mount_mysql_dirs;&lt;br /&gt;sh -x /vol/ec2_stuff/everytime_by_mountec2.sh;&lt;br /&gt;;;&lt;br /&gt;stop)&lt;br /&gt;unmount_mysql_dirs;&lt;br /&gt;unmount_nginx_dirs;&lt;br /&gt;unmount_ebs;&lt;br /&gt;detach_ebs;&lt;br /&gt;;;&lt;br /&gt;restart)&lt;br /&gt;set +e;&lt;br /&gt;$SELF stop;&lt;br /&gt;set -e;&lt;br /&gt;sleep 60;&lt;br /&gt;$SELF start&lt;br /&gt;;;&lt;br /&gt;*)&lt;br /&gt;echo "Usage: $0 {start|stop|restart}" | tee -a $EC2_LOG&lt;br /&gt;exit 1&lt;br /&gt;&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-2341979703192595781?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/2341979703192595781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=2341979703192595781' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2341979703192595781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2341979703192595781'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2009/06/init-script-to-mount-ebs-and-attach.html' title='Init script to mount EBS and attach elastic IPs to EC2 instances'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3970347904713241073</id><published>2009-05-26T03:39:00.002+08:00</published><updated>2009-05-26T03:47:31.854+08:00</updated><title type='text'>Auto Mounting  EBS on EC2</title><content type='html'>I assume that you have already created a EC2 instance (On top of your custom AMI),  EBS volume (both in the same availability zone) . Below are some instructions to automount EBS on EC2. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;AutoMount Init Script&lt;/div&gt;&lt;div&gt;===========================&lt;/div&gt;&lt;div&gt;http://developer.amazonwebservices.com/connect/thread.jspa?threadID=25071&amp;amp;start=0&amp;amp;tstart=0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1)apt-get install sun-java6-jre sun-java6-bin sun-java6-source&lt;/div&gt;&lt;div&gt;2)cd /usr/local/src/&lt;/div&gt;&lt;div&gt;3)wget http://developer.amazonwebservices.com/connect/servlet/JiveServlet/download/30-25071-102530-2022/mountec2vol&lt;/div&gt;&lt;div&gt;4)wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip&lt;/div&gt;&lt;div&gt;unzip ec2-api-tools.zip&lt;/div&gt;&lt;div&gt;5)edit mountec2vol&lt;/div&gt;&lt;div&gt;set JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13/  or equivalent&lt;/div&gt;&lt;div&gt;set EC2_PRIVATE_KEY EC2_CERT&lt;/div&gt;&lt;div&gt;set EC2_HOME=/usr/local/src/ec2-api-tools-1.3-36506/&lt;/div&gt;&lt;div&gt;set VOL and DEV&lt;/div&gt;&lt;div&gt;6)cp mountec2vol /etc/init.d/&lt;/div&gt;&lt;div&gt;7)chmod +x /etc/init.d/mountec2vol&lt;/div&gt;&lt;div&gt;8)test  mountec2vol&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;/etc/init.d/mountec2vol start&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;/etc/init.d/mountec2vol stop&lt;/div&gt;&lt;div&gt;9)update-rc.d mountec2vol start 15 2 3 4 5 . start 47 S . start 35 0 1 6 .&lt;/div&gt;&lt;div&gt;10)Bundle the new image&lt;/div&gt;&lt;div&gt;ec2-bundle-vol -d /mnt -k /mnt/pk-balbal.pem -c /mnt/cert-balhbalh.pem -u userid  -r i386  -p automountingebs&lt;br /&gt;&lt;/div&gt;&lt;div&gt;11)upload the new image&lt;/div&gt;&lt;div&gt;&lt;div&gt;ec2-upload-bundle  --url https://s3.amazonaws.com/subdir/ -b yourbucket  -m /mnt/automountingebs.xml -a accessid -s yoursecret&lt;/div&gt;&lt;div&gt;12)register image&lt;/div&gt;&lt;div&gt;ec2-register yourbucket /subdir/automountingebs.xml&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some additional info to create EBS &lt;/div&gt;&lt;div&gt;=========================&lt;/div&gt;&lt;div&gt;&lt;div&gt;On local machine&lt;/div&gt;&lt;div&gt;================&lt;/div&gt;&lt;div&gt;ec2-create-volume -z us-east-1c -s 10&lt;/div&gt;&lt;div&gt;ec2-describe-volumes vol-VVVV1111&lt;/div&gt;&lt;div&gt;ec2-attach-volume -d /dev/sdh -i i-IIII1111 vol-VVVV1111&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On EC2 Instance&lt;/div&gt;&lt;div&gt;===============&lt;/div&gt;&lt;div&gt;apt-get install -y xfsprogs&lt;/div&gt;&lt;div&gt;modprobe xfs&lt;/div&gt;&lt;div&gt;mkfs.xfs /dev/sdh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;echo "/dev/sdh /vol xfs noatime 0 0" &gt;&gt; /etc/fstab&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mkdir /vol&lt;/div&gt;&lt;div&gt;mount /vol&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1663&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;AutoMount&lt;/div&gt;&lt;div&gt;=========&lt;/div&gt;&lt;div&gt;http://www.ioncannon.net/system-administration/199/automounting-amazon-ebs-volumes-on-ec2-instances/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3970347904713241073?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3970347904713241073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3970347904713241073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3970347904713241073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3970347904713241073'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2009/05/auto-mounting-ebs-on-ec2.html' title='Auto Mounting  EBS on EC2'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-9211098442944003505</id><published>2009-05-25T21:02:00.003+08:00</published><updated>2009-05-25T21:10:35.320+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logrotate'/><category scheme='http://www.blogger.com/atom/ns#' term='monit'/><category scheme='http://www.blogger.com/atom/ns#' term='memcache'/><category scheme='http://www.blogger.com/atom/ns#' term='nginx'/><category scheme='http://www.blogger.com/atom/ns#' term='phpfpm'/><category scheme='http://www.blogger.com/atom/ns#' term='xcache'/><title type='text'>Nginx + PHPFPM + Memcache + Mysql  + XCache  + Monit + Logrotate</title><content type='html'>&lt;div&gt;Step by Step&lt;/div&gt;&lt;div&gt;============&lt;/div&gt;&lt;div&gt;1)install debian (in case of EC2 - grab a public debian image and create a instance using it)&lt;/div&gt;&lt;div&gt;2)apt-get update&lt;/div&gt;&lt;div&gt;3)apt-get install openssh-server&lt;/div&gt;&lt;div&gt;4)apt-get install vim screen rsync rcconf telnet emacs locate unzip&lt;/div&gt;&lt;div&gt;5)set up .bashrc and  .vimrc&lt;/div&gt;&lt;div&gt;6)apt-get install sysstat subversion sudo&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7)add new users and configure sudo&lt;/div&gt;&lt;div&gt;8)aptitude install postfix&lt;/div&gt;&lt;div&gt;9)apt-get install mysql-server mysql-client&lt;/div&gt;&lt;div&gt;10) mysql_secure_installation &lt;/div&gt;&lt;div&gt;11)aptitude install build-essential libtool libltdl3-dev libgd-dev libmcrypt-dev libxml2-dev libmysqlclient15-dev flex m4 awk automake autoconf bison make libbz2-dev libpcre3-dev libssl-dev zlib1g-dev re2c&lt;/div&gt;&lt;div&gt;12)install php with fpm, curl, mysql&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Install PHP with FPM, CURL, Mysql etc&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   =============&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   1)sudo apt-get install libcurl4-openssl-dev(if 4 is not found, intall libcurl3-openssol-dev)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   2)sudo apt-get install libjpeg62&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   3)sudo apt-get install libjpeg62-dev&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   4)sudo apt-get install libpng12-dev&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   5)cd /usr/local/src/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   6)wget http://in.php.net/distributions/php-5.2.8.tar.bz2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   7)wget http://php-fpm.anight.org/downloads/head/php-5.2.8-fpm-0.5.10.diff.gz&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   8)gunzip php-5.2.8-fpm-0.5.10.diff.gz &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   9)tar -jxvpf php-5.2.8.tar.bz2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   10)patch -d php-5.2.8 -p1 &lt;&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   11)./configure  --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --with-openssl --with-mysql --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --without-sqlite --disable-pdo --disable-reflection --with-curl --with-mysqli=/usr/bin/mysql_config&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   9)make&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   9)make test&lt;/div&gt;&lt;div&gt;Test whether both mysql and mysqli are supported&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   10)sudo make install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;13)vi /usr/local/etc/php-fpm.conf &lt;/div&gt;&lt;div&gt;:63&lt;/div&gt;&lt;div&gt;www-data&lt;/div&gt;&lt;div&gt;:66&lt;/div&gt;&lt;div&gt;www-data&lt;/div&gt;&lt;div&gt;You may want to add: /usr/local/lib/php to your php.ini include_path&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;14)install  xcache&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    Install XCahce&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    =============&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    1)wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    2)tar -zxvf xcache-1.2.2.tar.gz &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    3)cd xcache-1.2.2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    4)phpize&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    5)./configure --with-php-config=/usr/local/bin/php-config --enable-xcache&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    6)make install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;15)install nginx&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Install Nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   ==============&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   1)wget http://sysoev.ru/nginx/nginx-0.6.36.tar.gz&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   2)tar xzvf nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   3)cd nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   4)./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   5)make&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   6)make install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;16)configure nginx&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     Configure Nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     ==============&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     1)cd /usr/local/nginx/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     2)vi conf/nginx.conf&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     read for more details&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     http://www.yawn.it/2008/04/30/nginx-php-php-fpm-on-debian-etch-40/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     Enable forwarding php requests to php-fpm by uncommenting the handling of .php files&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     edit fastcgi_param as follows&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     https://calomel.org/nginx.html&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     http://articles.slicehost.com/2008/5/15/ubuntu-hardy-nginx-configuration&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     http://articles.slicehost.com/2008/5/16/ubuntu-hardy-nginx-virtual-hosts&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     3)change log format to include response time &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_response_time&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;17)configure xcache&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     Configure XCache&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     ================&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     1)vi /usr/local/lib/php.ini&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     add the following contents &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     magic_quotes_gpc=0&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     [xcache-common]&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     [xcache]&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     xcache.shm_scheme = "mmap"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     xcache.size = 64M&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     date.timezone = “Europe/Rome”&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;     default_charset = “utf-8″&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;18)install memcache extension for php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Install Memcache extension for php&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   ===================================&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   compile php with memcache support&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   http://www.mail-archive.com/php-install@lists.php.net/msg15223.html&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   1)wget http://pecl.php.net/get/memcache-2.2.5.tgz&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   2)tar -zxvf memcache-2.2.5.tgz&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   3)cd memcache-2.2.5&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   4)phpize &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   5)./configure &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   6)make &amp;amp;&amp;amp; make test&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   7)$ sudo make install&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20060613/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   8)vi /usr/local/lib/php.ini&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Add the following to php.ini&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   extension=memcache.so&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   display_startup_errors = On&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   9)run memcache test case in genlib/testcases/basic_memcache.php &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;19)test nginx - add init scripts &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Test nginx add  init.d scripts&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;=======================================&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;1)nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;2)php-fpm start&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;3)create a info.php file and test it.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;4)sudo kill `cat /usr/local/nginx/logs/nginx.pid`&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;5)add init.d scripts - follow instructions in &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;http://articles.slicehost.com/2007/10/19/debian-etch-adding-an-nginx-init-script/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;20)test php-fpm - add init script &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Test php-fpm add init.d scripts&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;===============================&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;1)cd /etc/init.d/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;2)ln -s /usr/local/sbin/php-fpm php-fpm&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;3)/usr/sbin/update-rc.d -f php-fpm defaults&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;21)optimize&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;optimize&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;=======&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Find out the number of connections to phpfpm from nginx&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$netstat -np | grep 127.0.0.1:9000 | grep -v TIME_WAIT&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;set appropraite value for variables in php-fpm.conf &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;set request_terminate_timeout to 10s&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;set request_slowlog_timeout to 6s&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;set user and group to  www-data &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;set max_children to 20&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;perform ab testing and optimize  worker_processes, worker_connections in nginx and max_children in php-fpm.conf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;22)add logrotate scripts for nginx,php-fpm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       logrotate scripts&lt;/div&gt;&lt;div&gt;       ================&lt;/div&gt;&lt;div&gt;       1)create logroate conf for nginx and php-fpm - copy logroate files from conf_files dir &lt;/div&gt;&lt;div&gt;       2)add entries for nginx and php-fpm logrotation at /etc/cron.daily/logrotate (not needed if /etc/logrotate.d is included in the logrotate.conf files, just make sure logrotate is called daily)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;23)fine tune php-fpm.conf - enable slow query - set max execution time&lt;/div&gt;&lt;div&gt;24)fine tune mysql - enable slow query - log queries that don't use index&lt;/div&gt;&lt;div&gt;25)check if query cache is turned on in mysql - optimize it&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; Optimize Query Cache in mysql&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; ============================&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; 1) show variables like 'query%';&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; 2) show status like 'qc%';&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;26)install monit&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   Monit&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   =====&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   1)apt-get install monit&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   2)vim /etc/monit/monitrc  - configure it&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   3)create /etc/monit/monit.d directory - add sshd,nginx monit config files here&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   4)add include /etc/monit/monit.d/* option in /etc/monit/monitrc&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   3)monit -t&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   4)vim /etc/default/monit  set startup=1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   5)test monit&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-9211098442944003505?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/9211098442944003505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=9211098442944003505' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9211098442944003505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9211098442944003505'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2009/05/nginx-phpfpm-memcache-mysql-xcache.html' title='Nginx + PHPFPM + Memcache + Mysql  + XCache  + Monit + Logrotate'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3507785187527438848</id><published>2008-05-15T15:21:00.002+08:00</published><updated>2008-05-15T15:25:53.269+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>vim tip for copying code from webpage</title><content type='html'>Sometimes copying code from webpage to vim can be painful. You might end up loosing all the newlines.  So I prefer to copy (from webpages)  using html source.  If you use html source, you will have to replace &amp;amp;gt, &amp;amp;lt .. and lot more to  &lt;,&gt; and stuff. &lt;br /&gt;&lt;br /&gt;The following will do it automatically for you.&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;:%!perl -pne 'use HTML::Entities; $_=decode_entities($_)'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks to godlygeek from #vim .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3507785187527438848?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3507785187527438848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3507785187527438848' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3507785187527438848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3507785187527438848'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2008/05/vim-tip-for-copying-code-from-webpage.html' title='vim tip for copying code from webpage'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-4002425797729875971</id><published>2007-11-23T20:43:00.000+08:00</published><updated>2007-11-25T20:12:32.329+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Changi'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Wifi at Changi Airport</title><content type='html'>I just checked out the free internet terminals in Changi Airport. Few of them run secured version of Internet Explorer. I was also able to use "Wireless@SG", the free island wide wireless at Changi. The speed was amazing. I had to download JavaDoc for JDK 1.5. It completed in 12 minutes.  If you are not aware, JavaDoc for JDK 1.5 is 150MB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-4002425797729875971?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/4002425797729875971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=4002425797729875971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4002425797729875971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4002425797729875971'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/wifi-at-changi-airport.html' title='Wifi at Changi Airport'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3132681090016566801</id><published>2007-11-23T20:32:00.000+08:00</published><updated>2007-11-25T20:19:22.076+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>IT Security Awareness Day 2007 at Singapore Poly</title><content type='html'>I gave a talk on WebSecurity at Singapore Poly at the IT Security Awareness Day Event.  Around 300 students attended the event, and most of them were school kids.  I mostly spoke about Johnny's Google Hacking Database, and little bit about XSS. Justin Lister from InterSect Singapore also spoke at the event. He organized   a simple game to explain Phishing.  Thanks to Samson, and Cecil for organizing the event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3132681090016566801?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3132681090016566801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3132681090016566801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3132681090016566801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3132681090016566801'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/it-security-awareness-day-2007-at.html' title='IT Security Awareness Day 2007 at Singapore Poly'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6267803793805237388</id><published>2007-11-18T01:30:00.000+08:00</published><updated>2007-11-18T01:43:39.574+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Lunch with David Axmark, Co-founder of MySQL</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/David_Axmark"&gt;David Axmark&lt;/a&gt;, the Co-founder of MySQL was in Singapore today.  The local MySQL  interest group meet along with David at GeekTerminal for lunch. David patiently answered variety  of questions relating  to   BitKeeper,  GIT,  SpikeSource's testing framework ,  Enterprise version of MySQL,  SQLite, India, SQL Injection, etc. Thanks to Wong for organizing the event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6267803793805237388?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6267803793805237388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6267803793805237388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6267803793805237388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6267803793805237388'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/lunch-with-david-axmark-co-founder-of.html' title='Lunch with David Axmark, Co-founder of MySQL'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-9158798855059848592</id><published>2007-11-17T02:15:00.000+08:00</published><updated>2007-11-17T02:33:14.379+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='UandMe'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>UandMe</title><content type='html'>Social networking has grown a big way. FaceBook has taken social networking to a different level.  &lt;a href="http://www.uandme.com.au/"&gt;UandMe&lt;/a&gt; is a mobile social networking application build by Locatrix.  UandMe goes one step further, by integrating with GPS.  With UandMe, you can know where your friend is, find a near by restaurant to meet with your friend, create alerts for various events,   etc.   Location based advertisement is also possible when you integrate with GPS. I guess UandMe will change the way people meet, dine, work etc. I was privileged to meet with Mark White, the founder of Locatrix. He was also kind enough to demonstrate UandMe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-9158798855059848592?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/9158798855059848592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=9158798855059848592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9158798855059848592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9158798855059848592'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/uandme.html' title='UandMe'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-4208364156369574590</id><published>2007-11-17T02:02:00.000+08:00</published><updated>2007-11-17T02:08:00.769+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Security Related Groups in Singapore</title><content type='html'>1) &lt;a href="http://www.linkedin.com/groupInvitation?groupID=36874&amp;amp;sharedKey=392CBE733E36"&gt;LinkedIn Group&lt;/a&gt;  for  OWASP &lt;br /&gt;2) &lt;a href="https://lists.owasp.org/mailman/listinfo/owasp-singapore"&gt;OWASP-Singapore&lt;/a&gt; mailing list&lt;br /&gt;3) &lt;a href="http://security.meetup.com/77/"&gt;Security Meetup - Singapore &lt;/a&gt;== Next meeting on 13th Dec 2007.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-4208364156369574590?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/4208364156369574590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=4208364156369574590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4208364156369574590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4208364156369574590'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/security-related-groups-in-singapore.html' title='Security Related Groups in Singapore'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3776313338531635452</id><published>2007-11-15T19:20:00.000+08:00</published><updated>2007-11-17T02:00:15.841+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>OWASP Meeting at GeekTerminal Singapore</title><content type='html'>Two days back, I attended the second &lt;a href="https://lists.owasp.org/mailman/listinfo/owasp-singapore"&gt;OWASP-Singapore&lt;/a&gt;  (Open Web Application Security Project) meeting at Geek Terminal. Six people turned out and we had three different presentations.  &lt;a href="http://michaelboman.org"&gt;Michael Boman&lt;/a&gt; spoke about "&lt;a href="http://michaelboman.org/wiki/index.php?title=Overcoming_USB_%28In%29Security"&gt;Overcoming USB (In) Security&lt;/a&gt;".   He also demonstrated Lock Picking. Wong from &lt;a href="http://resolvo.com/"&gt;Resolve&lt;/a&gt;  spoke about ILDP Strategies.  Later we discussed about MMORPG hacking.  We discussed about SecondLife hacking, gaming  client hacking, gaming logic exploitation, etc . We also discussed about developing a framework to test and prevent Game Hacking.  Later we discussed about websecurity. The whole meeting went for around 3 hours.  I wish more people join.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3776313338531635452?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3776313338531635452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3776313338531635452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3776313338531635452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3776313338531635452'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/owasp-meeting-at-geekterminal-singapore.html' title='OWASP Meeting at GeekTerminal Singapore'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-9105561601573779455</id><published>2007-11-13T16:55:00.000+08:00</published><updated>2007-11-13T17:16:46.163+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='design patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Singleton Vs Static</title><content type='html'>Singleton, MVC and Factory patterns are the design patterns I use very often. I also use static classes, more often than Singleton, but static classes are not design patterns.  For every implementation of Singleton, one can come out with an alternate implementation with static classes.  Lot of critics argue that Singleton is not the right way to program, and it is an anti-pattern. Singleton patterns can be considered as substitutions for global variables, and they are most useful when you want to use the same instance all over your program.  Using one object ( say of type Class A) to manage instances of a different class (say Class B) , and providing all functionalities using the objects of Class B is obviously a better coding practice. This is a better replacement of Singleton pattern, compared with static classes.   Here is an interesting discussing I'd with Cybereal at #java@irc.freenode.net. Cybereal explains why Singleton is a bad wrt to dependency injection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:03:11 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;cybereal ..  Aren't Singleton the best suitable implementations for Database connection pooling ? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:03:43 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;In a more general way...  Singletons are best suitable to manager global variables.. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:03:53 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;singletons *ARE* global variables, basically&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:03:56 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;and that's why they are bad&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(12:04:24 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: you shouldn't need to use a singleton to use the same resource across a program&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:04:50 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;but because people are lazy about typing and passing on dependency information to instantiated objects, you find they will lean towards singletons to do little more than save some keystrokes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:05:01 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;It's really hard to justify it for any other reason&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(12:05:41 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: despite being an anti-pattern, it does get used frequently so you'll still need to know how to deal with it, and sometimes to work around them&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:06:02 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;at least in java if you really need to you can bury a singleton in a separate classloader instance&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:06:13 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;So how will you implement a Database connection pool? Just a static class ? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:06:30 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;no, a regular class that you pass around to all the new instances of other classes that need to know about it&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:06:44 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;like handing out invitations to a party&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:06:58 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;you don't hand out houses with those invitations, and people aren't expected to figure out the address themselves&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:07:06 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;then.. some dumb guy who comes tomorrow will start creating instances of the regular class..&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:07:13 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;it won't matter&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:07:24 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;but even so, if he's dumb he's gonna do dumb things :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:07:34 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;you shouldn't write bad code just to try and protect from dumb coders&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:07:54 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;but the point is you should be able to have more than one in the same vm, and not have them hurt each other&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:07:56 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;It is really a debatable issue.. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(12:08:54 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: you probably won't really see it this way until it eventually comes back to bite you in the ass as it has me :)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:09:08 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;I still agree with the fact that.. you let one class (A) provide all functions.. and another class manage instances of Class A.. .. that looks more clean.. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:09:33 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;you're making a mistake of thinking a class should ever be in charge of anything&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:09:37 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;INSTANCES of classes should&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:09:43 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;classes are blue prints&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:09:54 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;hmm.. ok.... &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#777777;"&gt;cybereal cybereal &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:10:19 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;interesting argument.. thanks a lot cybereal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:10:28 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;nothing stops you, as I already described, from sharing a single instance of a class across your whole app&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:10:50 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;you get what you want from a singleton without the limiting factors, and all it takes is a little longer parameter list in constructors :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(12:11:18 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;ok..  I guess I will realize it better when it bites me back..&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(12:11:24 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;hehe ok&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-9105561601573779455?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/9105561601573779455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=9105561601573779455' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9105561601573779455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9105561601573779455'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/singleton-vs-static.html' title='Singleton Vs Static'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-7291220229442121772</id><published>2007-11-12T22:33:00.000+08:00</published><updated>2007-11-12T22:50:04.094+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>GMail's POP and SMTP service.</title><content type='html'>GMail's POP and SMTP service have been giving lot of troubles lately. Very often, I'm not able to send out mails via SMTP, and  downloading new mails occurs at snails pace.  Many others have reported the same problem, and I hope Google fixes it very soon. Email is an essential service, and use web interface for checking emails can be tedious if you have dozens of email accounts with a variety of service providers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-7291220229442121772?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/7291220229442121772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=7291220229442121772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7291220229442121772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7291220229442121772'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/gmail-popsmtp.html' title='GMail&apos;s POP and SMTP service.'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-844341353967237680</id><published>2007-11-06T21:56:00.001+08:00</published><updated>2007-11-06T22:26:13.831+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='datastructures'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Red Black Tree</title><content type='html'>TreeSet is an implementation of Red-Black Tree in Java.  It implements the Set and Collection interface. Here is a short yet excellent  &lt;a href="http://video.google.com/videoplay?docid=-4885907415794230907"&gt;video&lt;/a&gt; on adding new nodes to TreeSet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-844341353967237680?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/844341353967237680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=844341353967237680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/844341353967237680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/844341353967237680'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/red-black-tree.html' title='Red Black Tree'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-8003952800950190639</id><published>2007-11-02T00:19:00.000+08:00</published><updated>2007-11-02T00:31:56.023+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='brisbane'/><category scheme='http://www.blogger.com/atom/ns#' term='talks'/><category scheme='http://www.blogger.com/atom/ns#' term='barcamp'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='Australia'/><title type='text'>Barcamp - Brisbane, Australia.</title><content type='html'>I'm planning to fly a bit early for &lt;a href="http://osdc.com.au/"&gt;OSDC&lt;/a&gt;, so that I can also attend &lt;a href="http://barcamp.org/BarCampBrisbane"&gt;Brisbane Barcamp&lt;/a&gt;. It is on Saturday, 24/11/2007.  I'm planning to talk there on websecurity. I'm also looking forward to meet &lt;a href="http://dpn.name/"&gt;David Novakovic&lt;/a&gt;, a Computational Linguistics researcher and geek from Gold Coast. He will also speak about his new technology incubator. Click &lt;a href="http://barcamp.org/BarCampBrisbane1"&gt;here&lt;/a&gt; for complete list of talk at Brisbane Barcamp. Let me know if anyone else is also planning to attend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-8003952800950190639?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/8003952800950190639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=8003952800950190639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8003952800950190639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8003952800950190639'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/barcamp-brisbane-australia.html' title='Barcamp - Brisbane, Australia.'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6913043033128861970</id><published>2007-11-02T00:15:00.000+08:00</published><updated>2007-11-02T00:32:42.273+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='talks'/><category scheme='http://www.blogger.com/atom/ns#' term='design patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Design Patterns by Codingkriggs</title><content type='html'>Codingkriggs has excellent set of &lt;a href="http://www.youtube.com/user/codingkriggs"&gt;videos on Design Patterns&lt;/a&gt;.  I wish he continues making  videos :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6913043033128861970?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6913043033128861970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6913043033128861970' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6913043033128861970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6913043033128861970'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/11/design-patterns-by-codingkriggs.html' title='Design Patterns by Codingkriggs'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5081589285839437645</id><published>2007-10-31T01:45:00.000+08:00</published><updated>2007-10-31T01:52:57.892+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='GIT'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>Linus on GIT</title><content type='html'>The concept of distributed source code management system is very interesting. IMHO GIT is a much better idea compared with Subversion.  GIT takes care of the social factors involved in running a open source project. Here is a talk by &lt;a href="http://video.google.com/videoplay?docid=-2199332044603874737"&gt;Linus on GIT.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5081589285839437645?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5081589285839437645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5081589285839437645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5081589285839437645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5081589285839437645'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/linus-on-git.html' title='Linus on GIT'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6693727510525853361</id><published>2007-10-31T01:33:00.000+08:00</published><updated>2007-10-31T01:43:32.496+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Interactive Shell</title><content type='html'>Interactive Shells for some popular languages.&lt;br /&gt;&lt;br /&gt;IPython ==&gt; Python (supports readline)&lt;br /&gt;IRB  ==&gt; Ruby  (supports readline)&lt;br /&gt;php -a ==&gt; PHP &lt;br /&gt;BeanShell ==&gt; Java (interpretor for compiled language?? )&lt;br /&gt;SquareFree Shell ==&gt; JavaScript&lt;br /&gt;&lt;br /&gt;Installing readline library should help you auto complete and browse through history.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6693727510525853361?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6693727510525853361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6693727510525853361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6693727510525853361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6693727510525853361'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/interactive-shell.html' title='Interactive Shell'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5999353312220135786</id><published>2007-10-31T01:29:00.000+08:00</published><updated>2007-10-31T01:31:53.534+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='yahoo pipes'/><title type='text'>Yahoo! Pipes</title><content type='html'>I've been playing with Yahoo Pipes for a while now. Here is a &lt;a href="http://pipes.yahoo.com/pipes/pipe.info?_id=SDb10H143BGfkOEi8TxBKg"&gt;Yahoo Pipe to read orkut scraps&lt;/a&gt;. You can choose to receive the scraps in RSS form.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5999353312220135786?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5999353312220135786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5999353312220135786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5999353312220135786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5999353312220135786'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/yahoo-pipes.html' title='Yahoo! Pipes'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3775601835579196753</id><published>2007-10-31T01:18:00.001+08:00</published><updated>2007-10-31T01:23:42.645+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>Douglas Crockford on JavaScript</title><content type='html'>&lt;a href="http://developer.yahoo.com/yui/theater/"&gt;YUI Theater&lt;/a&gt; has excellent talks by Douglas Crockford on JavaScript.  JS follows prototype based objects and supported prototyped inheritance.  Douglas explains the fundamental difference between prototype based object orientation and class based object orientation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3775601835579196753?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3775601835579196753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3775601835579196753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3775601835579196753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3775601835579196753'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/douglas-crockford-on-javascript.html' title='Douglas Crockford on JavaScript'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-2836634707004435349</id><published>2007-10-26T02:50:00.000+08:00</published><updated>2007-10-26T12:23:04.125+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Meta Programming with Ruby at Singapore Ruby Brigade</title><content type='html'>&lt;a href="http://blog.choonkeat.com/"&gt;Choon Keat Chew&lt;/a&gt; gave an excellent talk on Meta Programming  at the&lt;a href="http://groups.google.com/group/singapore-rb"&gt; Singapore Ruby Brigade&lt;/a&gt; today.  He explained meta programming with a logger example.  Generally in Java we program to the interface and subclass existing classes to introduce new features. But in Ruby you could directly implement the new method or feature to the object and it instantly gets reflected over the entire scope of the program.  It is kinda dangerous in large teams, since anyone can override existing classes and change their behavior by  modifying their methods. He also discussed extensively about method_missing , *args feature in Ruby.  From what I understand the method_missing function lets you avoid "method not found exception", and also generate setter/getter and other simpler functions automatically. This is one case where meta programming is explicitly visible. He also discussed about simplicity of Rake. Implementing a simple task with Rake will take a lot less time compared with Ant. We also discussed about ducktyping, design patterns and readline library  in the end.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-2836634707004435349?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/2836634707004435349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=2836634707004435349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2836634707004435349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2836634707004435349'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/meta-programming-with-ruby-at-singapore.html' title='Meta Programming with Ruby at Singapore Ruby Brigade'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3236790793888460392</id><published>2007-10-24T17:20:00.000+08:00</published><updated>2007-10-26T02:50:04.068+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>FaceBook Developer Garage</title><content type='html'>&lt;abbr class="dtstart" title="20071024T183000"&gt;&lt;/abbr&gt;Today I attended Asia's first Facebook developer garage at NUS Staff Club.  The even was extensively advertised and there were around 200 people. But most of the people were only interested in business and social networking part. There were very few developers as usual.  I was late; hence I missed the video conference with F8 developers from SanFransico. For those who didn't turn up, don't worry you did not miss anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3236790793888460392?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3236790793888460392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3236790793888460392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3236790793888460392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3236790793888460392'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/facebook-developer-garage.html' title='FaceBook Developer Garage'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-8325760605139707144</id><published>2007-10-24T14:11:00.000+08:00</published><updated>2007-10-31T01:28:06.525+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Functional Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Closures'/><category scheme='http://www.blogger.com/atom/ns#' term='Static vs Dynamic typing'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><category scheme='http://www.blogger.com/atom/ns#' term='duck typing'/><title type='text'>Comparing Programming Languages</title><content type='html'>Comparing programming languages has always been interesting.  A thorough understanding of Object Orientation, Static/Dynamic/Duck typing, Functional Programming, Generics, Aspects, Closures, Design Patterns, Data Structures and Meta Programming  will let a programmer hop from one language to another very easily.  For example, though both Java and JavaScript are Object Oriented, Java is Class-Based whereas JavaScript is Prototype-Based.  Java forces programmers to implement proper namespaces, where as JavaScript does not.  Most JavaScript programmers define variables in global scope, though it is possible to organize them with namespaces. Haskell is fundamentally different from other programming languages since it uses functions as basic building blocks. Python, Perl, Ruby and PHP  support Dynamic Typing, where as C, C++ and  Java support Static Typing.  DuckTyping is implemented in the core of Python,  but not in languages like Java, though you can emulate Duck Typing in Java as well.  Design patterns are suppose to be language independent, but some of them get implemented in the core of some languages. For example the Iterator pattern is implement in Java, Python etc. So we don't even realize that we are using Iterator patterns when we use Python or Java. On the other hand we manually implement Iterator patterns in C.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-8325760605139707144?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/8325760605139707144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=8325760605139707144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8325760605139707144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8325760605139707144'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/comparing-programming-languages.html' title='Comparing Programming Languages'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-347798767668142137</id><published>2007-10-24T12:39:00.000+08:00</published><updated>2007-10-24T14:10:38.910+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='beanshell'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Java Bean Shell</title><content type='html'>Java Bean Shell is a handy tool for Java programmers to test APIs, regular expressions, and other small code snippets. In particular if you are working on Client-Server architecture, it takes long time for you to test small changes in the back end.  Though Java is compiled language, the interpreter tool in BeanShell will let you interpret the code.  It can be downloaded from &lt;a href="http://www.beanshell.org/"&gt;http://www.beanshell.org/&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;Demo&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;//to start Console&lt;br /&gt;$ java -classpath ./bsh-2.0b4.jar   bsh.Console&lt;br /&gt;//to start Interpreter&lt;br /&gt;$ java -classpath ./bsh-2.0b4.jar  bsh.Interpreter&lt;br /&gt;bsh % import java.io.Decoder;&lt;br /&gt;bsh % String dir = "%2Fhome%2Fcodeshepherd";&lt;br /&gt;bsh % System.out.println(dir);&lt;br /&gt;%2Fhome%2Fcodeshepherd&lt;br /&gt;bsh % System.out.println(Decoder.decode(dir));&lt;br /&gt;/home/codeshepherd&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The Interpreter does not support history and coloring. But the Console does.  But the output from Console is thrown in the parent shell.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-347798767668142137?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/347798767668142137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=347798767668142137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/347798767668142137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/347798767668142137'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/java-bean-shell.html' title='Java Bean Shell'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-8865668848091609536</id><published>2007-10-22T17:01:00.000+08:00</published><updated>2007-10-22T17:10:27.218+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OWASP'/><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Open Web Application Security Project - Singapore Chapter</title><content type='html'>OWASP-Singapore meetup was held on 9th Oct at Geek Terminal in Singapore.  Five of us meet and had a chat for about an hour. Geek Terminal is a nice place for geek meetups. I guess they provide laptops with wifi connection to use and they also have mini rooms with projects for conducting mini talks. I'm not sure if those laptops run Linux, would be great if it does so.   Last Saturday Facebook and Slashdot community hosted a meeting there, but I could not make it .  I hope we have more of these Security related meeting and Open Hack Days in and around Singapore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-8865668848091609536?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/8865668848091609536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=8865668848091609536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8865668848091609536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8865668848091609536'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/open-web-application-security-project.html' title='Open Web Application Security Project - Singapore Chapter'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-944723737541868220</id><published>2007-10-22T15:04:00.000+08:00</published><updated>2007-10-22T15:27:15.388+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='static typing'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='dynamic typing'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><category scheme='http://www.blogger.com/atom/ns#' term='duck typing'/><title type='text'>An Informal Interview With a Haskell Hacker</title><content type='html'>2:33:03 PM codeshepherd: given that haskell is a functional programming language.. what are the main differences you find when you compare haskell with other langs&lt;br /&gt;2:34:10 PM rajagopal.n: modifying the system state is something that is still tricky for me to do in some cases. For instance, I was thinking I had understood Monads properly, only to understand that there is more that I didn't understand clearly, when i tried to do some database manipulation using the HSQL connectors,  and print the resultsets on a webpage using HAppS.&lt;br /&gt;2:34:22 PM rajagopal.n: but otherwise, if all that you want to do is lot of computation&lt;br /&gt;2:34:28 PM rajagopal.n: writing Haskell code is fun&lt;br /&gt;2:34:36 PM rajagopal.n: you wanna one line binary tree?&lt;br /&gt;2:34:38 PM rajagopal.n: you can&lt;br /&gt;2:35:05 PM rajagopal.n: you can construct all such stuff with ease, without leaving space for much bugs.&lt;br /&gt;2:36:43 PM codeshepherd: function are building blocks of language.. and not objects.. so is it difficult for people from OOP background to learn haskell ?&lt;br /&gt;2:40:00 PM rajagopal.n: The difficulty of learning depends on the OOP that you were using.  Most people find it difficult to get used to the concept of lazy evaluation, and immutable data in Haskell, being used to languages where the statements get executed in sequence, and having been used to using variables as counters and stuff. people tend to ask in C, C++, I can do a I++ to increment the value of I. but why does haskell make these variables immutable? It takes time for them to understand that immutability is a way to facilitate lazy evaluation.&lt;br /&gt;2:40:27 PM rajagopal.n: It needs forgetting some of the imperative programming concepts to start accepting the functional programming concepts&lt;br /&gt;2:41:46 PM codeshepherd: Does haskell support Meta Programming ? If so how different is it from Ruby's meta programming implementation ?&lt;br /&gt;2:43:51 PM rajagopal.n: Haskell supports meta programming. I've just learnt it to understand some parts of the HAppS example blog application code. As I hadn't done any meta programming in Ruby, I'm not sure about how it compares to it&lt;br /&gt;2:45:08 PM codeshepherd: Does Meta programming combined with Functional programming pose special advantages ?&lt;br /&gt;2:49:53 PM rajagopal.n: I'm not sure about that da.&lt;br /&gt;2:50:19 PM codeshepherd: ok.&lt;br /&gt;2:50:41 PM codeshepherd: Does Haskell support Duck Typing ?&lt;br /&gt;2:51:06 PM rajagopal.n: ya,&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;Prelude&gt; :t map&lt;br /&gt;map :: (a -&gt; b) -&gt; [a] -&gt; [b]&lt;br /&gt;Prelude&gt; let bar a = map (*1) a&lt;br /&gt;Prelude&gt; :t bar&lt;br /&gt;bar :: (Num a) =&gt; [a] -&gt; [a].&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;you see that it makes it Num&lt;br /&gt;2:51:53 PM codeshepherd: Duck Typing with functions as basic blocks is kinda difficult to understand ? Do functions act like so called ducks in duck typing ?&lt;br /&gt;2:54:16 PM rajagopal.n: There is not difference in the way you see functions and data in a functional programming language&lt;br /&gt;2:57:02 PM codeshepherd: Is there any reason for people to choose Haskell over other languages  for hobby programming ?&lt;br /&gt;3:00:49 PM rajagopal.n: Haskell is pure functional. You get to learn a lot of new things, being a pure functional language that restricts modification to the state to be done only through monads. Learning Haskell and teasing the brain is refreshing when you get bored with all those languages that mostly differs only by syntactic sugar or a few extra features.&lt;br /&gt;3:01:55 PM codeshepherd: ok&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-944723737541868220?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/944723737541868220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=944723737541868220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/944723737541868220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/944723737541868220'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/informal-interview-with-haskell-hacker.html' title='An Informal Interview With a Haskell Hacker'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6442487556115392492</id><published>2007-10-19T17:37:00.000+08:00</published><updated>2007-10-19T17:58:07.812+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Singapore'/><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>My talk at Singapore Linux Meetup</title><content type='html'>This wednesday I gave a talk on websecurity  titled "Hacking the Web" at &lt;a href="http://linux.meetup.com/5/calendar/6388157/?a=cv1c_grp"&gt;Singapore Linux meetup&lt;/a&gt;.  This is my first talk in Singapore and as usual I was kinda nerves.  Around 35 to 40 people attended the talk and there were lot of questions from the audience.  We had some technical problems initially, with internet connection.  I was not able to connect to the internet from my macbook because of dhcp version mismatch. So I'd to run through the talk without internet connection and then later borrow a Windows laptop to demonstrate things on internet.  The slides are hosted at &lt;a href="http://www.codeshepherd.com/hackingtheweb/hackingtheweb.html"&gt;http://www.codeshepherd.com/hackingtheweb/hackingtheweb.html&lt;/a&gt; .  Thanks to Darrel for organizing  the talk and everyone else who came down. I will be giving the same talk at Singapore Poly, National University of Singapore, and Open Source Developers Conference 2007 at Brisbane,  in the near future. Overall this talk turned out to be a very good experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6442487556115392492?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6442487556115392492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6442487556115392492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6442487556115392492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6442487556115392492'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/my-talk-at-singapore-linux-meetup.html' title='My talk at Singapore Linux Meetup'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3447779114100378349</id><published>2007-10-12T20:13:00.000+08:00</published><updated>2007-10-13T00:26:04.803+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Geeky License Plates</title><content type='html'>geeky license plates..&lt;br /&gt;http://thesiblog.blogspot.com/2007/04/top-ten-geek-license-plates.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3447779114100378349?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3447779114100378349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3447779114100378349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3447779114100378349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3447779114100378349'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/geek-license-plates.html' title='Geeky License Plates'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-8914391034197468101</id><published>2007-10-04T11:38:00.000+08:00</published><updated>2007-10-04T11:48:01.757+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><title type='text'>Wife and Girl Friend</title><content type='html'>If &lt;br /&gt;Family:Package&lt;br /&gt;GirlFriend:Private&lt;br /&gt;Wife: ?&lt;br /&gt;Adultery: ?&lt;br /&gt;Diverse: ?&lt;br /&gt;OpenMarriage: ?&lt;br /&gt;&lt;br /&gt;Choices&lt;br /&gt;1)final&lt;br /&gt;2)static&lt;br /&gt;3)Public casting for Private&lt;br /&gt;4)Abstract&lt;br /&gt;5)Interface&lt;br /&gt;6)BCEL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(03:18:29 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;if private is for girlfriend , then what is for wife ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#062585;"&gt;(03:18:46 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#062585;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;***cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;hides his "jib" whatever that is...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(03:18:51 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;Fanook:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: static&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(03:18:57 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;final&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(03:19:18 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;unless you're in an open marriage, then it's abstract&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(03:19:22 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;Fanook:  static does not suit...  finay may be ..&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(03:19:36 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Or if you're homeless it's transient...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#f857d8;"&gt;(03:20:06 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#f857d8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;Fanook:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;cheeser: hmmm, how would one implement a divorce then? :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(03:20:22 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Fanook: bytecode manipulation!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#f857d8;"&gt;(03:20:26 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#f857d8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;Fanook:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;hehe&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0dff26;"&gt;(03:20:28 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0dff26;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cheeser:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;that's research i'll leave to others.  P^)=&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(03:22:08 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;adultery = ? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#5c3566;"&gt;(03:22:21 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#5c3566;"&gt;&lt;span style="font-size:100%;"&gt;freeone3000:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;adultery is achieved through bcel.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#5c3566;"&gt;(03:22:43 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#5c3566;"&gt;&lt;span style="font-size:100%;"&gt;freeone3000:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Or those who put things public that should be private.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(03:22:57 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;hehe :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(03:24:52 PM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;these metaphors would be more fun if java allowed multiple inheritence&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-8914391034197468101?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/8914391034197468101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=8914391034197468101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8914391034197468101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/8914391034197468101'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/wife-and-girl-friend.html' title='Wife and Girl Friend'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-491014466015571317</id><published>2007-10-02T16:14:00.000+08:00</published><updated>2007-10-02T16:22:35.074+08:00</updated><title type='text'>A map is a collection of pairs, but it's not a Collection.</title><content type='html'>A funny discussion at #Java@irc.freenode.net&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:13:47 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;sorry for the noob question, but what is the difference between an arraylist and a collection?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#48c4e8;"&gt;(02:14:13 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#48c4e8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;ojacobson:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;An ArrayList is one kind of Collection; there are others&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0c23d1;"&gt;(02:14:29 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0c23d1;"&gt;&lt;span style="font-size:100%;"&gt;Logi:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;ArrayList implements List extends Collection&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:14:34 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;o rly&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:14:42 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;ok that makes sense&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#48c4e8;"&gt;(02:14:47 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#48c4e8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;ojacobson:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;~javadoc Collection&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#b725c2;"&gt;(02:14:47 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#b725c2;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;javabot:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;ojacobson, please see java.util.Collection: &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html"&gt;http://java.sun.com/javase/6/docs/api/java/util/Collection.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:14:49 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;thanks very much&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0c23d1;"&gt;(02:14:56 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0c23d1;"&gt;&lt;span style="font-size:100%;"&gt;Logi:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;HashMap implements Map which is a collection even if it doesn't implement Collection directly&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#113d2c;"&gt;(02:15:05 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#113d2c;"&gt;&lt;span style="font-size:100%;"&gt;kimtiede:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;An ArrayList gives easy random access to the elements&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:15:12 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;Collection = List  Or Set ; List = ArrayList or LinkedList ..  iamgedanken&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#0c23d1;"&gt;(02:15:21 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0c23d1;"&gt;&lt;span style="font-size:100%;"&gt;Logi:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Map m=...; m.keySet() instanceof Set implements Colletion&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(02:15:32 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal_design_patterns_utah:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Logi: to be fair, it's a relationship of collections as provided&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#ce1cb1;"&gt;(02:15:38 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ce1cb1;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;cybereal_design_patterns_utah:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;entrySet, keySet, values&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:15:43 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;List and Set are interfaces implementing Collection... ArrayList is a Class implementing interface List.. iamgedanken&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:16:16 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;alright I understand now thanks for your time&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#a40000;"&gt;(02:16:20 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a40000;"&gt;&lt;span style="font-size:100%;"&gt;iamgedanken:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:16:32 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;Logi:  HashMap is not a Collection.. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:16:45 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;HashMap does not implement the Collection interface .. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(02:16:48 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;Logi:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: it is with a lower case "c"&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#979388;"&gt;(02:17:24 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#979388;"&gt;&lt;span style="font-size:100%;"&gt;aditsu:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;in STL style it would be a collection of pairs :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:17:33 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;Logi:  sorry I dont unerstand.. what is the difference ? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(02:17:51 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;ojacobson:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: A map is a collection of pairs, but it's not a Collection&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#48c4e8;"&gt;(02:18:01 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#48c4e8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;ojacobson:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;eg it doesn't implement the Collection interface&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#af7f00;"&gt;(02:18:03 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#af7f00;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;Logi:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;b&gt;&lt;span style="color:#0000dd;"&gt;codeshepherd: Collection is an interface and Map doesn't extend it. but what ojacobson said&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#204a87;"&gt;(02:18:21 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#204a87;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;codeshepherd:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#909090;"&gt;oh ok..  Yes,  in English.. not in Java :P&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#48c4e8;"&gt;(02:18:26 AM) &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#48c4e8;"&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;ojacobson:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;span style="color:#000000;"&gt;Right :)&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-491014466015571317?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/491014466015571317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=491014466015571317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/491014466015571317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/491014466015571317'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/10/map-is-collection-of-pairs-but-its-not.html' title='A map is a collection of pairs, but it&apos;s not a Collection.'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3587382734117413260</id><published>2007-09-29T15:22:00.000+08:00</published><updated>2007-09-28T23:45:28.215+08:00</updated><title type='text'>Please don't tell anyone... that I..</title><content type='html'>Dig into dustbins in the bus stop,&lt;br /&gt;Sniff wireless traffic in my apartment; watch what people do online,&lt;br /&gt;Walk along the beach late at night,&lt;br /&gt;Read other people's emails and IM conversations,&lt;br /&gt;Delete all my email accounts,&lt;br /&gt;Bully newbies in IRC and other mailing lists,&lt;br /&gt;Run a keylogger in my machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3587382734117413260?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3587382734117413260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3587382734117413260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3587382734117413260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3587382734117413260'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/07/please-dont-tell-anyone-that-i.html' title='Please don&apos;t tell anyone... that I..'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-1352066061010020745</id><published>2007-09-28T23:47:00.000+08:00</published><updated>2007-09-28T23:56:14.687+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geeks'/><title type='text'>Geek gatherings in Singapore</title><content type='html'>Unlike Bangalore, Singapore has very few Geek gatherings.  Singapore Linux meetup, Novel Suse Linux meetup, Ruby Brigade, Singapore JUG, are the active geek gatherings in Singapore.  On the other hand Bangalore boasts of many Geeky activities like "Hack Days", "Open Coffee Club meet",  regular Linux user group meetings, Bangpypers meeting,  PHP user group meetings, Blog Camps, Bar Camps, FOSS.IN, Freed, Geek gatherings at pubs, etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1352066061010020745?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1352066061010020745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1352066061010020745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1352066061010020745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1352066061010020745'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/09/geek-gatherings-in-singapore.html' title='Geek gatherings in Singapore'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-2563995313011293559</id><published>2007-09-28T19:57:00.000+08:00</published><updated>2007-09-28T22:57:19.327+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='VIM'/><title type='text'>Syntax Highlighting for Code Embedded in Blogger</title><content type='html'>There are multiple ways for highlighting the syntax of code embedded in Blogger. One way is to generate HTML files directly from VIM using :TOHtml and extract the CSS part in it and use it in Blogger. You can do the same with Textmate or Emacs. Another alternative is to use &lt;a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html"&gt;Prettifier.&lt;/a&gt;  Prettifier is very easy to use. All you need to do is add a CSS and JavaScript file in  your server and link them in your blog template. Please look at the  &lt;a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html"&gt;readme&lt;/a&gt;  file for more details. In my case, Blogger does not allow me to upload JavaScript files and CSS files, so I'm hosting them on a different server. I have updated my earlier posts to use Prettify.&lt;br /&gt;&lt;br /&gt;http://codeshepherd.blogspot.com/2007/07/eliza-loves-you-rogerian.html#links&lt;br /&gt;http://codeshepherd.blogspot.com/2007/06/hello-world-orkut-chickenfoot.html#links&lt;br /&gt;&lt;br /&gt;The Perl code has turned out bit messy, but the GreaseMonkey JavaScript code looks clean.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-2563995313011293559?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/2563995313011293559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=2563995313011293559' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2563995313011293559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2563995313011293559'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/09/syntax-highlighting-for-code-embedded.html' title='Syntax Highlighting for Code Embedded in Blogger'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5176676499523375286</id><published>2007-09-25T16:36:00.000+08:00</published><updated>2007-09-28T22:50:23.653+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='portlets'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='gridsphere'/><title type='text'>SpringMVC + Hibernate + GridSphere + Apache Tomcat</title><content type='html'>I've successfully integrated GridSphere and SpringMVC. I've been using a lot of GridSphere Tag Libraries in my JSPs. Now I've to rewrite them using Spring specific tag libraries. In my opinion the GridSphere specific tag libraries are much easier to use compared to Spring tag libraries. The following link provides detailed explanation for integrating SpringMVC with GridSphere. http://docs.gridsphere.org/display/gs30/GridSphere+3.0+and+Spring+Portlet+MVC . Now I've to explore some templating Engines, and Acegi Tag libraries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5176676499523375286?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5176676499523375286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5176676499523375286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5176676499523375286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5176676499523375286'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/09/springmvc-hibernate-gridsphere-apache.html' title='SpringMVC + Hibernate + GridSphere + Apache Tomcat'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5491158469975670204</id><published>2007-09-13T18:26:00.000+08:00</published><updated>2007-09-28T23:21:03.621+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Conferences'/><category scheme='http://www.blogger.com/atom/ns#' term='OSDC'/><category scheme='http://www.blogger.com/atom/ns#' term='WebSecurity'/><category scheme='http://www.blogger.com/atom/ns#' term='Australia'/><title type='text'>Happy News!!</title><content type='html'>I just received a email from Open Source Developers Conference, Australia,  Committee, confirming that my talk has been accepted for the Conference. I will be speaking on "Web Security" at OSDC 2007, Brisbane, Australia this November. Let me know if anyone else is attending the conference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5491158469975670204?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5491158469975670204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5491158469975670204' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5491158469975670204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5491158469975670204'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/09/happy-news.html' title='Happy News!!'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-1755997931625217019</id><published>2007-08-17T15:28:00.000+08:00</published><updated>2007-08-17T16:47:09.824+08:00</updated><title type='text'>Frustrating 3wplayers and Pr0n</title><content type='html'>Last night, I finished downloading Rush Hour 3. When I played it using mplayer, it prompted me to download 3wplayer. So I googled for W3player and found Perl source (look below for the link) for decrypting 3wplayer encrypted files into AVI files. I decrypted Rush Hour 3 file and it happened to be pr0n!!! &lt;br /&gt;&lt;br /&gt;Wikipedia:&lt;br /&gt;3wplayer is a rogue media player software application bundled with trojans that can infect computers running Microsoft Windows. It is designed to exploit users who download video files, instructing them to download and install the program in order to view the video.  &lt;br /&gt;&lt;br /&gt;Perl code to decode 3wplayer encoded video files: http://www.federicopistono.org/Futile_attempt_of_spreading_malware_3wPlayer_vs_perl_hackers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1755997931625217019?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1755997931625217019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1755997931625217019' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1755997931625217019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1755997931625217019'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/08/frustrating-w3players-and-pr0n.html' title='Frustrating 3wplayers and Pr0n'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-7479008980948381185</id><published>2007-08-08T17:30:00.000+08:00</published><updated>2007-08-08T17:33:07.471+08:00</updated><title type='text'>Why are programmers lucky?</title><content type='html'>&lt;span style="font-weight:bold;"&gt;#bioinformatics @ irc.freenode.net &lt;/span&gt;&lt;br /&gt;(05:07:23 PM) _dan: my dad is an electronics enginerer, he has a room stacked full of stuff, always made me quite jealous, I mean I can hardly have an electron microscope at home..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-7479008980948381185?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/7479008980948381185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=7479008980948381185' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7479008980948381185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7479008980948381185'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/08/why-are-programmers-lucky.html' title='Why are programmers lucky?'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-2148971827349904592</id><published>2007-08-06T22:35:00.000+08:00</published><updated>2007-08-07T14:40:02.789+08:00</updated><title type='text'>The sarcastic subconscious</title><content type='html'>Many times I code in the dream only to wake up and realize that I haven't saved my code!!! Maybe technology will grow up soon to tap productive work from our subconscious minds.  Maybe someday biologists will create a VIM plugin to save the code we dream of.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-2148971827349904592?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/2148971827349904592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=2148971827349904592' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2148971827349904592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2148971827349904592'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/08/sarcastic-subconscious.html' title='The sarcastic subconscious'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-5351608088714938881</id><published>2007-07-26T15:47:00.000+08:00</published><updated>2007-07-26T16:48:52.607+08:00</updated><title type='text'>Intellectual Masturbation</title><content type='html'>Geek's Google query to search for porn: 'intitle:"index of" porn (mpeg|mpg|avi)'. &lt;a href="http://www.google.com/search?hl=en&amp;q=intitle%3A%22index+of%22+porn+(mpeg%7Cavi%7Cmpg)"&gt;Click here&lt;/a&gt; to try it. 100% satisfaction guarantied.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-5351608088714938881?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/5351608088714938881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=5351608088714938881' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5351608088714938881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/5351608088714938881'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/07/intellectual-masturbation.html' title='Intellectual Masturbation'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6034340334339721806</id><published>2007-07-21T18:36:00.000+08:00</published><updated>2007-09-28T19:51:37.106+08:00</updated><title type='text'>Eliza Loves You - Rogerian psychotherapist</title><content type='html'>Recently I ported the ElizaLovesYou Gaim plugin to Pidgin. &lt;a href="http://codeshepherd.com/downloads/elizalovesyou.pl"&gt;Click here&lt;/a&gt; to download the source.  Most conversations with the Eliza bot are quite uninteresting. But the one I saw today needs special mention.  It is one of the most interesting conversations I've seen with Eliza bot.Here goes the conversation. Scroll down to read the code. &lt;br /&gt;&lt;br /&gt;(05:51:39 PM) J: alo&lt;br /&gt;(05:51:39 PM) Codeshepherd's Bot: Hi J/Talk.v104FA524C95, The maniac is sleeping or eating or buzy doing some shit!!!.&lt;br /&gt;(05:51:39 PM) Codeshepherd's Bot: I am his dumb slave bot :). You can speak to me if you want!!!&lt;br /&gt;(05:51:50 PM) J: hi Jayshree and arch here&lt;br /&gt;(05:51:51 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(05:52:27 PM) J: hello&lt;br /&gt;(05:52:28 PM) Codeshepherd's Bot: How do you do. Please state your problem.&lt;br /&gt;(05:52:58 PM) J: i'm fine. how r u?&lt;br /&gt;(05:52:59 PM) Codeshepherd's Bot: Do you say you'm fine for some special reason?&lt;br /&gt;(05:53:45 PM) J: yes cause we re are goibg to the ice cream parlor&lt;br /&gt;(05:53:46 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(05:54:17 PM) J: how do u do?&lt;br /&gt;(05:54:18 PM) Codeshepherd's Bot: Why do you ask?&lt;br /&gt;(05:54:35 PM) J: generaaly i'm concerned about your health&lt;br /&gt;(05:54:36 PM) Codeshepherd's Bot: Do you want my health?&lt;br /&gt;(05:55:11 PM) J: how can i take your health?&lt;br /&gt;(05:55:12 PM) Codeshepherd's Bot: What is it you really want to know?&lt;br /&gt;(05:55:42 PM) J: generally how are you?&lt;br /&gt;(05:55:43 PM) Codeshepherd's Bot: Oh, I?&lt;br /&gt;(05:55:54 PM) J: yes you only..&lt;br /&gt;(05:55:55 PM) Codeshepherd's Bot: I understand.&lt;br /&gt;(05:56:15 PM) J: ok give me the answer..&lt;br /&gt;(05:56:16 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(05:56:30 PM) J: how are you?&lt;br /&gt;(05:56:31 PM) Codeshepherd's Bot: What are your feelings now?&lt;br /&gt;(05:57:09 PM) J: i'm still wondering why are you not answering my question?&lt;br /&gt;(05:57:10 PM) Codeshepherd's Bot: Is it important to you that your question?&lt;br /&gt;(05:57:32 PM) J: yes..&lt;br /&gt;(05:57:33 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(05:58:08 PM) J: no problems in life&lt;br /&gt;(05:58:09 PM) Codeshepherd's Bot: Why 'no'?&lt;br /&gt;(05:58:42 PM) J: because i stay happy all the time..&lt;br /&gt;(05:58:43 PM) Codeshepherd's Bot: You say because you stay happy all the time?&lt;br /&gt;(05:58:50 PM) J: yes..&lt;br /&gt;(05:58:51 PM) Codeshepherd's Bot: Please tell me some more about this.&lt;br /&gt;(05:59:12 PM) J: being sad is again sad...&lt;br /&gt;(05:59:13 PM) Codeshepherd's Bot: Earlier you said your question.&lt;br /&gt;(05:59:55 PM) J: yes, i was asking you how are you?&lt;br /&gt;(05:59:56 PM) Codeshepherd's Bot: Why do you tell me you were asking me how are me now?&lt;br /&gt;(06:00:15 PM) J: okies i'm confused now..&lt;br /&gt;(06:00:16 PM) Codeshepherd's Bot: Why do you say okies you'm confused now?&lt;br /&gt;(06:00:49 PM) J: because you don't seem to answering my question.&lt;br /&gt;(06:00:50 PM) Codeshepherd's Bot: Why do you say your question?&lt;br /&gt;(06:01:10 PM) J: i think i should talk somethiong else..&lt;br /&gt;(06:01:11 PM) Codeshepherd's Bot: Do you really doubt you should talk somethiong else?&lt;br /&gt;(06:01:39 PM) J: no i don't have ant doubts..&lt;br /&gt;(06:01:40 PM) Codeshepherd's Bot: Why 'no'?&lt;br /&gt;(06:01:59 PM) J: because i'm clear&lt;br /&gt;(06:02:00 PM) Codeshepherd's Bot: Do you say because you'm clear for some special reason?&lt;br /&gt;(06:02:28 PM) J: yes because i have taken bath 2day..&lt;br /&gt;(06:02:29 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(06:02:40 PM) J: did you take bath?&lt;br /&gt;(06:02:41 PM) Codeshepherd's Bot: You're not really talking about me -- are you?&lt;br /&gt;(06:02:56 PM) J: yes i'm talking about you.&lt;br /&gt;(06:02:57 PM) Codeshepherd's Bot: Why don't you tell me a little more about this.&lt;br /&gt;(06:03:08 PM) J: like what?&lt;br /&gt;(06:03:09 PM) Codeshepherd's Bot: But your question.&lt;br /&gt;(06:03:23 PM) J: i forgot my question..&lt;br /&gt;(06:03:24 PM) Codeshepherd's Bot: Is it important to you that your question?&lt;br /&gt;(06:03:37 PM) J: no not important.&lt;br /&gt;(06:03:38 PM) Codeshepherd's Bot: Why 'no'?&lt;br /&gt;(06:04:03 PM) J: pk let me move on to somthng else.&lt;br /&gt;(06:04:04 PM) Codeshepherd's Bot: But your question.&lt;br /&gt;(06:04:17 PM) J: i discad that question&lt;br /&gt;(06:04:18 PM) Codeshepherd's Bot: Why do you say you discad that question?&lt;br /&gt;(06:04:34 PM) J: i;m not interested in that question..&lt;br /&gt;(06:04:35 PM) Codeshepherd's Bot: Can you elaborate on that?&lt;br /&gt;(06:04:40 PM) J: no&lt;br /&gt;(06:04:41 PM) Codeshepherd's Bot: Why not?&lt;br /&gt;(06:04:59 PM) J: because i forgo my quetion&lt;br /&gt;(06:05:00 PM) Codeshepherd's Bot: Is it important to you that your quetion?&lt;br /&gt;(06:05:10 PM) J: not important&lt;br /&gt;(06:05:11 PM) Codeshepherd's Bot: But your quetion.&lt;br /&gt;(06:05:41 PM) J: hello can you type some other line&lt;br /&gt;(06:05:42 PM) Codeshepherd's Bot: We were discussing you -- not me.&lt;br /&gt;(06:05:57 PM) J: oh sorry..&lt;br /&gt;(06:05:58 PM) Codeshepherd's Bot: I've told you that apologies are not required.&lt;br /&gt;(06:06:20 PM) J: thanks for reminding e&lt;br /&gt;(06:06:21 PM) Codeshepherd's Bot: That is interesting. Please continue.&lt;br /&gt;(06:06:38 PM) J: i don;t have anything to say now&lt;br /&gt;(06:06:39 PM) Codeshepherd's Bot: You say you don;t have anything to say now?&lt;br /&gt;(06:07:17 PM) J: yes&lt;br /&gt;(06:07:18 PM) Codeshepherd's Bot: Please tell me some more about this.&lt;br /&gt;(06:07:46 PM) J: we are going to the ice cream parlour to eat ice ceam&lt;br /&gt;(06:07:47 PM) Codeshepherd's Bot: Would you like it if they were not going to the ice cream parlour to eat ice ceam?&lt;br /&gt;(06:08:09 PM) J: no i will not like it.&lt;br /&gt;(06:08:10 PM) Codeshepherd's Bot: Why not?&lt;br /&gt;(06:08:30 PM) J: because i want to eat ice cream&lt;br /&gt;(06:08:31 PM) Codeshepherd's Bot: What would it mean to you if you got to eat ice cream?&lt;br /&gt;(06:08:51 PM) J: i would be happy&lt;br /&gt;(06:08:52 PM) Codeshepherd's Bot: Why do you say you would be happy?&lt;br /&gt;(06:09:07 PM) J: because i like ice cream&lt;br /&gt;(06:09:08 PM) Codeshepherd's Bot: That is interesting. Please continue.&lt;br /&gt;(06:09:44 PM) J: ice cream is creamy and cold, that makes it good thing to eat after food&lt;br /&gt;(06:09:45 PM) Codeshepherd's Bot: Does talking about this bother you?&lt;br /&gt;(06:09:57 PM) J: no not at all&lt;br /&gt;(06:09:58 PM) Codeshepherd's Bot: Why 'no'?&lt;br /&gt;(06:10:23 PM) J: why should i have problem with it?&lt;br /&gt;(06:10:24 PM) Codeshepherd's Bot: That's quite interesting.&lt;br /&gt;(06:10:29 PM) J: hmm&lt;br /&gt;(06:10:30 PM) Codeshepherd's Bot: That is interesting. Please continue.&lt;br /&gt;(06:10:43 PM) J: ok now i'm tired&lt;br /&gt;(06:10:44 PM) Codeshepherd's Bot: Can you elaborate on that?&lt;br /&gt;(06:10:52 PM) J: tell me some stories&lt;br /&gt;(06:10:53 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;(06:11:10 PM) J: ya tell me cindrella story.&lt;br /&gt;(06:11:11 PM) Codeshepherd's Bot: Tell me more about that.&lt;br /&gt;(06:11:23 PM) J: you have to tell me that.&lt;br /&gt;(06:11:24 PM) Codeshepherd's Bot: Do you wish to believe I have to tell you?&lt;br /&gt;(06:11:38 PM) J: yes&lt;br /&gt;(06:11:39 PM) Codeshepherd's Bot: Why don't you tell me a little more about this.&lt;br /&gt;(06:13:25 PM) J: i don't have anything more to say.&lt;br /&gt;(06:13:26 PM) Codeshepherd's Bot: Why do you say you don't have anything more to say?&lt;br /&gt;(06:14:11 PM) J: ok bye!&lt;br /&gt;(06:14:12 PM) Codeshepherd's Bot: Please go on.&lt;br /&gt;&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;#ElizaLovesYou v0.4 &lt;br /&gt;#Changes&lt;br /&gt;#Ported v0.3 to Pidgin by Deepan Chakravarthy  &lt;br /&gt;#Email: codeshepherd AT gmail DOT com&lt;br /&gt;#Thanks to sadrul and resiak  on #pidgin@irc.freenode.net and Davo_Dinkum on ##English@irc.freenode.net  for their help.&lt;br /&gt;#ElizaLovesYou v0.3 - Rogerian psychotherapist for Pidgin&lt;br /&gt;#Copyright (C) 2004 Scott Wolchok&lt;br /&gt;#This program is free software; you can redistribute it and/or&lt;br /&gt;#modify it under the terms of the GNU General Public License&lt;br /&gt;#as published by the Free Software Foundation; either version 2&lt;br /&gt;#of the License, or (at your option) any later version.&lt;br /&gt;#This program is distributed in the hope that it will be useful,&lt;br /&gt;#but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;#GNU General Public License for more details.&lt;br /&gt;#You should have received a copy of the GNU General Public License&lt;br /&gt;#along with this program; if not, write to the Free Software&lt;br /&gt;#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;#(You can find the GPL at http://www.gnu.org/copyleft/gpl.html)&lt;br /&gt;#You'll need to install Chatbot::Eliza from CPAN before this will work.&lt;br /&gt;#Run 'perl -MCPAN -e "shell"' and answer the questions, then type&lt;br /&gt;#'install Chatbot::Eliza' at the prompt. That should do it!&lt;br /&gt;#'install Pidgin' at the prompt&lt;br /&gt;#'install Purple' at the prompt&lt;br /&gt;#Please note that this plugin is just a hook for the Perl Chatbot::Eliza&lt;br /&gt;#module - the credit for the actual "bot" goes to the John Nolan, the&lt;br /&gt;#writer of that module.&lt;br /&gt;#Superdug is great!!!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;use Pidgin;&lt;br /&gt;use Purple;&lt;br /&gt;use Chatbot::Eliza;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;my %bots;&lt;br /&gt;my $plugin;&lt;br /&gt;my $data = "";&lt;br /&gt;#my @timeouts; #Pidgin segfaults if we leave the send_message timeout and unload the plugin&lt;br /&gt;&lt;br /&gt;%::PLUGIN_INFO = (&lt;br /&gt;        perl_api_version         =&gt; 2,&lt;br /&gt;        name             =&gt; "ElizaLovesYou",&lt;br /&gt;        version          =&gt; "0.4",&lt;br /&gt;        summary          =&gt; "Rogerian psychotherapist for Pidgin",&lt;br /&gt;        description      =&gt; "Automatically responds to incoming messages on all accounts using the Eliza algorithm",&lt;br /&gt;        author           =&gt; "Scott Wolchok &lt;evilsporkman\@gmail.com&gt;",&lt;br /&gt;        url              =&gt; "www.codeshepherd.com/downloads/elizalovesyou.pl",&lt;br /&gt;        load             =&gt; "plugin_load",&lt;br /&gt;        unload           =&gt; "plugin_unload"&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;sub plugin_init &lt;br /&gt;{&lt;br /&gt;        return %::PLUGIN_INFO;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub do_eliza &lt;br /&gt;{&lt;br /&gt;        my $im;&lt;br /&gt;        my ($account, $sender, $message, $conv, $flags) = @_;&lt;br /&gt;        $bots{$sender} = new Chatbot::Eliza unless $bots{$sender};&lt;br /&gt;&lt;br /&gt;        while($message =~ s/&lt;.*?&gt;//)&lt;br /&gt;        {&lt;br /&gt;        };   #HTML si t3h sux0r!&lt;br /&gt;        if($conv)&lt;br /&gt;        {&lt;br /&gt;                my $theIM = $conv-&gt;get_im_data();&lt;br /&gt;&lt;br /&gt;#Tried to use a queue to hold timeouts so we could remove them at plugin_unload - the thing segfaults if there's a timeout pending and you unload it&lt;br /&gt;#       push @timeouts, Pidgin::timeout_add($plugin,10,\&amp;send_message,[$theIM,$bots{$sender}-&gt;transform($message)]);&lt;br /&gt;                Purple::timeout_add($plugin,1,\&amp;send_message,[$theIM,$bots{$sender}-&gt;transform($message)]);&lt;br /&gt;&lt;br /&gt;                Purple::Debug::info($::PLUGIN_INFO{name}, "tutorialpluginLeaving do_eliza\n");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;                $conv = Purple::Conversation-&gt;new(1, $account, $sender);&lt;br /&gt;                if ($conv) &lt;br /&gt;                { &lt;br /&gt;                        print "ok.\n"; &lt;br /&gt;                        $im = $conv-&gt;get_im_data();&lt;br /&gt;&lt;br /&gt;# Here we send messages to the conversation&lt;br /&gt;                        $im-&gt;send("Hi $sender, The maniac is sleeping or eating or buzy doing some shit!!!.");&lt;br /&gt;                        $im-&gt;send("I am his dumb slave bot :). You can speak to me if you want!!!");&lt;br /&gt;                } &lt;br /&gt;                else &lt;br /&gt;                { &lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub send_message &lt;br /&gt;{&lt;br /&gt;        Purple::Debug::info($::PLUGIN_INFO{name}, "tutorialpluginEntering send_message\n");&lt;br /&gt;        my ($IM, $message) = @{$_[0]};&lt;br /&gt;&lt;br /&gt;        Purple::Debug::info($::PLUGIN_INFO{name}, "Shifting timeouts\n");&lt;br /&gt;        #shift @timeouts;&lt;br /&gt;&lt;br /&gt;        Purple::Debug::info($::PLUGIN_INFO{name}, "tutorialpluginSending message\n");&lt;br /&gt;        Purple::Conversation::IM::send($IM,$message);&lt;br /&gt;&lt;br /&gt;        return undef;&lt;br /&gt;}&lt;br /&gt;sub plugin_load &lt;br /&gt;{&lt;br /&gt;        $plugin = shift;&lt;br /&gt;&lt;br /&gt;        my $conversations_handle = Purple::Conversations::get_handle();&lt;br /&gt;        Purple::Signal::connect($conversations_handle, "received-im-msg", $plugin, \&amp;do_eliza, $data);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub plugin_unload &lt;br /&gt;{&lt;br /&gt;        my $plugin = shift;&lt;br /&gt;&lt;br /&gt;#       for my $timeout (@timeouts) {&lt;br /&gt;#               Pidgin::timeout_remove($timeout);&lt;br /&gt;#       }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#Note: I got this from forsaken in #gaim on FreeNode and renamed it to getIM, his original credit follows:&lt;br /&gt;#From Split.pl and edited.&lt;br /&gt;#Michael Wozniak &lt;martianpenguin@hackermail.com&gt; and Anthony Noto &lt;agnoto1@yahoo.com&gt;&lt;br /&gt;sub getIM &lt;br /&gt;{&lt;br /&gt;        my $thing = $_[0];&lt;br /&gt;        my @im_array = Purple::ims(); #get the array of IM's&lt;br /&gt;        foreach my $element (@im_array)&lt;br /&gt;        {&lt;br /&gt;                if ( Purple::Conversation::get_name( Purple::Conversation::IM::get_conversation ( $element ) ) eq $thing )&lt;br /&gt;                {&lt;br /&gt;                        return $element;                #return the correct IM&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return undef;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6034340334339721806?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6034340334339721806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6034340334339721806' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6034340334339721806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6034340334339721806'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/07/eliza-loves-you-rogerian.html' title='Eliza Loves You - Rogerian psychotherapist'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-266965500586956208</id><published>2007-06-13T17:51:00.000+08:00</published><updated>2007-06-14T11:57:57.761+08:00</updated><title type='text'>Longing to get Chicken Pox</title><content type='html'>During the late 90's, when I was in my 3rd class I studied in a school by the name "Eden Garden". It's  a residential school, and we were allowed to meet our parents once in two weeks. I still remember those days, we used to eagerly wait for our parents to come on the visiting days. Its was then that Chicken Pox entered our school. Wow, what a happy news it was. Anyone affected by Chicken Pox was allowed to go home. I was longing to get sick, go home and see my parents. I did get Chicken Pox and one of the staff member accompanied me home!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-266965500586956208?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/266965500586956208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=266965500586956208' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/266965500586956208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/266965500586956208'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/06/longing-to-get-chicken-pox.html' title='Longing to get Chicken Pox'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-7976440529343185323</id><published>2007-06-05T03:19:00.000+08:00</published><updated>2007-09-28T19:56:30.621+08:00</updated><title type='text'>Hello World - Orkut - Chickenfoot - GreaseMonkey</title><content type='html'>A simple Chickenfoot script to stay online in orkut, its as simple as English.. &lt;br /&gt;&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;for(var i=0;i&lt;1000;i++)&lt;br /&gt;{&lt;br /&gt; go("http://orkut.com")&lt;br /&gt; enter("Email","myemail@gmail.com")&lt;br /&gt; enter("password","secret")&lt;br /&gt; sleep(600)&lt;br /&gt; click("sign in")&lt;br /&gt; sleep(600)&lt;br /&gt; go("http://www.orkut.com/GLogin.aspx?cmd=logout")&lt;br /&gt; sleep(60)&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-7976440529343185323?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/7976440529343185323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=7976440529343185323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7976440529343185323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7976440529343185323'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/06/hello-world-orkut-chickenfoot.html' title='Hello World - Orkut - Chickenfoot - GreaseMonkey'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-4805685067277650754</id><published>2007-06-04T19:52:00.000+08:00</published><updated>2007-06-04T23:59:00.185+08:00</updated><title type='text'>Human are just biological machines. (2090)</title><content type='html'>Its 2090, and I am 100+ years old. Humans are fighting with Androids, but this time for a different cause. Humans want to be treated the same as Androids. They don't want to be looked down upon. And the irony is I live in a two bed room apartment  with an Android named Codaro. Codaro's friends often visit us. It's very unusual for a Android to live with a human. The situation has gone from bad to worse. Androids have began to consider, humans as waste biological machines of no use to them. Some criminal human minds  are planning to steal space crafts from Androids which are capable of traveling faster than light just to go back in time. We get news from our great, great grandparents, that Androids from future are invading them. Its very rare to see Androids getting married to humans these days. Yet we live happily in a world with no sense of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-4805685067277650754?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/4805685067277650754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=4805685067277650754' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4805685067277650754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/4805685067277650754'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/06/human-are-just-biological-machines-2090.html' title='Human are just biological machines. (2090)'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-3565614138656835895</id><published>2007-05-25T00:27:00.000+08:00</published><updated>2007-06-01T16:59:14.982+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='random thoughts'/><title type='text'>The kaleidoscope in my head</title><content type='html'>Someone in me thinks that the era of competition between Codeshepherd and Deepan is over. Codeshepherd is an anathema to Deepan and so is Deepan to Codeshepherd.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-3565614138656835895?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/3565614138656835895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=3565614138656835895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3565614138656835895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/3565614138656835895'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/kaleidoscope-in-my-head.html' title='The kaleidoscope in my head'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-7893486731285295552</id><published>2007-05-24T16:57:00.000+08:00</published><updated>2007-05-26T20:42:31.673+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='random thoughts'/><title type='text'>Phantom memories</title><content type='html'>What do I mean by phantom memories??  Don't you ever feel, you had come across a situation sometime before in your life ? I am referring to those memories that don't really have a basis. Are these memories of us living in some other universe? Is quantum mechanics the answer the  question? Did I die two minutes back in some other world ? Or did you kill me in some other world?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-7893486731285295552?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/7893486731285295552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=7893486731285295552' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7893486731285295552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/7893486731285295552'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/phantom-memories.html' title='Phantom memories'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-1051745345995681440</id><published>2007-05-24T16:28:00.000+08:00</published><updated>2007-05-24T22:07:22.382+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Music - making the religious harmony</title><content type='html'>AR Rahman, is a icon of passion, music, spirituality and many more. AR has a very interesting background which many of us don't know. He changed his name to "AR Rahman", before the movie Roja was released. He choose his own name.  He converted from Hinduism to Islam. He has a vision to bring harmony between various religions in the subconscious level. His tool is the "language of nature".  Vande matharam song has it lyrics taken both from Islam and Hinduism devotional songs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1051745345995681440?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1051745345995681440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1051745345995681440' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1051745345995681440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1051745345995681440'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/music-making-religious-harmony.html' title='Music - making the religious harmony'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-6355507016457345201</id><published>2007-05-24T16:00:00.000+08:00</published><updated>2007-05-24T17:57:35.385+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='biology'/><category scheme='http://www.blogger.com/atom/ns#' term='puzzle'/><title type='text'>A kind of Synesthesia</title><content type='html'>Answer this puzzle.. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Father and son are driving along a river side road in a mountain. They meet with an accident when they cross a bridge. The father dies in the accident, and the sun is taken to the hospital. In the hospital, the doctor look at the patient and says "Oh this is my son!!". How is this possible?? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you know the answer, then you may not be suffering from Synesthesia. I am not yet sure if this can be called as a case of synesthesia. Anyway I will explain why those people who fail to answer this puzzle might be suffering from synesthesia. The answer to the puzzle is "The doctor is the mother".  Given the fact that most doctors are men,  the doctor profession is associated with male gender. And you end up thinking how can the father be alive?? Did he not die in the accident.  Synesthesia is defined as a  neurological condition in which two or more bodily senses are coupled. So here you can the sense corresponding to profession is couple with sense (??) corresponding to gender. May be I should ask Dr.Ramachandran if this is a correct instance of synesthesia.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-6355507016457345201?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/6355507016457345201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=6355507016457345201' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6355507016457345201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/6355507016457345201'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/kind-of-synesthesia.html' title='A kind of Synesthesia'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-9181870960479518108</id><published>2007-05-24T15:15:00.000+08:00</published><updated>2007-05-24T22:11:43.593+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><title type='text'>Exploiting Unicode</title><content type='html'>Support for unicode characters lets us to use fancy alphabets. I use &lt;a href="http://www.atm.ox.ac.uk/user/iwi/charmap.html"&gt;this link&lt;/a&gt; to generate all fancy character for my name and nick. For example look at the word "codeshepherd" in title, it should be like "ÇÖÐÊSHËþHÈRD". The only downside of using these fancy characters is, google index bot will not read it as "codeshepherd". So I might lose in the page ranking for the word "codeshepherd". If you are using GTK applications, you can use ctrl+shift+u+ *unicode number* to enter unicode characters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-9181870960479518108?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/9181870960479518108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=9181870960479518108' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9181870960479518108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/9181870960479518108'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/exploiting-unicode.html' title='Exploiting Unicode'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-2015201007542235171</id><published>2007-05-24T11:56:00.000+08:00</published><updated>2007-05-24T22:10:48.095+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><title type='text'>CodeShepherd's Garbage Collector</title><content type='html'>Garbage collectors attempt to reclaim memory used by objects that will never again be accessed. So technically  this blog is similar to garbage collector working on my brain. I blog just to kill my free time. Am not sure if someone would ever benefit from my blogs. What plays the role of garbage collectors in mammals ?? Proteases ?? A point to think over!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-2015201007542235171?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/2015201007542235171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=2015201007542235171' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2015201007542235171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/2015201007542235171'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/codeshepherds-garbage-collector.html' title='CodeShepherd&apos;s Garbage Collector'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-1839843997009211194</id><published>2007-05-23T17:54:00.000+08:00</published><updated>2007-05-24T22:07:53.312+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Getting parallels to boot from fedora core paritition on macbook</title><content type='html'>I recently bought a macbook (2gig ram, 2ghz intel, 80gig hd). It runs both fedora and osx. I can boot to the same fedora core partition both from parallels and   in the native dual boot mode.  I use the rEFIt boot loaded to choose between linux and osx initially, if I choose linux then control passes from rEFIt bootloader to grub. rEFIt is a bootloader for EFI based systems like Intel macs. EFI is similar to bios on macs. I don't have a clear understanding of firmwares like EFI and BIOS. rEFIt bootloader provides a nice terminal which you can access even before you boot your machine. &lt;br /&gt;&lt;br /&gt; The trickier part is to getting parallels to boot from the dualboot fedora root partition. I used bootcamp only to create a partition for linux initially. I tried resizing the OSX partition with parted, but ended up corrupting the OSX partition. So I had to reinstall OSX from scratch. So I advise people to use bootcamp  to resize the OSX partition. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Steps involved in getting parallels to boot from dualboot fedora/ubuntu/debian/gentoo partition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1)Use bootcamp to create a new partition for linux. &lt;br /&gt;2)Install rEFIt bootloader&lt;br /&gt;3)Install fedora/ubuntu/gentoo/debian on the new partition&lt;br /&gt;4)Make sure to install grub on SDA/HDA or whatever is the main disk. This happens by default in fedora, I am not sure about how other distros handle this&lt;br /&gt;5)Now when you boot, you should find rEFIt bootloader with two primary options, one to boot OSX and another to boot Linux&lt;br /&gt;6)Boot to OSX and install parallels&lt;br /&gt;7)Start parallels and create a custom distro, for harddisk choose bootcamp option.&lt;br /&gt;8)Edit the pvs file corresponding to the custom distro you created in parallels as follows. &lt;br /&gt;In the  [IDE devices] session change the line "Disk 0:0 image = Boot Camp;" to "Disk 0:0 image = Boot Camp;disk0s3"&lt;br /&gt;9)Boot to the linux in parallels. You will find your grub broken. I landed in the grub prompt. &lt;br /&gt;10)In the grub prompt  enter as follows&lt;br /&gt;&lt;grub prompt&gt;configfile (hd0,0)/etc/grub.conf &lt;br /&gt;11)If everything goes well you will see the grub menu&lt;br /&gt;12)Boot to linux in parallels. &lt;br /&gt;13)If you had already booted  linux as a native OS, you will need to reconfigure your X. &lt;br /&gt;14)I have fuse sshfs installed both on OSX and Fedora, So I can mount the OSX partitions in linux and linux partitions in OSX. Eventually I can access all data in my harddisk from both the operatings systems.&lt;br /&gt;15)Choose shared network option in parallels so that you can mount your sshfs paritions using a fixed IP.&lt;br /&gt;16)I use firefox with google browser sync plugin. So I share the same bookmarks and history on both the operating systems. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These steps should ideally work for any linux/unix flavors. It works for me with Fedora Core 6. I am waiting for the Fedora Seven release. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Unsolved Problems&lt;br /&gt;1)Sometimes the keyboard does not work after you choose linux from rEFIt bootloader. So you can't change the options you have set in your grub. you will end up booting to the default one. This seems to be a bug in apple firmware (EFI ??). It has been documented in the rEFIt website.&lt;br /&gt;2)Every time I boot to linux from parallels, I have to enter "configfile" option manually. This is because grub can work only for one set of configuration. I have grub working for dual boot configuration. So I have to manually enter "configfile" option everytime I boot to fedora in parallels.&lt;br /&gt;3)If you choose ram option to some number other than 512mb or 1024mb, you reach kernel panic in parallels. &lt;br /&gt;4)I cannot use function keys on linux when i boot from parallels. Am not sure why parallels is not capturing it. I badly want to use ctrl+alt+f1 to get the ttys. ctrl+alt is used for releasing mouse from parallels. Haven't yet figured a way to getaround this. There seems to be sendkey option in parallels. Will have to explore that. &lt;br /&gt;5)The X-configuration changes when you shift from dualboot linux to parallels linux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1839843997009211194?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1839843997009211194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1839843997009211194' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1839843997009211194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1839843997009211194'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/running-fedora-core-on-macbook.html' title='Getting parallels to boot from fedora core paritition on macbook'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-1028601007401806258</id><published>2007-05-23T17:52:00.000+08:00</published><updated>2007-05-24T22:09:57.266+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><title type='text'>Social life for geeks</title><content type='html'>Most people who are passionate about technology, tend to socialize at IRC. I often visit #linux-india, #english, #math, #gaim, #electronics, #robotics. Those channels that I visit less frequently are ##c, ##java, #tomcat, #mysql, #postgres, #physics, #linux, #bash, #anything, #gcc, #g++, #web, #javascript, #non-math, #perl, #python, #fedora, #ubuntu, #joomla, #bioinformatics, #hardware, #php, #oracle, ##windows, #chemistry, #biology, #photography, #ai, #machinelearning, #crypto, #damnsmalllinux, #dojo, #dslr, #ejb, #google, #gtk+, #haskell, #hprog, #music #robotics, #smalltalk, #subclipse, #xen, #xml, #uml.  I go to freenode regularly. During week ends I also go to Dalnet and QuakeNet. Schools and colleges are not needed anymore, if someone is interested in learning computers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-1028601007401806258?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/1028601007401806258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=1028601007401806258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1028601007401806258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/1028601007401806258'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2007/05/social-life-for-geeks.html' title='Social life for geeks'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32350163.post-115497933474906533</id><published>2006-08-08T03:33:00.000+08:00</published><updated>2007-05-25T02:29:11.473+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><title type='text'>My Besant Nagar home..</title><content type='html'>I will never forget my midnight walks to besant nagar beach. Absolute silence!!! sometimes interrupted by chennai police .. &lt;br /&gt;&lt;br /&gt;Its really easy to add google maps to your site. Look at &lt;a href="http://wikimapiablog.blogspot.com/2006/08/how-to-add-google-map-to-any-web-page.html"&gt;this link for a simple how to&lt;/a&gt; &lt;br /&gt;Here is my besant nagar home.&lt;br /&gt;&lt;br /&gt;&lt;iframe src=http://wikimapia.org/s/#y=12995839&amp;x=80262170&amp;z=18&amp;l=0&amp;m=a width=1043 height=396 frameborder=0&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32350163-115497933474906533?l=codeshepherd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeshepherd.blogspot.com/feeds/115497933474906533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32350163&amp;postID=115497933474906533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/115497933474906533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32350163/posts/default/115497933474906533'/><link rel='alternate' type='text/html' href='http://codeshepherd.blogspot.com/2006/08/its-really-easy-to-add-google-maps-to.html' title='My Besant Nagar home..'/><author><name>codeshepherd</name><uri>http://www.blogger.com/profile/14800752599316075969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bioinformatics.org/~deepan/snaps/codeshepherd.jpg'/></author><thr:total>0</thr:total></entry></feed>
