Monday, November 4, 2013

Data Structures: AVL trees

We know that data structure in computer science refers to the way in which we organize and store data such that it can be used in an efficient manner. You must have heard of stacks, queues, linked lists, trees to organize data. All these are examples of data structures that have advantages and handles the basic operations insert, delete and search at varying degrees of complexity. Tree is an abstract data structure. Many kinds of tree data structures exist. To name a few, we have binary search trees(BST), red black trees, B trees, B+ trees, AVL trees and so on.

What are AVL trees?
Also known as self-balancing binary search trees, these were the first data structure of this kind to be invented. BST is the simplest tree data structure; however, some data sets can make the tree unbalanced which increases the complexity of basic operations. A balanced tree is one in which difference between the height of left sub-tree and right sub-tree is not greater than one.

AVL trees follow the same rules that apply to the binary search tree, hence it is simple too. However, AVL trees require some additional operations that keep them balanced and these operations are called tree rotations. The acceptable height difference between the left and the right sub-tree at any point in the AVL tree should be -1, 0 or 1. Hence, after every Insertion and deletion operation on these trees we need to handle these rotation operations to keep the tree balanced. Refer to this if you want to learn how insertion, deletion and searching work. The image shows how insertion can be performed.

Why people prefer these trees?
The time complexity of the AVL tree for insertion, deletion and search is O(logn) which makes this one of the most efficient trees for retrieving stored data.

References:

Sunday, October 27, 2013

Hacking: Who are hackers?

When we hear the word ‘hacker’, what is the first thing that comes to our mind? They are bad people! We think that hackers are the ones who attack computers and steal information and so on. To some extent it is true, there are such people. But they make a very small portion of all the hackers. There are hackers with good intentions called ethical hackers. They find out issues with the software and let the software owner know the problem before an unethical hacker exploits it.

Hackers are the ones who look at computers very differently than the rest of others. It is their thinking ability and vision that leads to real invention. In fact, companies like Google, Microsoft and Facebook gives bounties in tens of thousands of dollars for ethical hackers who find critical vulnerabilities.

Many security and network protocols maintain open standards, so that researchers and other ethical hackers can find out any problems with the protocol. The prime example here can be public key encryption protocol. This protocol is security critical and is used to to protect our banking, business and e-commerce data. The underlying algorithm is public, but is still hard to crack as it requires immense computational power. Till date, people have not found any backdoor to this security protocol and millions are being spent to make sure none such exist, or if they exist the good guys find them first.

Well, there are malicious hackers too. For example, the computer virus CryptoLocker, recently in news which encrypts all the data in the computer and will give you the decryption key only if you pay some money.

In reality, most hackers want to learn the complexity of the computer world and solve real complex problems. Hope such hackers gain numbers.

Sources:
http://www.forbes.com/sites/jameslyne/2013/10/22/computer-virus-spreading-that-means-you-never-get-to-see-your-files-again/

Sunday, October 13, 2013

Open Source: Vim

We are extremely familiar with the popular Windows editor, Notepad. Similarly, Vi is a popular choice as an editor in Linux/Unix world. Vi is a basic text editor with powerful and non-fancy features. "Vim" is an acronym for "Vi IMproved". Vim has yet more features than Vi, including mouse support, graphical versions, visual mode, many new editing commands. Vim has become one of the most commonly used text editors by programmers; I am one of them too! It was written by Bram Moolenaar and was made publicly available in 1991. Vim is free and open source software.

There is a built-in tutorial for beginners in Vim, which can be accessed by vimtutor command. A user manual too is available and it has the help feature that will walk us through the commands.  Vim basically has two modes edit mode and command mode. Vim has a vast array of commands and features.
Anyone can customize Vim, right from user interface and macros to user defined functions. Any functionality can be added or extended using vimscript, Vim‘s internal scripting language. It also supports other scripting languages like Perl, Python, Ruby, Lua, Tcl and Racket.

Vim has definitely improved a lot over Vi. Vim is compatible with Vi, however it is not 100%. Few enhancements of Vim include auto-completion, comparison between files and revision control of files, Yes! I have tried these file operations. It has a rich plugin support. Various compression formats like gzip, bzip2, zip and tar format are supported. It also supports remote editing over network protocols like HTTP and SSH, session state preservation, split (horizontal and vertical) and tabbed window support. It provides multi-language support (Unicode), visual mode and many more.

Lastly, few of the platforms that Vim is supported on include UNIX, Linux, BSD, Mac OS, IBM OS-2, Microsoft Windows versions, etc. One thing you should really appreciate about Vim is that, apart from providing rich and powerful features it also encourages users to consider donating to children in Uganda, as it is released under the charityware clause.

