Friday, February 24, 2012

Job Switch - Day3,4,5

The days were quite hectic and due to which not able to post anything. For 3 more days since i started, i studies more of C. This time using a course of practical programming on C from ocw.

The start of the course was a bit lazy. So to compensate that i solved some problems from geeksforgeeks.

But now the course is going to be interesting as the real problems are going to be discussed.

So that's all.. Will not give much description this time.. I was busy with Office tasks as well so in between 3-4 days the study was on halt..

Plan of Day6:
As it is Saturday, the plan could be rigorous but i have to go to office. Thus the expectation should be less..
1. Go through some more chapters of OCW lecture notes. Solve problems in between and first lab.

Labels: , , ,

Wednesday, February 15, 2012

Job Switch - Day2


This is actually not day 2 when i started the preparation but due to some other commitments, i was not able to study anything.
Also, since i got some interview call, so thought of studying for that (of course with concentrating on C).

So, Today i studied linked list. Created some programs. I am feeling like a professional programmer (comments, debugs, splitting files).

Now about programs: 
1. Created basic program to create and print link list.
2. Program to swap the alternate nodes on a link list.
3. Reverse the linklist.
4. Adding/Removing nodes in front and at end of list.

Good Learns:
1. using pointer to pointer - a pointer to pointer = pointer pointing to another pointer which is pointing to a location. So we need to allocate memory for pointer to pointer. Then allocate memory for the pointers which the double pointer is pointing.
Eg. 
node** head;
head = malloc(sizeof(node*));
*head=malloc(sizeof(node));
2. efficiently moving with link list. -- handle head scenario seperately. Instead of trying to accommodate the head pointer scenario in the general flow, handle it separately. This reminds me that in some case I may need to do it for last node as well.

3. using gcc to build multiple files together(after this interview thing, i will learn how to create make files). Created a shell for building multiple files in a directory.

Now, Day 3 plan:
1. Devise more programs on linklist, tree, arrays, and strings.
2. Read about file handling.

Labels: , , ,

Sunday, February 12, 2012

Job Switch - Day 1

It was a good Sunday morning when i woke up. Started the day with a hot morning tea.

Now, update on today's plan:
1. Read first 10 questions of C-faq.
        Read first 3 only and then realized, it is not the way to learn C. May be it help for temporary purpose when i have an interview on next day and i just want to revise some good  questions. But anyways, during the course of day, i finished up reading 7 of them. :)
2. Make 3 basic programs in C.
        Task achieved. I have created 3 programs. Learnings from them follows.

Good Learns:
1. Use \n at the end of each line of debugs or printf.
2. scanf, printf - what they take and what they return. - to do
3. scanf - if u give some string with scanf, it will not ignore it and may include those also with the % arguments. So no use of giving extra information in scanf. Instead use printf to print to console.
4. so what are % arguments called - format specifiers. :)
5. TRUE - 1, FALSE - 0 if u use relational operators ('==', '<', '>' etc.).
6. = is also an operator (operates from right to left). So, a=b=c; will copy the value of c into b and then value of b into a (i.e. both a and b will be equal to c after the expression).
7. arguments to a function can be expression also, but they will be executed first before passing the values.
8. what happens when printing(using printf) a variable with data type different from the format specifier?
9. what if i don't give any argument to while loop? - compilation error. The argument or controlling expression is required for while loop which is not try in case of for loops.
10. Use of math library functions with gcc: They will not work as required if you don't use the -lm option to ask gcc to link the math library function.
11. Scanf - format specifier for double is %lf (see it as long float), similarly for long %ld.

Overall, I should say it a good start. Hope, it will be continued.

I am using the following link to get on the ideas and then use google for my rest of the queries.
http://www.eskimo.com/~scs/cclass/notes/top.html

Start Building dynamic part of the Website

When i decided to go with amazon ec2 for hosting my web site, i knew that i have to configure it on Linux.
To create a web site u need to first do following:
1. Start learning the HTML, CSS and javascript. They will help you in creating the static part of website.
2. Choose the language for dynamic part of website. It's mostly on the choice or the programming languages you already know.

I have chosen PHP as it is very fast (and i think it is easy to learn).

So let's start setting up PHP for web development. :)
1. Search for "setting PHP and mysql in ubuntu" in google. :)
    You will get links for various versions of Ubuntu. Now you need to know which version on you are.. (if u already know ignore next bullet).
2. cat /etc/issue: This will show you the Ubuntu version. For me it shows this:
    Ubuntu 10.04.1 LTS
3. Now add this version to your google search. Bingo!! You are feeling lucky :)
4. I have used this Link to setup rest of the details.
    http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-10.04-lamp
5. You can test your site by typing localhost in your web browser.

Now start learning PHP. More on PHP in later blogs.
   

Saturday, February 11, 2012

Job Switch

I have been procrastinating a lot about it. Tried a lot of methods but nothing works. So to stick with the schedule and to keep my blogging alive, I will post my whole plan with this post and also the plan for next day.
So here it how it will work. I will post plan for next day before sleeping and do whatever i can and then come back with whatever i learn. Write little about what i learn and then plan for next day accordingly.

Full Plan:
1. Without any distraction - Work (make 100 programs) on C.
2. After getting some fluency with C, I will move to C++. Again make 100 programs. This time lets make 50 more.
3. Then Start with Data structures. Make 30 programs.
4. Sorting and Searching. Make 50 programs.
5. Algorithms. Make programs till u understand each and every one of them. :)

Fifth point looks very lengthy but till then i will be capable and can start working on Job switch. Before that a BIG NO to all job interviews. Even if they attact.

Now tomorrow's plan:
1. Read first 10 questions of C-faq.
2. Make 3 basic programs in C.

Ok. That looks easy but i don't wanna overload myself on the very first day :D

Note: If u feel this is more personal information, then u must know this is a personal blog and i did not give you the link to this post. :P

Labels: