Monday, June 20, 2011

Infographic of the Day



Infographic of the Day


Infographic of the Day: The future ain’t what it used to be. I don’t see a flying car anywhere on this chart!

Infographic of the Day

Infographic of the Day: "

Infographic of the Day



Infographic of the Day: The future ain’t what it used to be. I don’t see a flying car anywhere on this chart!


[reddit]



Tagged: computers, Infographic, the future


"

Tuesday, June 14, 2011

Fibonacci number in O(1) time!

It takes O(Exponential) time if you use recusion...
takes O(n) if you use loop with two variable
can it be solved in O(log(n))?

More better, it can be solved in O(1) time ?!!!
#include  stdio.h
#include  math.h  //please add smaller and larger symbol

unsigned long long fib(int n)
{
    double x = sqrt(5)/5;
    double f1 = x * pow((1 + sqrt(5)) / 2, n);
    double f2 = -x * pow((1 - sqrt(5)) / 2, n);

    return (unsigned long long)(f1 + f2);
}

int main()
{
    int n;
    printf("Find nth Fibonacci number, n = ");
    scanf("%d",&n);
    printf("%dth Fibonacci number: %llu\n",n,fib(n));
    return 0;
}

Unsigned long long type can represent largest number which has <=20 digits. For  larger number, use gmp library or use higher level language.

This algorithm use golden ratio.

Thursday, June 9, 2011

ToStudyList

http://en.wikipedia.org/wiki/Fast_Fourier_transform
http://zung.zetamu.net/Files/XSTK2010_2chapters.pdf

Tuesday, June 7, 2011

Every year

Obviously every year is annual. Every two years is biennial.

What does a developer do?

http://programmers.stackexchange.com/questions/81929/is-it-normal-for-people-to-not-work

Q
After graduating college I was hired as a Junior Programmer a little over a year ago. I quickly noticed that I was degrees of magnitude faster than all the other programmers; this seems to be because I simply don't waste time "in general".. The majority of other people however seem to enjoy staring the ceiling, browsing youtube/facebook/random websites, and in general doing in a day the work I usually do in an hour. I'm 100% sure they would be able to do that work in an hour too if they focused.
I've been quickly promoted to Senior Developer and more recently to Team Leader and now I replaced a lot of those people with new hires (still a couple to go).. The situation is now more acceptable, but still I think it could be much better.
I can't help to notice though that everyone seems to behave like this is "normal".. All my bosses aren't concerned about this and they too seem to work little to nothing. I always have a very hard time finding them, they arrive much later than they are supposed to and leave early.. Obviously there is nothing I can do in this case since they're above me, but I'm now wondering if this is the "norm" in all companies or I simply ended up in a very bad one (this is my first work experience). Also I'm wondering if in a few years I'll "become like them".

Sunday, June 5, 2011

How to become a Linux system administrator

One of the FAQs that I get is "How can I become a Linux system administrator". I got into sysadmin by mistake and learnt things the hard way i.e. by making mistakes. I do not know of any college courses that train people to be a sysadmin. There are private coaching centers that promise to train people to become a certified RedHat or Novell system administrator, but frankly I am wary of their capabilities. The main reason for my caution against these private institutes is the quality of the teachers there - anyone who is a good sysadmin will usually get picked up in the job market in a jiffy.

Here are things I think that anyone in the college right now and looking to become a sys admin can do. Note that I am focussing here mostly on the technical skills required.