Friday, September 06, 2024

Accessing a Video Encoder via API

In this day and age APIs have become an integral part of connecting systems and data sharing. They function on both hardware and software providing a uniform way of communication. However, not every system (hard or software) facilitates an API, or although supported is known publicly. Recently I figured out a rather unexpected range of devices to possess a similar facility.


My workplace employs a few mid-range video encoders to provide live and on-demand audio/video streams to public platforms. They belong to a brand named “Digicast”. We use few encoders belonging to a couple of hardware versions, which in turn runs different firmware versions. My problem begins with having to manage these encoders and needing to enable/disable/reboot them daily or frequently.


Although Digicast’s firmware provides a simple web interface (with simple authentication), having to login to each device every time is troublesome. It is in this backdrop that I started researching on creating a simpler and efficient way of achieving the aforementioned tasks. For this, I had to provide instructions via a program, and for that, I needed an accessible API. Then one day, while I was inspecting the HTTP request/response headers to/from the encoders, there was an XML response to be seen. It contained several tags with values I was already familiar with (refer Image 1). This got me thinking, that if there is an XML response there should be a request mechanism (i.e. API access).

 

(Image 1)

 

However, countless searches on Google or any other search engine wasn’t fruitful. There is absolutely nothing on this on the web (I propose that you try). So I wrote to the company support and surprisingly they responded promptly. It took more than a couple of mails to make them understand my need and eventually they gave me an API documentation. Then, a dozen mails back and forth, and I had all I needed to proceed. I’ll be attaching the documentation for the “DMB-8900A Classic ProVideo Streaming Encoder” below, so that anyone could download and use it.

 

Now let’s take a look at some basic API calls and their purposes.

 

For example, the following is a request to retrieve the current status of an encoder:
http://172.16.7.5/get_ctl?type=hdmi_ext 

You could read the XML output and search for the relevant tag/value to obtain the status of the stream. In my case, it would be <rtmp_second_enable> with a value of “0” or “1” accordingly. The documentation given at the end contains descriptions of other tags.

 

We could also give instructions to the encoder. For example, the following is for rebooting:
http://172.16.7.5/set_ctl?type=reboot

 

To enable/disable a stream, the value of “rtmp_enable” is set to “1” or “0” respectively:
http://192.168.5.5/set_ctl?type=hdmi_ext&rtmp_enable=1

 

Note the difference in the two end points “get_ctl” and “set_ctl” depending on whether you’re retrieving data or sending a command.

 

If you examine the attached document, there are plenty of other data you could retrieve using these API calls to accomplish various needs. I also must mention that API endpoints and parameters for later firmware versions may differ, and in that case, you’d have to get in touch with support and request the documentation. It’s rather surprising that the company hasn’t published this documentation online. It would make life easier for both their customers and support personnel.


[ Download the API document ]



Thursday, December 28, 2017

Social Detox

The year is coming to an end and it’s been a while since I last wrote on this blog. In fact not once during the last couple of years! I wasn’t taking a break from the “web” or from my daily work. And I did miss writing to this, besides it was a bit frustrating. But what I intend in writing today is to enlighten how the opposite of it could be rewarding and is sought after by an increasing number of individuals.

“Social Detox” (reduced from Social Media Detoxification) is what I’m referring to. The word social has an interesting meaning in this day and age. It’s often perceived as social media and the interactions thereof, especially in internet jargon. The widespread use and penetration of social networks to all spheres of society is a somewhat remarkable phenomenon, even in less developed countries. I have personal experiences to attest this fact.

Social networking has always been entwined with its pros and cons, although they aren’t a problem for everyone, always. But there are terms being coined like F.A.D. (Facebook Addiction Disorder), “echo chambers” and the inevitable distractions and consumption of time. So, the affected, started seeking a way out.

You’d probably heard of the “99 days of freedom” campaign. It’s basically a pledge you make to not visit Facebook for 99 days, while informing others of your decision in advance. I’ve seen several of my friends adopting the practice in recent times. Some even did it regularly. When they are back, they usually express a feeling which encompasses a high degree of satisfaction. I of course haven’t done it, but thought of how it would have felt to them. Then my thoughts stumbled across a few parallels.

Have you lived/camped in the middle of a jungle for a few days with no mobile phone connectivity? Have you been on a spiritual retreat with no interactions with the world outside? If yes, then you should understand what I’m implying. These are even considered as recreational activities. In fact, camping in a jungle - with no artificial light sources - is prescribed by some psychologists as a remedy for sleeping disorders, because it “resets” our biological clock. All this only endorses the essence of programs like the “99 days” experiment.

What’s special is how the withdrawal from an addiction or a frequent habit could lead to an elated level of mind. The abstinence affects a change in our psyche. That’s where the detox part really makes sense, since it cleanses you of the distractions or non-benefits. It also breaks the chain and the monotonous routine, giving us real change.


Monday, August 25, 2014

“No Fly Zone”

In general this hasn’t been a good year for the field of aviation. Starting from Flight 370, then Flight 17, then a couple of crashes in Brazil and Iraq, it’s been bad news one after the other. Causes of the afore-mentioned tragedies vary, with the exception of “MH370” which basically disappeared. Hence it’s rather coincidental that I came to hear an aviation-related mobile announcement in my neighborhood of Boralesgamuwa a fortnight ago. A van was airing a notice which gave a meaning similar to the following:

“We request you to avoid flying any kites in this area as it may cause a threat to aircrafts and passengers onboard.”

