{C++ etc.}

Latest Posts
 
Home | C++ Posts | Linux Posts | Programming Posts | Issue Tracking Posts

Thursday, June 29, 2006

Life: LKiNG Camp, IITC Research Papers and SLLG Leading Practices Symposium

Lighting the oil lamp representing fellows at the 2nd LKiNG Camp

Staying off bloging for a week has forced me to give a heading to this post which is by far the biggest so far.
I took part in the LKiNG camp held on the 24th and 25th which took up most of my weekend. It was pretty interesting. There wasn't alot of technical content because there were alot of participants who were at the novice level when it came to networking and internet technologies.
I met loads of interesting people. There were three guys from UCSC, Hasitha, Kasun and Priyanga.
Another undergraduate from University of Ruhuna was called Isuru Mudalige. I took an instant interest in the guy because he had my surname. I took some interesting pics. Hopefully I'll remember to bring them along next time I go home.
BTW mom had a cataract operation yesterday. Dad said there weren't any complications.
We have to hand in a research paper for the IITC conference by Friday. Most of the hard work is finished. Thank God the deadline was extended by two days. Otherwise most of us won't have been able to finish.
Got a new project yesterday. Working with the team assigned to the Sri Lanka Local Governance Leading Practices Symposium from our university. My amin job is to translate documents from Sinhala to English, a task made pretty difficult because of heavy usage of administrative terms in most of the documents.
There's alot of other stuff to be done for the RMV OSA, the Old Students' Association of my first school and regarding the CSE AGM.
Next few are going to be really hectic.

Sunday, June 18, 2006

Leisure: Gaming, Gossip and Graphic Designing Podcasts


G4 tv has made available some segments from their shows (attack of the show, x-play, filter etc.) as free podcasts. All of them are interesting but as a gamer my favourite one is x-play.
G4 TV Podcasts

Photoshop TV and Quick Tips for Designers are two podcasts which bring you the news and techniques from the world of graphic designing.

Life: E-Learning


Our CSE department has been one of the foremost educational institutes to adopt e-learning in Sri Lanka. We do our semester registrations online which saves alot of hassle and paperwork. All assignements are available in our online system called "LearnOrg" and we could submit our answers through that too.
This semester we had a nural networks course module and all the study materials were put down in two cd's and handed over to us. No lectures. We had to do a pretty hard assignment as part of the continuous assesment process and that was it.

The neural networks exam will be held on wednesday (21st) and all of us sitting infront of computers watching the lectures and reading the handouts.
But is this the way to go about adopting e-learning... by completely doing away with actual confrontation between students and the teacher? Somehow this doesn't give the same feel as having to sit through lectures and taking down notes and asking questions if one had any. And when the end of the semester arrives, you find that you haven't actually achieved much and you have alot to catch up on.
Maybe it's just me. I don't know. But I think e-learning should be an additional component of learning to reinforce the actual learning process. Not a replacement.

Wednesday, June 14, 2006

Code: J2ME Programming...The First Few Steps


A few months back, I did some J2ME coding for one of my projects. But I didn't really take off on the mobile programming front. The realization of the potential packed into new java enabled mobile devices has compelled me to take up programming for mobile devices, once again. Last time around I used the NetBeans IDE and wanted to try out something different this time around. Surprisingly, I found that neither Eclipse not IntelliJ IDEA had a solid j2me platform. Both implemented plugins which seemed to be outdated and under-developped. The NetBeans mobility pack, on the other hand, provides users with an easy to use interface and it's a breese to use it. And it's free (not like IDEA). So it's back to NetBeans. I also downloaded the Sony Ericsson SDK 2.2.3 for the Java(TM) ME Platform to make use of their native API.
Let's see how things go...

Download Eclipse Download the EclipseME plugin
Download NetBeans and NetBeans Mobility Pack

Tuesday, June 13, 2006

Software. Leisure: Instant Media... Free, Easy and GREAT!


I was wondering around freewarefiles and stumbled across this gem of an app. You can use InstantMedia 1.1.0.18 to subscribe to your favourite podcasts (audio or video). I know there are hundreds of apps which does the same. So what's so great about this? It's got a huge list of inbuild podcasts which you can subscrbe to instantly on almost every concievable subject. It's bound save you hours of work trying to find podcasts which are just right for you. It has alot of additional features which add a nice touch, like the toolbar on the side of the screen.

