Wednesday, February 11, 2015

Arduino for Clueless

Logo of Arduino


As per my previous post, I started researching electronics as a hobby. As I dug deeper, I discovered Arduino, a micro-controller board designed for layperson, hobbyists and artists. A search on YouTube resulted in some amazing projects created by people with no formal background in electronics or computer science.

I went through several tutorials and was very reassured that I could make sense of at least some things that the tutorials dealt with. I decided to give Arduino a try.

The first thing I did was to visit the official website which is an excellent place for everyone from beginner to expert. Since Arduino is an open source project, the website is very friendly. The volume of information about the platform could be overwhelming in the beginning. The best way is to take is slow and concentrate on the basics.

Where to begin?


Like every open source project, Arduino could be as simple or as complex as you wish. Hence, it could be down right scary for beginners who have no idea where to start. As I browsed about the projects and went through tutorials, I developed a plan of action for myself. So far it has worked well for me.

The Action Plan


Step One: Get an Arduino


Almost every website I visited wanted me to buy their special Arduino kit with 25 other components. The cost varied between USD 60 to 200. Add in shipping to Karachi and the cost went up another fifty bucks. I decided to buy from a Pakistani vendor and was pleasantly surprised to see several online stores offering the whole range of Arduino related products. The cost ranged from PKR 1200 to 3500.


I was not sure of anything at this point and thus opted for a second hand Arduino which I bought for PKR 800. The deal included the USB connector cable. I asked the guy for some LEDs and resistors which he threw in for PKR 100.

Going the OLX way is risky. I got lucky and got a board that actually worked. However, it is best to buy a new board once you think you will continue with the hobby.

Step Two: Get Assorted Tools and Stuff


A breadboard is essential during the initial learning process. You could easily prototype circuits without worrying about insecure or loose connections. In addition, it is good to have the following tools and stuff:

Tweezer to handle small components such as resistors. (PKR 40)

A wire stripper to make jumpers. (PKR 400-1600). Get a cheap China brand.

24 AWG wire for connections. Just ask for the wire used in breadboarding and the shopkeeper would understand what you want. (PKR 13-17 per meter)

A portable light is essential to illuminate the work area. Get a small chargeable light from one of the street stalls. Get a small chargeable light from one of the street stalls.

Electrical Components

LEDs in several colors. Get 5mm ones with long legs. Avoid smaller 3mm LED because they are difficult to use with their small legs. Get at least a dozen so that you could play with patterns. (PKR 3-4 per LED)

330ohm resistors are good enough to protect LEDs when using Arduino in breadboarding. (PKR 2-3 per resistor)

As you progress, you might need additional components such as pushbuttons, LDR, IR LED and shields. I recommend buying as the need arises.

Step Three: Get a Good Book


Beginning Arduino, 2nd Edition By Michael McRoberts is a great place to start learning. The book starts slowly and explains everything in detail. The best thing abut Arduino is that you immediately see the fruit of your labor in the form of blinking LEDs.






Thursday, November 20, 2014

Musings on Hobby




For as long as I could remember, my primary hobby has been reading. Over years I have amassed a significant library of books that I borrowed, stole or in extreme cases paid for.

I briefly ventured into PC gaming but found out that it is more of an addiction rather than a hobby. Unlike a book, it is very difficult to leave a level unfinished. Therefore, after some very traumatic months, I decided to leave the world of FPS forever.

I work with words on the day job. More specifically, I write blog post and SEO focused articles. The work allows me to use my creative skills and the pay is almost sufficient. The downside of this job is that I become too exhausted to use a laptop at home. This usually rules out a movie. I stopped watching the idiot box several years ago and do not intend to start filling my mind with the issues of dysfunctional groups of humans

I need a new hobby, some thing that would challenge me and provide a satisfying outcome. 

I decided to build simple electronics project because the whole thing is so removed from my usually schedule tat it would be a breath of fresh air in the very stuffy daily routine that I call life.