A fair enough request, given that the Ratmalana Airport is only about 2km away. But this was the first time I heard such a statement from the authorities. So I did some searching to see if kites are that hazardous as portrayed. And was surprised with the first article I stumbled upon. Apparently a nylon thread seemed to be the cause of a helicopter crash in the Philippines which killed two crew members and seven people on the ground! An important piece of information in that article is regarding the regulations and distance prohibiting kite-flying. I wondered if there were similar regulations in our country as well. Therefore I phoned the airport and inquired. According to the officer who answered me, there were no such specific laws or regulations which prohibited the leisure-time activity, but they will request the relevant local police stations to take action to clear the “sky paths” if needed. When I inquired of the height and distance from the airport that might be acceptable to fly a kite, he didn’t give any numbers. But explained to me how aeroplanes and low-flying helicopters encounter difficulties while approaching or departing the airport. August being the kite-season was a reason for the announcement to go out.

Further searching on regulations, I came across a couple: Hong Kong and the US. Notice the height/distance factors which are clearly mentioned and also the word “balloon” in the FAA page. The ATC of Netherlands has a more detailed page with maps highlighting prohibited areas in different colors along with a descriptive legend. May be our local authorities also should improve on this aspect. Enact regulations if there aren’t any and publish them on the official websites.

Still whatever the law may be, we as responsible and thoughtful citizens need to think of this stuff pretty seriously. And if you or your child needs to fly a kite, Galle Face Green is always there.☺

Monday, May 06, 2013

Volunteering in an Internet Age

As Wikipedia puts it (partly) volunteering is: “An altruistic activity and is intended to promote good or improve human quality of life. In return, this activity produces a feeling of self-worth and respect; however, there is no financial gain”. But the most fascinating thing about this definition is that it holds true for this age too. Many verbs have received different definitions in contemporary times, but some have adopted accordingly. “Volunteer” is one.

A couple or a decade ago, it was all about charity related work where you would offer your effort and/or skills for a social event. But now there are many other activities that one could perform on the internet, which upholds the same values. It’s mainly two-fold as skills & effort, but eventually the same thing. As with offline volunteering, these are mainly performed for proprietary entities or non-profit organisations. At the end of the day, the world benefits, the online community benefits.

Although the topmost activity in this sphere is devoted to the Open-source movement, I wish to focus on a few popular products/websites that rely on Crowdsourcing. Crowdsourcing itself is a new-age term, which could be broadly defined as, “obtaining the efforts of a crowd (volunteers)”.

Wikipedia is the best and most popular example. What more, even this article has a couple of hyperlinks to it already. This online encyclopaedia is almost totally built on the efforts of thousands of contributing volunteers. Not only the submissions, but moderations too are handled in a similar nature by ‘administrators’ who are chosen from the previously mentioned fervent contributors. That helps in maintaining the credibility, which is always a common question raised against crowd-sourced content.

My next focus is a company, and a popular one in Google Inc. Google’s products have now become necessary platforms for thousands of other products and services both online & offline. For example, Google Maps is one such platform. The fact that people are able to contribute to it has resulted in the rapid expansion and improvement of the product itself. Anyone could contribute to “GMaps” through the Map Maker tool which was launched about 5 years ago. Talking about maps, a special mention of a non-commercial/non-profit counterpart in OpenStreetMap also needs to be made. There may be differences in content and quality between the two, but they both acquire and deliver the same kind of service.

Apart from maps and among many others, there were other programmes such as (now suspended) “Google in Your Language”, where they obtained the contributions from volunteers in order to localize their products.

Even though there is no guarantee on the numerous types of ways your contributions could be used in a final output, the age old saying of “volunteer to make a better world” still stands, even in this day and age with a sense of self-satisfaction.

Tuesday, February 12, 2013

Base64 encoding and its proper use

A friend of mine recently unveiled a new version of his website. Given that I too had worked on it sometime back, I decided to check it out. The main points I looked out for was security holes, since there were numerous such flaws which I fixed years ago.  Rather unsurprisingly the password reset feature of the site had one such ‘vulnerability’. It was done anew and the method used was not the most recommended although many developers opt for it. It wasn’t a bug, but a bad implementation ready to be exploited.

The culprit was an incorrect use of base64 encoding. For me, the main uses of base64 are storage and transmission of non-secret data. Although in the case of storage it’s something like hashing binary data etc. The last part ‘non-secret’ is very important. Because if one was to use the same for ‘secret’ information, then again it’s a non-recommended use. In the above scenario that was the exact thing that happened. A piece of data which was meant to be secret and easily non-readable was sent publicly after encoding with base64. And as most developers know, it’s just a jiffy to decode base64. So what I did was decode the string value, only to find out that two values were concatenated. One value was the victim’s email and the other a randomly generated string which wasn’t that hard to identify. Then it was merely to modify the above value with a known user’s email. And voila! I could reset his/her password.

Mentioned above was how a badly implemented encoding could make your web application vulnerable. And this is not something associated with low-profile companies, but even Facebook had a similar situation which was revealed in this article at 'Hacker News'.

The remedies are many, depending on how far you’d be content with given that security isn’t a 100% achievable thing. One solution is to make the random ‘salt’ a highly cryptic value. Another is to use a well-recognized encryption mechanism. Or you could even develop your own encrypt function although security experts warn against this. A rather straightforward and often used method is to implement one-way hashing such as MD5. All this methods have their advantages and perils. It’s up to the developer to decide which is best depending on factors such as performance, importance, accessibility, etc.

Wednesday, December 05, 2012

Floating for lifesaving

