GAURAV KUMAR

Thursday, October 1, 2020

Basics of capitalism in less than 2 minutes


what is it  ?

It's an economic system where someone owns(privately) the raw materials and tools for production of goods and services and their operations for profit. Its primary goal is to generate profit and use it to invest back to generate more profits. 

what's good about it ?

Incentives - Providing better goods and services will result into more profit. 

Innovation - It's based on the idea of level playing field which simply means everyone has a fair and equal chance of succeeding. This brings competition which brings innovation because without it you won't be able to provide better/cheaper products.

What is NOT capitalism

People at all times have tried to amass capital(land, resources, money), that's not capitalism.

Contrary to what some people believe, It does not only create either winners or losers. First of all, it creates more winners in the system. second, everyone might have a fixed portion of the pie but the size of the pie is increasing. In other words, it's not a zero sum game, it's a positive sum game.

why someone opposes it ? where it fails ?

When capitalists becomes extremely successful and create monopoly, they might have influence over government because they control significant chunk of economy. This gives birth to the possibility of killing the competition via unfair means e.g. the competition does not get the tax benefits or the contracts even after being more innovative. Monopoly also affects innovation due to lack of competition, which further affects pricing which further affects affordability of common man in the society.

When capitalists become so consumed in short term profits that they ignore the things that are negatively impacting the society in the long term e.g. pollution, climate change etc.  

Children of capitalists inherit huge amount of wealth and ownership sometimes without deserving it, they do not have the incentive to work hard as they already have enough wealth which impacts meritocracy.


In the end, I want to leave you with some food for thought. Try to think which one would you choose, given you have a choice.

1. Government owns the oil, gas and the big businesses and collects direct profit instead of taxes on the  profit, uses this money to make societies better through various government programs.

Vs

2. Individual citizen owns the business and controls how to spend the profit( You may choose to invest in making society better if you like, it's a freedom you get being a capitalist)

Leave a comment if you like. Thanks for reading it. 

Friday, August 28, 2020

Notes : The hard thing about hard things

  • Darwin project - all the employees coming together working 12 hours a day for 6 months. It sounds so intense and makes me remember the marathon(42 days of non stop work with almost impossible targets to achieve) we used to do in our office of GreyOrange. 
  • Ask your employees - what are we not doing that we should be doing
  • People, Product and Profit - in that order
  • Make the company a good place to work, In worse times(and every company goes through it) people stick to a company mostly because it's a good place to work.
  • Top 2 reasons why employees quit - 1) They hate their manager 2) There is no learning for them anymore
  • No startup has so much time to do optional training for employee. Make it mandatory if your goal is to train people in something important
  • Interviewing high level executive in a small startup - think really hard and know what you really want from this position
  • Sometimes an organization does not need a solution, it needs clarity
  • Minimize politics. If the conflict between 2 people is behavioral, then bring the complaining person and targeted person in the same room to discuss, it increases transparency. If the conflict between 2 people is competency related, fire the less competent if necessary 
  • Organization design - It should be for the people. Change from monolithic design as it scales.
  • Most difficult skill as a CEO is to keep your own psychology in check.
  • Focus on where you are going than what you have to avoid.
  • Peacetime CEO vs Wartime CEO - Peacetime CEO knows that proper protocol leads to winning. Wartime CEO violates protocol in order to win.

Friday, February 13, 2015

Software Culture

Hi all,
Lately I have been thinking a lot about it. A lot of poeple in my company are talking about how should we define company culture and why we need to define a culture essentially. Altough I paid attention to what was being said but a thought triggered in my mind that if company culture is so important and software team is a big of part of the company, shouldn't we also talk about software culture. What I have observed so far is mostly people follow what's being followed in the system for long. Now, if no one sets it right in the beginning, then very soon you have so many employees following the same trend and it will be disaster.

A very simple example, let's say if people don't have the habit of testing the whole code with all the test cases before pushing it to production, then it might not be big deal now. It works until it doesn't and then one day it destroys what you have been building so far. A real example, Knight capital lost 440 million dollars because a bad code was pushed to production. The company was near bankruptcy.

