Monday, January 21, 2013

A conversation between a Soldier and Software Engineer in Shatabdhi Train

Hi! This post is the very much interesting to you even if you're not from IT field. Must read!
The content has been taken from Notes of a Facebook page Service Selection Board of Indian Military.


Vivek Pradhan was not a happy man. Even the plush comfort of the air-conditioned compartment of the Shatabdhi express could not cool his frayed nerves. He was the Project Manager and still not entitled to air travel. It was not the prestige he sought; he had tried to reason with the admin person, it was the savings in time. As PM, he had so many things to do!!
He opened his case and took out the laptop, determined to put the time to some good use.
"Are you from the software industry sir," the man beside him was staring appreciatively at the laptop. Vivek glanced briefly and mumbled in affirmation, handling the laptop now with exaggerated care and importance as if it were an expensive car.
"You people have brought so much advancement to the country, Sir. Today everything is getting computerized. "
"Thanks," smiled Vivek, turning around to give the man a look. He always found it difficult to resist appreciation. The man was young and stockily built like a sportsman. He looked simple and strangely out of place in that little lap of luxury like a small town boy in a prep school. He probably was a railway sportsman making the most of his free traveling pass.
"You people always amaze me," the man continued, "You sit in an office and write something on a computer and it does so many big things outside."
Vivek smiled deprecatingly. Naive ness demanded reasoning not anger. "It is not as simple as that my friend. It is not just a question of writing a few lines. There is a lot of process that goes behind it."
For a moment, he was tempted to explain the entire Software Development Lifecycle but restrained himself to a single statement. "It is complex, very complex."
"It has to be. No wonder you people are so highly paid," came the reply.
This was not turning out as Vivek had thought. A hint of belligerence crept into his so far affable, persuasive tone. "
Everyone just sees the money. No one sees the amount of hard work we have to put in. Indians have such a narrow concept of hard work. Just because we sit in an air-conditioned office, does not mean our brows do not sweat. You exercise the muscle; we exercise the mind and believe me that is no less taxing."
He could see, he had the man where he wanted, and it was time to drive home the point.
"Let me give you an example. Take this train. The entire railway reservation system is computerized. You can book a train ticket between any two stations from any of the hundreds of computerized booking centers across the country.
Thousands of transactions accessing a single database, at a time concurrently; data integrity, locking, data security. Do you understand the complexity in designing and coding such a system?"
The man was awestruck; quite like a child at a planetarium. This was something big and beyond his imagination.
"You design and code such things."
"I used to," Vivek paused for effect, "but now I am the Project Manager."
"Oh!" sighed the man, as if the storm had passed over,
"So your life is easy now."
This was like the last straw for Vivek. He retorted, "Oh come on, does life ever get easy as you go up the ladder. Responsibility only brings more work.
Design and coding! That is the easier part. Now I do not do it, but I am responsible for it and believe me, that is far more stressful. My job is to get the work done in time and with the highest quality.
To tell you about the pressures, there is the customer at one end, always changing his requirements, the user at the other, wanting something else, and your boss, always expecting you to have finished it yesterday."
Vivek paused in his diatribe, his belligerence fading with self-realization. What he had said, was not merely the outburst of a wronged man, it was the truth. And one need not get angry while defending the truth.
"My friend," he concluded triumphantly, "you don't know what it is to be in the Line of Fire".
The man sat back in his chair, his eyes closed as if in realization. When he spoke after sometime, it was with a calm certainty that surprised Vivek.
"I know sir.... I know what it is to be in the Line of Fire......."
He was staring blankly, as if no passenger, no train existed, just a vast expanse of time.
"There were 30 of us when we were ordered to capture Point 4875 in the cover of the night.
The enemy was firing from the top.
There was no knowing where the next bullet was going to come from and for whom.
In the morning when we finally hoisted the tricolour at the top only 4 of us were alive."
"You are a...?"
"I am Subedar Sushant from the 13 J&K Rifles on duty at Peak 4875 in Kargil. They tell me I have completed my term and can opt for a soft assignment.
But, tell me sir, can one give up duty just because it makes life easier.
On the dawn of that capture, one of my colleagues lay injured in the snow, open to enemy fire while we were hiding behind a bunker.
It was my job to go and fetch that soldier to safety. But my captain sahib refused me permission and went ahead himself.
He said that the first pledge he had taken as a Gentleman Cadet was to put the safety and welfare of the nation foremost followed by the safety and welfare of the men he commanded... ....his own personal safety came last, always and every time."
"He was killed as he shielded and brought that injured soldier into the bunker. Every morning thereafter, as we stood guard, I could see him taking all those bullets, which were actually meant for me. I know sir....I know, what it is to be in the Line of Fire."
Vivek looked at him in disbelief not sure of how to respond. Abruptly, he switched off the laptop.
It seemed trivial, even insulting to edit a Word document in the presence of a man for whom valor and duty was a daily part of life; valour and sense of duty which he had so far attributed only to epical heroes.
The train slowed down as it pulled into the station, and Subedar Sushant picked up his bags to alight.
"It was nice meeting you sir."
Vivek fumbled with the handshake.
This hand... had climbed mountains, pressed the trigger, and hoisted the tricolour. Suddenly, as if by impulse, he stood up at attention and his right hand went up in an impromptu salute.
It was the least he felt he could do for the country.
PS:- The incident he narrated during the capture of Peak 4875 is a true-life incident during the Kargil war. Capt. Batra sacrificed his life while trying to save one of the men he commanded, as victory was within sight. For this and various other acts of bravery, he was awarded the Param Vir Chakra, the nation's highest military award.

Sunday, July 1, 2012

A Small Attempt to Make You Look Into the Future: 4G

The vision of mankind is always beyond the future. The communication technology has developed very rapidly since last few decades. The mobile phone has became the window to the world of information. While 3G is revolutionary thing that man has achieved. The attempts are being made to develop 4G that is the fourth generation communication technology. Very soon within a year the 4G will be ready for deployment. I explained you briefly about 1G, 2G & 3G. This post is targeted towards all the technical predications about 4G.

Although 3G was revolution and just like extension to existing 2G services, 4G is a evolution. 4G is entirely new thing distinct from 2G and 3G telephony. 4G is chiefly aimed to enable users to have uninturruptible and and amazingly high-speed internet access which is give rise to several new features, for example real-time HD video conferencing, streaming, live TV, online gaming, telepresence etc. The whole mobile network architecture is redesigned to achieve high-speed connectivity.

The air interface used in 4G, as explained before is LTE (Long Term Evolution). Just like 2G uses TDMA, 3G uses WCDMA, 4G uses a new technology known as OFDMA (Orthogonal Frequency Division Multiple Access). The core network of 3G is WCDMA. Similarly the core network in 4G is referred as SAE (System Architectural Evolution). This core network is flat all IP network. The major advantage of SAE is that it is designed in such a way to accommodate all networks such as GSM, CDMA, Wi-fi (IEEE 802.11) , Wimax (IEEE 802.16) . That is the device supported with Wi-fi, Wimax etc. can be also supported by SAE. 4G uses MIMO (multiple-input and multiple-output) technique to achieve this much data rate. MIMO is the use of multiple antennas at both transmitter and receiver to improve communication performance and efficiency.

The 4G is totally devoted to data communication and there is no support for traditional voice calls. You cannot dial a phone number directly. Thus, all voice calls are VoIP calls. Your voice after dialing any number gets routed towards the IP network and not PSTN network. By the way, there is also support for IP video calls with much higher quality and less image and voice distortion as compared to 3G video call.

Considering speeds, there is peak download speed upto 1 Gbps and upload speed upto 0.5 Gbps in 4G SAE if the operator has reserved spectrum of 20 MHz.

That's all! Verizon in USA and Vodafone in Germany have successfully launched 4G services. Probably in India the, 4G will arrive after 2015 considering the interest of operators and people. I think my small attempt to make you look into the future will be indeedly successful!

Thanks and regards,
Nitish R. Muley

Wednesday, March 7, 2012

Media Codecs, Containers and Formats: A Ready Reference

Digital Media is a revolutionary thing all over the world and is the cheapest source of entertainment as well as infotainment for a common person. In the last decade, the availability and emulation of digital media is so much increased. We can't stay away from our MP3 players, iPods and cellphones. MP3 music is the greatest invention for music industry and is very much easily available anywhere. The popularity of MP3 is mainly due to its flexibility, platform independence and its fine compression which can produce better quality audio at lower bitrates (usually 128 kbps is preferred). But still, there is somewhat confusion among people about the media formats, codecs and containers. Today, I am going to tell you everything about these things. Usually, the common audio formats that we use are .wav, .mp3, .aac, .amr, .wma, .m4a etc. On the other hand, the video formats are .mpg, .avi, .mp4, .3gp, .mkv, .wmv etc. Every format is developed for a particular purpose and is emulated on particular platform.
In the sense, digital media (audio or video) is compressed into relatively small files by a software known as ‘coder’ and is again reproduced into original media by the software called as ‘decoder’. The word ‘codec’ refers to the amalgamation of coder (co) and decoder (dec). We have to install a particular codec on our system to emulate or play particular format of media. Three type of codecs are 1. Image codecs, 2. Audio codes and 3. Video codecs.
MPEG (Moving Pictures Experts Group) is the standardization group of experts of ISO which develops and sets standards for video and audio compression and transmission. Another group of this standardization is VCEG (Video Coding Experts Group) which is formed by ITU (International Telecommunication Union).

