Tuesday, July 10, 2007

Can a C code give different outputs on different runs??

At first glance on the topic, your answer immediately would be "NO!!"

Let me clarify my situation to explain the topic better. I am talking about a C code that used network sockets provided by the OS. Many such clones of the program are running simultaneously and these interact among themselves using the BSD sockets.
I really got expected execution sometimes by just repeating the whole process of execution just one more time for confirmation... And what happens, it executes properly!!
With all these experiences of mine, I thought about jotting down some common factors that may affect socket programming..
Pointers for socket programming:
  • Never give up with just one wrong execution of the program. Try at least 2 times.
  • Carefully choose your buffer sizes. No error is flagged and this is a very easy way of losing data while transmitting or receiving.
  • DON'T flood the network with packets continuously with packets from different sources to different destinations. It just does not work!! Give some breathing time for it to transmit the packets successfully.
So... Go on and give your best network code in C :)

Intern Life

Its almost been the tail end of the topic concerned when I am writing this.. But this is when I actually made this blogspot working with its new features and all that it claims...
Coming to the point, I got through into Summer Fellowship Programme through a selection process and was then allotted a professor to work under. And it happened to be Computer Networks under which I was supposed to work. It is such a new and growing topic with people around the world finding things that will in the future make your networks work faster and more secure! The curriculum part of the area showed no hint to the vastness of the topic.(boooooh :( )
Well it went on and I was supposed to write C code to simulate some protocol.
I am feeling too sleepy to continue now... Maybe I will try to finish with some more posts within this week....
Keep reading.... :)