The Storyteller

I have started learning Python

May 3, 2008 · 11 Comments

Yes, probably this is the third or fourth time I have said this. I am such an idiot to never find my time to learn everything. I wish one day I can really develop my web apps using both PHP and Python. And no Java (Or Ruby), nah, I am tired of that, really!

I first coded an xml parser with the help of builtin expat parser, in 2002 for coherity. Since then I fall in love with this excellent language. And once I was about-to-be-addicted into ruby but no more, I dont like it. No stereotyping, I just dont like it, period. I coded in java for a long time and tried but didnt fall into it, my bad.

I wish I wont have to write another post again titled “I have started learning Python” - wish me best of luck.

→ 11 CommentsCategories: Me - Myself · python
Tagged:

নস্টালজিয়া - ৪

April 30, 2008 · 4 Comments

ইস্কুলে ভর্তি হবার কিছুদিন পরেই আমরা এসেছিলাম রাজশাহীতে বেড়াতে। সবাই মিলে বেড়ানোর কি যে মজা টের পেয়েছিলাম সেবার। ট্রেনে করে এসেছিলাম মনে আছে আমার। বাবার কেমন যেন এক বন্ধু থাকতেন রাজশাহীতে, আমরা গিয়ে তাঁর বাসাতেই উঠলাম। রাজশাহীর বাসাগুলো কেমন যেন পুরোনো পুরোনো, আর সেই সময় সাহেব বাজারের বাড়ীগুলো যেন আরো পুরোনো ছিল। একতলা বাড়ি, দোতলায় ছাদে ওঠার প্যাঁচানো একটা সিঁড়ি আর চিলেকোঠা, আর ইয়া মোটা মোটা দেয়াল। এককথায় সেই সময় মারাত্মক লেগেছিল আমার। কাকার অনেকগুলো ছেলে মেয়ের মাঝে দুই ছেলে ছিল নোটন আর ছোটন নাম। ছোটনের সাথে আমার বেজায় খাতির হয়ে গেল। ছোটনের মাথায় রাজ্যের যত দুষ্টামী বুদ্ধি। আমাকে ও শিখাল কিভাবে শক্ত কাগজ ভাঁজ করে গুলি বানিয়ে দুই আঙ্গুলের মাঝে একটা চুল বাঁধা রাবার দিয়ে মারা যায়। আর কারো গায়ে লাগলে সাথে সাথে খুবই জ্বালা করে। আমরা যাকে পাই তাকেই গুলি মারি। সেকি মজা। ছোটন একবার তার বড় বোন তুলিকে গুলি মেরে ভয়ানক মার খেল। এরপর আমরা একটু সাবধানে গুলি মারতে লাগলাম। লুকিয়ে চুরিয়ে, আর বেশির ভাগ সময়ই বকুনি খেল নোটন আর ছোটন।

খুব ছোটবেলা থেকেই মা আমাদেরকে রিডিং পড়া শিখাত। গড়গড় করে পড়তে না পারলে আবার পড়তে হত। মুখে একদম ফেনা উঠে না যাওয়া পর্যন্ত ছাড়া হত না। চরম কষ্টকর এবং বিরক্তিকর একটা ব্যাপার ছিল এই রিডিং পড়া, তবে পরে অনেক কাজে দিয়েছিল আমার এই গড়গড় করে পড়ার ব্যাপারটা। ক্লাসে কোন রিডিং করার দরকার থাকলে বেশির ভাগ সময় আমি পেতাম এই ভার। ষে যাক গে, মার প্রসঙ্গ আসল অন্য একটা কারনে। মা আমাকে দাবা খেলা শিখিয়েছিল অনেক ছোটবেলায়। দুপুর বেলা খাবার পর আমরা মাঝে মাঝেই দাবা খেলতাম।

