Thursday, 28 February 2013

Programs , Programmer should make at least once?

If You are interested in systems and infrastructure,  It Is recommended  
  • Networking. Write a server or two. A simple static-file HTTP server is a good start, or an SMTP server. If you want to get into concurrency, write a multithreaded IM server or game server. For the ambitious, implement a peer-discovery system and make it do something useful - for example, build a serverless local chat service.
  • Storage. Build a simple filesystem. FUSE can abstract away the kernel interfaces for you; all you have to do is implement the basic filesystem functions. Flattening a complex directory structure in a consistent, reliable, and expandable way isn't easy, and there are many edge cases to consider.
  • Assembly. Even if you never plan to use it in a real project, it's essential to understand how the computer actually works. Write a simple program or algorithm in assembly - quicksort is a good choice. Try to optimize it as much as possible. Implement setjmp() and longjmp() too - these will push you to break the rules you may have learned from higher-level languages.
  • OS concepts. Writing malloc() and free() is not as easy as you might think. Have you ever wondered why free() can fail in weird ways when free()ing non-malloc()'d pointers? (You can fix this, but it'll be slow.) Writing a thread scheduler might be overkill, but you'll learn a lot about locking and concurrency.
  • Languages. Write a compiler/interpreter for a language. Maybe even design your own language. Generating working code is a good start, but try to optimize the generated code if you can.

If Your are  interested in game development, It Is recommended  
  • Graphics. You want your game to look good. Write some simple OpenGL programs. Make a spinning cube first, then maybe add some sort of interactions with it. Make a particle system that follows some pre-defined rules, and play with rendering methods to make it look like something else (a fiery or smoky plume, or water droplets, for example). What you can display on the screen is limited only by your imagination.
  • OS concepts. Games are complex systems, and each piece has to behave in a certain way at a certain time. There's a lot of work to be done that the player doesn't see, but the game always has to be responsive when the player does something.
  • Networking. If you want people on different machines to be able to play with or against each other, you'll need to come up with a way for them to communicate. Design a protocol that's fast, but also allows room for expansion as you add new features.
  • Security. Players will always try to cheat, and usually security involves staying one step ahead. Try to think of everything players could possibly do with your program, and restrict them to the set of things they should be allowed to do. Some of the techniques involved can be  tricky - for example, you can't stop players from reading your game's memory, but you can make it hard to search by moving sensitive data around in memory often.
  • Artificial intelligence. Players may want to play with other people, or by themselves (with AIs). I don't have any recommendations here since my AI/ML background is rather lacking.
 eBay Ad:
  Let's Take A Look at  Online Mega Store; ebay
Read More

Tuesday, 26 February 2013

Who designed the Gmail logo?

Dennis Hwang designed the Gmail logo.
At the time, Dennis designed virtually all of the Google doodles and a lot of the new logo work as well.

The logo was designed literally the night before the product launched.

The initial version used the same font as the Google logo (Catull),
But Catull has a very awkward 'a',
So Dennis decided to use Catull for the 'G' to tie the brand to Google,
then cast the others in a cleaner sans-serif (Myriad Pro, if I recall correctly).
 eBay Ad:
  Let's Take A Look at  Online Mega Store;

Read More

Sunday, 24 February 2013

What are the differences between HTTP and HTTPS?

Hyper Text Transfer Protocol (HTTP) is a protocol, which is used for transmitting and receiving information across the Internet.
  • No encryption is Here
  • URL begins with “ http:// ”
  • It uses port 80 for communication.

HTTPS is a combination of Hyper Text Transfer Protocol (HTTP) and SSL (Secure Sockets Layer)
Where, SSL is currently  Most frequently used  to provide security for Internet communication,
So HTTPS is more secure  for transmitting and receiving information across the Internet. 

This type of communication is used for accessing those websites where security is required. 
Like...Banking websites, payment gateway  where HTTPS protocols ar other secure protocol Must be used.

  • Encryption is present Here.
  • URL begins with “https://”
  • It uses port 443 for communication.

The HTTPS transaction is bit slow and More time is required for Decrypting / Encrypting.
 eBay Ad:
  Let's Take A Look at  Online Mega Store.   ebay
Read More

Wednesday, 20 February 2013

What is adding "salt" to a password/hash?

-As U know,Authentication of users is very Needed on a website using a password
-The most obvious solution is to store the raw password in a file and compare that to the password they've entered.
-But, This has the problem that any breach of the password file reveals the user's real passwords.
-These can be used to break into the user's accounts at other sites and raises the severity of the problem from a local issue to one much more severe.

-To solve this problem we can "hash" the password, using a one-way function that converts the plaintext password into a new value.
-It's possible to then compare the hash of the user's input to the stored hash but it's hard to take a particular hash and figure out what password was used to generate it.

"Salting" is a security practice of adding random data (a "salt") to a password before hashing it and storing the hashed value. 
The salt is stored in plaintext.

-It is common to use assumed one-way functions (normally  Hash fun.) to store passwords,
because you never need to recover the encrypted password ,But  you only need to verify that a candidate password is correct.