Learning from other's mistakes, we can take a few things in our accounts. Writing cleaner codes, writing test cases of each feature no matter how small it is, continous backup are a few things that often people miss and it comes from practice. Automating small repetitive tasks is another thing that reduces operation time and free up the engineer to work more on actual product. Using git flow is another good practice.

Making a flow diagram before starting to write code has significant effects on code quality and code iterations.

If a feature is requested from business side, tell the developer why that decision was made. It helps them understand it from business side and there is possibility that they can give some input which will be useful for both business and software.

At last, Respect your engineers. If they want a little more time, give them.

Sunday, February 16, 2014

People and Startups

Hi,
I have been wanting to write about startups for a very long time. Since I am working in one for almost 2 years, I have seen multiple phases of a startup. I read stories about so many startups in hacker news and it amazes me how an idea develops into a product/service and how an initial product/prototype matures into a deliverable product. How people manange the money to get as much as they can. How they push the limits and work all night to add a feature and still look fresh in the morning for the demo to invenstors/clients. It's exciting to do all this. it's an art to do all this and survive till next runway.

The thing that comes to my mind is how do they start. Whenever I do background check on any founder/co-founder, I see they have created something earlier too or have been interested in doing such things for a long time. Basically people prepare themselves to get into startup business. My question is 'what about those who are new in this'. Those who don't have much background in running a business or technology for a long time. Those who are very interested in doing/creating new stuff becuase they have been in such system for a short time. Should they wait a little more to know if their passion is real or jump into this directly. As far as I have seen success rate of startups are increasing and people are taking it seriously. It can be risky but at the same time you can miss something life changing if you don't go for it.

I would like to share some of the things I have experienced so far working in a startup. You have better control over your life. The sense that you own something gives you more satisfaction than money. It may be the product you built or the company you own. You get to build new things which you are passionate about. It leads to a better life when you create something. People will always be there to assess you. To tell you what you are building might not be very useful. To tell you it's not a good product-market fit. To tell you that your revenue model is not sustainable. But I think you should build something first and then worry about those things. If you succeed you will prove them wrong. If you fail, you will have expereince for lifetime. So, I say go for it.

Friday, July 26, 2013

Communicate with an unknown usb serial device in linux

Hi all,
Recently I was trying to work with a 2D barcode scanner which was told to work as serial data device. When I inserted it in my linux system, there was nothing like a serial port or something in my "/dev" list. When I searched with the model number, I found nothing relevant to make it work. Usually it is suspected that the driver is not present in the system. I was really frustrated at that time since there was no lead and it had to be done soon. The material came with no driver. When I saw the syslog, it showed some path related to the device inserted. There I found information about the manufacturer and googled it which led me to a website where I found windows7 driver of this device. It felt like I was halfway there. I quickly downloaded the driver, installed and run it. And yes, I was able to view serial data after scanning 2D barcodes. But this wasn't it. It had to work on a linux system too.

As I tried to know more about the problem, I learned that there is a way. Writing a udev rule to control the usb device sounded like a cool thing to do. But the thing is, I had never written a udev rule and I was anxious to make the device work. So I kept searching around a bit and found something that said an unknown usb serial device can be recognized by the system if we load the kernel device driver with the product id and vendor id of the device. Finding product id and vendor id was easy. It is printed by "lsusb" command. So I gave it a try.

modprobe usbserial vendor=0x1eab product=0x0d02

I saw "dmesg" and there it was. the device was recognized as a serial device and found as /dev/ttyUSB0 .

Lesson: An unknown serial usb device doesn't need any extra driver but the usual usbserial driver can be used to register it in the linux kernel.

Saturday, February 16, 2013

multicast in lwip using LM3S6965 micro-controller


Hi all,

recently I was working on sending multicast packets to multiple LM3S6965 micro-controllers. I was using lwip library and my experience with lwip is not much.
So, naturally I googled for some examples to get the start. But unfortunately I could not find any complete working example. So, I did a bit of trial and error.
After struggling a while, I was able to send and receive multicast packets. So, I thought I would write a working example for this. I did this using raw sockets and without RTOS.

A few things to do first:-
1. enable igmp in lwipopts.h file by adding this line :-
#define LWIP_IGMP 1
2. enable udp options and disable NETCONN and SOCKET options from lwipopts.h file
#define LWIP_UDP 1
#define LWIP_NETCONN 0
#define LWIP_SOCKET 0