Features:


  • Subscribe to your favorite channels. Hundreds available.
  • New shows will appear instantly.
  • Internet High Definition - iHD
  • Full Screen Video - Supports DVD and HD quality videos.
  • Music and Audio - Plays all video and audio formats.
  • Play Modes - Plays both full screen and small format videos.
  • Playback Independence - Play shows whenever and wherever you like.
  • I´M Toolbar - An optional sidebar which sits on your desktop allows you to instantly see when new shows arrive.
  • Play both QuickTime and Windows Media files via a single player. No more switching back and forth from player to player.
  • Supports .wmv, .mov, .m4v, .mp4, .m4a, .wma, .mp3 , avi, .mpg and many more formats.
  • Integrated Catalog - Integrated Catalog of videocasts (video blogs), audiocasts, and news feeds
  • Download Management - Automated background downloading of large media files. Manages network disconnects seamlessly.
  • Built-in media library. Organize all your media in one place.
  • Auto delete shows in a given channel by age, size, max number of shows. Auto-filter show selection by keyword match.
  • Create multiple playlists for your audio and video files.

Downlod: http://www.freewarefiles.com/program_6_212_21032.html
Product website:
http://www.im.com/

Life: Transition


I got my first computer in 1988, when I was 6. It was an Atari 800XL. That was the only computer I had till 2001.
I craved for computer. I dreamt of all the things I'll be able to do with it. Meanwhile my life was going on as usual, with long nights of reading and grueling days of farming. I enjoyed good books and I loved to watch my crops grow and bear fruit.

I have a computer now. I don't read as much. I don't do any gardening. I play games most of the time. I also have a phone. I listen to radio, read, play more games and browse the net with it. Every night I go to bed wearing the phone's headset and listening to "Yes.FM". I haven't yet done most of the things that I thought I would do when I get a computer. I want a PSP, a laptop and an XBox 360. I've become more materialistic.
I crave for those long nights of reading and grueling days of farming.

Sunday, June 11, 2006

Phones, Software: Getting SE K700i to Work With Linux


I stumbled across this site by accident and thought it would be handy, specially because I'm in the process of converting to Ubuntu.
Haven't tried out any of this yet.

"Sony Ericsson K700i and Linux

Introduction

Welcome to my little page about the Sony Ericsson K700i and how to make it work with Linux. Most of these instructions apply to Debian GNU/Linux, but you should be able to do similar things with other distributions - after all, most of the time, it's just about how to install the right packages - everything else should stay the same.

This is by no means a complete guide on what you can do with your mobile phone and Linux, just some hints which I want to share with you - most of these things I couldn't find anywhere else on the 'net."

Phones: TequilaCat BookReader - Text Reader for Java Enabled Phones

Last night I was going through my mails and thought it would be wonderful if Opera Mini had a built in PDF viewer. Couldn't find a solution for reading online PDFs but came across one for reading e-books on any java enabled phone. The software is called TequilaCat BookReader. You install it in a (Windows) desktop and add any e-books that you want. The application will convert it to a .jar file and you can drop it into your phone and view it there. Also found out that one can install jars on the SE K700 by dropping it to the root. All this time I was trying to move .jars into folders and they always ended up in the "Others" folder. This thread has alot of info about how to use TequilaCat.

Saturday, June 10, 2006

Phones: Nokia N71...What some reviews left out

I was reading this review on the Nokia N71 and it occured to me that The Smart Phone Show put out a more comprehensive review. All the nice features of the phone have been covered in the "InfoSync" article but they left out some major design issues such as:

- The camera on the front which is very susseptible to smudging and damage specially because it's right below the smart key on the front panel.
- The difficulty of pressing the nav keys and the rocket key.

- The bulk and the huge hinge which jutts out of the phone.



I just saw the video review of the phone so actual users might find more cons. But the list of pros are pretty long and gives you plenty of reasons to go out and buy this.

Friday, June 09, 2006

Leisure: Half Life 2 - Episodes


Valve has released the first of the HL2 episode franchise and reviewers are virtually losing their heads over it.

The character of Alex plays a major role in the game, as with the main HL2. The games are pretty short with average players being able to finish it in 5-7 hrs. They've added some in game guides to tell you how each particular section of the game was designed which appealed alot to reviewers. You can skip these and just play the game if you want.
The level of interaction with Alex is so intense that it get's one craving for a "Hug" key.
Episode two is next in line and the trailer is already out.
Official Site: http://ep1.half-life2.com/


Thursday, June 08, 2006

Code: Blogger Categories Using Javascript - The Complete Guide

Several methods have been suggested on this subject. I went through a few of them in order to add "Catagories" to my blog. Some improvisations had to be done to make it work so I thought I'll publish an easy to follow guide on the subject. Using javascript to hide catagory names in the TI

Credits:

  • Taher Baderkhan - Calling Blogger advanced search using javascript. link
  • Sean - Using javascript to hide category names in the title. link

The process would be done in three steps.

  • Step 1 - Add function to use Blogger advanced search and add links for each catagory to call it.
  • Step 2 - Hide categories included in the title.
  • Step 3 - Add a line to indicate the categories under which each post had been posted.


Let's get down to business.

Step 1 - Add function to use Blogger advanced search and add links for each catagory to call it.

Add this javascript function within the
<head> tags of the blog (outside the <style> tags).

<script language="javascript">
var blogUrl = "YOUR BLOG ADDRESS";
function showCategory(category){
var encodedCategory = escape("\"" + category + "\"");
var url = "http://search.blogger.com/?ui=blg&as_q=";
url = url + "&bl_url=" + blogUrl + "&bl_pt="
+
encodedCategory + ":";
window.location.href = url;
}</script>


Make sure to replace the above words [YOUR BLOG ADDRESS] with your blog's address. Don't include the www part of the address. inclose the blog's address in qutations

Categorizing your posts

Every time you create a new posting make sure to prefix the title of the posting with the name of the category. That’s all. For example, if your posting has the title "Nice Flowers" and you want to add it to the category "Garden" then your posting's title should look like this

Garden: Nice Flowers

Creating the Category URL in the sidebar
To create a category section for your blog. The URL for a category should look something like this


<a href="javascript:showCategory('THE CATEGORY');">THE
CATEGORY</a>


Clicking on the link will display all the postings under that category in the blogger search page.

I did not intend this at the begining but I realized that you can even add your posting to more than one category. All you need to do is prefix all the categories to the posting's title. You can seperate categories with commas or semi cololns. For example: If you want to add the "Nice Flowers" posting to the categories "Garden" and "Environment" then the title should look something like this

Garden, Environment: Nice Flowers

The only problem with this solution is that if you insert a new posting it takes few minutes until the blogger search engine indexes your page. So, in the first few minutes clicking the category link won't display your latest posting. I have tested this and I found out it takes around 5 - 10 minutes for your result to be displayed in the category search page. Not bad


Step 2 - Hide catagories included in the title.

It's not nice when you have all the catagory names appearing in your post titles. Let's add a function to strip catagories when displaying them.

<script language="javascript">
var post_catagory_js='';

function filterCategory(category) {
post_catagory_js='';
var tok_array = category.split(":");
post_catagory_js = tok_array[0].replace(/:/, '');
document.write(tok_array[tok_array.length-1]

.replace(/:/, ''));
}