I’m sure most of you would have read/heard/watched the story of four divers getting swept away by a current in the sea off Mount Lavinia recently. Rather miraculously, all four were found nearly after 24 hours. When interviewed, the divers told the media how they kept floating for more than a day at sea.

There are few important lessons that could be learned thanks to these individuals' endurance. One, don’t swim against a current. It’s a waste of energy and you’ll ultimately end up tiring yourself and get cramped (and eventually drown, if no help arrives). Two, stay calm. Because you are in the middle of nowhere and panicking will not help. Three, float. Don’t swim. Why? Again because you’re in unknown territory and not sure whether you’ll reach a land or a safe place. Hopefully, your endurance holds-up and help arrives. But since it’s not a very energy-consuming exercise, you may even swim slowly towards a marked direction.

What do they mean by float? Do we just float like that? Answer is no. You’ve got to learn, relax & practice it. Technique-wise you’ll need to master the kicks and build-up endurance. This is where basic lifesaving lessons could help. I often see swimming classes advertised in papers, websites etc., stating all the strokes in the world. But in a scenario as above, all the swimming in the world may not be the most needed or appropriate. So I propose that every coach should stress on teaching floating techniques to their students. I’m not rejecting the need of actual swimming. But lifesaving methods should be treated as a life skill as far as I’m concerned.


Thursday, November 01, 2012

Witnessing a Radio frequency migration


All FM radio channels in Sri Lanka underwent a frequency migration from November 1st 2012. Bear in mind, few channels were lucky to retain their previous frequencies. The reason is to have only one frequency (maximum two) for any channel throughout the island. According to the TRC, the policy of new frequency allocation in short is: ‘every channel receives a maximum of two frequencies separated by 200 kHz, and every channel is separated from another by 300 kHz’. Although practically there were a few exceptions, given factors like ownership of multiple channels, etc., this was the base. One downside I observed was that the entire 87.5 – 108 MHz range has now been allocated and sneaking-in new channels will be a tricky scenario, unless we adopt/implement a new technology.

So, I kept awake till the dawn of November 1st in order to witness how radio channels will handle this occasion. By 11.30 p.m. (October 31st) most channels were ‘out’ in the sense that either nothing or a long continuous irritating noise was heard. Some channels were promoting their would-be new frequencies. These ads were even seen on TV stations owned by the same media companies. A few had already migrated (e.g. Yes FM). The guys at FM Derana had a mini countdown to midnight and the frequency swapped at sharp 0000 Hrs. When I re-tuned, they were celebrating the migration with auspicious activities. Some channels were still blank and they were back live (obviously) in the morning. As I remember, a couple of channels were having parallel broadcasts before midnight while later switching to the new frequency only. It seems there was no uniform migration plan, but may be ‘overlapping’ channels decided on informal strategies within them.

On a final note, I think this should have happened long ago, but better late than never. It was also fun to experience such a (hopefully) rare occurrence.

Tuesday, July 24, 2012

A layered Transport Model

Traffic seems to be growing in the country, especially in the capital and suburbs. Increasing number of vehicles and roads that are unable to accommodate them are the main reasons. The inevitable factor of undisciplined drivers & pedestrians does exist too. But the lack of infrastructure stands out. There ought to be short-term and long-term policy brainstorming being performed somewhere out there, but with unseen results. So, I have visualised a transport model, if anyone's interested in taking my 'five cents'.

The best way is to study how some countries have successfully curbed traffic congestion. Once, I met a person who worked in Italy, and he was telling me that they had planned their cities a long time ago as a 'layered' plan. I don't know whether this is correct as a fact, but some evidence can be seen. What I propose is something on the same lines, because widening existing roads or building new ones aren't always feasible, given that we are a developing nation and rely highly on foreign monetary assistance. Not to mention the scarcity of available lands. Well, we do need financial assistance, but whatever infrastructure built needs to be sustainable or else we'll end up in a similar situation a few years down the line.

When the Dutch built a canal system in Colombo, it couldn't have been a part of a long-term plan, but may be because they thought of it as the most viable transportation system suitable for the geography of the area. After all this was an era with no fuel-driven vehicles. In my plan I propose these existing waterways be utilised for transport. A project was kicked-off two years ago, but hasn't lasted long. I think the publicity and popularity it received was not enough, for otherwise the system was a very low-cost transportation method. Mind you, safety and health matters need to be taken care of too. But these type of waterways are utilised immensely in developed countries.

The other issues are with roads and railroads. I propose a merge. How? There are two ways: subways under the existing roads or elevated railway lines over the existing roads. This provides for maximum utilisation of land and infrastructure since what we are talking is a 'vertical' approach as opposed to the orthodox 'horizontal' approach.















 A subway















 An overhead (elevated) railway

This of course has been implemented in many countries as seen in the pictures above. If all three layers (subway, highway, overhead) could be implemented in one alignment that would be an ultimate solution. I even propose that overhead railways or roads be built over existing waterways, thereby making use of them both. If the costs involved are deemed to be high, still it is much sustainable than our current solutions. My point is a layered approach and not necessarily everything what I've highlighted here. But if any decision-maker is willing to extract something of this that seems to be practical and feasible, be my guest.


The model - illustrated


Thursday, May 10, 2012

Sri Lankan 'rebel' players' tour to South Africa (1982) (a quick recap)

It was 18 years ago on a day like today that Nelson Mandela was sworn in as South Africa's first democratically elected black president, thereby officially ending the apartheid. During the apartheid, South Africa was banned from international sport and any team or players who travelled to play in that country were severely penalized, often with long durations of bans.

Towards the end of 1982, 14 Sri Lankan cricketers (some of them national players) made a 'rebel' tour to South Africa. The result was a 25 year ban to each of them. But, the most damaging impact was that our cricket-crazy island nation lost some of the most talented Sri Lankan cricketers and their services for the future. Hence, some experts believe that it would have retracted the country's cricketing prowess by a few good years.

Stats and records of the above-mentioned 'Arosa SL' tour are very scarce. But Cricinfo has a somewhat comprehensive (if one may regard it as such) record in their archives. I happened to stumble upon it and found the figures and scorecards pretty interesting. Although 12 matches were played, the archives have the scores of only 11 matches. The scorecard of an ODI is missing. Sri Lanka lost all matches with the exception of two, which were drawn against Western Province & Eastern Province teams. The tour comprised of four ODIs, six First-class matches & two 'Test' matches. Even though the Lankan players were beaten well and truly, there were some exceptional & consistent performances from a few of our talented players of yesteryear.

In order to discover these 'jewels' of both teams, and to obtain a hitherto unknown and a more relevant picture of these unseen (by me) players, I performed a very simple analysis noting down the best performances of players from the two teams. What I found have been listed below (format-wise).


First-class matches

For Sri Lanka, the most consistent batsmen were Bernard Perera & Anura Ranasinghe, both scoring more than 300 runs throughout the series. The highest score by a Lankan batsman was 96 by Perera. Bandula De Silva & Flavian Aponso too had made decent contributions. The standout bowler was Tony Opatha, while Ranasinghe & Lalith Kaluperuma had chipped in with a few wickets. Ranasinghe's all-round capabilities had left a prominent mark throughout these matches. I was also amazed to find out that Jerry Woutersz was a pretty good batter.

One thing I noted was that a few South African national players represented the Western Province team, including Peter Kirsten. There were altogether five centuries - two from Transvaal players (Mark Venter & Henry Fotheringham), another couple from Western Province players (Ken McEwan & Lawrence Seeff) and one from an Eastern Province batsman (Dave Richardson) - the highest being 159 runs made by Fotheringham. Bowlers such as Pienaar Anker, Kenny Watson, Kenneth Cooper & Michael Clare seemed to have had good spells capturing more than 5 wickets in matches they played.

Test matches

Though only two matches were played, six SL batsmen were able to score half centuries, while Bernard Perera was the sole centurion (102). Flavian Aponso and Jerry Woutersz were the most consistent batsmen. There is nothing much to talk about the Sri Lankan bowling in test matches, but Lalith Kaluperuma had managed to secure a 5-wicket haul.

While it wouldn't take rocket science to understand that the SA batsmen would have had a run feast, three of them stood out. Namely, Jimmy Cook, Graeme Pollock & Lawrence Seeff. All three of them had scored a 150+ score, the highest being a 197 by Pollock. Garth Le Roux's performance was the best for a SA bowler which included a 6-wicket haul as well.

ODI matches

The only Lankan batsman to score a century is Anura Ranasinghe (100). None of the others were able to surpass the half-century mark. This may sound a bit startling, given that each innings was played for 55 overs unlike nowadays. But then again, that might be attributed to good South African bowling. Bowling-wise too there isn't much to talk, except that Susantha Karunaratne had picked up a couple of wickets twice.

For South Africa, three batsmen made centuries: Jimmy Cook, Peter Kirsten & Lawrence Seeff; Seeff and Cook displaying their capabilities in the shorter format too. Barry Richards was also consistent making a couple of half centuries. Vince van der Bijl was the best bowler for the South Africans.


So that brings to an end my short recap/analysis of a long-forgotten and (in)famous series of the past. If you are interested in going through the scores and figures of each match, you may do so by visiting the link provided at the beginning of this article.

Tuesday, January 31, 2012

A week of tech meet-ups

It's not often that you find yourself attending several tech-related meet-ups during a week, especially in Sri Lanka (let alone happening). But, last week turned out to be exactly that. If there is a trend building as such, then that's great and I hope for more. These provide an opportunity to share, learn and network with people offline as oppose to Googling or Social Networking. It also reminds some that they are humans!

First was at Coco Veranda on Monday 23rd January. This was arranged through Meetup.com by a bunch of guys from a company called WebGurus and was meant for PHP developers only. Being the first of its kind I attended, (and probably the first in Colombo) there were about 15 - 20 PHP developers gathered that evening. The session commenced with each person introducing him/herself while the main feature of the evening was a presentation by Jayawi Perera on the security aspects of PHP development, which was pretty good. Afterwards, it was more chatter within the gathering to go along with Coco's delicacies (there were many). It was agreed to hold a similar meet-up every month to discuss PHP related stuff.
 













Come Thursday, and it was time for Refresh Colombo. This was the first 'Refresh' for 2012, and two talks and an inaugural networking session were lined-up for the evening. Needless to say, there were about or probably more than 100 people attending this time around. Personally I was glad to meet an old friend Dilshan Kathriarachchi after about seven years. One of the talks scheduled for the evening was by him. The first presentation was an SEO audit of a local website by Shaad Hamid. He discussed a few SEO points and shared some tips in between too - which SEOs normally wouldn’t do. Then it was Dilshan. He talked on his experiences with start-ups and the journey so far. I had stuff to reminisce during the talk too, because it was he and his first start-up that I first worked with eight years ago. Those were crazy and fun times. Lastly it was a networking session, where we got to know others that we hadn't met or talked before and discussed what they were up to.











  



From two-digit attendance to three-digit attendance, and the last for the week was easily a four-digit one.  The second 'Android Forum', organised by Etisalat Sri Lanka, it was. This was held at the Cinnamon Lakeside hotel on the 27th of January. The morning programme was meant for Android developers, whereas the evening session was aimed at explaining the ABCs of Android. There were some fine presentations in-between and a useful panel discussion as well. The guy from Google Israel was something special too.















All-in-all it was a week full of knowledge to harness, people to connect and stuff to share. One thing unique about all these functions was that they were free of charge. So it is only proper to sincerely thank all the wonderful people behind the sponsoring & organising of these events.


Wednesday, November 02, 2011

Bearing 7 Billion

The world's population exceeded seven billion yesterday according to the UNFPA (United Nations Population Fund). It seems to have been taken in a celebrative notion. Although the joy a baby brings to its parents and family is something immense, this is not about celebrating the birth of a one or two or few '7 billionth' children. It's about the world's population reaching a substantial rounded figure. This is a mark that needs to be considered seriously or else a mark that should change how we perceive the future of the earth.

How many billion people walk on earth is not the real issue. Can the earth bear them all and if so for how long is the issue. If you've watched the 'HOME' documentary which by far is the best of its kind when it comes to enlightening us on 'earthly' issues, then you'd probably have a good idea of what I'm talking about. If you haven't seen it, I strongly suggest you do.

We eat everyday. We eat many things. Most of them are either produce which are grown on soil or based on such sources. Then, we drink. The base being that wonderful and amazing liquid made up of two Hydrogen atoms and an Oxygen atom; namely water. But, drinking-water is sparse. So sparse that it accounts to less than 1% of the planet's entire hydrosphere. Apart from this, we consume water for many other activities too. We inhale, we burn, and we make use of the Oxygen in the atmosphere. We produce. We produce all kinds of artificial material using elements extracted from the earth. These don't get back to their normal forms or places in a hurry. In fact, some would never in a time we could comprehend. While consuming all this, we release harmful substances back to the eco-system; often referred to as pollution.

What ungrateful masterminds we are. We suck the cream out of the earth, gulp it up, or convert it to an artificial state that would never enter a natural cycle, and pollute it! How could we expect the situation to get better with an increasing population? How could we expect 'Mother Earth' to bear all this indefinitely? Most people don't seem to be bothered, or (to put it in another way) are ignorant.

You and I, we need to understand, acknowledge, and act sooner or later. Because there's a limit to everything. Even Mother Earth has her limits. Once limits exceed, her wrath will be upon us. Mankind may opt to call it 'end of the world' not knowing that he is the one who caused it.

Wednesday, August 10, 2011

Towards a generation of e-Socials

Humans by default are social animals, not in the modern meaning but as a fact. This comes with their dependence on others to grow, to learn, to find food, to mate, to bear & raise offspring, and in short to LIVE. Initially I was a bit reluctant to proceed writing this article after a previous one on orthodoxy versus modernisation drew some criticism but continues to rank high in page views. If you think the same, then it accounts to another who's misread (with no pun) the whole thing. I try remaining moderate on most things I've come across in life and still am. The aforementioned article is no exception to that rule, where it stresses on the concept of 'balance'.

Continuing on this, I wish to highlight a new breed of human beings who could be termed 'e-Socials'. Simply this means people who socialise online and maintain a rather (in)different attitude offline - consider offline as the antonym of online. Personally, this inconsistent behaviour has put me off several times and I have all the reason to believe & assume that few more people find it rather irritating or confusing. My understanding has done away with the confusion part, since I now realise this to be a psychological trait, which in turn may characterise the behavioural aspect of an individual.

Interaction and implicit communication are imperative components of socialising. In today's web and networked life this has been achieved in other ways. Take for example a person in a chat room. They interact by typing, scream (by capitalising letters), show emotions via emoticons, and appear to be of a certain gender where in reality the person(s) is (are) not inclined to act as such. To elaborate, think of an individual in a grumpy state being able to express the complete opposite by typing in a smiling face (emoticon). The digital/virtual interface has facilitated the above merrily and successfully. I have met many people offline and have found them to be extremely different than they appear to be online. Some who appear very outgoing and cheerful online are surprisingly introverted and timid when encountered in normal day-to-day life. How could this happen? Is it a Multiple Personality Disorder or a distortion caused by living an extreme online life thereby ignoring to associate in REAL life? I'm not aware of any psychological analysis or study conducted on these lines but there couldn't be none either.

The arrival of social networking web sites has only assisted the above. Facebook, Google+, Hi5, Twitter, etc provide a bag of virtual substitutes for the online social being. People chat, share their thoughts, share photos, 'like' things, play games (as oppose to sports), find & make friends, entertain themselves, learn stuff and many many more by just sitting in front of a computer or by the use of a mobile gadget. Some even opt for the now rather conventional medium of email. What I think is, this is pretty alright if the whole world is connected and there's no need of offline interaction. But, (un)fortunately that's not the case. Hence, when there are two types the latest and uncommon become eccentric leading to confusion, irritation, agitation (in society) and you name it! So, we either wait for the transformation to happen imagining that this is a transitional phase and expect ourselves to be guzzled up by the tide. If there are no signs of it happening in the near future, then I say: GET A LIFE, and by that I mean a real one, not a forged one!

Saturday, July 23, 2011

Some special freshwater fishes of Sri Lanka