3.if you are using DHCP options then set netif flags in dhcp.c file.
Replace line: netif->flags |= NETIF_FLAG_DHCP;
With line: netif->flags = NETIF_FLAG_DHCP | NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP | NETIF_FLAG_IGMP;

Now you are all set. Write the code to start receiving and send a sample packet.


void UDP_Multicast_init(void)
{
struct ip_addr ipgroup,test_ip;
struct udp_pcb *g_udppcb;
char msg[] = "gaurav";
struct pbuf* p;
p = pbuf_alloc(PBUF_TRANSPORT,sizeof(msg),PBUF_RAM);
memcpy (p->payload, msg, sizeof(msg));

IP4_ADDR(&ipgroup, 238, 0, 0, 3 ); //MultiCasting Ipaddress.
#if LWIP_IGMP
iret = igmp_joingroup(IP_ADDR_ANY,(struct ip_addr *)(&ipgroup));
UARTprintf("ret of igmp_joingroup: %d \n\r",iret);
#endif
g_udppcb =( struct udp_pcb*) udp_new();
udp_bind(g_udppcb, IP_ADDR_ANY, LOCAL_PORT); //to receive multicast
udp_recv(g_udppcb, NET_UDP_rec,NULL);// (void *)0); //NET_UDP_rec is the callback function that will be called every time you receive multicast
udp_sendto(g_udppcb,p,&ipgroup,LOCAL_PORT); //send a multicast packet
}

Note that you don't need udp_connect to send or receive multicast.

It worked for me. I use lwip 1.3.2

Sunday, April 24, 2011

Rename multiple files with bash script

Hi there,
Recently I came up with a problem related to filename of downloaded files.In my college I use DC(Direct Connect) client to download files from other peers.Recently I downloaded a large number of music videos which remained in temporary directory and did not move to music directory.Although It downloaded completely, It remained in temporary directory and hence name of files was in the format "filename.(avi/mpg/flv etc.).(some chars).dctmp". So I had to rename them.Definitely, I couldn't do it manually as there were more than 1000 files.Hence I tried to write a bash script for renaming all of them at once.
Initially I tried to store the filename as "*.*.dctmp" in which I would trim the "*.dctmp" part.Hence the remaining part would the desired filename(with proper externsion).But storing the filename like that did not work out.
Then I saw that in temp files, there is a common pattern that before "dctmp" extension, there are exactly 39 chars. Then I tried a different method of trimming filename which is explained below with code.


code :

for i in *.dctmp
do
len="${#i}" ;
let len-=46
#echo "$len";
name="${i:0:len}" ;
#echo "$name"
mv "$i" "$name" ;
done

save it with name.sh and run "bash name.sh" on terminal.The script should be run in the same directory in which temp files are present.

e.g. Guns N' Roses - Welcome To The
jungle.mpg.47IMRQGAGFWOA7GMLZTK3X6QFIGR4P4EKHDRHKI.dctmp
became Guns N' Roses - Welcome To The Jungle.mpg

Worked on ubuntu 10.10

Wednesday, April 20, 2011

Microkernel approach in minix3

In computer science, a microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system. These mechanisms include low-level address space management, thread management, and inter-process communication (IPC).As an operating system design approach, microkernels permit typical operating system services, such as device drivers, protocol stacks, file systems code, to run in user space.MINIX3 has around 4,000 lines of code. Kernels larger than 20,000 lines are generally not considered microkernels.


Reflecting on the nature of monolithic kernel based systems, where a driver (which has approximately 3-7 times as many bugs as a usual program) can bring down the whole system,MINIX3 aims to create an operating system that is a "reliable, self-healing, multiserver UNIX clone".In order to achieve that, the code running in kernel must be minimal, with the file server, process server, and each device driver running as separate user-mode processes. Each driver is carefully monitored by a part of the system known as the reincarnation server. If a driver fails to respond to pings from the reincarnation server, it is shut down and replaced by a fresh copy of the driver.In a monolithic system, a bug in a driver can easily crash the whole kernel, something that is much less likely to occur in MINIX3.



Reliability factors in MINIX3 :-