function addCategoryComment(){
var cat_array = post_catagory_js.split(",");
document.write('Filed under ');

for(i=0;i<cat_array.length;i++)
{
cat_string = cat_array[i].replace(/,/,'');
document.write('<a href=\"javascript\:showCategory

(\''+cat_string+'\')\; \">'+cat_string+'</a>');

if(i != cat_array.length-1) document.write(',');
}

}

</script>

You'll notice that there are two functions. The first is the one we'll look at for the moment. It will strip off the section of string which precede the ":" symbol. If you use a different symbol to differentiate the categories section and the actual post section, just insert it in place of ":" in the following lines:

var tok_array = category.split(":");
post_catagory_js = tok_array[0].replace(/:/, '');
document.write(tok_array[tok_array.length-1].replace(/:/, ''));

The "replace(/:/, ''" parts are not essential. You can leave them out if you want to.

Now, find the "<$BlogItemTitle$>" tag in your template and replace it with:

<script language="javascript">

filterCategory('<$BlogItemTitle$>')</script>


and replace “<$BlogPreviousItemTitle with:

<script language="javascript">

filterCategory('<$BlogPreviousItemTitle$>')

</script>

Step 3 - Add a line to indicate the catagories under which each post had been posted.

This is where the function addCategoryComment, which we saw earlier, comes in handy. Since we have already added the javascript function, we can get down to adding the "Filed under [categories]" section. Note that it's assumed that you used "," to separate categories. I wanted to insert this at the bottom of the post. You can insert it anywhere you want with some minor adjustments.

Find the "
<$BlogItemBody$> " and add the following html code right next to it.

<br><ct><script language="javascript"> addCategoryComment()</script></ct><br>


Result:

<$BlogItemBody$><br><ct>

<script language="javascript"> addCategoryComment()</script></ct><br>


Note the
<ct> tag. This is to add a different style to the string. If you leave this out, the default style used in the post string will be applied to the footer that we'll be adding.

The style called "ct" doesn't exist in your stle sheet. Adding:

.post ct {
display:block;
float:left;
text-align:left;
font-family: sans-serif;
font-style:italic;
font-size:90%;
line-height:1.5em;
color:#666;
}

should fix this.

You're done! Just remember that you have to wait a few minutes (hours?) before you start getting search results.

Btw. This post was partially written in MS Word 2007 beta 2 blog writer. I had to paste the codes in dreamweaver and paste it back in word in order to get the correct html.

Software: Free Software Magazine


Want to know the latest from the world of free software? Then this is the place for you.

About Free Software Magazine

Free Software Magazine is the only magazine worldwide that is dedicated to the promotion of free software as a whole.

Our website is based on the fantastic free software Drupal CMS.

For more information on what we mean by "free software" visit the Free Software Foundation (FSF).

Pretty Impressive hah. Subscribe to their feed here.

Software: Feed Reader 3...Disappointing


I'm a great fan of freeware and the open source movement (although I'm a part of it and my views are considerably oriented towards commercial software development) so it was a great disappointment to see that the free RSS reader, the aptly named FeedReader 3, did not perform at all well.

I usually don't read the documentation of any product unless it's pretty complex. So, with FeedReader, I set off to add feeds to it as soon as I got it. The first disappointment...the feed discovery process is extremely slow. It goes on for hours and then you get to select the type of the feed (Atom or RSS). Sometimes it crashes with an out of resources exception. I was trying to add one of my favourite feeds several times and finally, when it got added, I couldn't find a link to it anywhere. The posts from the feed were shown in unread posts but the feed itself was nowhere to be found. I'm sure there's a way to solve these issues but I couldn't be bothered, specially with the plethora of free RSS readers out there.

Wish I had seen this article sooner.

Wednesday, June 07, 2006

Phones: Sony Ericsson K700i Under 3" of Water

Phones have always given me a bad time. I've used four so far and two of them met their tragic ends when they (accidently) immersed themselves in salty water. That's right! not once but twice.

The first was a Trium Mars and it got soaked in sea water when a giant wave washed over us.



The Trium Mars

The second was a Motorola E360 and I fell into the Bolgoda river (on the edge of the University) while it was in my pocket. It convulsed and then went to a slow and painful death.
The Motorola E360

The next one, a Nokia 2100 was saved the plight because I sold it after using it for two months. As if to keep the tradition going, my latest phone fell into one of the draining systems in our hostel bathroom. Tadaaa! how happy I was...not. The phone was under 3" inches of soapy water (wish I could have taken a picture :)). While I was picking it up I was praying (to who ever might listen) not to distroy my baby. I turned it off as soon as it was out of the water but it turned itself on again. Classic signs shorts in the cirsuit due to conduction of water.
I took it apart and placed it infront of the fan to dry overnight. The next morning it was working fine. No overheating. No signs of corrosion. I'm as happy as a bee.
Good thing it fell into soapy water. If it had been salt water, it would have been "cyonara K700i"...


Software: Easy TV...Great way to watch TV for free


I just downloaded this app called EasyTV. It let's you watch a bunch of tv channels on your PC and what's more...it's FREE!!! I've already tested it on a few channels and it's working pretty well. Some of the feeds don't seem to work but there are plenty which does. If you wanna know what tv in Macedonia is like...this is the thing for you. (Surprise!!! they even have a few Sri Lankan channels!!!). Download it here.


Life: Pictorial

Here are some of the pictures that I took recently. I don't yet have a digi cam and have to use my phone (a SE K700i) so the quality's not that good...