তো রাজশাহীতে কাকার সাথে দাবা খেলা হল অনেক। আমি ছোট বলেই কাকা ইচ্ছা করে ভুল চাল দিয়ে হেরে যেত। খুব মজা পেতাম আমি, জিতেছি ভেবে। কাকার সাথে একদিন ভোর বেলা আমি বাবা, নোটন ছোটন আর আমার বোনেরা মিলে বের হয়ে দেখলাম কয়েকজন মিলে পদ্মার পাড়ে হাঁসের বিয়ে দিল। খুবই মজা পেয়েছিলাম সেদিন।

ছোটন আর আমি মিলে একটা ভয়ানক বাজে কাজ করছিলাম সেবার। ছাদের উপরে অনেক খোয়া (ছোট ছোট ইঁটের টুকরো) রাখা ছিল কোন কারনে। আমি আর ছোটন মিলে সেগুলো আকাশের দিকে ছোঁড়া শুরু করলাম একদিন, বাসার নিচে রাস্তা, সব খোয়া গিয়ে পড়তে লাগল মানুষজনের গায়ে। আমরা ব্যাপারটা অত আমল দেইনি - হঠাৎ বিশাল এক শোরগোল পড়ে গেল, অনেক গুলো লোক এসে ধমাধম করে বাসার দরজা ধাক্কানো শুরু করল। আমরা কেবল বুঝতে পেরেছি যে কাজটা খুবই সিরিয়াস টাইপের কিছু হয়ে গেছে। আমার আর ছোটনের আত্মারাম প্রায় খাঁচাছাড়া অবস্থা তখন। আমরা কোথায় গিয়ে যেন লুকিয়ে পড়েছিলাম। বাসার বড়রা সবাই বাইরে গিয়ে মানুষজনকে ঠান্ডা করেছিল।

এর কয়েকদিন পরেই আমরা আবার ঢাকায় চলে আসলাম। রেল স্টেশনে আমি আর ছোটন কেঁদেছিলাম অনেক, এত মজার দিন শেষ হয়ে গেল ভেবে। আমি এসএসসি পাশ করার পরপরেই কাকা মারা গেল, আর ছোটন নোটন কেউই পড়াশোনা করল না, ব্যবসা ছিল এদের প্রধান পেশা। ছোটনরাও পড়াশোনা শিকেয় তুলে হয়ে গেল দোকানদার।

→ 4 CommentsCategories: Me - Myself
Tagged:

10 signs you are ruining your career as a web app developer

April 30, 2008 · 19 Comments

Heh Heh, well - this is an article just highlighting some of experience in last couple of months. I am sometime too much annoyed because of the the attitude of some people, sometime I feel that they are annoyed on me. And I think I should write them down. Signs indicate that you are ruining your career

1. You’ve started implementing (or started believing in) popular (?) asshole driven development in your company (or in your team)
2. You are one of the biggest jerk who’s thinking that you are no more suitable for a “developer” position and you always want to be the PM or tech lead. LOL
3. You cannot find any topic to study this evening
4. You are so busy in development that your last blog post was about 2 or 3 months ago
5. You haven’t contributed in any single open source project yet, WTF!!
6. You are spending time to write a 7 page resume
7. You are not using any RSS aggregator (LOL)
8. You’ve never heard of any framework, nor using any
9. You’re neither member nor active in any online tech forum
10. WAMP is still the development platform for your LAMP app.

→ 19 CommentsCategories: General
Tagged: , ,

নস্টালজিয়া - ৩

April 29, 2008 · 4 Comments

সেই বাসা টা আমরা বদলিয়ে চলে আসি মাঠের পাশে আরেকটা বাসায়। ঘুপচি গলির মাঝে এক কোনায় ছিল আমাদের বাসা। এখানে আমি ছিলাম ক্লাস ফাইভ পর্যন্ত। সেটা পরের কাহিনী। এই বাসাটার সাথে আমার অনেক স্মৃতি জড়িয়ে আছে।