But, Hashes are deterministic which presents a problem with unsalted password strings.
In the simplest case, if two people chose the same password, then I can tell that their passwords are the same. 
More importantly, if one is  trying to crack a large number of hashed unsalted passwords, any result could hit any of the passwords.

So..By Salting, A Successful Attack can be applied to only one password at a time,
So, is difficult to tell whether two passwords (with uniq salts) are identical.
 eBay Ad:
  Let's Take A Look at  Online Mega Store;
ebay   ebay

Read More

Sunday, 17 February 2013

Best computer / Programming Quotes

"Computer science is no more about computers than astronomy is about telescopes."
-  Edsger Dijkstra

"If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is."
- John Louis von Neumann

"Only ugly languages become popular. Python is the one exception"
- Don Knuth

“To iterate is human, to recurse divine.”
- L. Peter Deutsch

“Talk is cheap. Show me the code.”
- Linus Torvalds

“The question of whether computers can think is like the question of whether submarines can swim.”  -Edsger W. Dijkstra

"A computer is a stupid machine with the ability to do incredibly smart  things, while computer programmers are smart people with the ability to  do incredibly stupid things. They are, in short, a perfect match."
- Bill Bryson

“Hardware: The parts of a computer system that can be kicked.”
Jeff Pesis

" Programming is the most fun you can have with your clothes on. "
- Professor John Guttag (MIT CS Prof)

"Without electrical engineering there are no computers; computer science is to electrical engineering as the art of making love is to the art of making beds."
 - Bertrand Meyer

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
- Brian W. Kernighan and P. J. Plauger in The Elements of Programming Style.

Program testing can be used to show the presence of bugs, but never to show their absence.
- E.W.Dijkstra

“ If debugging is the process of removing software bugs, then programming must be the process of putting them in. ” 
-  Edsger Dijkstra

"Programming  today is a race between software engineers striving to build bigger and  better idiot-proof programs, and the Universe trying to produce bigger  and better idiots. So far, the Universe is winning."

"To understand recursion, you first need to understand recursion."

"The best thing about a boolean is   even if you are wrong, you are only   off by a bit."

C programmers never die. They are just cast into void.

 eBay Ad:
  Let's Take A Look at  Online Mega Store;
ebay   ebay


Read More

Saturday, 16 February 2013

Who designed Google's Android icon?

Irina Blok created the little green robot (known as the "bugdroid" among Android team members) in  2007. She was a member of Google's marketing communications team,

In which She was helping  with copywriting and graphic design in preparation for the announcement of the Open Handset Alliance on November 5, 2007 and the early look SDK on November 12th. 
 eBay Ad:
  Let's Take A Look at  Online Mega Store;
ebay   ebay

Read More

Thursday, 14 February 2013

eBay Ads:
best selling and shopping at eBay 

Let's Take Example Of C Language..
It has 4 Stages.. 

1. Preprocessing:
(In gcc, it is the 'gcc -E' stage).Here, The Preprocessor replaces the #include files, include guards, #define (macros), etc with code.

2. Compiling:
(In gcc, It is the 'gcc -c' stage) Turns code (after preprocessor is done with it) from human understandable text to "machine code".
Basically, into assembly language (creates .o files for instance).
To be noted here is that the .o files so created still have textual symbols in them, not actual memory addresses. 

Compilation itself has many sub-stages (  ): 

3. Linking:
(in gcc,It is gcc -o stage) Turns the files produced from Compilation stage (object files like .o, .so files, etc) into actual executables (a.out, or a.exe).

This is where two things happen:
     A. Relocation:
     The Executable needs to be "built" into a format that the OS will understand. Whatever the compiler
     hands off to the linker needs to be laid out into the executable's data segment (holds program data),
     text segment (holds program code), heap (holds dynamically allocated memory through malloc, calloc, etc),
     stack (holds program stacks - return addresses for functions called), etc. 

       B. Symbol resolution:
       The symbols generated from step 2, are actually resolved into addresses here. These are not actual
       physical addresses in memory; these are some "temp" addresses. Resolving them into actual addresses in
       memory is a job that is done by the operating system's memory manager. 

4. Runtime: The runtime loads the dynamically loaded dlls (dynamic link libraries) as needed for the executable so generated, resolves shared dependencies, etc.

 eBay Ad:
  Let's Take A Look at  Online Mega Store;
ebay    ebay
Read More

Tuesday, 12 February 2013

Some of the greatest Windows PC Short-cuts

  1. Right-click on an empty space on the taskbar - show windows side by side or show windows stacked.
  2. WIN KEY + D to show desktop/minimize everything.
  3. WIN KEY + LEFT/RIGHT Keys put window to left/right of screen. Side by side positioning.
  4. WIN KEY + UP/DOWN to maximise and minimize.
  5. You can drag and drop files on the commandline instead of typing the whole path
  6. Select multiple files, press F2 to rename all of them sequentially.
  7. When typing, the HOME key puts the cursor at the beginning of the line. The END key puts the cursor at the end of the line.
  8. Control + Backspace deletes a word at a time. At least in Word.
  9. F6 to highlight the address bar to select long urls.
  10. While on the desktop, Control + Middle Mouse Button zooms in and out. This one is just fun.
  11. Middle-click a link to open in a new tab.
  12. Middle-click a browser tab to close it.
  13. Control + Shift + T to open recently closed tab.
CTRL + ALT + DELETE / CTRL + SHIFT + ESC for Task Manager

 eBay Ad:
  Let's Take A Look at  Online Mega Store; ebay
Read More

Saturday, 9 February 2013

What are the differences between new and malloc ???

The Main difference between new and malloc is 
- new invokes the object's constructor and
the corresponding call to delete invokes the object's destructor.

- new is type-safe, while malloc returns objects of type VOID*
- new is an operator and can be overloaded, malloc is a function and cannot be overloaded
- new[ ]  allocates arrays,and it's more intuitive than malloc
- new throws an exception on error while malloc returns NULL and gives error no
- malloc can allocate an N byte chunk of memory, while new must be asked to allocate an array of, say, char
- malloc-derived allocations can be resized via realloc, new-derived allocations cannot be resized

Although it is legal for new and malloc to be implemented using different memory allocation algorithms,
On most systems new is internally implemented using malloc, yielding no system-level difference.
 eBay Ad:
  Let's Take A Look at  Online Mega Store; ebay

Read More

Tuesday, 5 February 2013

Best Programming Jokes.....

A programmer gets a phone call from his wife
on the way home. "While you're out, buy some milk."
He never returns.
A programmer had a problem so he decided to use Java.
Now he has a ProblemFactory.
Programmer's girlfriend asks him,
"Are you going to sit in front of the computer all day,
OR are you going to take me out for shopping?"
Programmer replies "Yes".

The programmer's wife asks him to go to the store.

"Get a dozen eggs. And if they have milk, get 2"
He came back with 3 dozen eggs.

A programmer had a problem climbing Mount Everest,
So he is thinking of dividing Mount Everest into multiple pieces and conquering it.

Q: How many programmers does it take to change a light bulb?

A: None, that's a hardware problem.

Q. How did the programmer die in the shower?

A. He read the shampoo bottle instructions: Lather. Rinse. Repeat.

A man is smoking a cigarette and blowing smoke rings into the air.
His girlfriend becomes irritated with the smoke and says,
“Can’t you see the warning on the cigarette pack?
 Smoking is hazardous to your health!” 

To which the man replies, “I am a programmer.
We don’t worry about warnings; we only worry about errors.”

Two PROGRAMMERS are talking:

- How can you be so stoopid, that your password is the name of your dog?
- Why, what is your problem with wkf41a2s?

A coder pours his heart out to his buddy:
"Dude, I don't know what is happening...
 3rd day in a row it seems I just can't get it up..."

"Really? Dude, did you try Safe Mode?"

 eBay Ad:
  Let's Take A Look at  Online Mega Store;
ebay    ebay   ebay
Read More

Saturday, 2 February 2013

Why are 32-bit architectures limited to 4 GB of RAM?

They aren't. 
32-bit architectures are not limited to 4GB of physical RAM. 

But,The limitation is 32-bits (or 4GB) of VIRTUAL address space in a single process.
It is possible for a 32-bit processor and operating system to support more than 4GB of PHYSICAL memory. 

PAE Mode on x86 processors: (
Physical Address Extension) is the most common example. 
So We can have more than 4GB of RAM, We just can't see it all at the same time.
Read More

Friday, 1 February 2013

  • Finding the best route through the grocery store given a list of items
  • Opening and closing parentheses/braces before filling in the content.
  • Using underscore to_separate_words and *asterisks* for emphasis
  • Counting from zero is weird in the real world.
  • Eating lunch at 3pm and going to bed at 3am.
  • Finishing sentences with semicolons.
  • instead of using 'if' and 'otherwise' i started using 'if' else'.
  • Think of an app idea for every life problems
  • Too lazy to clean up my room because They believe in 
    garbage collector
  • typing git instead of get
  • Thinking that every problem in life can be solved algorithmically.
  • Thinking that if I start a line I write with "//" nobody will read it.
  • Real world '=' is different from a programmer's '='
  • Try to solve an emotional problem logically by breaking it into small events.
  • Using backslashes to escape quotation marks within a quote.
  • I have this nasty habit to ask people to "ping" me once they have an answer/update.
  • Drinking Redbull before writing the next piece of earth shattering code.
  • Doing exponential backoff on a bus when a collision happens.
  • Using "sudo" if your request is rejected.
  • Thinking and focus in engineering instead of solutions and solve the problem.
  • Forgetting to go outside and spending all day answering two year old forum questions.
  • trying to complete a word by using TAB or Ctrl_Space

 eBay Ad:
  Let's Take A Look at  Online Mega Store ebay .
Read More