Source:

Sunday, October 6, 2013

Agile: Various Methodologies for Software Development

There are various agile methodologies for software development. Most of them share the same philosophy, characteristics and practices. But, each one is different from an implementation point of view. Here are few claims of the main methodology which I find interesting.

Scrum - Here, Product Owner works closely with the team to figure out and slice the system functionality that forms the “Product Backlog”. Features, bug fixes, non-functional requirements and so on dwell in the Product Backlog. Each slice is a customer deliverable. Slices are prioritized as “potentially shippable increments” of software. Cross-functional teams estimate and sign-up to deliver a slice, which can be divided into tasks, in each sprint. The sprint length can be defined by the team. So, next sprint will have the next set of prioritized tasks and hence, it will continue.

Feature Driven Development - FDD is again a model-driven, short-iteration process. The features are small and useful. It follows eight practices for the feature delivery. Unlike other agile methodologies, FDD has short specific phases of work for each feature which include Domain Walkthrough, Design, Design review, Code, Code review and Promote to Build.

These were few processes of the main methodology, but, there are many more like Lean and Kanban, Extreme Programming, Crystal, and Dynamic Systems Development Method and so on. Usually, any team does not follow strict rules of agile development; there is always some amount of flexibility induced. This will help the team to perform effectively and have the deliverable ready even before the customer can know it.

Sources:

Friday, September 20, 2013

LinkedIn and Branding: Market yourself

Well, we all know about LinkedIn. Don’t we? That is the reason we sit and update it so carefully, when we start looking for jobs. Is that the only time we should be updating it? Why not do it on regular basis like we update our status on Facebook or Twitter? It is obvious that you do not need to update it so frequently. But yes, you always need to refurbish your profile regularly, as your profile is the one that speaks for you. Will updating my profile really help? Yes, it sure will, but the results are more profound when you advertise yourself in a creative and innovative manner.

Diving deeper, how does LinkedIn help in marketing yourself? It is not just an online resume. It is the place where all the corporate recruiters can see your accomplishments. It is basically a marketing campaign in which you are the product. Your profile is your portfolio.

What if I don’t have a portfolio? It is never too late to create it. A power point presentation including all your accomplishments is a starter. Get ideas! What is internet for? Ask experienced people. You need to create a respectable brand for yourself.

How to create your own brand? Well, it is simple, showcase everything you have got. Include the type of challenges you faced, the way you approached and solved it. Add the link to your articles or research papers if you have written any or the presentations you have given. LinkedIn creates an impression on a person looking at your profile – Make sure it is the best!

What boosts your brand? Recommendation letters from the right people is a big YES. Recommenders are the people who have actually worked with you closely and have gauged your potential. If they write a few good words about you and your strengths, that can add a lot of value. There is also a section in which people can endorse you for specific skills. Make sure your strengths have good endorsement.

Resume is not the only way to show your achievements. You can do a lot more using LinkedIn. It has become a great source for employers seeking talented candidates. Make sure you have a profile that stands out!

Sources:

Friday, September 13, 2013

QR codes: Past, Present and Future.


What is a QR code?

This is a first question that comes to anyone’s mind who has never heard of it. QR code, Is that a type of barcode? What is the difference between a barcode and a QR code?

QR code is quick response code. Standard barcodes keep track of inventory. A QR code on the other hand is used for technological purposes, basically to get more information about the product. Unlike barcodes which represent numerical data, QR codes can represent numeric, alphanumeric, byte/binary, Kanji symbols and many more. These are used extensively for marketing and advertisement. There is no data a QR code cannot store. These codes can be scanned easily by using scanner apps available on Smartphones. Whenever a code is scanned, a URL or phone number appears immediately. Though the standard looks of QR codes are black and white, customized codes are becoming more popular these days.

Past:
QR codes are new in the field of technology. This code system was invented in 1994 by Toyota’s subsidiary Denso Wave. They used these codes to track the vehicle parts during manufacture. Initially, they were widely used in Japan but now, they have gained enough popularity in other countries.

Present:
Due to their ability to store huge capacities of data in different forms and speed they have flourished beyond the automobile industries. In recent times, Smartphones have scanners that scan the code and the information linked to it appears on the phones instantly.

Future:
QR codes are being used frequently in society, but in few years they will be used everywhere as a way to provide more information to consumers. It is estimated that large population would have learnt about QR codes and make use of them to gain needed information. Eventually, this will lead to rise of smartphones and technical sales and economy. People believe that the use of QR codes will push the technological limits far beyond the extremely technical world we live in today.

