Posted
4 months
ago
Many thanks to Yasin Aydın for translating this blog entry to English.
For me, everything started with a chain of coincidences..
First Meeting and Internship Application (January 2007 – April 2007)
At first I decided
... [More]
to go abroad for Erasmus Exchange Programme. After that, I forced my school to make an agreement with the school I want to go. In January 2007, I went to Grenoble city of France. I started my lessons and saw that everyone is using Linux, even in the classes and the laboratories. I got back home, installed Pardus 2007 to my laptop. For 6 months, I used Pardus 2007 for all everything except the times I needed Skype.
One night, when I was thinking in bed before the sleep, I thought “I wish I had a chance to have an internship in Pardus Project”. In a few days after that night, I learned that Pardus was looking for interns for the first time ever. I was excited, indeed. One one hand I wanted it so much, but on the other hand I was thinking that I won’t have a chance to be accepted because I didn’t have enough Linux experience at the moment. So far, my only experience was about reporting a few bugs, that’s all.
In the end, without losing any more time, I applied for the position with my CV and a cover letter (March 29, 2007):
Dear Pardus Team,
First, let me tell you about myself. I am a 3rd grade student in Galatasaray University, studying Computer Engineering. As a result of my Erasmus Exchange application I did last year, I am studying in Grenoble, France since January 2007. I will come back to Istanbul in June 2007, after this exchange program ends and I will have my internship period for 2 months.
Since I was born, I was always in a relationship with computers and I am happy with that and I still have the excitement I had first day. With this agitation, I decided to have my undergraduate degree on computers. I am interested in every subject about computers and electronics. But I have more interest in electronical design of the computer, processor organization, operating system design and signal processing areas. I agree that I cannot say I have incredible knowledge on these subjects but these are the topics I am having an extreme joy.
I have been using Linux since 2004. In the first year in the university, I started following the lectures given by GSULinux and by the end of the year I was accepted to the Staff group. This is the way I got into the UNIX world I was wondering about since my high-school years, in a laid-back but curious manner. I can say that I have gained a lot of hands-on experience with my attempts to install Gentoo operating system. Other than that, I am somewhat using C programming language since 2003 and I am proud of this.
Long story short, I want to pass my internship period in Pardus team, because for I would be so happy if I can be of any help for the operating system which is on my laptop for 2 months. I feel that this operating system which I am proud even when I am using will be a pride of my country in the future. I had my last year internship in the optoelectronics lab in TUBITAK/UEKAE, so I am familiar with around. Unfortunately, I don’t have any experience with Python at all. I only had a quick look last year but because I didn’t practice it since then, I don’t remember anything at all. I never developed a GUI using QT. I don’t think learning this will take a lot of time, and I am thinking about working and testing it if I can find some time. Below I am writing the projects I choosed amongst internship projects. Amongst all of them, without the concern of their difficulties and required knowledge levels, the ones which interest me are:
- Migration tool
- Proxy settings interface
- Package building tool
- Support for adding other Linux distros to the GRUB menu
- Graphical configuration interface
My CV is attached. The official length of my internship is 2 months (40 work days) and I can do it in any timeline between July and September 2007. Yours sincerely. Have a nice day.
A personal reply (Turkish screenshot) from Koray Löker arrived on 24 April 2007:
(The detailed Turkish blog entry by A.Murat Eren is also worth reading.)
Intership (July 2007 – August 2007)
After I started my internship the thing I realized is the presence of interns who know about Pardus and Linux more than me and who already met with the Pardus Team. I worked on developing a XMLRPC-based communication layer to the buildfarm. Most of the time we were working with Ekin Meroğlu and S.Çağlar Onur, I was going to their desks, asking some questions, taking notes for the answers, getting back to the internship office and trying to do some work.
The internship period was fast, I learned many things, I have visited the tomb of Anibal, met many precious people, had fun.. And, on September 11 2007, Çağlar asked me “Do you want to work with us part-time?”. It was also interesting that this offer was on my birthday. I accepted it.
Part-time Contribution (October 2007 – August 2008)
Between October 2007 and June 2008 I supported the project part-time. I was working in automatic printer discovery infrastructure in my spare times. We first added this feature in Pardus 2008 which helped users a lot. With me, Gökçen Eraslan started working full-time, while Fatih Aşıcı started part-time.
When my part-time work was overlapping with my last year in my university, I couldn’t have enough time for Pardus. When I came back to the office after completing my thesis and graduating in June 2008, I had a conversation with Erkan Tekman, about “I want to do something academic, I’m planning to study in a graduate programme, and because I was spending most of my time about my thesis, the relation between Pardus and me grown apart.”, but he convinced me to stay in the project and also told me that I can have my graduate studies within my 1-day academic permission. So in August 2008, I started working in the project full-time.
Full Time Contribution (August 2008 – January 2012)
I have become a full-time developer in August 2008. At the same time, I started my graduate studies in Boğaziçi University Biomedical Engineering. But because of some personal and timetable issues, I realized that studies and work won’t go together at the same time, I left the university.
Gürer Özen, İsmail Dönmez and S.Çağlar Onur, the people that I couldn’t find enough time to develop together when I was working as an intern and a part-timer, left the project. After Çağlar’s departure, I found myself maintaining the kernel package. When I took the responsibility of the kernel package and kernel drivers, Pardus 2008 was being actively developed and we were using 2.6.25 series kernel.
In November 2008, I upgraded the kernel to 2.6.25.20 and with the patches I borrowed from SUSE, I added UDF support to the kernel. That was my first update to the kernel package.
Afterwards, we published Pardus 2009 with 2.6.31 series. With the Pardus Corporate 2, we first used 2.6.32 series, then we upgraded to 2.6.35 series. In Pardus 2011, we used kernels 2.6.36 and 2.6.37.
Besides the kernel and driver maintenance, I started moving the packages that were waiting in the devel repository to the 2008-stable repository. I learned what a patch really is, I fixed build errors, I upgraded packages, etc. This period educated me so well about package maintenance.
After a while, I’ve taken the printer packages from Onur Küçük. Other than that, I’ve also taken the responsibility for some basic libraries, scanner support, sound stack, Bluetooth stack, HAL, udev, wired/wireless network framework, etc.. Now it seems that I am the maintainer of 425 different packages in 2011 stable repository.
Meanwhile, I also am looking to our bug tracking system and see that I had 586 tickets assigned to me which are closed as FIXED. Of course it is an estimated value, there may also be the ones which are labeled as FIXED by mistake, and are assigned to me but resolved by someone else. However this number gives an estimate about how much I participated in this project.
Pardus Corporate 2
On the 10th of december 2009, as announced in developers mailing list by Project Manager Erkan Tekman, I became temporary release manager for Pardus Corporate 2. This release which was actually started with the managership of Ekin, was temporarily transferred to me because of Ekin’s short-term departure from the project for his military service. When Ekin came back from his military service and assigned as contractual projects manager, the release was given over me for real.
We have worked a lot for the Pardus Corporate 2 which was using KDE desktop environment’s not-taken-cared-anymore but stable and fast 3.5 series. I cannot say that there were no delays on the release schedule but all these delays were because to improve the final product in a better way. We tried to reflect the factors that should exist in a corporate edition as our power and skills were enough. And in the end, we published Pardus Corporate 2 in February 2011.
The interest for the product inside TUBITAK was also a lot. To improve AKIS, which was a smart-card operating system developed by TUBITAK, we worked together with the AKIS team and provided a very comprehensive AKIS support in Pardus Corporate 2 and we have presented it.
Again we tried to complete the requests from projects like EPDK and SKAAS. We worked together with these teams and we supported each other.
So, what happened then?
As specified in the issue (Turkish) on 28th of August 2011 in the local newspaper Milliyet, a new nomination operation occured with a decree law (which regulates reconstruction in the community institutions) and TUBITAK president Nükhet Yetiş is removed from the position. A few days later, Önder Yetiş, the president of BİLGEM quit.
Of course, I will not talk about politics in this last article of mine. The readers of this article will interpret this reconstruction process which started on August 2011, with their own perceptions and interpretations.
But,
This period of reconstruction which has been continuing for the past 5 months was a giant avalanche, destroying TUBITAK. There are many researchers, managers, projects and units which are affected by this avalanche, and there are also ones which are not affected at all.
Pardus Project was never honored as expected, in FATİH Project (It is a huge educational project funded by the government which consists of putting interactive whiteboards in the classes, giving special educational tablets to the students, etc.) The cabinet ministers of the government used funny and ignorant sentences like “There is an operating system called Pardus which TUBITAK developed.”
When there was no hope at all for the inclusion of Pardus in FATİH Project, in October 2011 Pardus Project was migrated from UEKAE to BTE and renamed as “Pardus for Fatih”. And we said: perhaps?
After a few days, a highly ranked manager had an unprofessional speech as “Microsoft decreased the license prices by 5TL/computer and the minister of transportation already told me that the project will be given to Microsoft”, in front of the institute employees.
Another day, we also heard that people were very thankful to Pardus because it was fighting hard against Microsoft, in Fatih Project!
Consequently, I realized that renaming Pardus into “Pardus for Fatih” is nothing but a distraction.
We also have witnessed that researchers who we know, respect, doing their job good were being demoted and assigned to lower-level tasks. Media and outer world was and could be never aware of what’s going on inside.
Me?
In this reconstruction process, my faith for this period will work out good for Pardus was so low, and that little remaining faith was completely destroyed by some meetings I have attended and some new people I have met. So I decided to go on as much as I can and in the meantime, to take care of the remaining issues as I can. I published a stable update for Pardus Corporate 2, upgraded the kernel to 3.2 in my playground, fixed some of the reported bugs. Just in case for a new version plan, I prepared packages for new Linux technologies like systemd, dracut, kmod in my playground. At the same time I continued to take care of the projects and exams about my graduate education.
Reassignment
On 29th of December 2011, I learned that I was reassigned to Ankara for a month.
I was hired for Pardus Project in October 2007 and I was not a subcontracted worker who will work between institutions and projects. And also to think that the upper mananagement was aware of my finals and academic schedule, the goodwill of this reassignment was very questionable.
I said, this is it, and I resigned from this destroyed institution.
And now what?
Now 14 people are working in the project which 11 of them are developers. TUBITAK soon will organize a workshop about the future of Pardus Project. I, who never thought I would be even invited to this workshop, think that this workshop will be destructive more than constructive. I hope I will be wrong.
Is there another distribution project?
I am still using Pardus 2011 at home and believe that Pardus has many advantages against other distributions, is more user-friendly and PiSi package management is successful enough and practical. For this reason, I want to continue Pardus by myself or with other people’s helps, under a new name. I even have a copy of the some part of the Pardus 2011 source repository in a GIT repository I created on GitHub. I sometimes commit my changes I do but there is only a little bit of progression for now, not even close to be a product itself.
But wanting is not the only key to it. Even though I say I want it so much, my graduate study and a possible new work-life will considerably decrease my possible contribution to this new project. For this reason, I want to think more about this and talk about it afterwards.
Thanks
First, I would like to thank my awesome manager Erkan Tekman for everything he made an effort, defended and targeted,
And to my friends I could remember, who worked for Pardus Project under TUBITAK, in chronological order:
Gürer Özen, Barış Metin, A. Murat Eren, Barış Metin, Faik Uygur, Onur Küçük, Ekin Meroğlu, S. Çağlar Onur, İsmail Dönmez, Görkem Çetin, Umut Pulat, Koray Löker, Bahadır Kandemir, Gökmen Göksel, Gökçen Eraslan, Fatih Aşıcı, Pınar Yanardağ, Taner Taş, Serbülent Ünsal, Ali Ulvi Tunç, Işıl Poyraz, Semen Cirit, Renan Çakırerk, Serdar Dalgıç, İbrahim Güngör, Eren Türkay, Erdem Bayer, Akın Ömeroğlu, Mete Alpaslan, Fatih Arslan, Meltem Parmaksız, Metin Akdere, Mete Bilgin, Mehmet Emre Atasever, Yasemin Yiğit Kuru, Hakan Şimşek, Uğur Eke, Gökhan Özbulak, Nihan Katipoğlu, Beyza Ermiş, Çağlar Kilimci, Mehmet Özdemir, Bertan Gündoğdu, Kaan Özdinçer, Pamir Talazan,
and also, to the people who worked or are still working in TUBITAK for different projects; Seda Polat, Fehime Bıyıklıoğlu and Özmen Emre Demirkol,
to ÇOMÜ and Necdet Yücel for the 64-bit support,
to the people from Artistanbul team; Ali Işıngör, Seda Akay, Gizem Belen, İrem Çobanoğlu, Uğur Çetin and everyone else that I didn’t have the occasion the meet personally,
to the creators and managers of Özgürlükİçin,
to the all Pardus users and communities which always supported and helped us,
and finally, to Önder Yetiş and our old management, which now I could understand better that they always helped us to go further and supported us as they can.
Finally…
*** [Less]
Posted
6 months
ago
It has been a long time since i wrote a blog entry. Here is some interesting piece for final year computer science students.
Getting a job is one of the happiest things in the life of a final year guy. I also had such wonderful moments
... [More]
during my final year. I would like to share some bytes of info that can help you out.
University/College studies and your first job
In the long four years of engineering course, you study a lot of things. Lot of junk and little good. In reality very few subjects really help and are useful for a computer science job. For getting a job, you will need even fewer set of subjects among them. Hence, finding a job is easy. But you have to master the subjects that you love. I will list out the few subjects that will help you find a job.
Data structures, Algorithms and Analysis, Operating Systems, Computer Networks, C Programming, Object Oriented Programming, Database Management systems, Compilers (Optional), Distributed Computing (Optional), Microprocessors (Optional)
The perspective of current education system and the industry goals diverge very much. In colleges, we study for obtaining some marks. The teachers also have the goal to help their students to obtain marks rather than learning something that may help gain the ability to solve computer science programs using their skillsets. In industry, the ultimate goal is to produce good quality software within short span of time. That means, the skill requirements are good coding skills, ability to understand and solve problems algorithmically with analysis to validate and come up with optimal and practical solution. To grow up as a software engineer that meets the industry requirements, the education system at college fails.
You have to put good self effort to gain the skillsets and the passion for learning. You should have good coding skills with proficiency in one or more programming languages, understanding of standard algorithm techniques at basic level. Let us have a run through objectives during preparation for a job.
Preparing your CV
Curriculum Vitae is important while applying for a job. Your CV is a blueprint of your personality. It is the first phase during a recruitment that gives the recruiters an overall view of your skillset and your background. Hence, it is worth to spend few days in preparing your CV. Note the following things while preparing your CV.
Use a different layout from other candidates who are applying for job along with you. Make yourself different from others. Write a career objective that states your interest. If you are applying for a specific role, Write a highlights section as the first section in your CV. Highlights should list out important achievements and your skillsets in bullets. This section is indented for HR who screens your resume. The next section can be ‘Skills’, which lists out your skill sets and programming languages. Write in an order separated by commas such that less proficient technologies should come last. You should also mention the operating systems you are familiar with. The next section can be Achievements. But you can move this section to the end of the resume if you think that you do not have considerable good technical achievements for highlighting. The next section should be Projects. This is the most important section in your resume. You should spend some time in writing this section. You should specify the title of the project, duration (optional), the technologies used, a summary of the project describing the project in few words, and project highlights section. The project highlight section should list key features about your project listed as bullets. Write them in an impressive manner stating the facts properly.
Eg.
1. Implemented a H.263 video streaming library for android 2.3
2. Implemented video frames collector and device mapper that converts video stream to v4l linux device
3. Tested on Android 2.3 and found that 25 % performance improvement than the bundled video library
If you have lot of numbers to showcase the benchmarking or awesomeness of your project. that is great. If your project bagged some awards or deployed for some good numbers of users, mention that figures and achievements in the highlights.
I would prefer to order the project in the order of significance rather than chronological order. After the project section, have an achievements section which lists all technical and non-technical achievements. You can split your achievements section into subsections like publications, events, etc. Write the educational background section as the last section of your resume. Because it is the most insignificant portion of a resume if you are looking for a good computer science job. It states few figures that indicate your marks which is not an indicator of your knowledge.
Tips for interview preparation
You should acquire sound knowledge about few of the subjects listed in the earlier section of this article. Usually recruitment process consists of a written test paper followed by a couple of interviews. Focus of your preparation should be based on the job position you are applying for. If you are preparing for a developer interview, you should be sound with Data Structures and Algorithms. You might be bored with the subject since you attended some boring series of lectures from colleges to grab marks. Try again approaching the subject in a different manner. You will definitely enjoy it. Start reading the book ‘Programming Pearls’ before you start preparing. It will give you a wonderful insight you never had before. I will focus on developer interviews.
Companies usually ask some technical aptitude questions, puzzles and questions from the subjects along with the test paper. Most of the questions will be repeated. Search for programmer interview aptitude questions and brain teasers for programmers on Google. You will find a good list. Try to solve them. Learning algorithms are not hard. But understanding the use cases and ability to apply them to solve problems require some effort and practice. Whenever you learn an algorithm, try to implement it using a programming language. For practicing algorithms to coding, you should use some highly object oriented and simple languages. The best language you can learn is python. You can practice coding algorithms with Python without any implementation complexity and it will look like a pseudo code. Learn python today. Seriously it won’t take more than a day to learn things that you will require to implement algorithms. C is a great language. Implementing certain Data structures or algorithms in C gives you a good experience to code well in C. I will write some notes on few algorithms that you should try implement in C. Algorithm analysis for important algorithms should be understood. You should know the worst case complexity (Find out the worst cases in the case of a particular algorithm), Best Case complexity (Also the best case) and the average case complexity (Also the average case example). Space complexity of the algorithm should be known in order to select the best algorithm according to problem environment.
Data Structures and Algorithms
Binary Search
This is a very important algorithm you can apply at many different problem environments you never expect.
Understand the runtime complexity for the Binary Search and understand how to derive the complexity from algorithm. Note that it can be applied for only sorted lists. Learn how to apply Binary Search in a Rotated Sorted List by using recursion and how the algorithm complexity varies. Implement Binary Search using C for a list of strings. You should familiarize the terms in place sorting, stable sorting and also should understand which sorts come into these categories.
Insertion Sort
Understand the algorithm and derivation of algorithm analysis. Compare it with Card game in which we move the cards to the suitable position. Keep the example in mind and apply to similar problems. In Insertion sort, we sort the element set by consequently moving the current element to the appropriate position in an already sorted set.
QuickSort
QuickSort is a very important sorting technique. It uses divide and conquer technique. Divide the given set of elements into smaller sets recursively and apply comparison and swap. When comparison and swap is performed to formulated smaller sets, it results in the larger sorted set. Learn algorithm analysis. Learn how to find kth smallest element by modifying the Quicksort algorithm in O(nk) complexity. Find out mean of a set of elements in O(n) by modifying the above problem.
MergeSort
Mergesort is also a divide and conquer sorting technique. The concept is to merge two sorted list to obtain larger sorted set. By dividing the given array into smaller subset by recursion, smaller subsets are formed. Merging the subsets from lower level to higher level, we obtain sorted array. Learn algorithm analysis. Note that merge sort takes an extra array. Hence this is not an in place sorting. It has O(n) space complexity. You should practice problems related to merge sort. Eg. You are given two sorted arrays with size n and 2n. The second array contain n elements in the positions 0 to n-1. Now without using extra space, formulate the elements in 1st and 2nd array into 2nd array and return a sorted array of size 2n.
HeapSort
Heapsort is an interesting sorting technique. Heap is a tree in which parent node is always >= child nodes (called as max-heap) or parent node is always <= child nodes (called as min-heap). This is the basic property for a heap. Let us have an overview of how to create a heap and manage it. When we need to add an element into an existing heap, we add the element as root or to the rightmost bottom element in the heap. Then apply heapify operation. Heapify operation can be of two types: shiftup and shift down. When we add a new element to an existing heap as root element, we perform shift down operation. Shift down operation performs a traversal from root level to bottom level, at each level of traversal, it compares whether heap property is violated, if so it will perform swap between parent node and child node to obey the heap property. Hence the element we added as root will move to the accurate position when the traversal reaches the bottom level. If we add a new element to the bottom right element, we need to perform a shift up to position the element to the right position. We traverse from parent in the bottom level to the root, by checking the heap property at each level and swapping elements to meet the heap property, we get a balanced heap when traversal reaches the top element.
Heapsort makes use of these operations to obtain a sorted set. Let us assume we have a heap (1,n). the root element will be the highest value (max-heap). Hence it will be the last element in the sorted list. We swap the root and the last element. Now the heap property is lost. But the nth position of array has the correct element in the sorted list. So we exclude nth element and heapify the heap(1,n-1) by using shift down operation. Because the root element is the one breaking the heap balance. After doing heapify 2nd time, we get 2nd highest element as root element. Now swap root element with n-1 element. Hence n-1, nth elements are 2nd largest and largest elements. Now exclude the n-1 and nth element, heapify heap(1,n-2). Follow the procedure until the newly formed heap size become one. You will get a sorted list. Read the chapter Heaps from Programming Pearls (It will give you a wonderful insight). Practice the problems: Find kth largest element from a given unsorted array. Implement priority queues.
External Sorting
External sorting is an important sorting technique used when the amount of data we need to process is greater than the available memory. For eg, we have 1GB of integers and 256MB of RAM. Hence it is clear that we cannot load entire list of numbers into ram and perform in memory sorting. External sorting techniques are to be used to solve this problem. K-Way merging is one of the simplest methods to solve the problem of RAM < data size. We can split the data into K parts. The part split is performed such that each split is less than the size of RAM. Then we can sort each part individually using any sorting algorithm. Then we can perform a special type of merging to obtain sorted output. Let us see how to perform the merge.
For eg, we split the data into 4 parts and we individually sorted them. Then take the first element from each 4 sorted lists and sort them and find out the lowest element. It will be the first element in the sorted output. Add it to the new list called full sorted array.
Now, from the array from which we obtained the lowest element, take the next element, sort the list again and find out the second lowest element. From the array we obtained 2nd lowest element pop out the next element and sort again to find out the third lowest element. Proceed the process until all arrays becomes empty or one array remains few elements. If an array remains unempty add those elements in the order to the full sorted array. Have a look at implementation code (http://code.google.com/p/kway/)
Bit array technique for solving RAM < Data problem for sorting counting numbers
In a 32 bit system an integer takes 32bits to store an integer and a 64 bit system takes 64bits to store a number. But for storing counting numbers, we can use bit vectors which are formulated by using 64 or 32 bits in an integer. If we set 0th bit in 32 bit we can represent it as 0. If we set 2nd position, we can represent it as 2. If we define an integer array of size N, we can actually represent 32*N numbers using that integer array. In order to sort large number of unique counting numbers we can use, bitsorting by setting and clearing bit positions. If we need to represent 1 to 68 numbers we need only 68 bits. We can represent it using an integer array of size 3. Ie, 32*3 = 96 bits. To set 68th bit, we know that 68th bit is situated in the array offset 2. To obtain the array offset, divide the number by 32. (68/32 = 2). Now we need to know which bit position needs to be set in the 32 bits available in array[2]. For that, findout modulus by 32. 682 = 4. Hence set the 4th bit in the array[2]. This can be performed without division and modulus operators by using bit shift operators.
i=68
array[i>>5] |= 1 << (i & 0x1F)
Here we find out i/32 using right shift operator (Each right shift causes division by 2.5 times rightshift = division by 2^5 (32) ). By using AND operation with 0x1F, we get 5 Least significant bits, the value of 5 LSB returns in the position in 32 bits. Hence we shift 1 towards that much positions to left and is ORed to do the bit set operation.
Have a look at the implementation code. http://cm.bell-labs.com/cm/cs/pearls/bitsort.c
Bit manipulation problems
By using bit manupulation, we can do lot of tricks over numbers. See http://graphics.stanford.edu/~seander/bithacks.html for lot of interesting bit twiddling hacks.
One of the very common problems, is counting the number of set bits in a number.
int count=0
while (n){
n=n&(n-1)
count
}
n&(n-1) will return a number obtained by setting rightmost set bit in number n to zero.
Another problem is to check whether a number is power of 2. For a number which is power of 2, there will be only one set bit in the number. Hence if we do n=n&(n-1), we will obtain zero. Using a single line operation we can identify power of 2 or not.
Hashing
Hash is an important data structure that can be used to solve different problems. When you are asked to find the number of occurrence of numbers in a given list of numbers, you can simply use hash for solving the problem. Iterate through the list of numbers, like:
for (n in numbers)
{
hash[n] = 0
}
for (n in numbers)
{
hash[n] = hash[n] 1
}
We can solve many problems in O(n) using hash.
Implementing a hashtable in C is not easy at a first attempt. Try to code yourself a hashtable in C using pointer to pointer.
Binary Tree and Traversals
Binary trees are common interview questions. There are lot of BT based questions. Have understanding of common questions like the following.
* Difference between full binary tree and complete binary tree
* Find out Maximum/Minimum height of a tree (Recursive and Non-Recursive)
* What is the maximum number of elements in a tree with height H.
* Nth smallest/largest element in a binary tree
* Algorithm to find out Least Common Ancestor (LCA)
For your information, Least Common Ancestor is the common node in a binary tree which is obtained by traversing from two selected leaf nodes to the root element.
Linked list problems
- Reversing linked list
Linked lists are also very common interviewer question. First practice to be done for linked list problem is to write a linked list structure in C yourself and implement linked list traversal. Then add functions to reverse the linked list in place as well as by creating new linked list. If you do not want a new linked list, but you only need to print the elements of linked list in reverse order, use a recursive function that can do recursive calls till the end of linked list and print the elements.
Eg.
void reverse(struct linked_list *list)
{
if (list->next!=NULL)
reverse(list->next);
printf("%s\n", list->element);
}
- Cycle in a linked list
Test for cycle/loop in a linked list is a commonly asked problem. You can initialize two variables as start node for linked list and traverse in a while loop such that while loop ends when one of them becomes null or both variables becomes equal. In the while loop, we traverse two variables with different speed.
(varA=varA->next, varB=varB->next->next)
Have a look at well explained tutorial, ?http://ostermiller.org/find_loop_singly_linked_list.html
Tree traversals
It is very important to understand all the tree traversals and implementation.
1. Preorder traversal
2. Post order traversal
3. Inorder traversal
Traversals can be easily implemented using recursion. But interviewers might ask about non-recursive algorithm. In that case, use stack based algorithm to explain inorder traversal. You can easily implement inorder traversal using stack.
Graph Traversals
Graph traversals are commonly asked in interviews. Have the understanding of Shortest path algorithms.
Depth First Search
In depth first search initially traversal goes deep into deepest node and traversal proceeds. You can use a stack to implement depth first search or else ?you can use recursion to implement this.
Breadth First Search
In breadthwise traversal, you can use it to print the tree in the sorted order. You can use the same algorithm used for depth first search by changing stack into queue to obtain the algorithm for BFS.
Dynamic programming
Dynamic programming is an important algorithm technique to solve a large problem by splitting into smaller overlapping problems. When overlapping small problems are solved, the larger problem solution is obtained. Problems like finding shortest path can be solved using dynamic programming. It usually involves using a storage of subsolutions so that they are used in solving bigger problems which overaps the subsolutions. The dynamic programming is difficult to identify as well as apply to solve to problem scenarios. It requires considerable spending of time to learn and master it. When you look into some problems and look at its solutions, you may feel it is not that hard. But when you are given a different problem you may not even able to identify it can be solved using dynamic programming. Even if you identify, you will find hard to code the problem solution. Hence, give considerable time to work on this one.
Try to learn the problem to find subsets of a set using dynamic programming
Trie data structure
Trie is an interesting data structure that can be used to implement autocomplete feature. You can read more about trie from my older blog post. (Implementing autocomplete with trie data structure)
Conceptual Questions
Lot of conceptual questions are being asked during interviews. It will test your basic knowledge and understanding. Find some of the commonly asked topics
* CPU Scheduling algorithms
* Layers of TCP and OSI network stack
* Understand how Virtual Memory/Paging works
* Understand what happens when you enter a URL on web browser and how website is loaded
* Understand how a computer boots and explain the story
* What is the difference between 32 bit and 64 bit machine and OS
* Understanding TCP/UDP protocol
* Understanding ARP/RARP
* Understand DHCP
* Understand DNS (Recursive, Iterative resolution)
* Understand how email works (POP, SMTP)
* Understand Web 2.0, REST, Thrift, RPC
* Understand IPV4 vs IPV6
Books/References
1. Programming Pearls
Programming pearls is a great book you should read as a computer enthusiast. You will be inspired to learn about data structures and algorithms.
2. Cracking the Code interview
It is a nice book consisting of lots of interesting questions
3. Glassdoor.com
Glassdoor is a great website consisting of lots of questions being asked for different companies. As a first programming exercise, write a perl/python/bash script to parse questions into a text file. I had a python script that I had written long time ago. (Lost that somewhere)
Choosing your first job
Every job interview is a great experience. In my life, i had attended three job inteviews and ended up in receiving 3 offers. Each of the interviews were different experiences. Once you face interviews build positive approach in finding feedback yourself. When you receive multiple offers, put enough effort to understand about what you are going to do with each of the job offers your receive. Choose the job you love to do, so that you never have to work a day in life. Thanks and all the wishes.
You can find few posts about interviews from this blog here, http://www.sarathlakshman.com/category/interview/
I dedicate this blog post to all my juniors in Computer Science Dept, Model Engineering College, Cochin
Image credit: http://www.flickr.com/photos/stevefrog8/ [Less]
Posted
8 months
ago
The biggest technology fair in Turkeyhas just been over. More than 100.000 visitors and about 1000 companies met for four days.
Pardus was one of the biggest pavilion as for the last years. We ran out of DVD’s before the fair is
... [More]
over, altough we prepared 10.000 of them with the latest release of Pardus, which is 2011.2 Cervus elaphus. :)
The pavillion was full of fun. We hosted the SigmaRD artist collective with their body/gesture controller based on Kinect, which is written with Qt and runs on Pardus.
Their project Natural Interface, converts human interaction (gestures captured through Kinect) to X events. Thus, you can control desktop applications by simple hand gestures.
We also provided a home entertainment unit with a comfortable couch and a big LCD TV. In the previous events, we were tired and bored from the questions and prejudices about games on Linux. This time we showed everyone, how you rock with Linux! Hundreds of people enjoyed playing World of Goo, Frets on Fire, Crayon Physics, Open Arena, Torcs etc.and watching HD movies (free movies of course like Sintel, Elephants Dream and Big Buck Bunny ;) )…
But most of the people was interested in the interactive digital board which was powered by Pardus.
I should tell about this a little bit more. There is a project called Fatih, aims to improve technological infrastructure of Turkish educational system. It is planned to install digital interactive boards in all classrooms and Pardus has been chosen as the operating system. This means more than 600.000 interactive boards will be powered by free software and KDE! :) Another chapter of the project is providing tablet PC’s to all school kids where it is still controversial if the OS will be Pardus or another system (Android?). That is a though decision as it means 15.000.000 tablets will be operated which will be 15% of the whole market of tablets. (Yep, that’s right! :) )
Finally I want to thank all volunteers for their great work ! We couldn’t do this without their faith. [Less]
Posted
10 months
ago
Hi, I've started working on Pardus linux distribution as an intern last week. This post is the summary of the first week at the office...
I've been supporting Pardus for almost 6 years and being volunteer at the events occasionally. I've met
... [More]
most of the developers during these events. However, I had a great opportunity to met the ones who I haven't met before and the other interns at the meeting in first day.
Other four days of the week, Pardus developers organized some workshops which are useful for interns in these subjects: Python, vi, ÇOMAR, PiSi, Qt, Linux kernel, testing and debugging... We had enough time to practice too.
I have an active developer application request, and I have plans for Package Manager. Since I'm in the same office with its developer, we had chance to brainstorm. Gökmen has also requested me to make some improvements in package details window. That window contains a web page and making improvements is a piece of cake!
While other interns practice what we've learned from workshops, I worked on improvements for the details web page. For development, I preferred nginx web server which I use a lot recently. However, I had to make some changes in php package to be able to use it with nginx. I needed to enable FastCGI support, and I had to update libc-client package to do that. After these changes, I've managed to build a new php package with php-fpm patch!
Recently, I changed static rating stars with jQuery and Raty plug-in. I've also created a new php class to help me with working SQLite database that holds the rating data. It's almost finished, I just need to implement a log in system for package ratings.
This week on Monday, it became official that my internship project is "improvements on package manager". Sexy screenshots are coming soon! [Less]