Translation


by Transposh

Posts Tagged ‘Technology/Internet’

Empathy for Pidgin

Friday, October 9th, 2009
Empathy for pidgin

Empathy for pidgin

The choice is yours.Such is the power of open source.But that doesn’t mean that there are no favourites.Vi editor is the most used text editor while open office remains the most powerful office suite platform.Gimp is a lovely image editor.And if we talk about Instant messaging client Pidgin has been ruling the roost. But things are moving fast, fast enough for Pidgin earlier known as Gaim(GTK AOL Instant messenger).

Empathy Screenshot

Empathy Screenshot

The new kid off the block is known as Empathy which rides on a new framework providing a real-time communication on Linux desktops.Empathy is another instant messaging program which supports numerous networks and has lots of features.The project was introduced into GNOME with release 2.24 as the desktop’s messaging client. Empathy was built to take advantage of the new Telepathy framework which enables system wide communication not previously possible.Empathy also utilizes libpurple (the same library as Pidgin) and as such inherited support for all of its networks from the onset. Although a young project, it has quickly grown an impressive set of features, including the geolocation of contacts and support for video and audio chat over both XMPP (Jabber) and SIP. The XMPP protocol is used by numerous networks, including Google Mail and is considered a very important feature of the application.

Empathy, which literally translates as ‘in feeling’, is the capability to share and understand another’s emotions and feelings. It is often characterized as the ability to “put oneself into another’s shoes”.

Telepathy framework has three main benefits:

Real-time: Telepathy supports instant messaging (both one-to-one and in groups), voice calls and video calls; it’s less suited for store-and-forward applications like email.

Unified: Many different programs can take advantage of these communications; Telepathy lets these programs work together.

Framework: Telepathy allows the different aspects of communication handling to be divided between different parts of the system, meaning each part is simple.

The GNOME project has adopted Telepathy into the environment so that all applications can have system-wide communication. Just where this technology will take the desktop is not yet clear, but the possibilities are endless. This simple game of Sodoku is a good example of what’s possible with the Telepathy framework.Due to its use of the Telepathy framework, Empathy can tie itself into the desktop far more closely than Pidgin ever could.As free software improves over time and applications come and go, it only stands to reason that what is a common tool today might not be tomorrow. The fact that there is lots of choice is naturally a good thing, after all, competition encourages innovation. It is sad to see Pidgin replaced in GNOME because it has been (and continues to be) a great instant messaging client.

Install empathy

s

The Future of Scalable Databases

Thursday, October 8th, 2009

For most of us database is synonymous to tables, tuples, SQL, RDBMS, or normalization, but is that what databases actually mean or is it beyond just the relational data-model? Relational data-model although the most popular and the most accepted data-model is not apt for all problems. And how far can we go by mapping all our problems on to the relational data-model. After certain table size eventually the database starts slowing down so we move towards replications via multiple configurations which obviously increases the operating expenses. Now when this is not enough we employ some expensive sys-admins to configure sharding for our database for which we require still more resources or pay a fortune worth of money to the “Big Guys” like Oracle and Microsoft to tweak our databases for performance. But is this the future of databases? I guess not. Let us have a look at what other database options which are not based on the RDM and are free from SQL:

  • MongoDB: It is a very high performance open source, schema-free document-oriented database.It provides a JSON like data-store mechanism which can free the software architects from the limitations of the RDBMS. It also supports full indexing including inner objects and arrays, dynamic queries, query profiling, efficient storage of binary data including blob data, replication and fail-over, auto-sharding for extreme loads and we thought MySQL was ultimate for databases?
  • CouchDB: It is a free and open source document-oriented database written in the Erlang programming language which is a functional language. It is well suited for local replications and vertical scaling. It again has a JSON data-store as documents which need not share a schema, but retain query abilities via views. Views are a combination of aggregate functions and filters and are computed in parallel, much like MapReduce. With bindings for many languages this is sure to become one of the most popular databases in the future.
  • Mnesia: It is a distributed database system written in Erlang. The data-store of Mnesia can be considered Relational but isn’t what someone familiar with SQL might expect. A database contains tables. Relationships between them are modeled as other tables. A key feature of Mnesia’s is tables can be reconfigured within a schema and relocated between nodes, not only while the database is still running but even while write operations are still going on which make both the read and write operations extremely fast and fault tolerant.
  • Cassandra: It is an open-source distributed database management system with a five dimensional Key value hash. It was developed by facebook and open sourced in July 2008. It provides a structured key-value store with eventual consistency. The major components of a Cassandra data-model are Columns, SuperColumns, ColumnFamily and KeySpace. It is considered as a Hybrid of the BigTable and Amazon Dynamo Key Value store. It is currently used by facebook, twitter and Digg.
  • HyperTable: It is an open-source database based on Google’s BigTable. It used HDFS (Hadoop Distributed File System) as a storage file system and is distributed.
  • Amazon Dynamo Key-Value Store: It is a proprietary high availability Key-Value data-store which has properties of both Databases and distributed hash tables. It powers parts of Amazon Web services.

So seeing these I am sure Relational Databases are soon to loose their share of importance when concerns like high scalability of databases arise.

Lessons in Twittering

Wednesday, October 7th, 2009

Today micro blogging & Twitter have become synonymous to each other. The service that lets you keep the world abreast of your doing in 140 characters or less. Such is twitter’s popularity that there are several businesses around the service, but Twitter itself has a little idea on how to make money. On the other hand, Facebook is growing rapidly & blogging is still not passe. Twitters, too,are yet to master all the rules of twitting. So here’s a”dos and don’t s” listtwitter logo

  1. Your Twitter account and your blog are private and reflect only your thoughts. But even if you run a disclaimer, your opinions can be reflective of a certain bias. Tread carefully on subjects that involve you or your company
  2. Take care about what your colleagues say. In an attempt to prove loyalty to you or the company, they can do far more harm than good. Have a proper ‘public engagement’ policy for your minions, and one for yourself.
  3. Do not under any circumstances get involved in a ‘flame war’ online. A ‘flame war’ happens when two or more people start arguing online. A long and sustained ‘flame war’ can damage your reputation more than mistimed punch.
  4. Don’t try and be too preachy either, because that would make anyone sound like a complete twit. So what if it is only 140 characters?
  5. You found something funny online and want to share it on Twitter or a blog? Go ahead, but please spend some time checking the antecedents of what you are posting. The Internet is full of sob-stories and hoaxes. Be wary.
  6. Different social networks serve different purposes. LinkedIn is for professional contacts and Facebook is for friends. Twitter is to tell people about what you are thinking or doing. People won’t add you because you know them.
  7. Follow back only if the situation demands,but a moderate ‘following’ list on Twitter also highlights your taste. Only new-bots and people with a highly exaggerated opinion follow virtually no-one.

JavaScript Best Practices

Monday, October 5th, 2009

I always wondered why developers have to get reminded again & again to follow something which common sense should drive. Quite a handful of developers who are about to read this series will also question the fact that this is so very obvious to follow best practices & just a sensible thing to do. However, the ground reality is something different. Getting code handed over to me from other developers  has taught me that common sense is actually quite a rarity in live code, and the “sensible and logical thing to do” gets pushed far down the priority list once you are in the middle of a project, and the deadline is looming. Its something which is spoiling the aesthetics of development.

Thus this decision to create an article which is an accumulation of the best practices & excellent advice gathered over my short but eventful career. I have amassed quite a few rather I have learn it the hard way. There will be lots of things to disagree with & that is the best thing-you should question what you read and thrive to find the better solution. But these practices have transformed me into a much more effective developer & wade me out of troubled waters whenever I felt the pressure to deliver.

This is going to be a series where I will be posting all my experiences while working with Javascript. Keep checking the posts for new articles or subscribe for RSS feeds for  updates.

Working with strings

Concatenating strings has been a major issue which Microsoft has been grappling with its IE browsers(both 6 & 7) because of questions on performance due to garbage collection. As rumors suggested Microsoft has addressed this issue to some extent though not fully in its latest release of Internet Explorer 8. But browsers like chrome & Firefox have a slightly more efficient way of handling things strings.