I will continue to post updates on how my new hobby is going. Perhaps some aspiring electronics engineer or hobbyist could benefit from my experiences.


Later! 

Friday, August 23, 2013

A heartfelt plea from a Pakistani engineer

It is not very often that I share someone's blog on my site. however, I do follow a lot of Pakistani bloggers and just now i read something very touching. I think Hammad Ansari's plea should be heeded by IK and his PTI.

you can read the whole thing at Hammad Ansari's blog. Also check out his LinkedIn profile.

Tuesday, July 2, 2013

Four gadgets expected to hit the market by December 2013

Four gadgets that were till now considered science fiction could become a fact of life by December 2013. The break neck pace of the development in hi-tech world means that we could be using four of the most anticipated gadgets of recent times

Flexible Displays



LG, the South Korean technology giant has been in the process of developing flexible displays for their next line of products. These displays have been the topic of discussion for many years with pros and cons of the technology thoroughly discussed.

LG has recently announced that they have developed and tested a range of flexible displays that would offer multiple views, a wide viewing angle and best of all, lower power consumption than the traditional LCD and 
LED based displays.

Incidentally, there were rumours of Apple being involved or at least being at the top of the client list. However, both LG and Apple have refused to comment.

Smart Glasses



Smart glasses are the staple of sci-fi shows. They are depicted as augmented reality devices that greatly add to the work and play time of the person using them.

The launch of Google Glass brought these ideas into real life. The project received a lot of attention from all quarters. Fan boys gloated over the features while the opposition highlighted the privacy issues.

While Google Glass might be the star of the show, it is not the only product about to hit the market. Companied like Recon will make smart glasses available at $500. The gadget will include an HD camera, microphone and a host other features

Smart Watches




The phenomenon of Smart Watches is not new. They are already available from various vendors. However, the current models are nothing more than small display screen acting like the extension of the device they are paired with. True smart watches that respond to voice commands and weight less than the current models will be available by the year’s end. The oft rumoured iWatch might also make its appearance some time near December 2013.

Affordable 3D Printers



3D printers that print out solid objects have been on the market. But the price tag is high enough to restrict them to being the novelty playthings for a select few. We will see a sharp decline in the cost of 3D printers by December 2013. It is estimated that the price might actually fall below the $1,000 mark.

Also you could rest assure that 3D printers will not cause the society to break down. All those scary stories about people “printing” guns through 3D printers are really that; stories to deter the spread of the technology.  A gun made entirely out of plastic with blow itself on the first pull of the trigger.

So rest easy and start saving for your favourite gadget. Christmas 2013 is just five month away! 

Monday, June 24, 2013

Gangs of Karachi

Following is the text of a leaked cable from teh US counsalate in Karachi. teh original can be found at:

http://cables.mrkva.eu/cable.php?id=203530

US embassy cable - 09KARACHI138 (original version)

SINDH - THE GANGS OF KARACHI (original version)

Identifier:09KARACHI138
Wikileaks:View 09KARACHI138 at Wikileaks.org
Origin:Consulate Karachi
Created:2009-04-22 11:52:00
Classification:SECRET
Tags:PTER ASEC PGOV PK
Redacted:This cable was redacted by Wikileaks. [Show redacted version] [Compare redacted and unredacted version]
VZCZCXRO6005
OO RUEHLH RUEHPW
DE RUEHKP #0138/01 1121152
ZNY SSSSS ZZH
O 221152Z APR 09
FM AMCONSUL KARACHI
TO RUEHC/SECSTATE WASHDC IMMEDIATE 1042
INFO RUEHIL/AMEMBASSY ISLAMABAD PRIORITY 0499
RUEHBUL/AMEMBASSY KABUL PRIORITY 0271
RUEHLO/AMEMBASSY LONDON PRIORITY 0314
RUEHNE/AMEMBASSY NEW DELHI PRIORITY 1861
RUEHLH/AMCONSUL LAHORE PRIORITY 2720
RUEHPW/AMCONSUL PESHAWAR PRIORITY 4603
RUEAIIA/CIA WASHDC PRIORITY
RHMFISS/JOINT STAFF WASHINGTON DC PRIORITY
RHEHAAA/NSC WASHINGTON DC PRIORITY
RUEKJCS/SECDEF WASHINGTON DC PRIORITY
RUMICEA/USCENTCOM INTEL CEN MACDILL AFB FL PRIORITY
RUEKDIA/DIA WASHINGTON DC PRIORITY
S E C R E T SECTION 01 OF 03 KARACHI 000138 
 