Reduce kernel size
Cage the bugs
Limit drivers' memory access
Survive bad pointers
Tame infinite loops
Limit damage from buffer overruns
Restrict access to kernel functions
Restrict access to I/O ports
Reincarnate dead or sick drivers
Integrate interrupts and messages

Architecture :


The approach that MINIX 3 uses to achieve high reliability is fault isolation. In particular, unlike traditional OSes, where all the code is linked into a single huge binary running in kernel mode, in MINIX3, only a tiny bit of code runs in kernel mode about 4000 lines in all. This code handles interrupts, process scheduling, and interprocess communication. The rest of the operating system runs as a collection of user-mode processes, each one encapsulated by the MMU hardware and none of them running as superuser. One of these processes, dubbed the reincarnation server, keeps tabs on all the others and when one of them begins acting sick or crashes, it automatically replaces it by a fresh version. Since many bugs are transient, triggered by unusual timing, in most cases, restarting the faulty component solves the problem and allows the system to repair itself without a reboot and without the user even noticing it. This property is called self healing, and traditional systems do not have it.

Tuesday, April 19, 2011

An Approach to core dump in minix3

Hey people,
I have been trying to work around implementing core dump in minix3.A clear understanding of what core dump is necessary for its design. I will start with what a core file is.

The core file contains the memory image of the process, which can be used for debugging purposes.A core file is created when various errors(depends on how dumping is implemented) occur. Errors such as memory-address violations, illegal instructions, bus errors, and user-generated quit signals, commonly cause this core dump. The core file that is created contains a memory image of the terminated process.

The contents of a core dump are organized sequentially in the core file.It may follow any data structure to produce dump.Below is a rough idea of what things can be included.

Core header -> Defines basic information about the core dump, and contains offsets that locate the remainder of the core dump information.
User stack -> Contains a copy of the user stack at the time of the core dump.
Data area -> Contains the user data section.
Memory mapped regions -> Contains the anonymously mapped regions.

Process Control Blocks :

A process control block (PCB) exists for each process, describing the state of that process by maintaining the LDT, as well as saved register values, used to save the process state while a process is waiting to be scheduled. The PCB is a struct proc, containing important information about one process, including the process number and status. Also accessible through the PCB, via the p_map memory map, are the base addresses and physical and virtual sizes of the three segments of each process: (1)the text, (2)data, and (3)stack segments.

In minix architecture the microkernel, file system, and memory manager all maintain their own process tables but keep strict correspondence between these entries.The complete state of a process is defined by the process' data in memory, plus the information in its process table slot.

Wednesday, April 6, 2011

Some Merits of GDB

There are some impressive features of GDB which I would like to point out :

1. GDB targets a good range of processors which includes Alpha, ARM, AVR, H8/300, System/370, System 390, X86 and its 64-bit extension X86-64, IA-64 "Itanium", Motorola 68000, MIPS, PA-RISC, PowerPC, SuperH, SPARC, and VAX.

2.GDB offers a remote mode.gdbserver can be used to remotely debug the program

3.The file caching mechanism is embedded within BFD and allows the application to open as many BFDs as it wants without regard to the underlying operating system's file descriptor limit.

Some features which I would like to have :

Display of variable values in a tree structure by a single command.

Various Aspects of a GNU Debugger

This blog is intended to give a brief overview of GDB and some internal features. GDB is an interactive tool. GDB should be responsive to the user.

GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:

* Start your program, specifying anything that might affect its behavior.
* Make your program stop on specified conditions.
* Examine what has happened, when your program has stopped.
* Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another.


GDB consists of three major subsystems:

1. User interface: The user interface consists of several actual interfaces, plus supporting code.

2. Symbol handling (the symbol side): The symbol side consists of object file readers, debugging info interpreters, symbol table management, source language expression parsing, type and value printing.

3.Target system handling (the target side): The target side consists of execution control, stack frame analysis, and physical target manipulation.


GDB uses a technique called prologue analysis to find frame sizes and saved registers. A prologue analyzer disassembles the function's machine code starting from its entry point, and looks for instructions that allocate frame space, save the stack pointer in a frame pointer register, save registers, and so on.

Breakpoint Handling:
Hardware breakpoints are sometimes available as a builtin debugging features with some chips. Typically these work by having dedicated register into which the breakpoint address may be stored. If the program counter ever matches a value in a breakpoint registers, the CPU raises an exception and reports it to gdb.