The verendah...where we like to sit and talk in the evenings


Me in my room


In our garden 1


In our garden 2


In our garden 3


In our garden 4


In our garden 5


In our garden 6


In our garden 7


The (unconventional) path to our home...note the forest in the distance


Another shot of the path


Nittambuwa...the town situated 2km from out home


Random shot of the kandy road taken when coming home on bus


Where we spend most of our time during exam time...


We do like to party...alot. Adaya, Dinesh, Balla and Has (bet you can't see him) singing...

Monday, June 05, 2006

Life: Havin a break...


With the first subject of our exams over, it's time to relax for a bit. There's a week's break till the next one which is "Theory of Computing" so I could go home and see how the guys are doing. Got some work at the OSA of my first school so there won't be much time to have a break.
Hope I could get the new stuff chaky has downloaded. Normally half the stuff he gets is crappy. Must be because he's always looking DVD rips and not the latest or best movies. He's got X3 though. Yeahh!

God I miss Ramedian and it's 7mb downlink :(

Life: Sri Lanka Ministry of Defence Web Site

I don't like to put down my ideas about the ongoing ethnic crisis in Sri Lanka but recently there has been a lot of propaganda carried out by the LTTE (the rebel tamil tigers if you didn't already know that).
The Ministry of defence of Sri Lanka has created a new website to counter the false claims made through tamilnet. Dinesh has forwarded a mail asking us to put links to the new MOD website. I created a new icon to put in mine so it wouldn't spoil the looks.



I've uploaded it to image shak. You can find it here.
You can add a link to the MOD SL by inserting the following HTML in the appropriate location (should be between the "" tags):

<a href="http://www.defence.lk/"><img src="http://img456.imageshack.us/img456/3166/sla8rn.jpg"></a>


Leisure: Bleach and 1UP


What!!! You dont watch "Bleach"??? Sooooo uncloooooooool Duuudes.... Seriously Bleach is like the only anime that I keep up with. It has this universal appeal of being complex and serious and being funny at the same time. And the best thing is you don't have to have access to torrents to DL it. All episodes are available as direct downloads here. While your at it you might wanna check out the 1UP video podcast. These are the guys who do Electronic Gaming Monthly and they got the latest reviews in the podcast. Get it here with your favourite RSS reader.

Sunday, June 04, 2006

Views,Life: Sick of Sci-fi


I've been reading nothing but sci-fi novels for the last hundred years. It seems to be the only type of fiction our library has and thats thanks to the huge number of sci-fi books donated by Dr. Arthur C. Clarke who was a former chancellor of our uni. Most of them are more than twenty years old. The style doesn't quite hold up to the expectations of the modern reader.
Sci-fi took a great turn for the better with the advent of Neuromancer and other cyberpunk novels released during the early 1980s. Modern sci-fi seems to capture human nature and find the perfect balance between morality and technology where as most pre-1980 s sci-fi novels seems to be chronicals of future technologies with a few humans thrown in for flavour. Not that there weren't any good sci-fi books before that (apparently Aldous Huxley's books were quite good but I found "The new world" a really tiring read) but they were quite rare. Hardly the stuff fit for someone who's mingled with the works of Iain Banks, Kingsly Amis, Le Carre, Forsyth and so forth.
I'm stuck up with reading "Architects of Hyperspace" and it's an excrutiating experience to say the least. It seems I have to be content with outdated sci-fi and a few Terry Pratchet books till I can find the time and finances to get a membership at the British council.

A dying man's message sends interstellar explorers on a search for a lost alien civilization.

"A splendid book. McDonough has created the most mind-boggling artifact since EON."
—Arthur C. Clarke

"McDonough's imagination is as daring as they come."
Locus

"The imagination and scientific know-how of Clarke. I loved it."
The Midwest Book Review

"High adventure in the classic SF tradition."
Science Fiction Chronicle

Saturday, June 03, 2006

Views: Intellectual Property (IP) Law in Sri Lanka

One of the modules that we had for this semester was "Professional Practice". In between all the talks about ethics, morality and whistle blowing we had a few lectures on SL IP law conducted by Mr. Jayantha Fernando. According to him, Sri Lanka has implemented alot of reforms to meet up with the standards of the EU, the TRIPS agreement (whatever that maybe) and the WIPO standards.