We discussed about the past, present and future and understood the importance of using QR codes. But, a system cannot be perfect. SECURITY is always a major issue. How can security be an issue with QR codes? We have seen that QR codes can be used everywhere. Let us say you see an advertisement of a new restaurant with its QR code that will take you to their website once you scan the code. An attacker can easily paste different sticker on top of the poster. When you scan the code, it will directly take you to the attacker’s website and might download malicious files without you even realizing it. Consequences of security breach can be really bad. So, what can you do to be safe? One simple solution would be to make sure your QR code reader has the ability to show you where it is taking you. Also, it gives you the flexibility to choose if you want to visit the site or not. There are many more code readers which address different security issues. Get the one that is most secure yet serves the purpose.

Sources:

Friday, September 6, 2013

Social Media in Business: Brand and Security

Business these days heavily depend on information flow. Employees are more productive when they can make better decisions and save time. This is possible when they have the much needed feedback about their product. Social network has recreated the bond between companies, employees, customers and suppliers, shortening the process from months to few hours. Social media is often best used by companies to fortify their brands, gain loyalty of their customers and to potentially augment their market share. 

How to attain social media success in your business?
Walmart’s director gives five steps that your business should follow:
  1. Determine your value: Brands need to think about social media as a way to deliver value rather than as a tool. Rather than using social media for mere product gains, Walmart communicated about its sustainability efforts, hence delivering value, through its twitter accounts @WalmartGreen, @WalmartHealthy, @WalmartGiving and @WalmartAction, among others.
  2. Audience comes first. Know them well: Use marketing tools to understand people better, profile them and see what interests them, how committed and active are they with those interests. 
  3. Deliver good content: We share content that we think people like and we find out whether or not they actually like it. Initially for few months, we launch community-based Twitter to advertise the product. Once we get valuable feedback we get to know if we are delivering good content. The popularity of the product among people itself will get us a larger audience rather than more promotion.
  4. Find clever metrics: It is easy for marketing department to evaluate the success of a social media campaign. But you need to get creative here. They have to track more positive metrics such as how often a post is retweeted or made favorite.
  5. Use your data well: We use the data collected to know our customers better. This will help in building a meaningful relationship with the customers.

There are many models that suit different businesses. Choose the one that best suits you wisely and follow it but be ready to be innovative because change is constant.


Social media generates many opportunities along with which it also gives rise to many challenges, the most likely being data security, privacy concerns and brand and reputation damage. So what could be the anticipated risks with these challenges?  Security and privacy concerns could be: Identity theft, data retention, technical exploits like malware, viruses/worms, etc which leads to brand damage. How exactly a brand damage happens? This could be when you post hostile remarks or any classified information on a public site, calumniation, and violation of the rights secured by the copyright. 

What about brand promotion?
Making consumers aware is the best way to promote your brand.  New social networking sites are coming up every other day. Learn about the best ones to keep your consumer informed. You can promote your brand by being more effective. How exactly can that be done? One way is by interacting more with customers. Facebook is a social media to interact with customers. Like and comment on others pages. The more you do it, the more they will comment on yours. Reciprocation is the real secret to building social network which in turn helps you in promoting your brand.  Facebook is one media. You could tweet about your products; use visual appeal via instagram and many more. Find the right media to do it. But be aware of the information shared on your pages. Make sure it does not hurt your brand. So try to incorporate privacy concerns.

So, how to handle these privacy concerns?
One possibility is to use closed social networks. This will inspire employees to work more openly; they support the need for privacy. Private messages could be targeted to specific audience and private groups can be created for defensive, on-going conversations. In this way, social network is open, with an option to have a private conversation as needed.  

Sources:
http://www.entrepreneur.com/article/226753
http://www.ey.com/Publication/vwLUAssets/Protecting_and_strengthening_your_brand_Social_media_governance_and_strategy/$FILE/Insights_on_IT_risk_Social_media.pdf
http://www.isaca.org/chapters2/kampala/newsandannouncements/Documents/Social_media_UTAMU_2.pdf
http://www.cio.com/article/735777/5_Secrets_to_Corporate_Social_Media_Success?page=2&taxonomyId=3004
http://sparkandhustle.com/takeaway-tips/using-social-media-to-promote-your-brand-grow-your-network-generate-revenue/
http://www.wisegeek.com/what-is-brand-promotion.htm 
http://blog.bufferapp.com/10-surprising-social-media-statistics-that-will-make-you-rethink-your-strategy