Recent posts


GSoC Wrapup Report

Posted on 21 Aug 2015

This is a GSoC wrap up report of everything I did this summer. Though, my official GSoC organization was LibreOffice, the work also involved GNOME directly, and Mozilla indirectly. Some of you, who are already familiar with my work might find this post repetitive since I would be repeating many of the things here that I have already talked about in my earlier posts. Initial state of the widget Before I started working on it as a summer of code project, the widget: used to render all tiles in the loaded document used to make calls to the LibreOffice core in the same UI thread was not introspectable was gtk2 and needed such minor fixes here and there Tiled Rendering I started with implementing tiled rendering in the widget. First plan was to reuse the Mozilla tiled rendering code. After analyzing this and discussing it, we scraped that plan as it was quite infeasible. Better approach was to understand how tiled rendering is implemented and write our own class that handles the tiles for you. We took ideas from Mozilla tiled rendering code, and GeglBuffer. We started with a small TileBuffer class, and it gradually improved as widget started to...

Read more...

GUADEC 2015 in Gothenburg

Posted on 10 Aug 2015

This year GUADEC was organized in the wonderful city of Gothenburg in Sweden. It was my pleasure attending this conference for the second time, and meet several awesome contributors in FOSS community again. Discussions with several contributors helped me get a wonderful insight of various important topics in both GNOME, as well as the LibreOffice project. As a Summer of Code student this time for LibreOffice, I also gave a talk about my (project)[http://pranavk.github.io/open-source/initial-preview-of-libreoffice-integration-with-gnome-documents/] with Markus Mohrhard. You can download the slides (here)[https://mmohrhard.files.wordpress.com/2015/08/integrating-libreoffice-with-gnome-documents.pdf]. I would like to thank whole of the GUADEC organizing team for organizing this event smoothly. Last but not the least, a many thanks to TDF for sponsoring my travel and accomodation without which all of this would not have been possible. I am looking forward to have a long and exciting journey ahead with GNOME and Document Foundation.

Read more...

FUDCon Pune 2015

Posted on 03 Jul 2015

This year FUDCon, held at Pune, last week was my first ever FUDCon, and my first steps in to awesome Fedora community. This was also the first conference where I delivered a full-fledged talk about ‘Automating UI testing’ presenting some of the work I did in automating the UI tests for gnome-photos. The talk was more about how they can make their UI tests automated. I also talked about ‘Integrating LibreOffice with your applications’ in a barcamp talk sharing and discussing ideas with few people, presenting what I am up to in this project in LibreOffice, and how they can take advantage by either directly using the new, evolving LibreOfficeKit API, or by using the new Gtk3 widget in their applications. I talked about how I am acheiving this using tiled rendering, and how I (with Michael and Miklos) am planning to enhance this in future by incoporating the support for opengl, efficient tile management, and multi-threaded support. Besides that, it was a wonderful opportunity for me to meet new people contributing to Fedora project, and sharing ideas with them. I now have a better idea of how I can contribute more to Fedora, and feel motivated enough to continue...

Read more...

Initial preview of LibreOffice integration with gnome documents

Posted on 22 Jun 2015

I managed to integrate LibreOfficeKit’s LOKDocView widget with gnome-documents, finally. Here is the screencast for the same. There are still lot of improvements that I need, for example, we need to have a new editing overlay now in gnome-documents so that you you can do operations like bold, italics, underline, search, switch to edit mode and view mode, and few other things. There are also crashes right now which possibly are because I haven’t yet written robust code to nicely separate the currently used EvinceView and the newly used LOKDocView. On the other hand, I have few ideas to improve the widget backend, for example, improving the tile buffer backend by rendering nearby tiles to increase the visual coherence. Right now, it only renders the visible tiles, but it would be good to render the tiles nearby the boundary of the visual region so that the scrolling is smooth. I would be working on improving upon this in next coming weeks.

Read more...

Introspecting LOKDocView, the LibreOffice widget

Posted on 15 Jun 2015

This is in continuation of my work under LibreOffice. For the past few days, I have been working on restructuring the widget, LOKDocView, to make it introspectable. I also ported the widget to gtk3 from gtk2, so applications can now start thinking of using it. To test its introspectability, I wrote a simple test application in javascript making use of this widget. Here is the small screencast I made using the widget from javascript. The widget still needs more polishing to provide a sane, minimal, still useful, API to consumers and to hide the still unstable LibreOfficeKit API. So, we would be improving that in coming weeks. We also plan to try GtkGLArea instead of currently used GtkDrawingArea for the widget to enable openGL while rendering tiles, and hence increase the performance. The backend currently use tilebuffer, taking few ideas from gegl-buffer, and Mozilla’s tiled buffering logic. I also hope to make further improvement in this backend to increase the widget’s performance making use of efficient algorithms. Here is the feature branch for LOKDocView.

Read more...

Integrate Libreoffice with gnome-documents

Posted on 05 Jun 2015

This year I am working on integrating Libreoffice with gnome-documents. gnome-documents currently only supports viewing documents. It indirectly makes use of poppler library to render PDF documents. To show any other format such as .docx, .odt, .ods, it first converts the document into a PDF format using unreliable unoconv command, and then render these PDFs using poppler. Hence, this also disables gnome-documents from editing editable formats. As part of my GSoC 2015 under Libreoffice, my main aim would be to improve an existing widget under Libreoffice, LOKDocView, and integrate the widget with gnome-documents. LOKDocView make calls to Libreoffice core using LibreOfficeKit. The current LOKDocView implementation needs a little furnishing. It also doesn’t support efficient tiled rendering, which is very essential especially at larger zoom levels (You never want the application to render zillions of tiles for you at 500x even if you don’t want to see majority of them). One of the improvements that I would be making in this widget is efficient tiled rendering so that it only renders the visible part, and while scrolling tries to reuse the already renders tiles to the best of its ability. To improve this tiled rendering, I have modfied the widget to...

Read more...

Analysing ssh traffic usage per user

Posted on 19 Apr 2015

I often use my computer as a router. My friends would login to my system via ssh, and use the internet. Sometimes, its the opposite, that is, I login to their system to access the internet. But most of the time, its me who act as a router for others, as a internet gateway. The problem I only give ssh account to few of my close friends. I expect them to use internet only for browsing and not for downloading heavy stuff. But sometimes they would download heavy stuff and that would drastically affect my internet experience. I don’t want to cut everyone’s ssh access. It would have been great if I could somehow know which user is eating up my bandwidth, and then warn or deny his ssh access. Solution I googled about if there is any existing tool that would suffice my requirements. I found few interesting tools like iftop but the problem with most of them was that they don’t map users with the session. They could only tell me the traffic mapping to any particular ip addresses. Then, I came across this blog post by someone which made use of iptables to log the traffic. Again,...

Read more...

Goodbye proxychains !

Posted on 18 Feb 2015

I have this weird, not so straight mechanism to use Internet. I have a server in the Internet/Cloud that I am almost always logged in. I use this server to create a SOCKS proxy on my local and then use Internet via this SOCKS proxy. And then I would use proxychains or proxychains-ng or tsocks with each of the program I want to use Internet for. This is a bit messy setup but somehow I make everything work by using these combination of tools. These tools help resolve the DNS requests made by the program on the remote because my local DNS server doesn’t resolve DNS requests pertaining to Internet. Recently I found a wonderful tool i.e sshuttle, this tool would dynamically change your iptables and would make your computer access Internet if you have a setup like me, i.e you have a server in the Internet and you want to use Internet via this server on your local computer. You would then set your computer to use no proxy and it works because it has changed your iptables, all your packets, DNS requests are being routed through the server and your application doesn’t even know about what’s going on...

Read more...

Transforming Control flow to Data flow

Posted on 13 Feb 2015

This is in continuation to my earlier introductory post on Spatial Computing project I have been working on. I spent my last few days transforming the traditional control flow of the programs into a data flow graph having producer consumer relationship between the instructions. As mentioned in my previous post, this data flow when executed on a data flow architecture that we have been trying to build for ASICs and then later for general purpose computers would be using the highest level of parallelism available because of the producer-consumer relationship between the instructions. There are some programming constructs which are hard to transform from sequential to data flow. Loops, pointers, pointers to functions are some of them that needs extensive care. This post is more about the results from my project. I will be showing the transformation for single loop just for the sake of simplicity : Sample Code int sum_single_loop (int a){ int sum = 0; for (int i = 0; i < a; i++) sum = sum + i; } I am making use of LLVM IR format, so I convert all the code in imperative languages which are having their LLVM front-end avilable, to LLVM IR format....

Read more...

Libreoffice headless comes to the rescue

Posted on 03 Feb 2015

During exam time, I often have to read a lot of .ppt files provided to me by our instructors. That’s what we are supposed to study so that sylabii can be revised quickly. I don’t use windows at all and hence have to use libreoffice for opening these presentation files but libreoffice is quite slow for me as compared to microsoft powerpoint. I don’t want to install Windows now just because of this purpose. However, I observed that pdfs can be opened comparitively faster than these .ppt files. Converting each ppt file to its pdf equivalent is a cumbersome task. Last week, I wanted to convert a bulk of .ppt files to their pdf equivalents and this is where Libreoffice headless came to my rescue, it helped me do a mass conversion with this following command : libreoffice --headless --convert-to pdf *.ppt This will convert all the ppt files in current directory to their pdf equivalents. If you don’t know what a headless means, it means that you don’t want the whole GUI thing to woke up and do stuff for you, that increases the performance by several folds such as in this case. We just want the conversion feature...

Read more...

Enabling user homedirs on Apache

Posted on 03 Feb 2015

In this I will be talking about enabling user home directories for user accounts on the server. I will talking specifically about CentOS since it is this OS that I am using on one of the server I am handling. As usual, we have to tweak little bit with selinux variables here as if your selinux is on, it will prevent apache from accessing user home directories, but first of all you need to enable the homedirs in apache configuration itself. Depending on your OS, apache configuration file name maybe different. In CentOS, following is the apache configuration file : /etc/httpd/conf/httpd.conf You need to look for mod_userdir.c ifmodule block and then comment the line that says UserDir disabled and make sure that line UserDir public_html is uncommented. You can rename this from public_html to any directory name you like but then make sure that your users have that same directory name in their home directory. You also need to restart the httpd server after this. Here it goes : sudo service httpd restart After this you need a selinux rule here, you need to allow userdir from selinux. sudo setsebool -P httpd_enable_homedirs true And there you go, usernames on the...

Read more...

Setting up a mail server the easy way

Posted on 02 Feb 2015

For past few years, I have been managing the whole server at GLUG-NITH. I installed various servers on that machine since it was the first server I got my hands to. I tried whole lot of stuff until one day the SAN space crashed and we had to start from scratch again. We also had a mail server and it was very urgent to up this since leaving the mail server in that inconsistent state would mean a lot bounced mails. We had full fledged mail server previous time consisting of postfix and dovecot. I used a roundcubemail as frontend as it had a nice UI. But there was a major security concern with this, the sysadmin having root access can always see the emails of the members who are given the email address associated with the server. This time, I thought of taking care of this major security concern and scrap the whole idea of storing mails on the server. Instead, we can just use postfix to receive the mail and forward it to the alias that the user provides. Eg: if you are sending email to abc@glug.nith.ac.in, and the alias for abc is set to jkl@gmail.com, then as...

Read more...

My research project on Spatial Computing

Posted on 07 Jan 2015

I have been working for past few months on a research project in one of the cores of computer science, Computer Architecture specifically trying to increase the efficiency of existing processors in use by several folds. This would be possible because this new architecture is a dataflow based architecture unlike the control flow architecture that we have been using since Von Neumann invented it. This new architecture can theoretically exploit the maximum possible parallelism and hence making it super efficient. Here, we are trying to generate a hardware and create a compiler for the programs written in imperative languages so that they can be executed on this new data flow based hardware. The LLVM compiler infrastructure suits very well here. It has got frontends for various programming languages, it then converts the source code of these programming languages to a special LLVM IR (Intermediate Representation). This saved a lot of time since we now do not have to deal with so many programming languages and can work on a single language (LLVM IR) that would indirectly support all other languages. We have taken the concept of waves from the well known Wavescalar Architecture. Since LLVM is a compiler infrastructure, it...

Read more...

Create a secure GPG keypair with subkeys

Posted on 24 Aug 2014

Public key cryptography has always fascinated me. I created my keypairs long ago. They are not used much because there are not much people around me who use public key cryptography. Very few of them have generated their keypair. Some of them who have generated do not know about whether they have a keypair. But still, this week I managed my keypair immuned to any theft of keys. If your private key is stolen, everything is over, so better not store the main private key on your laptop or phone but rather in a private safe or in your pendrive which is then kept in a private safe. If you have your GPG key already or not, using separate subkeys to sign and encrypt messages is always a good choice. There are few steps I will talk about below that will help you detach your private key from your secret keyring in your laptop and allow you to store it in a safe place. You can buy a separate pendrive which you don’t use for daily purposes to store your private key. I am assuming you already have your GPG keypair, if you don’t have it already, you can use...

Read more...

Post GUADEC

Posted on 12 Aug 2014

This is little late to write about GUADEC but I really got sick after I reached home from Strasbourg. So I have been taking time to recover and now I’ve come up with this little late blog post about GUADEC. This GUADEC was my first international conference and it was really a great experience attending it. It was awesome meeting experts in their fields and actually talking to them this time in person rather than discussing with them on IRC or over email. Sitting together with so many new faces, making new friends, long discussions with them about the technical topics, hacking together on stuff, discussing new upcoming features in GNOME, having fun together, exploring the beautiful Alsace region together was truly a wonderful experience. Talks and keynotes were excellent. It happened with me multiple times that I wanted to attend both the talks happening in both the rooms at the same time. I felt like multiplying myself so that I could attend both of them but poor me, nobody can do that. I am waiting eagerly for the GUADEC videos so that I can watch ones I really wanted to attend but couldn’t attend. I also attended some of...

Read more...

Photos: Browsing DLNA Servers - One step closer

Posted on 07 Jul 2014

This post is in series about my GSoC project: Browsing DLNA Media Servers in Photos. If you checked out latest GNOME 3.13.3 release, you might have observed that gnome-online-accounts now has learned to set up access to the media servers in your local network as mentioned in this blog post by mclasen. Good to see one part of the project committed in this release. I have been working for past few weeks on making this whole setup at least work and have finally able to make all of it work. I have a working media server miner that mines the content from added media server accounts in GOA. I have even taken care of the albums in this regard. Photos from your media servers are not thrown randomly into the tracker, rather their parent directory information comes along with photos. This makes it easy to view photos in the application in more organized way provided you have organized your photos well in your media server. Here’s a screenshot that is showing photos in their albums according to the directory structure of the media server. The albums you are seeing in above screenshot are directly taken from the media server directory...

Read more...

Disable your NVIDIA card in Linux

Posted on 29 Jun 2014

My NVIDIA graphic card on my linux box had already given me alot of pain. I couldn’t resist seeing my laptop fan going wild and my laptop going excessively hot even during normal operation. I knew that all this is due to the NVIDIA graphic card I have. Since, I do not use my graphic card much, I decided to turn my graphic card off permanently on my fedora 20 box. bbswitch module helped me alot in accomplishing this. But before using this module I had to disable the inbuilt nouveau driver for NVIDIA card that is already shipped with the linux kernel for NVIDIA card. nouveau is an open source graphic card driver for NVIDIA cards. Disabling it means I need to blacklist it. On my Fedora 20 box, I added following file in /etc/modprobe.d/blacklist-nouveau.conf Just add following line in the above mentioned file. blacklist nouveau Remember to generate initramfs image after doing this, so that your kernel knows about the change the next time you reboot. You can generate the new initramfs image as : dracut -f Reboot your box and your nouveau driver is not loaded this time. You can double check that using the following command...

Read more...

MediaServer miner for gnome online miners

Posted on 09 Jun 2014

After a working GOA media server provider I had been working on, its the time to start mining data from the added GOA account. Though media server provides variety of media types, I am currently only considering browsing photos from the media server. Exported object on the D-Bus by the GOA daemon only provides with the UDN (Unique Device Name) and the DlnaSupported property of the media server. The DlnaSupported property tells if the media server is DLNA certified or not. This can be useful if in future we plan to integrate other types of media servers in GNOME. These two properties are just enough for the miner to start working. The miner fetches the UDN of the added accounts and see if the DMS with UDN is currently online or not. Also depending upon the DlnaSupported property, it will instantiate the server manager accordingly (Eg. DLNA server manager for DLNA devices, some XXX manager for some XXX type of media server etc.). All online media servers are then probed for photos. The mining task would really have been very easier had all the media servers provide the searchable property on them. But unfortunately, not all the media servers are...

Read more...

MediaServer Provider in gnome online accounts

Posted on 01 Jun 2014

After discussion with gnome-design team about my GSoC project viz. Browse DMSes from photos, the schedule line of the project changed slightly. Discussion with the design team concluded that the new media servers would be added in the gnome-online-accounts itself which means that I need to write a new provider for media servers in gnome-online-accounts as an addition to my earlier proposed project architecture which only included writing a miner for browsing DMSes and then using the miner from the gnome-photos application. So, I have been working on writing a new MediaServer provider currently in gnome-online-accounts. I am using GtkListBox to show the currently available Media Server devices on the network. There are plans to include the support for AirPlay also in the future which would require extending this media server provider. Currently I am only working for adding support for DLNA Media Servers. The media server provider in g-o-a uses dleyna-server DBus API in the backend to accomplish major part of its task. It calls the dleyna-server methods to get all the servers around and then probe each one of them for their properties. You can have a look at my code in a separate WIP branch I am...

Read more...

DLNA Media Server support in gnome photos

Posted on 25 Apr 2014

Photos is a wonderful application available in GNOME. Its written in C. It helps you browse all the available photos in your standard directories (home, Picture, Documents etc.). You can create new collections of photos, mark your good ones as favorites. As a part of my GSoC 2014 project under GNOME, I will be extending the code of this application to add a new feature under GNOME i.e to add the support of DLNA Media Servers. What is DLNA Media Server ? So, lets talk about what a DLNA Media Server is ? There are lot of devices these days around us that are DLNA Media Server (or DMS). These can be cameras, smartphones, laptops etc. These servers serve the content to Digital Media Renderers (DMR). The job of DMR is to get the content from the DMSes and render them. So if the media content is a music, DMR would play it; if its a photo, it would just show it. DMR can be your TV, smartphone etc. My GSoC project this summer would enable gnome-photos to browse the content of all the DMSes available around and show the content in the application. Additionally, it can also push the...

Read more...

Google Summer of Code 2014

Posted on 23 Apr 2014

I have been accepted at Google Summer of Code 2014 program. I am thankful to Google. This is my first GSoC project and I am looking forward to give my best shot. I am grateful to my mentor Debarshi Ray who has been very helping to me for my intial patches and first steps into GNOME community. My project will incorporate a new feature in gnome-photos to support DLNA Media Servers. After the completion of the project, gnome-photos application in gnome would have this wonderful capability to browse all DLNA Media Servers available on the local network. I am excited about working on this project Here is the wiki of the project. I will be posting updates about the project on my blog under the tag gnome-soc. I hope it will be a great summer ahead full of learning. I also wish other accepted students good luck with their projects and a wonderful summer of code ahead. Good Luck !

Read more...

My first steps into open source

Posted on 02 Apr 2014

I have been a huge fan of open source softwares for the last two and half years. I have been using Linux during this whole time and have been trying to explore more and more open source softwares available in the market. That means that now to do any task, however complex, I try to find an open source alternative to any existing easily available software like Adobe Photoshop. I know using Photoshop but GIMP is even better. Contributing to open source softwares is even more fun than using them. When you see your code pushed to master and being used by thousands and sometimes millions of users, you feel accomplished. Its been over a month that I have started contributing to open source organisation including Mozilla and GNOME. I have also applied for a GSoC 2014 project under GNOME that proposes to extend the gnome-photos functionality by incorporating the support for DLNA Media Servers in gnome-photos. The other contribution of mine being in Mozilla was also a wonderful experience. I learnt alot during the whole process of writing the patch for Mozilla. The patch exposes the raw data functionality to UDP Socket Messages interfaces. It was listed as a...

Read more...

Loop Devices in linux - Mount disk images

Posted on 28 Nov 2012

Well one have programs out there for windows to mount ISO images etc. to the virtual drive. You can then use those to perform task that might not be possible without mounting the image. Softwares like Daemon tools and PowerISO are very good examples of such softwares. Loop Devices Loop devices are pseudo devices available under linux commonly found under /dev/ with the name of loopN where N is a number like 0,1,2,3,4 etc. Mounting a disk image You can make use of some commands to attach an ISO image first with the loop device and then mount the loop device like you do mount any other device in your computer. To revert to the previous state you do the reverse i.e you first unmount the device and then you detach the image from your loop device. There is this utility losetup available in linux systems which is used to attach the disk image with the loop device. You require sudo priviliges to do so. Lets assume you have an ISO image in your home folder with the name Ubuntu.iso and you want to mount it like you have made a DVD or CD out of this image first and...

Read more...

Introduction to GPG - GNU Privacy Guard

Posted on 28 Nov 2012

GPG is GNU privacy Guard and it is a software made over OpenPG standards. The terms GPG and OpenGP are the terms that are used too often interchangably but one must understand that these two terms are different. One is a standard and other is a software made over that standard. If you are new to public key cryptography, I would like to showcase the concept here. Public Key cryptography is a very secure way to share messages between two parties. The transmitter transmits the message after encrypting it with a special key called ‘public key’. This public key as the name tells is public and can be shared with any other. The other key is ‘private key’. The private key as the name tells should not be made public to any person. It should be kept private with you only. Now anyone having the copy of your public key can encrypt the messages and send messages to you. Since we are using public key cryptography, that encrypted message can only be decrypted by the private key. And since you are the only person having that private key, you are the only single person in the world who can decrypt...

Read more...

Saving Buffered Google Chrome Videos to Disk

Posted on 09 Nov 2012

First of all, I must tell you that I will be talking exclusively about Linux only. However with only small bit of headache you should be able to copy the same procedure and implement the same thing in other Operating Systems also like MacOS and Windows. Overview First of all you should have cache enabled in your google chrome browser for this trick to work. Just go to the browser settings and then enable the cache. If it is already enabled you can increase the cache limit to something appreciable if you watch big videos so that whole of it resides in the cache itself and then you can save even large buffered videos to your disk and watch them later. Procedure The cache folder of your google chrome browser resides in your home directory. There is a folder named google-chrome in there. Enter into this folder and then enter into a directory named Profile 1. There are two directories inside that with name Cache and Media Cache. Your media files, all pictures, music clips and video buffered resides there. The problem is that its really hard to find which one of them is the video file, which one of...

Read more...

Power saving and increasing battery backup in linux with nvidia GPU

Posted on 23 Sep 2012

If you are new to linux (any distro like ubuntu and fedora), you might have noticed that battery backup in linux is just beyond horrible. If you used other OS, the same machine that used to give you 4-5 hours of battery backup now suddenly starts giving you battery backup less than 1 hour. Moreover you notice that your laptop starts heating too much beyond the limit to the extend that you never experienced when using other OS. I use Dell XPS L502x. My system is a dual boot with windows and other linux flavours. I love to play with my linux but the only thing that used to keep me away from my linux system is the horrible battery backup and horrible heating issues I had with my laptop when using linux. Problem The most usual problem people have in their laptops due to which their laptop starts heating and consuming more power is their high performance graphic card (nvidia in my case). Nvidia has this wonderful technology called Optimus that turns the card off when the card is not in use in windows, hence consuming less power and emitting less heat. Unfortunately Nvidia has this driver with this...

Read more...

Parsing large XML files efficiently with Python

Posted on 04 Jul 2012

Parsing XML with python is not a difficult task if you have some familiarity with python and any of the library that deals with providing you methods to parse XML. But what if you want to parse very very large XML files. Probably you are here searching for this only because you were trying to parse a very large XML files and your CPU was not able to handle it or you have memory issues. I was also searching for this thing when I was trying to parse a very large XML file. I was trying to parse a file whose size was in GB. And whenever I start my python script, it just gets killed everytime. Then I came across some scholarly article written on efficiently parsing XML files. Concept Basically when parsing very large XML files, problem is that the traditional parser will hold the information about the parent and its child and everything. So as you start reaching the end of the while it is keep storing everything inside the memory and which means that you might get out of the memory. Approach What you basically got to do is to delete the references of parents and...

Read more...

NoSQL databases

Posted on 01 Jul 2012

Many of you might have worked with SQL databases, that basically just stores your entries in form of a table. You can then manipulate those entries or records the way you like. There are several commands that help you manipulate and analyze the data in a SQL database in a wonderful way. You can even join the tables/relations and do operation on them. MySQL, Postgresql are some of the SQL database servers that you can use for doing making up your database in a SQL format. Well all these are Relational Database Management System (RDBMS) NoSQL - Yes, please no more SQL. But what is this NoSQL ? As the name suggests its a database with no more SQL. Yes it does not use SQL as its query language. Basically a NoSQL database uses a key value store to store its entries. So you can imagine a container having keys in it which are unique from each other. And each key have values associated with them. Remember that no two keys can be same. If you try to insert any key later that matches the key already in the databse earlier you are going to overwrite that. NOTE : You...

Read more...

Getting started with TopCoder

Posted on 01 Jun 2012

What is TopCoder ? Well you might have heard of this famous website when exploring the web here and there. I also found it when exploring the google career’s website. They still remember they had mentioned it somewhere that if you participate in online programming competitions like Top Coder then you can mention your score in your resume while applying for google. Something like that. I don’t remember it exactly. Well coming to the point, top coder is an online programming contest where you can participate and increase your programming skills. They have wonderful set of problems and conduct online programming competitions periodically. The range of competitions vary from designing stuff to programming stuff, you can puruse your interest. If you win some competition etc. they also give your good amount of money. So its better than freelancing. They also have a rating system - in which they rate each of their member according to the performance he shows in the competitions. This gives a boost to the participant to have a high rating. Best programmer’s are highest rated and wherever you will see their username its written with a red-color, which implies a red rated coder - the highest...

Read more...

Meet your Hard Disk Drive

Posted on 22 May 2012

First of all a hard disk consists of many platters stacked together, a platter is a disk shape object. Now comes the head, the head reads the data written on the platters and in between each platter there are two heads reading the data on one of the faces of two different platters. The head moves from outer to the inner edge when reading data. Each platter consists of tracks which are further divided into sectors. The tracks are number from 0 to usually 1023 in a standard Hard Disk and each track can have many sectors. One thing to note here is : when the platter will be rotating, in inner edges the head will be covering one rotation over the platter in lesser time as compared to outer edges (if the data is uniformly distributed over the entire disk). As you might know from the high school physics that velocity equals product of radius and angular velocity (v=wr), so in one rotation the head will read more data in those tracks which are away from center of the disk. To compensate for this difference, the density of data that is stored in the outer edges is less so...

Read more...