Audio Codecs:
The consumer audio comes from music industry originally in ‘compact discs’ (CDs). This audio is in uncompressed format which provides very much good and surround quality of sound. A CD contains 80 minutes of this uncompressed audio. It doesn’t require any codec software for playback or emulation. This uncompressed audio requires a lot of space on disc. This space is not available on many systems. So, this uncompressed audio is ‘ripped’ on hard disc and compressed into small files by the ‘codec’ that we manually choose. These codecs compress the audio into very small-sized files (of few MBs) which are easier and better for playback. Let me summarize some of the main audio codecs:

1. PCM (Pulse Code Modulation): This is very basic method to represent analog voice signals digitally. It was invented in 1937. But, it is still the standard form of digital audio in computers, telephones and other systems. This is the lossless codec implies audio is not compressed in this format. Its filename extension is .wav.
2. MP3 (MPEG-1 Audio Layer-3): This codec was designed by MPEG and is patented by USA in 1993. It is the lossy method of audio compression implies during compression there is some loss. It reduces the amount of data required to represent an audio signal. Thus, gives the same quality of sound as that of CD. The MP3 file created is about 11 times smaller than original CD at bitrates of 128 kbps. Thus it is very efficient codec. Its filename extension is .mp3.
3. AMR (Adaptive Multi-rate Audio): This is audio compression codec designed especially for human speech recording. This is adapted by GSM and UMTS as their standard audio codec. Usually, digitally recorded audio is compressed using AMR which vomits the streams other than human speech resulting many hours of recorded speech compressed into few MBs. This was invented in 1999. Two forms of AMR are NB (Narrowband) WB (Wideband). This is used in real-time audio streaming on web due to its small size. Its filename extension is .amr.
4. MIDI (Musical Instruments Digital Interface): This is actually not a codec but is the method optimized for storing and reproducing instrumental music streams. This stream doesn’t contain actual audio signal but contains codes of particular instrument at a particular frequency. So, the whole music stream is stored in few KBs saving disc space. Its filename extension is .mid.
5. MP2 (MPEG-1 Audio Layer-2): This was developed by MPEG is now replaced by MP3 but remains dominant for audio broadcasting and is used on Video CDs. Its filename extension is .mp2.
6. AAC (Advanced Audio Coding): This format is successor to MP3. This is the lossy compression codec for storing digital audio and is now standardized by ISO. It achieves better audio quality than that of MP3 at similar bitrates. It is the default audio codec for Apple Inc. products. Apple Lossless format is the implementation of AAC. It is also adopted as the audio part of MPEG-4. Its filename extension is .aac or .m4a. .m4a refers to MPEG-4 audio stream.
7. WMA (Window Media ™ Audio): This was created by Microsoft Corporation and is the default audio codec for Microsoft Windows and their products.


Video Codecs:
The playback of digital video on computer system is not very simple because if video is uncompressed, it consumes a lot of GBs of hard disc and also volatile memory. So, video often comes in compressed form. Following are the most common video codecs:
1. Motion JPEG: This is the most basic video codec where each video frame is compressed as a stream of JPEG images. It is the lossy video codec. It is common in video-cameras.
2. MPEG-1: It is the lossy codec for video compression developed by MPEG. It is now a widely compatible video codec. This codec is used in Video CDs, digital cable/satellite broadcasting.
3. MPEG-2: This codec is successor to MPEG-1. It was primarily developed for ‘Digital Television Broadcasting’, cable and satellite TV. The first version of technology for DTH, DVB -1(Digital Video Broadcasting) uses MPEG-2 codec. MPEG-2 is the default video codec in DVDs. Its main feature is that it transports higher resolution and higher bitrate video much efficiently and provides very much better quality.
4. MPEG-4: This is the successor to both MPEG-1 and MPEG-2. This is referred commonly as ‘MP4’. It is the multipurpose version of MPEG having many applications regarding the needs of cellphones, pocket players, videoconferencing, broadcasting etc. There are again two parts of MPEG-4. These parts are 1. MPEG-4 Visual and 2. MPEG-4 AVC.
1. MPEG-4 Visual: This part has major two profiles namely, Simple Profile (SP) and Advanced Simple Profile (ASP). Simple Profile is used in situations where the low bitrate and low resolution is mandatory e.g. cellphone, pocket player, low videoconferencing etc. Advanced Simple Profile is commonly used on PCs or higher resolution systems. The video running on cellphone is usually MPEG-4 Visual Simple Profile. MPEG-4 Visual is similar to H.263 codec developed by VCEG of ITU. Streaming videos on YouTube mobile use this codec.
2. MPEG-4 AVC (Advanced Video Coding): I highlight this part because it is today becoming the widely compatible video codec having very high efficiency and compression capability. It delivers the high-quality of video at relatively lower bitrates. It saves upto 50% bitrates during compression resulting into smaller size of video file. As per my observation, a complete rip of movie is compressed in 750 MB in AVC format. It is mainly aimed at the distribution of high-definition (HD) video. Almost every HD video comes in this format. It is the official video codec on Blu-ray disc. The second version of technology used for DTH, which is DVB-2 uses MPEG-4 AVC. This is codec also aimed real-time high-quality video-streaming as well as videoconferencing. The streaming videos on YouTube and other websites use this video codec.
Actually, development of this video codec was the joint project of MPEG and VCEG. Thus, MPEG-4 AVC is also called as H.264 referring to successor of H.263.

