Friday, November 30, 2007

cUp and cAp - Pictorial representation of words in English

Look at the image I drew, the 'U' signifies that a cup is in that shape and it can hold stuff. The 'A' on the other hand signifies that a "cap" is a COVER, the 'A' symbol is like the one that closes on top.

just a illustration to state that objects were named based on the characters.

this is just my theory ---

Umbrella starts with a 'U' and as per the previous theory it should have been starting with a 'A', to signify that umbrella is to cover us from rain...

to disprove:
oh may be this way, holding us against rain :) In this case they chose the literary meaning; "holding". what ever that holds be it holding for OR holding against starts with a 'U'.

Another example to prove/disprove: 'Utensil' / 'Atom'

I enjoy viewing my thoughts from different stand points, trying to contradict and approve. (this is one of the reflections)

Thursday, November 29, 2007

A peek in to internal product names

Having worked with several product companies in the past, I have come across fancy names being given to the products internally.

Where did this notion start?

May be IT guys are bored hearing of all the technical jargon's all the time or lack of new words. The most common names that I have come across are the names of products after mountains, lakes, islands, Greek mythology and names after movies too.

When a new guys walks in to the company, he learns the various jargon's the company produces (each month :)) and on top of that the product names that are no way related to the technology.

names that I have come across:
Pluto, katmai, Yukan, Orcas, Longhorn, Apache, Octurus, Aruba, Kokomo, Matrix, Batman, Batman & Robin, Xfiles, Helios, Apollo, Gabriel, Luna, Sparc, ....

Wednesday, November 28, 2007

Programming traditions --foll--from--the--past>

Whenever you learn a new computer language, you come across typical traditional programs and naming conventions.

Digging the etymology of them below:

1. You learn C, C++, Java, C# the first program in many books/tutorials is the print "Hello World!".

probably it is attributed to K&R who created 'C' language which is introduced a phenomenal way in which programming are done today. May be using this as baseline, all the programming languages start with the print "Hello world" program. Do not know what do they used to teach during COBOL/FORTRON days.

World's biggest Hello world program

//C code

void main()
printf("Hello world");

//Java code
public class HelloWorld

public static void main (String[] args)
System.out.println("Hello, world!\n");


//C# code
public class Program
static void Main(string[] args)
System.Console.WriteLine("Hello World");

2. Function name is foo()?
what is foo btw - click here
origin of foo()

remember this:
// C code
void foo()
void bar()
// Neither foo() nor bar() accomplish anything useful,
// and the use of either will lead to a stack overflow error

void foobar()

3. local integer variable names i, j and not a, b?
May be (I)nteger starts with 'i'?, well may be... some one started it and it continues. Or people from maths started using j, k as they were close to integers (See the link below for more) as computers are after all math based !!!
slightly different but from a math world - why is J used for set of integers

4. --More to add--

Monday, November 19, 2007

C# using indexes on Enums

This is a sample code snippet:

Definition of your enum:
public enum ETagNumbersForHTML
None = 0,
One = 1,
Tiny = 5,
Small = 10,
Medium = 50,
Large = 100,
ExtraLarge = 1000,
SuperLarge = int.MaxValue

Main method:
static void Main(string[] args)
Random rnd = new Random(0);
int value;
Array values = Enum.GetValues(typeof(ETagNumbersForHTML));
int myRnd = rnd.Next(0, values.Length);
value = (int)values.GetValue(myRnd);

Thursday, November 15, 2007

another puzzle

There are N(>1) balls in a row. Each ball is of a different colour. I make lot of swaps where in each swap I interchange the position of two different balls. After K swaps, I see that the original order of balls is restored. In other ways, the order is just the same as it was before we started to do any swaps. Prove that K is always even?

Wednesday, November 14, 2007