মাসে একবার শুক্রবারে আমি আর বাবা বের হতাম চুল কাটতে। সেইসময় নাপিত মামা পাঁচ টাকায় চুল কেটে দিত। আর এই চুল কাটার ব্যাপারটা আমার কাছে ছিল একটা অসহ্য ব্যাপার। বড়দের চেয়ারের দুই হাতলের উপরে কাঠের একটা তক্তা দিয়ে তার উপরে আমাকে বসানো হত। চুল কাটার সময় নাকে মুখে চুল ঢুকে যেত, উফ, আমার শুধু মনে হত চুল না বড় হলেই তো হয় - সবসময় চুল ছোট থাকলে কত ভাল হত।

আমাদের পাশের বাসায় টুটুল নামে একটা ছেলে থাকত। ঐসময় টুটলের কাজই ছিল আমাকে সারাদিন ক্ষ্যাপানো। বাসার পাশে একটা দোকানে সেইসময় চার আনায় অনেকগুলো টিকটিকির ডিম (ছোট গোল গোল লজেন্স) পাওয়া যেত, আর টুটুল করত কি সেগুলো কিনে আমাকে দেখিয়ে দেখিয়ে খেত। এমন মেজাজ খারাপ হত আমার। টুটুলের সাথে আমার বনেনি কখনোই। টুটুলের মা ছিল অদ্ভুত এক মহিলা, সে টুটুলের উপরে ক্ষেপে গেলেই টুটুল কে একদম ন্যাংটো করে পিলারের সাথে বেঁধে রেখে দিত। টুটল যতই চিৎকার করে কাঁদুক না কেন, তাকে ছাড়া হত না। ব্যাপারটা সেই সময় আমার মনে অনেকদিন ধরে গেঁথে গিয়েছিল। টুটুলের গলা ফাটানো কান্না শুনলেই বোঝা যেত ওর মা ওকে এখন বেঁধে রাখছে। টুটলরা খুব শীঘ্রই বাসা বদল করে কোথায় যেন চলে যায়।

আগের বাসায় আমাদের একটা কুকুর ছিল টমি নামে। আমি আর বাবা প্রতিদিন সকালে ওকে খাওয়াতাম। বাসা বদল করে আসার পর কেন যেন কুকুরটা আমাদের সাথে আসেনি, যদিও মাঠের এপাশ আর ওপাশ। শুক্রবারে আমি আর বাবা প্রায়ই কিছু বাসি রুটি নিয়ে আগের পাড়ায় গিয়ে টমিকে খুজে বের করতাম। কিছুদিন পরে টমিও কোথায় যেন চলে গেল, আর পাইনি।

ছোটবেলা থেকেই অনেকগুলো বোনের সাথে থাকায় রান্নাবান্না আর পুতুল ছিল আমার খুবই পছন্দের একটা খেলা। আমরা বালি দিয়ে ভাত রান্না করতাম, ভুসি দিয়ে বানাতাম খাবার আর ইটের গুঁড়ো দিয়ে বানাতাম সরবত। । এমনকি পাশের বাসার নতুন ছেলেটা আর তার বোনের সাথেও আমি রান্নাবান্না খেলেছি অনেকদিন। একদিন কি কারনে যেন একটা টিনের জগে অনেকখানি আটার ভুসি নিয়ে পানি গুলে খাটের তলায় রেখে দিয়ে ভুলে গিয়েছিলাম। কয়েকদিন পরে সেই ভুসি পচে গন্ধ বের হওয়া শুরু হল। ভালই মার খেয়েছিলাম সেদিন।

→ 4 CommentsCategories: Me - Myself

নস্টালজিয়া - ২

April 29, 2008 · 9 Comments

আমি তখন স্কুলেও ভর্তি হইনি, ভাসা ভাসা মনে পড়ে কিছু কিছু দিনের কথা। আমাকে খাওয়াতে খুবই বেগ পেতে হত বোনদের। আমাদের বাসায় কোন ফ্রিজ বা টিভি ছিল না সেই সময়। মাঝে মাঝে আমাদের অনুমতি মিলত পাশের বাসায় টিভি দেখার। আর টিভিতে কিছু চলার সময় সে কি ভিড় মানুষ জনের, যেন উপচিয়ে পড়ত ঘর। ওরা সবসময় টিভি দেখতে দিত না (কিংবা আমরা সবসময় যেতাম না, ঠিক মনে নাই) - তাই টিভি তেমন একটা আকর্ষনীয় বস্তু ছিল না আমার কাছে। আমি খেলতাম রাজ্যের যত প্যাকেট (বিস্কুট, সিগারেট) দিয়ে। সেই গুলো দিয়ে গাড়ি বানানো হত, মাটি দিয়ে চাকা। একবার অনেক গুলো শোলা পেয়েছিলাম কোথা থেকে যেন, সে কি আনন্দ আমার। শোলা পানিতে ভাসে, আর তাই গামলার সামনে থেকে আমাকে আর উঠানো যেত না।

বাসার পাশে ছিল ক্যান্সার গবেষনা ইন্সটিউটের মাঠ। আমি আর বাবা প্রায়ই বিকালে বের হয়ে যেতাম খেলতে। টোকাই আর ভাসমান ছেলেপুলেদের সাথে আমরা খুবই মজা করে ফুটবল খেলেছি অনেকদিন। আমি প্রায়ই দেখতাম একটা গাছের নিচ থেকে ওরা ফল কুড়ায়, দেখতে অনেকটা কামরাঙার মত। বাবাকে জিজ্ঞেস করায় বাবাও বলেছিল ওটা কামরাঙা। যেহেতু কামরাঙা মজার তাই একদিন আমি একটা ফল কুড়িয়ে কামড় দিয়ে দেখি ওয়াক থু, তেতো, চরম তেতো। আমি ভাবতাম ছেলেগুলো কেন এগুলো কুড়ায়। বড় হওয়ার পর জেনেছিলাম ওটা ছিল অর্জুন গাছ।

আমাকে ঐ সময়টায় দাঁত মাজার সময় কাউকে সাথে রাখতে হত। বেশির ভাগ সময় এই দায়িত্ব পেত স্বাতী অথবা শিমু, আমার ছোট আর সেজ বোন। হেহ হেহ, তার কারন হল আমি দাঁত মেজে পেস্টটা ফেলে দেয়ার বদলে প্রায়ই গিলে ফেলতাম। হো হো হো

আমাদের বাসার সামনে এক লোকের একটা ভক্সওয়াগন ছিল। আমরা বলতাম ব্যাঙগাড়ী। চকচকে সাদা একটা গাড়ী। মেজ বোন প্রায়ই বলত, ইস, আমাদের যদি এরকম একটা গাড়ী থাকত। প্রায়দিনই সকালে আমি আর স্বাতী তাকিয়ে দেখতাম গাড়ীটার বের হওয়া।

→ 9 CommentsCategories: Me - Myself

Web scrapping in a smart way, making a “Today in History” object in PHP

April 29, 2008 · 5 Comments

There are thousands of services available on web who are presenting interesting as well as education information which you can really integrate in your web page or make a nice widget and let others use them seamlessly with their content delivery platforms. In this article I am going to show you how you can make a nice Today-in-History widget with the help of the data provided in Scopesys. You can use this code to make a nice widget or a trivia app or whatever. But before making your own scrappers from any services, please please please carefully note the copyright of that content. You shouldn’t violate copyright either way.

In this widget, we will strip the following content from the pages provided by scopesys and display them in different categories.
1. Today in history
2. Who’s born today
3. Who’s died today
4. Where is holiday today
5. Religious observance of today
6. Religious history of today

Lets go :D


<?php
//todayinhistory.php
error_reporting(0);
define("MARKER_START","<H3>On this day…</h3>");
define("MARKER_END","<BR><BR><HR><h3>Holidays</h3>");
define("BIRTHDAY_START","</font></center></center>");
define("BIRTHDAY_END","<HR> <br><H3>Deaths which occurred on ".date("F d").":</H3>");
define("DEATH_START","<HR> <br><H3>Deaths which occurred on ".date("F d").":</H3>");
define("DEATH_END","<HR><IMG align=left SRC=\"http://www.scopesys.com/flag.gif\">");
define("HOLIDAYS_START",’<i>Note: Some Holidays are only applicable on a given <b>"day of the week"</b></i><br> <br>’);
define("HOLIDAYS_END","<HR> <H3>Religious Observances</H3>");
define("RELIGIOUS_START","<HR> <H3>Religious Observances</H3>");
define("RELIGIOUS_END","<HR> <H3>Religious History </h3>");
define("RELHISTORY_START","<HR> <H3>Religious History </h3>");
define("RELHISTORY_END","<BR><BR><font color=red>");


echo "<h2>Today is ".Date("F d, Y")."</h2>";
$data = file_get_contents("http://www.scopesys.com/today");


if ($_GET['history']==’1′){
echo "<br/><h2 style=’color: green’ >Today in history</h2>";
$end = strpos($data,MARKER_END)-15;
$start = strpos($data,MARKER_START)+strlen(MARKER_START);
echo substr($data,$start,$end-$start);
}


if ($_GET['born']==’1′){
echo "<br/><h2 style=’color: green’ >Who’s born today</h2>";
$end = strpos($data,BIRTHDAY_END);
$start = strpos($data,BIRTHDAY_START)+strlen(BIRTHDAY_START);
echo substr($data,$start,$end-$start);
}


if ($_GET['died']==’1′){
echo "<br/><h2 style=’color: green’ >Who died today</h2>";
$end = strpos($data,DEATH_END);
$start = strpos($data,DEATH_START)+strlen(DEATH_START);
echo substr($data,$start,$end-$start);
}


if ($_GET['holiday']==’1′){
echo "<br/><h2 style=’color: green’ >Where is holiday today</h2>";
$end = strpos($data,HOLIDAYS_END);
$start = strpos($data,HOLIDAYS_START)+strlen(HOLIDAYS_START);
echo substr($data,$start,$end-$start);
}


if ($_GET['religious']==’1′){
echo "<br/><h2 style=’color: green’ >Religious observance</h2>";
$end = strpos($data,RELIGIOUS_END);
$start = strpos($data,RELIGIOUS_START)+strlen(RELIGIOUS_START);
echo substr($data,$start,$end-$start);
}


if ($_GET['relhistory']==’1′){
echo "<br/><h2 style=’color: green’ >Religious history</h2>";
$end = strpos($data,RELHISTORY_END);
$start = strpos($data,RELHISTORY_START)+strlen(RELHISTORY_START);
echo substr($data,$start,$end-$start);
}
?>

Now if you want to find who born today, point your browser to todayinhistory.php?born=1. Mashup Mashup Mashup, that is what many successful web app are doing these days. And sometime this is how data collection is done behind the scene :)

Writing this code was really enjoyable as getting root canal done in your teeth with a rusty drill (I forgot where I’ve read such a nice quote), heh heh. But I am sure, you will enjoy it more than that ;) - happy scrapping.

→ 5 CommentsCategories: Cool Webapps · PHP · idea
Tagged: , , , ,

নস্টালজিয়া - ১

April 28, 2008 · 12 Comments

ক্লাস ওয়ানে আমাকে ভর্তি করা হবে। বাবা আমাকে নিয়ে চললেন টি.অ্যান্ড.টি সরকারী আদর্শ বালিকা বিদ্যালয়ে (Ahem) - বালিকা বিদ্যালয় হলেও আসলে ক্লাস ফাইভ পর্যন্ত ছেলেদের পড়তে দিত। বাসার পাশে হওয়ায় আর আমার আরো দুটো বোন একই স্কুলে পড়ায় এটাই হল আমার জন্য উপযুক্ত জায়গা, মা বাবা আর বোনেরা ঠিক করেছে।

