Friday, 22 July 2011

Best Linux Quotes & Jokes

It seems most of the best (funny), Linux jokes are Linus Torvalds jokes, here are  the best of the Lot :-


We all know Linux is great... it does infinite loops in 5 seconds.
- Linus Torvalds about the superiority of Linux on the Amsterdam Linux Symposium


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition (Found in the .sig of Rob Riggs)

`When you say "I wrote a program that crashed Windows", people just stare at you blankly and say "Hey, I got those with the system, *for free*".' (By Linus Torvalds)

“See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too.” (By Linus Torvalds)

"All operating systems sucks, but Linux just sucks less" - Linus Torvalds

By golly, I'm beginning to think Linux really is the best thing since sliced bread. -- Vance Petree, Virginia Power

Computers are like air conditioners - they stop working properly when you open Windows.

"Linux is user friendly, it's just picky about its friends" 



Sunday, 17 July 2011

Adding Systemd to Gnome/kde



 A still of Kde Desktop

Haven't been doing a lot of work of-late, sighhh... out of ideas really !!!!

I had earlier assumed, using systemd/launchd as an external dependency, or copying its working across all startup scripts and application, I came across an interesting discussion on the gnome mailing list, but my mentor thinks that, it would not be viable/ unfeasible. So that, idea is pretty much ruled out. Anyone genuinely interested in following the topic can read this interesting conversation by Lennart, the creator/maintainer of systemd, here :-


http://mail.gnome.org/archives/desktop-devel-list/2011-May/msg00427.html


My mentor feels that it would be better to augment and improve the existing kdeinit, kded, etc. scripts. Currently kdeinit and kded call and start other scripts and applications by serialisation, if we parallise, more and more events, it would reduce the startup time, we would have to let them do stuff asynchronously and let the modules report back when they're finished setting up stuff. On my part, I would have to edit most if not all the scripts. On my part, I have been asked to have a look at what takes the longest during launch. Maybe I should try adding just a lot of debug output to kdeinit that shows how long each operation takes. To start with, I should just call utime() between the various methods called in kdeinit, and print out the difference between them. I should look at the timings of all the scripts and how much script is spent on each process, and then, we parallise some particular scripts that take most time.


Using the debug* files here: 
 well, first I should probably find out what uses time during launch, if kded starts instantly, it isn't worth wasting time on making it launch stuff in parallel

 

Sighhh... So Much to DO ....       o_O
 

Wednesday, 6 July 2011

Adding Meta Tags to your Blogger Blog

What are meta tags and why should I add meta tags to my Blog ?

Meta tags are the magic words that tells the search engine (google/ yahoo/ bing...) bots about, the keywords and tags in your content, it tells the search engine what your blog is about, so that your blog get emphasised on those keywords. Adding meta tags is an important factor in Organic search engine Optimisation (SEO). Meta tags allows search engines to index your web pages more accurately. In other words, Meta tags communicate with the search engines and tells more information about your site and make your webpages index correctly and accurately.

For Example :-
As you can see in the above screenshot, " hacks, help, tips and tricks for open source learners and hackers " is the meta tags description which I added to my blog.

Unfortunately Blogger doesn't have a add Tags feature so, this is how you can add Tags to your blog on blogger :-

(1). After signing in to your blog, go to Design.
(2). Choose edit HTML option.
And now check for these lines in codes :-

<head>
<b:include data='blog' name='all-head-content'/>

Now add the following code to your html code, below the above lines :-
 <meta content='DESCRIPTION HERE' name='description'/>
<meta content='KEYWORDS HERE' name='keywords'/>
<meta content='AUTHOR NAME HERE' name='author'/>







<meta name="keywords" content= " humour, pictures, jokes, Template, Competition, tutorial, hacks, tips, tricks" />
<meta name="description" content="A cool Blog on college Life and Stuff, Quizzing, Dramatics, football and stuff" />
<meta name="author" content="Aaditya Chauhan" />
<meta name="ROBOTS" content="ALL" />
  
Replace the red portion with your tags and description and the green part with your name.


That's it ! You have successfully added the metatags to your blogger blog. You can check out your tags description, when you see your blog on Google.

Sunday, 3 July 2011

Switching from Gnome to KDE

I recently, switched from Gnome to KDE, for the sake of my project and even though I was reluctant in the beginning, I would now have to admit, that it was totally worth it .KDE is strikingly different from gnome, and I find it very similar to Microsoft Windows, in some ways. To start-with, I found Kdm pretty boring so may be the recent talk in the kde community to replace Kdm with Lightdm is well placed. But the rest of the desktop environment was nice and refreshing. Here is a simple procedure to switch from gnome to kde.

Just follow the simple steps :-

(1). Go to System ---> Administration ---> Synaptic Package Manager.
(2). Search for kubuntu Desktop.

 (3). Select the package and install the package.


It would be a, not so huge 117 MB to Download. So just sit back and relax, it took 34 minutes to download on my system.

(4). Now it would start installing, it would again take some time, to install.


Some time in between the download it would ask you, if you would like to keep gdm or switch to kdm, I would say, you should stick with gdm. And you are through to use it.

So enjoy, using kde and don't forget to give your valuable feedback at community.kde.org/  !!!!!!

Technorati Tags: , , ,

Sunday, 26 June 2011

JPEG Compression Algorithm

Who knew, that the file format we daily use to store our images, is not just a file format, but also a state-of-the-art compression technique. It has been a common day-to-day experience for every multimedia enthusiast, that the same png image when saved in the jpeg format, results in smaller size, i.e. the image gets compressed. The degree of compression is adjusted, allowing a selectable trade-off between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. The term "JPEG" is an acronym for the Joint Photographic Experts Group which created the standard, it is the most common format for storing and transmitting photographic images on the World Wide Web.

The image compression techniques is of 2 types :-
(1). Lossy
(2). Loss-less.

It is the Lossy technique that is more preferred, as it gives better compression ratios, for very little loss in clarity.
The compression is often achieved by leaving out non-important data parameters, and focussing only on important parameters, like :-

(1). color-space transformation matrix :-
The image is converted into a RBG colored matrix and also a gamma channel determing the brightness of the respective color. This kind of a color space conversion creates greater compression, without any perceptual change in image quality.The compression is more efficient because the brightness information, which is more important to the eventual perceptual quality of the image, is confined to a single channel. This more closely corresponds to the perception of color in the human visual system. The color transformation also improves compression by statistical de-correlation.

The various steps involved in the conversion of an image into jpeg format, is :-

(2). Down-sampling
(3). Block-Splitting
After Sub-sampling each block is split into 8*8 blocks.
(4). Discrete cosine transform
Next, each 8×8 block of each component (Y, Cb, Cr) is converted to a frequency-domain representation, using a normalised, two-dimensional type-II discrete cosine transform (DCT). Before computing the DCT of the 8×8 block, its values are shifted from a positive range to one centred around zero. For an 8-bit image, each entry in the original block falls in the range [0,255]. The mid-point of the range (in this case, the value 128) is subtracted from each entry to produce a data range that is centred around zero, so that the modified range is [ − 128,127]. This step reduces the dynamic range requirements in the DCT processing stage that follows. (Aside from the difference in dynamic range within the DCT stage, this step is mathematically equivalent to subtracting 1024 from the DC coefficient after performing the transform – which may be a better way to perform the operation on some architectures since it involves performing only one subtraction rather than 64 of them.)

(5). Quantisation
The human eye is good at seeing small differences in brightness over a relatively large area, but not so good at distinguishing the exact strength of a high frequency brightness variation. This allows one to greatly reduce the amount of information in the high frequency components. This is done by simply dividing each component in the frequency domain by a constant for that component, and then rounding to the nearest integer. This rounding operation is the only lossy operation in the whole process if the DCT computation is performed with sufficiently high precision. As a result of this, it is typically the case that many of the higher frequency components are rounded to zero, and many of the rest become small positive or negative numbers, which take many fewer bits to represent.

(6). Entropy encoding :-
It is basically a step where we apply Huffman coding/algorithm on the redundant information bit.

sighhhh.......... you would have never thought that these many steps take place, just while saving the image.

To reconstruct the image from these mathematical Data, an entirely opposite data transformation takes place, i.e. the encoded Data passes through the decoder, the inverse discrete fourier transform takes place, and so on and so-forth.

Technorati Tags: , ,