Monday, March 21, 2011

password reset from shadow file in ubuntu 10.10

Hi,
Recently I was trying to write a script for changing password automatically for a user.I required something else for this but I found one similar script while searching over Internet.While I was experimenting with this on my ubuntu 10.10 system, I did a terrible mistake.At the place of username, I put my main account username.Not only this,I used "pwgen" program to generate random password which was there in the script and I blindly used it.

The script I used is below:-

touch pass.txt
chmod 600 pass.txt

# generate a nice secure password and put it in a file
pwgen > pass.txt

# get the password hash
ph=$(makepasswd --clearfrom=pass.txt --crypt-md5 |awk '{print $2}')

# Set the password
usermod -p $ph "username"


Now, first time I used it using sudo, It asked for password.Now this script randomly generated a new passowrd and set for my account.Now, a new password was hashed in /etc/shadow file which I didn't know.Next time, when I used it again,it asked for password which was changed randomly.So,I could not give correct password.


Now, I thought how would I login after next reboot.I asked someone who told me to use a live cd of ubuntu to change shadow file.In shadow file, password is stored encrypted corresponding to each username.Now, I was preparing for a back up.Still, I wasn't sure it will work.

When I rebooted,something clicked in my mind.I booted in recovery mode.Then using root shell, I opened /etc/shadow file.Usually it opens in read-only mode.But since I was root that time, I removed the hash of my username.I removed everything that was there between first 2 colon(:). I did it only for my username and root.Hence, password was omitted.Now I reboot again and reset the password using passwd command and it didn't ask for current password.I didn't know that we could reset our password in recovery mode.

I knew that this similar method worked in ubuntu 8.04. But I thought they removed this as a bug.Now it worked for me.I can't decide if it is a good or bad thing.Since I changed my password in emergency,It is cool. But someone else can access my account by resetting my password.

Monday, November 22, 2010

facemash experience "the social network"

hello people,
I have been constantly watching and listening "The Social Network" since the time I first watched it.Awesome movie.very inspirational.Well,I too thought about writing facemash after watching this.But,I did not want to end up facing punishment like mark.So, I didn't try to insult anyone.Just experiment and wanted to refresh my php and mysql concepts.


What we need is collection of some images.put it in a directory and provide its path in the code.for this example I will use "pics" as directory which has 7 images.Now write one php script to display 2 images randomly and let user click on any of this.Now,one more script to check which image was clicked and calculate the new rank of both image.I am sharing a piece of code here.

require_once("sql.php"); //sql.php connects to the database.
srand(time());
$r1 = rand()%7;
srand(time());
$r2 = rand()%7 ;
while($r1 == $r2)
{
srand(time()) ;
$r2 = rand()%7 ;
}
$query1 = "SELECT * FROM pic WHERE picid = '$r1'";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_array($result1);
$query2 = "SELECT * FROM pic WHERE picid = '$r2'";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_array($result2);
$pic1 = $row1['pic'] ;
$pic2 = $row2['pic'] ;

give image with its link in the html part of the code href='mash.php?id1=$r1&id2=$r2' img src=pics/".$pic1


href='mash.php?id1=$r2&id2=$r1'img src=pics/".$pic2


now when this page redirects to mash.php,new rank of both images is calculated based on the algorithm you wanna use.here, we have defined 3 variables.'h' is no. of hit on the image,'d' no. of times the image has been displayed.'rank' shows point given to image.use get method to catch variables to update database containing no. of hits of an image.
$id1 = $_GET['id1'];
$id2 = $_GET['id2'];

$query1 = "SELECT * FROM pic WHERE picid = '$id1'";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_array($result1);
$query2 = "SELECT * FROM pic WHERE picid = '$id2'";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_array($result2);

$h1 = $row1['h']+1;
$d1 = $row1['d']+1;
$rank1 = [algo to calculate new rank];

$h2 = $row2['h']; // no. of hit remains same for the image not clicked.
$d2 = $row2['d']+1;
$rank2 = [algo to calculate new rank] ;

$res1 = mysql_query("UPDATE pic SET h='$h1',d='$d1',rank='$rank1' WHERE picid='$id1' ") ;
$res2 = mysql_query("UPDATE pic SET h='$h2',d='$d2',rank='$rank2' WHERE picid='$id2' ") ;


So,this was my experience.Worked without any problem.See ya.

Thursday, September 2, 2010

UNSUCCESSFUL UBUNTU KERNEL UPGRADE TO 2.6.32-24


Hi all,
Just a month before 10.10 release,ubuntu 10.04 has created a problem for me.This post is more like a problem statement because I haven't figured out the solution yet.Last night I was upgrading my kernel to 2.6.32-24.After that my network manager was not running.I thought something was wrong with upgrade.So I rebooted and was shocked when I saw the grub menu.Previously, Grub menu used to show kernel versions 2.6.32-21, 2.6.32-22, 2.6.32-23 and their recovery options.Out of that 2.6.32-23 could not be used to boot.So,I used to boot through 22.But now,I could see only 23 and my system did not boot.when i tried to edit this option(generic kernel 2.6.32-23 in grub menu screen), I got first line as recordfail as shown in above image.

Then I tried to search on internet but found nothing important.Tried live cd of ubuntu 9.04 and tried to reinstall kernel.tried "sudo update-grub" and also grub-pc.Then checked /usr/src of 10.04 where I saw all previous kernel images along with 2.6.32-24.Now it looks like latest kernel couldn't be written but previous images were removed and only remained kernel is corrupt.So,I am not able to boot into ubuntu. Right now only solution is to reinstall 10.04.hoping a better solution from someone.

Sunday, May 30, 2010

Summer Internship :First week

hi all,
Right now I am at nagda(M.P.) for my internship at GRASIM chemicals.It's been a week and I am enjoying it completely.We are a group of 10 students in chemical division.Normally we go to the plant and visit different manufacturing sites.Due to strict discipline, we wear a helmet which we try to put on and off enormous times.Since I came here,1st thing I was looking for was internet connection but didn't find much options at such a place.After so much analysis, we thought to use GPRS connection.I recharged my airtel sim for unlimited plan.But now I have realized that it is in roaming, so it's slower than i had expected.

Finally we have 2 connections and 6 students in our group.So, we are always experimenting with creating shared connections.Sometimes we use LAN wire to connect.Sometimes,we create wireless ad-hoc and sometimes create proxy server(using privoxy).Till now we are having fun.Yesterday we went to ujjain to visit famous "Mahakaleshwar" temple.There we had a funny incident.When we bought the tickets for returning,the train started taking off.We entered into different class due to rush and ended up paying fine for that.Actually it wasn't fine,it was bribe.We were in no position to negotiate ,so we paid the money.We didn't get the receipt but paid less money and became the integral part of corruption.Although we had done no mistake considering the situation.
anyway that was a lesson for all of us.Now we have 50 days more to live at this place.Hope to spend it nicely.

Monday, May 3, 2010

Download speed through apt-cacher and dependency problem with downloading so many packages at a time








hi,
I am not able to stop experimenting with ubuntu lucid lynx the time I installed it.With the apt-cacher,it's easy to download all the packages that you like.So,I was there with synaptic package manager and kept on selecting large number of packages.Finally I got a collection of 148 packages with 220 MB size.When I started to download,I saw variation of speed which is very common but I would like to point it out by some snap-shots.
1st picture shows the usual speed of download through apt-cacher which is 347 KB/s.2nd one shows unusual high speed 2843 KB/s.











But sometime we suffer low speed also.Just like this.


Now,apart from speed,there is one more thing that I would like to share.Since I selected a lot of packages and started downloading all,I got some installation problem.All the packages were downloaded but couldn't be installed properly.Very less packages were installed because of dependency problem.No idea how did it happen.Probably,when there is a huge number of packages ,some of them might have dependency due to others files in the download list.So,in my view,large number of packages should not be installed at a time.

By the way, I sent these dependencies report to developers officially.Here is one screen-shot which explains it.


Conclusion :- try installing less number of packages at a time.

Saturday, May 1, 2010

performance review of ubuntu 10.04 lucid lynx

