Bharat Banate's Work Profile

View Bharat Banate's profile on LinkedIn

Tuesday, August 5, 2008

Real world Ruby

I am working on Ruby language since last few months. I really wondered, this is so beautyful language to work with, so what could be various usages of this great language? I Googled a bit for this and found many fascinating facts. I thought like sharing this information with you. Many people use Ruby in their daily jobs, others as hobby. But there are many other useful and important areas where Ruby is being used.

Simulations
NASA Langley Research Center uses Ruby to conduct simulations.

A research group in Motorola uses Ruby to script a simulator, to generate scenarios as well as to post process the data.

3D Modelling
Google SketchUp is a 3D modelling application which uses Ruby for its macro scripting API.

Business
Toranto Rehab uses a RubyWebDialogs based application to manage and track on-call and on-site support for IT help desk and IT operations teams.

Robotics
At MORPHA project, Ruby was used to implement reactive control part for the Siemens service robot.

Networking
Open Domain Server uses Ruby to allow people using dynamic DNS clients to update their IP configuration in real time so that it can be mapped to static domains.

Telephony
Ruby is being used within Lucent on a 3G wireless telephony product.

System Administration
Ruby was used to write the central data collection portion of Level 3 communications Unix capacity and planning system that gathers performance statistics from over 1700 Unix (Solaris and Linux) servers scattered around the globe.

Web Applications
Basecamp, a web-based project management application developed by 37signals is programmed entirely in Ruby.

43 things allows you to keep a list of goals and share it with the world. It was developed entirely in Ruby.

A List Apart, a magazine for people who make websites that has been around since 1997, has recently been revamped and uses a custom application built with Ruby on Rails.

Blue Sequence, a sophisticated mission-critical application which forms part of Toyota Motor Manufacturing's own "Sequence-in-time" production process, has recently been selected as finalist in this years British Computers (BCS) Information Management Awards.

Saturday, July 26, 2008

What is Raid Level and LVM in Linux...

What is RAID and LVM

RAID is usually defined as Redundant Array of Inexpensive disks. It is normally used to spread data among several physical hard drives with enough redundancy that should any drive fail the data will still be intact. Once created a RAID array appears to be one device which can be used pretty much like a regular partition. There are several kinds of RAID but I will only refer to the two most common here.

The first is RAID-1 which is also known as mirroring. With RAID-1 it's basically done with two essentially identical drives, each with a complete set of data. The second, the one I will mostly refer to in this guide is RAID-5 which is set up using three or more drives with the data spread in a way that any one drive failing will not result in data loss. The Red Hat website has a great overview of the RAID Levels.

There is one limitation with Linux Software RAID that a /boot partition can only reside on a RAID-1 array.

Linux supports both several hardware RAID devices but also software RAID which allows you to use any IDE or SCSI drives as the physical devices. In all cases I'll refer to software RAID.

LVM stands for Logical Volume Manager and is a way of grouping drives and/or partition in a way where instead of dealing with hard and fast physical partitions the data is managed in a virtual basis where the virtual partitions can be resized. The Red Hat website has a great overview of the Logical Volume Manager.

There is one limitation that a LVM cannot be used for the /boot.

Thursday, June 19, 2008

C++: void pointers

The keyword 'void' can be used to define a pointer to a generic term. In C++, special care has to be taken to handle the assignment of void pointers to other pointer types. Following code shows the same:

void *p;
char *s;
p = s;
s = p;

Here, the second assignment would flag an error indicating a type mismatch. While you can assign a pointer of any type to a void pointer, the reverse is not true unless you specifically typecast it as shown below:

s = (char*) p;


C++: Anonymous unions and enums

An anonymous union does not have a union name (tag) and its elements can be accessed directly without using a union variable.
For example,

union {
int i;
char ch[2];
};

Both i and array ch[] share the same memory locations and can be accessed directly simply by saying

i = 10;
ch[0] = 'A';

Simply omitting the union name in declaration does not make the anonymous union. For an union to qualify as an anonymous union, the declaration must not declare a variable of the union type.

Similarly, we can build anonymous enums as shown below:

enum {first, second, third};
int position = second;

The stream I/O classes define several anonymous enumerated types.

Monday, May 19, 2008

Do you know?

If you want to find out which interrupt caused your application to terminate, use following formula to find this out.
Interrupt Number = Return Code - 128
where,
Return Code is value returned by your application on exit.

Cheers!