আমাকে অনেকবার করে নামতা মুখস্ত বলতে হল মার কাছে রওনা দেবার আগে। আরো কি কি যেন বলতে হয়েছিল। স্কুলে ম্যাডাম এর রুমে আমাকে একা একা ঢুকায় দিয়ে বাবা বাইরে বসে আছে। ম্যাডাম একবার জিজ্ঞেস করেন নামতা বলতে, একবার এবিসিডি বলতে। তখন তো আর প্লে, কেজি এগুলা ছিল না, অন্তত আমাদের মত নিম্ন মধ্যবিত্য পরিবারের জন্য। সরকারী স্কুলে ক্লাস ওয়ানে বোধহয় এগুলোই জিজ্ঞেস করত। আমি ভয়ে ভয়ে কাদোঁ কাদোঁ মুখে সব বললাম। ম্যাডাম কিছুক্ষন পরে বাবাকে ডেকে কি যেন বললেন।

বাসায় ফিরতে ফিরতে বাবা জানালো যে আমার ভর্তি হয়ে গেছে, তবে ক্লাস ওয়ানে না, টুতে। আমার মত ধেড়ে বাচ্চার নাকি ক্লাস ওয়ানে পড়া ঠিক হবে না। রোল দিয়েছে ১২০। আমি তো মহা খুশি, ১২০ - কেন যে ১২০০ হল না। বাসায় এসে দেখি মা মাছ কাটছে, মাকে বললাম - জান মা, আমার রোল না ১২০। মা তখন বুঝিয়ে দিল যে রোল যত কম হয় ততই ভাল।

পরেরদিন থেকে ক্লাস, মহা টেনশনে ছিলাম আমি । বাসায় আমার বোনেরা সারাক্ষন আমাকে বাসায় আটকায় রাখত, বাইরে যেতে চাইলে ভয় দেখাত ছেলেধরার। এই বুঝি ছেলেধরা নিয়ে যাবে, এই ভয়ে আমি তটস্থ থাকতাম। পরের দিন স্কুলে গেলে কি হবে, ক্লাসে তো আমার বোনরা থাকবে না, যদি ছেলেধরা ধরে নিয়ে যায় এই চিন্তায় আমি তখন ব্যাস্ত।

→ 12 CommentsCategories: Me - Myself

How to make your own springloops in PHP

April 27, 2008 · 9 Comments

Springloops is a nice code management service recently came into focus. It helps you to manage the code base of your application, monitor the commit and deploy the final version easily to another server. So if you are wondering how to build such a system and how it actually works, this article is for you.

Please note that I am neither way affiliated with Springloops nor any of it’s contacts. This article expresses completely my own opinion.

The primary obstacles of making such a service are
1. Managing the subversion repositories and users
2. Interaction with subversion repositories (Not same as option 1)
3. Payment gateways
4. Code browser
5. User friendliness
6. Scaling

Among these options, 4 and 6 are out of the scope of this article. There are thousands of article explaining those topics to you. So I am not going to talk about them. There are excellent libraries available to manage many popular payment gateways. Just google it and you are done. And about user friendliness and design, you can hire a consultant who’s specializing on this subject and get it done.

1. Managing the subversion repositories and users
In springloops or any other subversion hosting service, you need to do some basic shell scripting which is required for adding the subversion repositories dynamically and to add users in it. There are some excellent articles how you can do it with apache2. To avoid any traffic related issue, best practice will be hosting these repositories in another server, and using htaccess - just point your user’s svn URL to the exact url. Check out the following urls to find out how to host subversion repositories with apache. Linux should be the first choice, heh heh.

Reference:
1. Setting up subversion with apache in Ubuntu gutsy gibon
2. Setting up subversion with apache2
3. Setting up subversion with apache2 and DAV in debian
4. Host your open source projects in ubuntu in 3 easy steps

All you have to do is writing shell script to automate these steps and restart the apache2 demon once an user register his/her project with your service. You are done

2. Interaction with subversion repositories (Not same as option 1)
Now this is quite a challenging part and many of you are lost how to achieve this kind of functionality for such services. For PHP developers, you know there are an excellent repository of extensions named PECL and also repository of libraries name PEAR. In PECL there is an excellent extension which is cent percent appropriate for this work. Yup, I am talking about “SVN” extension. You have to install this extension to use it with your PHP code. Once you are done with installing it, now you got the complete power to interact with the subversion repositories hosted by your users. This extension is very rich and provides all the functionalities you need to interact. For details please point your browser to the appropriate section in PHP manual.

Reference
1. Installing PECL SVN extension for PHP in Ubuntu Gutsy Gibon
2. PECL svn package
3. SVN extension documentation

4. Code Browser
Another challenging part of the total setup. If you cannot provide excellent code browser which will clearly demonstrate the changes in code from different revisions, figure out the log and the notes made during each commit and finally, make note on it to show to your fellow team members.

Using svn_diff, svn_ls and svn_log you can clearly find out the difference of a file in two different revisions, the file and directory structure of the repository and the log of each commit. So basically once you got the file and directory structure of your repository for a revision, you can just traverse through it and display as a nice report using your PHP code. And when user will ask you to display the difference, you will find the difference using svn_diff which returns the difference as standard diff format. Now using regular expression (or whatever way) you will mark the lines which was changed and just display them highlighting using different colors to your user, as a nice report. And You can also browse the log of any revision using svn_log and show it to your user.

And last but not the least, you can create tags, branch and whatever addition by maintaining a local shadow working copy of your repository. Only the thing that you cannot do (or still I am thinking how-to) is merging, heh heh.

And when it comes about deploy the latest code base to your server, you can do it using svn_update where the path is the working directory in your server.

Reference
1. Standard Diff Format
2. svn_diff
3. svn_log
4. svn_ls
5. svn_add
6. svn_update
7. svn_checkout

Basically this is how a service like Springloops is built. I hope, you’ve enjoyed this article as much as I did to write it, heh heh.

→ 9 CommentsCategories: OpenSource · PHP · pecl · subversion · ubuntu
Tagged: , , , ,

Running on Ubuntu Hardy Heron

April 26, 2008 · 10 Comments

Last night I’d migrated from gutsy to the latest release of ubuntu series, Hardy Heron. At a glance it looks really nice to me. Here is a comprehensive list of pros and cons that I’d encountered

Pros
* Clear look with new Human theme
* More support for drivers, it has detected my dell BCM 4328 card automatically
* It has detected appropriate and maximum screen resolution for my laptop automatically which I had to do in gutsy by installing proprietary xorg fglrx driver. But I installed fglrx driver to use the maximum 3D output from my ATI Radeon 1400. I can also use compiz fusion now.
* Blazing fast, really!
* Integration of Wubi (Well, ubuntu is my primary OS and I have only one OS in my machine, but it is very good for those who want to give it a try from windows)

Cons
* so far there is only one con and that is it comes with Firefox 3 beta 5. I really dont like this version of firefox caus all my favorite extensions breaks in it.

So in overall I am very happy to using the new ubuntu Hardy Heron. Give it a try.

→ 10 CommentsCategories: General · ubuntu
Tagged: ,

Installing PECL subversion extension for PHP in Ubuntu 7.10

April 21, 2008 · 3 Comments

I was trying to interact with my subversion repositories using PHP yesterday and I knew that PECL has a extension named “SVN” for PHP users. So I tried to install in in my machine by when I tried to install it with the following command it always failed saying “unable to locate svn_client.h

sudo pecl install -f svn

Then I googled for some time to find out which package actually and I found that it is a part of libsvn which I didnt install in my machine which has ubuntu 7.10. so I found the appropriate package using the following command and it obviously locate the appropriate lib to install, which is “libsvn-dev

sudo apt-cache search libsvn

After that I just installed it via the standard procedure “sudo apt-get install libsvn-dev” and then tried to install the pecl extension once again. And whoa!, it works.

Here’s a small snippet to find out the difference of a single file from the repository under two separate revisions. in the following example svn_diff function returns two streams. one of them contains the difference and another one contains the error block.


<?php
list($diff,$error) = svn_diff(”http://orchidframework.googlecode.com/svn/trunk/app/config/configs.php”,
52,
“http://orchidframework.googlecode.com/svn/trunk/app/config/configs.php”,
61);
echo “<pre>”;
fpassthru($diff);
?>

Easy, huh?

→ 3 CommentsCategories: PHP · pecl · subversion