hello friends,
Ubuntu launched its Final release of lucid lynx 10.04 just 2 days before and I couldn't stop trying it as soon as I could.Reason is not that I was waiting eagerly for its final release.Real reason is that I had done some mistake in hard disk partition while installing slackware which caused me loss of linuxmint which I was using for a very long time.So, finally I thought to try fresh and final release of 10.04.
oh boy,What an OS.Surprisingly it can be called as the perfect OS.Lookwise,it has got better.Also,the most exciting feature is its boot time.Amazing boot time must have impressed everyone.Shutdown time is also faster.This has got attention of some people who are claiming that skipping disk check can also reduce boot time.Anyway,I don't want to create any controversy here.
Talking about look,It gives a sight of mac.The minimize, maximize and close buttons of window is on the left side which gives you feeling of working on mac.Anyway that feature was available previously also but not as default(a package "mac4lin" changes the look in that manner).New Gwibber social client is also very exciting.Gwibber can be configured to broadcast status on facebook,twitter etc. and to see other's status.
Recently "ubuntu tweak" became my latest crush as It has got nice and sexy packages which synaptic package manager didn't let me try directly.visit ubuntu-tweak.com for more info about tweak.As I am in a university which does not provide with a superfast internet connection but allows downloading packages with apt-cacher,I couldn't stop downloading all the packages which caught my attention.Well,It's definitely wastage of resource.
In final words,ubuntu 10.04 is just lovable and awesome and great experience so far.Don't know how soon the bugs will come out.Till then,enjoy lucid lynx.Happy open source.

Saturday, April 10, 2010

GPG public key

Hi,
As I was searching why my gpg public key is not working,I suddenly found answer.Actually gpg public key contains some extra words also which I neglected.public key can be viewed in terminal by typing :

gpg --armor --export [your public key id]

Now complete output is the public gpg key including "-----BEGIN PGP PUBLIC KEY BLOCK-----" and "-----END PGP PUBLIC KEY BLOCK-----".Initially I was taking only middle part.One more thing public key requires public key id which can be viewed by typing "gpg --list-keys". The pub part shows id.This command displays whole list of keys.So, if someone has made more than one key pairs,then it is useful to see which public key is for which public key id.As I successfully generated my public key, I am going to share it. It is right below :-

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

mQGiBEu+azsRBACGVGTbi3GHDKa8rkzOWP8lQYg0omH6mU5tIHe+0fLiTMRzbr1o
/lTT2w+GksRhziWL03+zTc36R/gNAPJvp8djhaeDpYD0DCh1JuFNLPAZWVMQ1TJf
INgQ59KoBr/sWHWa0DXTFoTK1o/0wLsUioH54nN4rfxsPQgKMA5f/FYEzwCgitK5
WeQWsm8RMkZURaROcq7kHE0D/0GsXazBA0n+iQFVbbjblOpzs0/nvJfnEWKEbyCv
e9NUrbNqvttA501uy+VeIlMIbVzIOHAMeIpgWMT+z6vVYcBmKrZGCRv0i9gBzrd/
8HVWbVrZDwz7Mk076f/1wo5iLv9OP657O6i3B4F/1fiBmJubTQkXgL5nKwu1iQvj
wTfDBACAcLMha0rBLji4l3MCHpwYVb/vCs1OsGWmDlRElkST6zqv8bg9/O2AZqgE
fewe8ZqcYyRMlElsoqXlL0z+JZykCp4QUGwajB/oWCdecFK09uOU518Os90wLjro
LvAZmebkmoR2gsy3J9QBar7Lp63Y1AfxZGiCQU9/a5+0OIGCbrQ6Z2F1cmF2IGt1
bWFyIHlhZGF2IChlbmNyeXB0aW9uKSA8Z2F1cmF2a3VtYXI1NTJAZ21haWwuY29t
PohgBBMRAgAgBQJLvms7AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQdFo6
7FlOrR11+gCbBsVq1jpmwo1JE10bcO5UEWySlRkAn0JuAhWtePIR8pK14NasjSNO
xDg8uQINBEu+azsQCACLKpR8orOIiaooO+fI2IEVFL8Qb+s/9/dfx/asMoBB2bAS
IhpNt6N65a3MtMhDeIZcfafwtpgjxJAuxp1iwWpbEyj2vDWcZ5xpnf3N3hrb8wm9
eBpGnGj7ugETBgNZ/G3aQJsljv6Ze+Ys83wQ20mdXTTIg3Yc/bzlohE0Itl3JgMW
BioI13pxXcWgxcPMBBeeoL0bBGCQOhjCTckjVjoJTrHxXvxqembTeUQ8wG6tnLj7
HIMOtKp9usF83H0qvDhiYjGJ7xI5KplJXyEw9+T1afrHY7KcggMmwOdHvuTrKI62
XIpX3eVFu7zDh5cA7tMtbErSpSZxhskPNPYpQYKzAAMFCACCUEAJHO9FHL9zq7fR
GNcx5o4TaNsplBpq42zFnd14pq1ftxr5SfUVn6ciPVkGnj9v5LVOxib0SJCgcDCw
mGkQ5SmD3XCq/KDqjSlFYacLJOIH/sKMWmkLrF7Nv5o0VrQbSdzPCCWCbNsiFoad
Zb5bGXtOrg2nLj6uIUe5ZM3EUJr/iMFRhZ9Xk4ETTsqyD95yfdM8y+Djnri3bdTg
eL3QriiZu3k0CJGcBu/lYWcVR7wseIUa7LYsLuGhzH3zyFuZHw8NqUls4H7UQel1
dMut5SGo6Ksn0n9UwyKzUe+Eir49efX+gMivn+ttupOZ2t7OcCH6IaCr0Y6E1Iz6
BCveiEkEGBECAAkFAku+azsCGwwACgkQdFo67FlOrR0zFACfdSLkUkkvO++A6XyH
2ItqsnYVgCQAn0iB1mZ1eI7xuUyR6y+teREIc4Bf
=+Uo3