It's strange though to hear that computer programmes are protected along the same lines as works of literature. I don't think programmers go through the grueling process of coming up with a unique idea, wrestling with it for months or years and finally getting down to
putting everything down in words.


I've tried both writing and computer programming and I find a programming a breeze compared to writing anything remotely creative. But the wierd thing is software and other content, if downloaded, doesn't appear to be clearly addressed by any of these laws.

Graphics: Cool effects with Photo Shop liquify filter and stroke

I just finished preparing the (relatively simple) pic for the title of my blog. I've been using alot lately and decided to use it here to distort the background. Adding a few strokes of blue playing around with liquify made it pretty much what I wanted. After applying a stroke filter to get the thatched appeareance, I accidently applied theliquify stroke effect to the layer. The result was amazing. The light grey lines that you see along the border of the design have been added this way. Spice it all up with a drop shadow and you got one hell of a header (even with my picture on it lol).

Before: After:

Life: Back to Studies


I've been sitting here doing nothing all morning. It's 3 in the afternoon now. With exams starting on Monday, it's high time I got myself immered in the sea of documents of various sizes and shapes that we've recieved througout the semester. Studying's a pain. I'd rarther sit here doing nothing all day. But hey... if we aren't gonna do it...who else will ;)

Friday, June 02, 2006

Views: No Smoking!!!!


Yesterday we went out to have our shot of late night plaintea at aound 11. I, as always, asked the guy at the counter for a cigerette. This guy tells me that there's this fancy new law stating that we couldn't smoke in public places!!! Apparently three guys have been picked up by the police while they were having a fag on the pavement. Imagine my surprise for this was the first time I heard of this!!! Well... I'm not exactly up to date on current affairs. Blame it on our hostel and the lack of a decent TV room. But the main question here is "Do we need a law against smoking in public places???". Most Sri Lankans are non smokers. And some others, like me, smoke with extreme moderation; one cigerette per day, two tops, and a few more on social occasions. I know only a handful of heavy smokers. Ya we all know it's bad for your health and all but then again CO and lead particles are extremely bad for your health but no one suggests that we should stop using internal combustion engine.
If it's about the youth of the country getting addicted to smoking cos they see someone smoking in the bus halt...well what can I say...it wont be much help. People start smoking mainly because of the influence of their peers. No one farces you to smoke. You jsut start off wwanting to find out what's so cool about breathing in a puff of smoke and letting it out. In my case it was different. I was curious about smoking. True. But I was pissed off at these guys who aired commercials where a girl disses a guy cos he's smoking. Now... I value my freedom more than any woman on the planet (mabe except my mom) and it drives me totally wild when I see something like this. What I wanted to do was to get the message across to these "anti-smoking" guys. Keep your damned bitch... I live my life the way I want it and your petty words don't count for shit. I made up my mind to smoke (I was a non smoker and a non alcoholic and a vegetarian at the time).
It's a free world (apparently) and we have the right to make chaices about our lives. I chose smoking. Someone else would choose not to smoke. I respect that choice. And it's the responsibility of these so called "anti-smoking leagues" to respect the choices of who want to smoke. These "pana ne" phrases are just fueling the fire. No more smoking in public places (apparently this hasn't been approved by the cabinette yet)... fine...now could we get down to the real issues in this country...

Thursday, June 01, 2006

Views: The virtues and wiles of hairloss


Just got my hair cut really short today. It's nothing new for me cos I been wearin the crew cut on and off since I was a toddler. In the latter years it was mainly to express the radical side of me. I would grow this beautiful thick crop of hair and suddenly...out of the blue...cut it all off. And it usually got the point across; that I'm not your average blue eyed baby boy.
But nowadays it seems that I have to get the crew cut. I've been loosing alot of hair lately, specially after the six months I spent in a software company under an AC going full blast with a big coat of hair gel all over my hair. I don't loose my 2 cents over it but it's a sad ending to what has been a great part of my (heavily underused of late) body...And it gives you this unusual feeling of being old. That's pretty bad. It could change your whole outlook on life. I'm saying this thinking along the lines that a person's person's perception of the outside world is partially based on his/her physical characteristics. I used to laugh at guys who fussed too much about their looks...now I know the reasons they had...
Just goes to show the extent of the uncertainty principle in Buddhism...