Consider this example:

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
var annualRevenue = 10000;
var  longStringMessage = 'My name is Janmejay Mohapatra ' +
'I work for Ajatus Software ' +
'Ajatus Software is a web design & development company '+
'Ajatus Software is based in Bhubaneswar ' +
'Ajatus has an annual revenue of '+annualRevenue+
'Ajatus Motto is to work for the masses '+
'And create a better web'

Instead of concatenation, use join:

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
var annualRevenue = 10000;
var  longStringMessage =[ 'My name is Janmejay Mohapatra',
'I work for Ajatus Software',
'Ajatus Software is a web design & development company',
'Ajatus Software is based in Bhubaneswar',
'Ajatus has an annual revenue of ',annualRevenue,
'Ajatus Motto is to work for the masses',
'And create a better web'].join();

Similarly, building up a string across conditional statements and/or loops by using concatenation can be very inefficient.
The wrong way:

?View Code JAVASCRIPT
1
2
3
4
var primeNumbersStr = 'prime numbers less than 100:';
for (var i = 0; i > 100; i++) {
     primeNumbersStr += i + ' = ' + checkPrime(i) + '';
}

The right way:

?View Code JAVASCRIPT
1
2
3
4
5
var strBuilder = ['prime numbers less than 100:'];
for (var i = 0; i > 20; i++) {
     strBuilder.push(i, ' = ', checkPrime(i));
}
var primeNumbersStr = strBuilder.join('');

Firefox Addons for Web Devs

Sunday, October 4th, 2009

Firefox, one of the most popular browsers, can be the best tool for a web developers at work.

The following are some of the most popular and useful Firefox add-ons for a web developer:

  1. FireBug: It is undoubtedly the best Javascript and CSS debugger created till date. The main components of Firebug are the console, the HTML inspection tool, the CSS Manipulation tool, the script debugging tool, the DOM inspector and the Net console. Each of these are extremely useful while creating or testing both static or dynamic web-pages. The console can be used to monitor all sorts of AJAX get or post requests, checking for headers, requests and responses sent or received in these requests, keeping watch on which script makes the AJAX call, etc. The HTML inspection tool can help check the HTML structure of the web page element by element as well as can help manipulate the styling for these elements and see the preview instantly, it also helps in checking out DOM manipulations made by the Javascript. The CSS, script debugging tools can be used to manipulate the script or the styling instantly.

  2. Measure It: As a web developer it is very common that we require certain dimensions of the page we created to be measured on the fly. The only way to do this till now was to take a screenshot and use a photo manipulation software to get the exact dimension of the page. But thanks to Measure It we now can take the measurement of any page or image opened inside Firefox just by clicking and dragging.

  3. Colorzilla: How many times does a web developer wish that he could use a color picker to get the color form the web page into hex. Now because of Colorzilla its possible on Firefox. Just select the color and check out the Hex code of the color in the bottom bar. The only con in this Add-on is that it doesn’t give an option to copy the hex code directly to the clipboard. But still its surely a life saver.

  4. Web developer Tool: The much acclaimed all in one web developer tool for Firefox. It is a mix of everything that a web developer might need to inspect his website. But the sad part is the presence of all options makes it lesser usable and more confusing for a first time user. Anyways some of its important tools are the disabling features which can disable almost anything on a web page i.e. from images to scripts, the Cookies feature which can be really helpful for checking the behavior and values of the cookies on a web page, CSS tool which has similar features to firebug but in a worser UI, the Form tool to manipulate and inspect forms on a web page, images tool used for finding broken, half loaded images, images loaded from different domain and to disable images. There are few more additional features as well but the UI undoubtedly could have been better.

  5. Resize Window: Any web developer knows 1024×768 happens to be one of the most common resolutions on which web sites need to look good but most web devs happen to have higher resolution screens so this add-on can help them to check out their website instantly on any resolution instantly by resizing their window.

So, if you are someone who is just entering the field of web development do not forget to load these add-ons onto your Firefox to turn it into the perfect web developer tool.