SIPDIS 
 
E.O. 12958: DECL: 04/22/2019 
TAGS: PTER, ASEC, PGOV, PK 
SUBJECT: SINDH - THE GANGS OF KARACHI 
 
Classified By: CLASSIFIED BY CONSUL GENERAL STEPHEN FAKAN FOR REASONS 1 
.4 b and d. 
 
1. (S) Summary: The police in Karachi are only one of several 
armed groups in the city, and they are probably not the most 
numerous or best equipped.  Many neighborhoods are considered 
by the police to be no-go zones in which even the 
intelligence services have a difficult time operating.  Very 
few of the groups are traditional criminal gangs.  Most are 
associated with a political party, a social movement, or 
terrorist activity, and their presence in the volatile ethnic 
mix of the world,s fourth largest city creates enormous 
political and governance challenges. 
 
MQM (Muttahida Quami Movement) 
------------------------------ 
 
2. (S) The MQM is an ethnic political party of the Urdu 
speaking community (known as "Mohajirs," which is Arabic for 
immigrants) that migrated from India at the time of 
partition; Mohajirs make up around fifty percent of the total 
population in Karachi.  MQM is middle-class, avowedly 
secular, and anti-extremist (the only party to publicly 
protest the recent Swat Nizam-e-Adl regulations).  It has a 
long history of clashes with the Pakistan People,s Party 
(PPP), which controls the Sindh province in which Karachi is 
located, and with the Awami National Party (ANP), which 
represents MQM,s rival ethnic Pashtuns. 
 
3. (S) MQM's armed members, known as "Good Friends," are the 
largest non-governmental armed element in the city.  The 
police estimate MQM has ten thousand active armed members and 
as many as twenty-five thousand armed fighters in reserve. 
This is compared to the city's thirty-three thousand police 
officers.  The party operates through its 100 Sector 
Commanders, who take their orders directly from the party 
leader, Altaf Hussain, who lives in exile in the United 
Kingdom.  The Sector Commanders plan and monitor the 
activities of the armed elements.  MQM's detractors claim 
these armed men are involved in extortion, assassination of 
political rivals, shootings at campaign rallies, and the 
murder of people from other ethnic communities. 
 
4. (S) Low to middle-ranked police officials acknowledge the 
extortion and the likely veracity of the other charges.  A 
senior police officer said, in the past eight years alone, 
MQM was issued over a million arms licenses, mostly for 
handguns.  Post has observed MQM security personnel carrying 
numerous shoulder-fired weapons, ranging from new European 
AKMs to crude AK copies, probably produced in local shops. 
MQM controls the following neighborhoods in Karachi: 
Gulberg, Gulshan-e-Iqbal, Korangi, Landhi, Liaquatabad, 
Malir, Nazimabad, New Karachi, North Nazimabad, Orangi Town, 
Saddar and Shah Faisal. 
 
MQM-H (Muhajir Quami Movement-Haqiqi) 
------------------------------------- 
 