5. H.263: This is a video codec originally designed for low-bitrate systems such as cellphones. The videocalls on UMTS or 3G network use this codec. This is also used on streaming videos on Internet. It was used on YouTube. But, with the arrival of H.264 or MPEG-4 AVC, many of the websites including YouTube have discarded this codec. The alternative to this codec is MPEG-4 Visual Simple Profile which is already explained.
6. H.264: This is same as MPEG-4 AVC. Literally, H.264 is another name for MPEG-4 AVC.

7. DivX (Digital Video Express): It is the most popular private video codec which is developed by DivX Networks Inc. Its main feature is to compress lengthy video segments into small-sized files at higher visual quality. It is supported on many DVD players. It actually implements both profiles of MPEG-4 Visual (SP and ASP). It is the video codec commonly associated with ‘ripping’ of DVDs.

8. Xvid: It is the competitor to DivX. It implements MPEG-4 Visual ASP. It is similar to DivX, also compresses lengthy video segments into small-sized files and associated with ‘ripping’ of DVDs. It is also supported on many DVD players. It is not a separate video format but is a ‘program’ to decode and encode MPEG-4 ASP videos.

9. WMV (Window Media ™ Video): This was created by Microsoft Corporation and is the default video codec for Microsoft Windows and their products. It is also adopted on Blu-ray discs.

10. HEVC (High-Efficiency Video Coding): Also referred as H.265, HEVC is emerging video codec having amazing efficiency of compression. This will be the successor to MPEG-4 AVC or H.264. The final drafting work on this will complete in 2012.


Containers:
Media container is the particular ‘file’ which bounds video and audio together using specified codecs. You can refer video container as video format. Every container has its own filename extension and can support many codecs at a time. Following table summarizes some of the popular video containers or formats.


Sr. No.ContainerDeveloped byFilename ExtensionSupported CodecsNotes
1.MPEG-TSMPEG.mpgMPEG-1, MPEG-2Widely Compatible
2.AVI (Audio Video Interleave)Microsoft.aviMotion JPEG, DivX, Xvid, AVCWidely Compatible
3.MPEG-4MPEG.mp4MPEG-4 Visual, MPEG-4 AVCBecoming Widely Compatible
4.3GPP (3rd Generation Partnership Project)3GPP.3gpH.263, MPEG-4 Visual Simple ProfileDeveloped specially for mobiles
5.FLV Flash VideoMacromedia Flash.flvH.263For video streaming on web
6.MatroskaMatroska.org.mkvMPEG-4 Visual, MPEG-4 AVC/H.264Stores number of subtitles, audio and video streams into single file. This format is getting very popular due to this unique feature. One can switch between audio and subtitles during runtime. Commonly used for storage of full-length movies and TV shows.
7.QuickTime MovieApple Inc..movMPEG-4 Visual ASP, AVCDeveloped for Apple products
8.DATVideo CD.datMPEG-1Container format for video on VCD
9.DVD-Video ObjectDVD.vobMPEG-1, MPEG-2Container format for video on DVD

And this was the sufficient information which may be required by you anytime. I think MP3 from audio and MP4 from video should the standard formats as they are widely compatible as compared to others.
I will always provide you updated information about this subject. Be in touch…
Thanks and Regards,
Nitish R. Muley