-----END PGP PUBLIC KEY BLOCK-----



And Now I am working on sending a mail with encryption by my private key.Hope,It works.

Thursday, April 8, 2010

GPG encryption

recently I came to know about GPG encryption.It means Gnu Privacy Guard.GPG is a command line tool with features for easy integration with other applications also.GPG is mostly used for secure communication and storing data in encrypted form.There are other uses also which I am not discussing right now.

Actually when I was filling a form for account in a site,I was asked for pgp/gpg public key and then I started wandering around to search for it.It is open source and mostly used in command line which I like.There is a windows version of it also.There are so many online pages with uncountable words for its description that I got confused sometime.But finally I figured out the theory behind it.It is like this.

There are 2 type of keys generated by gpg.One is public and another is private.Public keys can be distributed to your friends and published anywhere.With public gpg keys someone can encrypt the message and send it to you.Now, to decrypt it we need the private key which is only with you.So this way emails can be securely sent.Even if somebody sniffs the mail in the middle,It will be secure because the attacker will not have the private key to decrypt it.To create your own key pair just type gpg --gen-key in command line and follow rest instruction(You will mostly choose default values).This way you can export your public keys.But unfortunately my public keys are not working for no reason.I am still looking for answer.


But I did use gpg encryption to my file which is very easy to use and fun to watch.I am going to show what exactly I did.In the terminal just make a simple file. e.g

$ echo "my first encryption" >gen hit enter

$ gpg -e gen it will ask for user ID,use your own user ID

And done! Now hit terminal with ls command and see that there is another file named gen.gpg which is encrypted.Now If you deleted old file named gen then the content can only be viewed by opening gen.gpg which needs password.To decrypt it,put gpg -d gen.gpg in command line and hit enter.Now it will ask for the passphrase which is confidential and it makes the file secure.

Saturday, March 27, 2010

external hard disk drive

hello there,
I recently bought an external hard disk drive of 1TB. great experience till now.It is of 3.5" and so definitely not portable and also requires external power supply.I just roamed around every shop at nehru place(great place for electronics goods in India).Finally I compared brand value and prices of mainly 3-4 companies like WD,seagate,Iomega etc.Finally WD was my choice.same product was available in 2 different packages.One with external power supply and another with USB power supply.price for USB power supply was almost double.so I preferred to take the one with external power supply.With this I got 2 years of on site warranty which I do not think I will need.Today is saturday and customer care center is open from monday to friday only.So I will have to register my product on monday in order to get warranty of 2 years and free telephone service of 30 days.

At last,great product to use and one more thing.you do not get 1024 GB by buying 1TB hard drive. you get only 930 GB if you calculate. Multiply (1000/1024)^4 with 1024.