5. (S) MQM-H is a small ethnic political party that broke 
away from the MQM in the mid-1980s.  MQM-H has its 
strongholds in the Landhi, Korangi and Lines Area 
neighborhoods of the city.  The MQM regarded these areas as 
no-go zones when it was in power during the Musharraf 
presidency.  As a condition for joining the Sindh government 
in 2003, it asked that MQM-H be eliminated.  The local police 
and Rangers were used to crack down on MQM-H, and its leaders 
were put behind bars.  The rank and file of MQM-H found 
refuge in a local religious/political party, Sunni Tehrik 
(see para 9).  The local police believe MQM-H still maintains 
its armed groups in the areas of Landhi and Korangi, and that 
the party will re-organize itself once its leadership is 
released from jail. 
 
ANP (Awami National Party - Peoples National Party) 
--------------------------------------------- ------ 
 
6. (S) The ANP represents the ethnic Pashtuns in Karachi. 
The local Pashtuns do possess personal weapons, following the 
tribal traditions of the North West Frontier Province (NWFP), 
and there are indications they have begun to organize formal 
armed groups.  With the onset of combat operations in the 
 
KARACHI 00000138  002 OF 003 
 
 
Federally Administered Tribal Areas in August 2008, a growing 
number of Pashtuns fled south to swell the Pashtun ranks of 
what already is the largest Pashtun city in the world.  This 
has increased tensions between ANP and MQM. 
 
7. (S) If rhetoric of the police and the ANP leadership is to 
be believed, these armed elements may be preparing to 
challenge MQM control of Karachi.  In March, the Karachi 
Police Special Branch submitted a report to the Inspector 
General of Police in which it mentioned the presence of 
"hard-line" Pashtuns in the Sohrab Goth neighborhood.  Sohrab 
Goth is located in the Northeast of the city. 
 
8. (S) The report said this neighborhood was becoming a no-go 
area for the police.  The report went on to claim the 
Pashtuns are involved in drug trafficking and gun running and 
if police wanted to move in the area they had to do so in 
civilian clothing.  A senior member of the Intelligence 
Bureau in Karachi recently opined that the ANP would not move 
against MQM until the next elections, but the police report 
ANP gunmen are already fighting MQM gunmen over 
protection-racket turf. 
 
ST (Sunni Tehrik - Sunni Movement) 
---------------------------------- 
 
9. (S) ST is a small religious/political group with a 
presence in small pockets of Karachi.  The group has only 
managed to win a handful of council seats in local elections 
but militarily it is disproportionably powerful because of 
the influx of MQM-H gunmen after the government crack-down on 
MQM-H (see above).  ST has organized the party and its gunmen 
along the lines of MQM by dividing its areas of influence 
into sectors and units, with sector and unit commanders.  ST 
and MQM have allegedly been killing each other's leadership 
since the April 2006 Nishtar Park bombing that killed most of 
ST's leadership.  ST blames MQM for the attack.  There 
appears to have been a reduction in these targeted killings 
since 2008. 
 
PPP (Pakistan People's Party) 
----------------------------- 
 
10. (S) PPP is a political party led by, and centered on the 
Bhutto family.  The party enjoys significant support in 
Karachi, especially among the Sindhi and Baloch populations. 
Traditionally, the party has not run an armed wing, but the 
workers of the PPP do possess weapons, both licensed and 
unlicensed.  With PPP in control of the provincial government 
and having an influential member in place as the Home 
Minister, a large number of weapons permits are currently 
being issued to PPP workers.  A police official recently told 
Post that he believes, given the volume of weapons permits 
being issued to PPP members, the party will soon be as 
well-armed as MQM. 
 
Gangs in Lyari: Arshad Pappoo (AP) and Rahman Dakait (RD) 
--------------------------------------------- ------------ 
 
11. (S) AP and RD are two traditional criminal gangs that 
have been fighting each other since the turn of the century 
in the Lyari district of Karachi.  Both gangs gave their 
political support to PPP in the parliamentary elections.  The 
gangs got their start with drug trafficking in Lyari and 
later included the more serious crimes of kidnapping and 
robbery in other parts of Karachi.  (Comment:  Kidnapping is 
such a problem in the city that the Home Secretary once asked 
Post for small tracking devices that could be planted under 
the skin of upper-class citizens and a satellite to track the 
devices if they were kidnapped.  End comment.) 
 
12. (S) Each group has only about 200 hard-core armed 
fighters but, according to police, various people in Lyari 
have around 6,000 handguns, which are duly authorized through 
valid weapons permits.  In addition, the gangs are in 
possession of a large number of unlicensed AK-47 rifles, 
Rocket Propelled Grenade launchers and hand grenades.  The 
weapons are carried openly and used against each other as 
well as any police or Rangers who enter the area during 
security operations.  During police incursions, the gang 
members maintain the tactical advantage by using the narrow 
 
KARACHI 00000138  003 OF 003 
 
 
streets and interconnected houses.  There are some parts of 
Lyari that are inaccessible to law enforcement agencies. 
 
Pashtun Terrorists 
------------------ 
 
13. (S) A Senior IB officer recently opined to Post that "All 
Pashtuns in Karachi are not Taliban, but all Taliban are 
Pashtuns."  The size, scope and nature of "Talibanization" 
and true Taliban terrorist activity in Karachi is difficult 
to pin down, but Post has increasingly received anecdotes 
about women, even in more upscale neighborhoods, being 
accosted by bearded strangers and told to wear headscarves in 
public. 
 
14. (S) There has not been a terrorist attack against U.S. 
interests in Karachi since 2006.  There are several theories 
about Taliban activity in Karachi and why they have not 
staged an attack in so long.  One school of thought has it 
that MQM is too powerful and will not allow the Pashtuns to 
operate in Karachi, and this, combined with the ease of 
operating elsewhere in Pakistan, makes Karachi an undesirable 
venue.  Another line of thinking claims Karachi is too 
valuable as a hiding place and place to raise money. 
 
15. (S) In April, the police in Karachi arrested Badshah Din 
Mahsud, from their Most Wanted Terrorist list, known as the 
Red Book.  It is alleged he was robbing banks in Karachi at 
the behest of Baitullah Mehsud, from the NWFP, and the money 
was being used to finance terrorist activity.  There is a 
large body of threat reporting which would seem to indicate 
the equipment and personnel for carrying out attacks are 
currently in place in Karachi.  In April, Karachi CID told 
Post they had arrested five men from NWFP who were building 
VBIEDs and planed to use them in attacks against Pakistani 
government buildings; including the CID office located behind 
the US Consulate.  CID also claimed they had reliable 
information that suicide vests had been brought to Karachi. 
 
16. (S) Comment:  The importance of maintaining stability in 
Karachi cannot be over-emphasized.  Traditionally, Karachi 
was at the center of lawlessness, criminal activity, and 
politically-inspired violence in Pakistan.  But with the 
security situation in the rest of the country deteriorating, 
the megalopolis has become something of an island of 
stability.  Nevertheless, it still has a number of well-armed 
political and religious factions and the potential to explode 
into violent ethnic and religious conflict given the wrong 
circumstances. 
 
17. (S) The PPP,s decision to include MQM in coalition 
governments in Sindh Province and in the federal government 
has helped preclude a return to the PPP-MQM violence of the 
1990,s.  But the potential for MQM-ANP conflict is growing 
as Pashtuns challenge Mohajir political dominance and vie for 
control of key economic interests, such as the lucrative 
trucking industry.  Any sign that political violence is 
returning to Karachi, especially if it is related to the 
growing strength of conservative Pashtun "Taliban," will send 
extremely negative shockwaves through the society and likely 
accelerate the flight from Pakistan of the business and 
intellectual elite of the society.  End comment. 
FAKAN 

Wednesday, May 29, 2013

A New take on Agile Programing

According to a definition, Agile software development is a group of software development methods based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development and delivery, a time-boxed iterative approach, and encourages rapid and flexible response to change. It is a conceptual framework that promotes foreseen interactions throughout the development cycle. The Agile Manifesto introduced the term in 2001.


However in real world, This is how management thinks of Agile software development:


Sunday, May 26, 2013

Reasons Why Visitors or Users Never Come Back to Your Website



It is a given fact that attractive designing and top notch development are two important factors that help you drive more business revenues and customers from your website. But, for many corporate and ecommerce websites management it appears that their online presence doesn’t really help in engaging visitors or turn users into customers.

It is very critical that the reasons why visitors or users never come back again to the website or leave the website after the first 10 second stay. Do you wish to know which are the possible reasons or things within your website design that cause the crisis that many webmasters are too intimately familiar with.

Unwanted pop-ups Ads
Pop-ups for ads or other stuff that appear the moment the website loads really turn off the visitors. Additionally, some sites feature music or worse, a podcast that starts playing automatically without the users ‘permission. While you view these popups or podcast screening an essential part of your website design and promotion strategy, your users generally do not put with this nonsense.

Dead links
The worst thing that could happen to a user’s experience on your website is a 404- Page Not Found error. It is impossible to maintain or even sustain traffic in such scenarios. Make sure your website doesn't have any dead links or missing files. This is especially true for eCommerce websites. Users usually click on a landing page that comes up in search results. A missing or dead link is a sure guarantee that that user (and his friends) is not coming back.

Not so clear navigation
Another big anonymous that mars the user’s experience is the when the user can’t find the information they are looking for on the website. Create an unbroken navigation for your website and then have a UI expert evaluate the design.

Force users to download something to read the content
Many websites often force users to download the document or software. This is considered as the ‘price’ of reading the content of the website! While the practice is dwindling, there are some sites that continue this practice. In this age of lack of trust, does any webmaster seriously think that a user would actually download anything from an untrusted source? This is one of the fastest ways of losing credibility, and hence traffic and revenues.

Mandatory registration really drives them crazy
Forcing the user to register is a surefire way of diverting traffic to your competitors. This gimmick has been so abused by the spammers looking to harvest email addresses that a user would rather do another Google search then to fill a form. Make sure that the information is there on the landing page so that the user could get what they come for. 

Friday, May 24, 2013

How to negotiate with Taliban

There are as many views on talking and negotiating with Taliban as there are political factions and "security experts". However, in all the hubhubm one important source of advice has been completely overlooked.

Check out the best way of negotiating with the Taliban.....

Step 1


Step 2


The Benefits


Dealing with the mess




 

Monday, April 29, 2013

The Art of Conversation



The dying art of conversation is a sad fact of modern society. 

Many people say that it is already dead, buried by email, texting and instant messaging. Social media is the final nail in the coffin of the art of conversation. Now we talk just to exchange information rather than for the pure pleasure of a meaningful spar between two people. 

It all started with the arrival of the email. What was envisioned as a business tool was soon turned into a medium of personal messages. The email took the place of a phone call and replaced this last mean of human contact. However, email did not receive mainstream acceptance and social gatherings like dinners and cocktail parties kept the art of conversation alive.

The arrival of cell phone was the final straw. This device is the main reason why a whole generation does not converse. They chat, message, email or send out instant messages, but never converse with each other.

Having a good conversation is not difficult. The rules have not changed much since the days of Greek who first introduced the world to the delightful art of conversation. Every educated person in ancient Greece was expected to hold their own in a conversation and great matters were settled during casual conversations.

The Victorian era was the heyday of the art. Everyone in the society from the lowly servants to the heist aristocrats was an expert in the art and a good conversation was the common way of spending a pleasant evening.

Modern technology has made every person an isolated island, which exchange snippets of information with similar islands. This situation is usually mistaken for a conversation. The art of conversation, although dying, is not completely lost. The habit of conversation requires careful nurturing to elevate it to the status of an art.