My interest on fish started at a very young age. Initially it was a few Guppies borrowed from a friend in school and which I kept in a huge toffee bottle. But then, to a bigger fish tank and another. Joining YZA was the climax of this. There, I was able to scientifically learn & study about all the freshwater fish species in Sri Lanka.

In this aspect too, our country is a blessed region, since we are very rich and diverse in fauna & flora. Sri Lanka is currently home to 80 odd indigenous freshwater fish species. (I'm a bit confused on the exact figure due to a few rapid changes and additions that have recently taken place in this sphere). Most people are startled to hear this fact and are also utterly unaware of the array of species our country possesses. Hence, on the positive, awareness through whichever means would benefit the conservation of our fauna & flora for generations to come. On these lines, I thought of sharing some acquired knowledge of freshwater fishes of Sri Lanka with you. And as it's difficult to provide information on each and every fish, I've chosen a few special species - although there are more - for this blog post.


1. Hora dandiya - Rasboroides atukorali - හොර දණ්ඩියා


I'll start from the two extremes. Previously known as Horadandia atukorali, this little fellow is the smallest freshwater fish in Sri Lanka growing to an average length of 2 cm or less. It belongs to the Cyprinidae family which accounts to the most number of species in the country. This fish has no lateral line and is transparent in colour with a light green hue. They often live in large schools close to the surface while feeding on planktons. It is a somewhat weak fish compared to other Cyprinids. Has been reported from the wet zone (locations such as Diyawanna Oya, Attidiya, Matugama) and Yala in the dry zone. Not an endemic species.


2. Shark catfish - Wallago attu - වලයා

A Walaya caught at Kitulgala - from Rohan Pethiyagoda's 'Freshwater fishes of Sri Lanka'


From the smallest now it's to the biggest. The Wallago is the largest freshwater fish in the country which measures to a maximum length of 5 feet, although individuals of this magnitude are very rare. Since its rarity in recent times, the Wildlife Conservation Society of Galle had once requested to report any sightings of the fish as part of a survey carried out by them. This species belongs to the Siluridae family which boasts of many large individuals.

The Shark catfish is blackish brown in colour and white underneath. It has two pairs of barbels out of which the maxillary is very long. The mouth which extends beyond the eye, suits its nature of being a voracious carnivore. Mostly active at night, its diet includes small fish, reptiles, birds and even mammals! This is a solitary creature that lives in deep pits in large rivers or tanks. It has been mainly reported from areas such as Kitulgala, Mahaweli River and tanks in the dry zone. Harmful means of fishing such as dynamiting is believed to have contributed towards the diminished numbers of this species and resulted in being extinct from some of the previously inhabited locations. It is not endemic to Sri Lanka and is also recorded from India.

Now I move onto a couple of fishes with unusual habits.


3. Archer fish - Toxotes chatareus - දුමිත්තා

     An Archerfish shoots at a target

Ever heard of a fish that spits? Well, this one certainly can. In fact, that's a way it hunts for food. And as its name implies this fish is a skilled shooter, which channels a jet of water towards a target over the surface thereby hitting the pray and causing it to fall. The younger ones are not very accurate, but they eventually develop and learn to deal with the angles concerning the refraction from air to water. This species is an average sized fish and shows a distribution from India to Northern Australia. It is found in both fresh and brackish waters and often in lagoons too.


4. Upside down sleeper - Butis butis - නිදිමතයා

     Laying upside down


Although called a 'sleeper', it's just a position that this species is sometimes found lazing around, not that they actually sleep (even its Sinhala name presents the same meaning). They are often found lying in one place on a surface. Due to this weird behaviour, it's sometimes even referred to as 'crazy fish'. This species belongs to the Eleotridae family which has another individual - Eleotris fusca - in Sri Lanka. It is carnivorous and feeds on smaller fish or crustaceans. Lives in fresh and brackish water while commonly found in lagoons, estuaries, swamps and lower reaches of freshwater streams.

The last two I've chosen are a bit unusual in appearance.


5. Freshwater garfish - Xenentodon cancila - යොන්නා


The Freshwater garfish is a 'needle fish' - because of its shape - and belongs to the Belonidae family. It grows to a maximum length of one foot although most reported are about 8 inches. Has big eyes and long jaws, and teeth of the bottom jaw protrude out while the upper ones don't. Length of its head is almost half the total body length. A dark band with a margin runs along the side of its body. They prefer to stay in one place, close to the surface in wide streams or large rivers. It's not the best-known swimmer and usually are found in packs of 7 or more. As a carnivorous individual, it feeds mostly on small fish & frogs, tadpoles or crustaceans and hunts mostly at night. The Garfish has been reported from areas such as Waga and Kithulgala while I once observed it in a tributary of the Magal Ganga at Deraniyagala. It's at times mistaken for the 'Halfbeak' known as මොරැල්ලා in Sinhala.


6. Ocellated pipefish - Microphis ocellatus - නැට්ටා


This fish belongs to the family Syngnathidae which includes Sea Horses too; the major difference being that sea horses hang about vertically (yes, they are fish. Not horses, or for that matter mammals!). These fish have a series of bony rings that encloses their body and have no scales. They feed by sucking into a tubular snout. Males have a brood pouch in which the eggs are laid, fertilized and incubated. It grows to a maximum 6 - 7 inches in length and is a VERY slow swimmer. It's also a very rare species and has been recorded only from a few locations in the wet zone. (e.g.: Avissawella, Agalawatta). Mainly occupies slow flowing habitats although may exist in fast flowing locales as well.



Friday, June 03, 2011

They know you more than you

Privacy is one of the most talked about topics of the information age. With more and more information generated it's bound to aggravate. As I see it privacy is two fold in our usage. One is the derived form (non-voluntary). The other is more straightforward where we submit our information to another party (voluntary). Many people are knowledgeable on what they submit to the World Wide Web or at least intrinsically think twice before doing so. If not, at least a bit of commonsense would do. This is of course assuming that you're really bothered about your personal information and hence privacy. But what about the other form, where someone else derives certain information on you based on various data? Additionally, you may think on the lines of a personality test. The first (and the last) time I sat for one, I scored pretty well. But a web based company could be in a better position of judging you with the amount of information gathered throughout the years. I intend of giving you some goose bumps largely based on these.

When we upload photos to Facebook, or post crazy status updates we are well aware of who could see them and the fact that Facebook stores it on their servers. Furthermore these sites have their own 'Terms of Use' & 'Privacy Policy' posted publicly although more often than not people really don't care reading them. As per internet statistics, the most popular, used and visited websites are Google, Facebook, Youtube, Yahoo, Live, etc. and are run by US based companies. This eventually creates a certain web centricity towards a certain geopolitical location as well. This blog is no exception either. Privacy when coupled with politics can be a tricky issue, where it's sometimes even referred to as intelligence. But the gravity of infiltration, harnessing and action taken upon depends on the country's laws and regulations.

Just imagine the amount of information your Gmail or Yahoo mailbox contains. From passwords & bank/credit card account information to communication with crushes, your fetishes and even porn are only a few to mention. Not excluding religious and political stuff as well. And it's not only free web mail services, but chat software such as Gtalk, Yahoo, MSN, etc might record your chat history although you may have opted to go-off the record. If you think that's all, just consider the amount of searching you'd done throughout the years using all those popular search engines. What's the assurance that these companies wouldn't store your search queries or for that matter any personally identifiable information including location data. Google even has a function that allows you to delete/manage your search history termed 'Google Web History'. So if you're still the kind of person who thinks that Google doesn't know anything about your multiple accounts, I say wakeup! that's such an insignificant thing.

Data mining technologies are the most used in deriving information or patterns from this data. In fact, our search & browsing patterns, Facebook likes, email contents and anything similar is sufficient of determining our personality and interests. This helps in creating a somewhat virtual personality of you. The integration or interconnection of social and other major web platforms have only helped it.

Then there are the types who say, "So what? I don't care what any web company or country knows about me, I feel totally OK with it". Actually I myself belong in that category. The purpose of this post was to enlighten the extra-cautious individuals who aren't very comfortable with this issue and not to drive you off the web. Who knows, someday we might just have to admit that's how it is. After all, wouldn't it be nice to see Google predict what you'd be up to this coming weekend?

Now why do I hear someone mutter "creepy…".

Saturday, April 23, 2011

Few tips on how to save your internet quota

Is your workplace one of those places where restrictions on internet browsing has been imposed? And, is there a restriction on the amount of bandwidth you consume per day or week? Then better get yourself accustomed to using it [bandwidth] thriftily and wisely. Apart from that, it could be very useful for people with limited broadband packages. This article gives a few tips that would help your cause.

Look out for:

'Heavy' sites! Websites with loads of graphics, flash animations, streaming video/audio are the ones to lookout for. Sites classified as entertainment, news, gossip, etc often fit into this category. Occasionally, web sites with pages that refresh automatically every few seconds, such as Cricinfo could consume a lot of data although not necessarily identified as 'heavy'. Richly developed/designed web sites like Facebook too transmit more information between the user and the web server although unnoticed, in order to provide the user with a better browsing experience.

When browsing:

At times, our ignorance itself could be a reason. One such example is the Google Image Search. If you search for a certain term which yields hundreds of results and scroll down to the end of the result page, this will end up loading all the images in the result. But, if you were to scroll down page by page, images below are loaded only upon scrolling. Another instance is clicking on audio/video links which are linked or hosted on an external site, although embedded in a not-so-heavy web page which you are viewing. Streaming audio & video relatively consume much more data irrelevant of where it's played; in a flash player window or a popped-up media player. People who use web based free email services – Yahoo, Gmail, etc – tend to download large attachments in their emails without further thinking. But be aware that this could gobble up your quota, as any download of this nature is done over HTTP. A cheeky little solution is given below ;)

Exemptions:

Of course, intranet web applications and your company's / organisation's website and web based email will be excluded from quota usage if hosted internally.

What you could do:

Most content on a web page is not needed especially if you're reading an article. The flashy graphics and irritating advertisements are not the kind you'd often like viewing. So, you could stop the web page loading further once the content needed has been loaded. To do this, simply hit the 'Esc' key or click on the button next to the address bar. Later if there's an image you need to see, right click on the empty image box and click 'Show Image / Show Picture'. You might find this operation to be much quicker in Firefox than Internet Explorer. Disabling the loading of images on a web page will save a heap of quota, but you could view only the textual content of a web page. To disable image loading in Firefox, go to Tools -> Options -> Content and uncheck "Load images automatically". In Internet Explorer 8, go to Tools -> Internet Options -> Advanced and uncheck "Show pictures" under "Multimedia". The paths and/or option names will slightly differ and vary depending on the browser versions.

If you're the type of person who checks the latest news and events happening around, visiting the relevant website(s) periodically might not be the best idea. Instead, you could subscribe to the relevant web site's RSS feed and manage it as a bookmark in your browser. These RSS feeds will display summarised lists of content (such as the titles of news stories) and you may view the entire article by clicking on the link to the related web page. View images below.







Bookmarks in Firefox








Feeds in IE


Remember me mentioning about rich websites consuming more data? Well, a neat but not so user friendly alternative is to use the mobile versions of such sites if available. Most of the frequently accessed websites on the net have their mobile versions. Some examples are Gmail, Yahoo, Cricinfo, Facebook & Twitter. These versions are designed for use on mobile devices and hence are very light-weight although with lesser functionality.

And the 'cheeky' solution for downloading big attachments; forward your email to your office email account if it’s hosted internally and save the attachment to your PC from there. This will cost you nothing except for the bandwidth consumed during the usage of the web mail service. Staying in the topic of web mail, in case you need to check your Gmail or Yahoo mail accounts frequently, better install the relevant toolbar. This way (given that you're logged in), you could get notified of any new mails along with the subjects.







Gmail notifications in Google toolbar


Obviously this is not everything and there are many more workarounds and practices you could adopt. While some might find this an added burden to their [internet] surfing behaviours, once got used, it will be negligible. Same as turning off the light before you go to sleep. After all it's your choice.

Tuesday, January 18, 2011

Who are the 'Isurumuni Lovers'?

Isurumuni LoversAccording to folklore Namalpura near Vijithapura during 455 - 473 A.D. (the reign of King Dhatusena) was ruled by a commander named Namal. This commander was executed by King Kashyapa due to his allegiance towards King Dhatusena and his elder son Mugalan. Commander Namal's only son, who was also known as Namal, was spared by Kashyapa. Young Namal's mother too passed away grieving over her husband's death. Hence, the young prince lost both his parents.


Prince Namal was a charming, talented and strong young man. His life was majorly devoted towards agriculture and religious activities.


One Vesak full moon poya day, this prince was attending religious activities at the Vijithapura monastery. Suddenly he couldn't believe his eyes with what he saw. She was the most beautiful damsel he had seen and he would ever see. He couldn't take his eyes of her, and so was she. They both grew close and talked with each other. While this conversation was going on the prince realized that the girl had heard about him and was longing to meet him. She was Chithra, a granddaughter of King Dhatusena. King Dhatusena had a brother named Kumarasena. Kumarasena had a son named Guptasena. Chithra was his daughter. She had a brother named Bandusena, who was a commander of King Kashyapa. Prince Namal knew Guptasena quite well.


Because of this friendship Prince Namal was invited the next day to Chithra's palace in the vicinity of 'Kala Wewa'. Chithra's parents gave Namal a warm welcome and their marriage was confirmed. The wedding had to be delayed since Chithra's brother Bandusena was abroad at that time. He was spying on Mugalan who escaped to India, according to the orders given by King Kashyapa. So it was decided that the wedding would be held once he returns back home.


During this time Namal and Chithra used to meet every evening and go for a walk. It was a well known fact to everyone in the area that the couple was engaged.


Meanwhile commander Bandusena returned back home from duty with a friend of his, named Mahanaga. Mahanaga was a deputy of Bandusena. Seeing Chithra, he told his friend Bandusena of his intentions of marrying her. Replying to him Bandusena said he may marry Chithra with her consent. Though this wasn't the time for Mahanaga to ask Chithra, he had high hopes that he'll be married to her.


Few days later Bandusena and Mahanaga were coming back from the palace when Mahanaga couldn't believe what he saw. It was prince Namal and princess Chithra seated on the bank of 'Kala Wewa' chatting with each other in a world of their own. Mahanaga couldn't bear it and his jealousy ended up in verbal abuse towards prince Namal. Being the calm character he is Namal wasn't intimidated. In fact he explained to Mahanaga and Bandusena about his relationship with Chithra and that he got her parents approval.


According to Bandusena's response it seemed as if he was totally unaware about the whole situation, because he was on a busy schedule since returning from India. But Mahanaga didn't want to give in, and it was decided that both of them resolute this matter with a 'Duel' (sword fight) between them. This was much to the comfort of Bandusena who didn't seem to have a solution. Though Mahanaga was in no position of denying the challenge, he insisted that someone like Namal was no match for him. Anyway according to the guidance of Bandusena, a venue and time was scheduled for the fight.


As expected the fight began amidst a huge gathering. Facing the first swing of sword from Namal, Mahanaga quickly learned that he had underestimated his opponent. It took another couple of swings for Namal to disarm Mahanaga. The third not only disarmed him but also ended his life. Namal emerged victorious!


Hearing about prince Namal's feat, King Kashyapa appointed him as a commander in chief. Prince Namal and Princess Chithra were married amidst celebrations. But their marriage wasn't to be a long lasting one.


A few months after their wedding came the rainy season. 'Kala wewa' was overflowing due to the heavy rains. And many people gathered towards the lake to watch this scenery. Among them were Namal and Chithra as well. When Chithra was approaching the left canal of 'Kala Wewa', in came a gust of wind and she was thrown in to the gushing water. Namal who jumped in to the water was able to save her life initially but the currents were too strong even for him, and they both were washed away and drowned. Their bodies were found lately and the funeral was held with state honour.


By this time, King Kashyapa had commenced renovation work at 'Isurumuniya'. It was done under the supervision of Kashyapa's elder daughter, princess Bodhi. She was also an expert architect. It is said and believed that the carving of the 'Isurumuni Lovers' was done by herself in remembrance of prince Namal and princess Chithra.


* This is a translation of an original Sinhala article published in the 'Divaina' newspaper of 04-09-2005. Its online version can be reached at: http://www.divaina.com/2005/09/04/scholast01.html