Monday, October 10, 2011

Understanding "understanding"

I have lately been wondering about how we understand things. How we capture data from different sources and relate to each other to make it meaningful. Being a programmer, I wish that these can help make computers understand. Now all that we do is make it work the specifically the way we want them to work. A simple google search would reveal that "Machine learning" is the way to go. But first do we understand how we understand?

I ponder about these and hope to post what I think about.

Note: I have used a link to the Andrew's lecture notes. It is only to indicate a reference to the topic.

Monday, August 8, 2011

Fossil SCM

Fossil is a distributed source control, distributed bug tracking and distributed wiki. Yes, heard about "distributed" in scm (git). It is similar. But why, what's the advantage?

Why - The entire snapshot repository comes in a single file (as SQLite database). That file has all the required data:

  1. Source code -> The project code base, most important one.
  2. Bug tracking -> Track all the associated bugs of the project at the same place.
  3. Wiki -> Documentation about project objectives, its details.
  4. Events -> A timeline of all the activities performed on fossil.
  5. A web interface that can be launched from the small foot print fossil executable.
  6. Lots of configuration options

NOTE: All of the developments may not take advantage of this. But, on the other side, if the development need/requirement matches Fossil, use it! Its excellent :)

The web-interface or the UI launches with most of the configurable items. A simple

./fossil ui

is all we type and this launches a web-browser with fossil user interface.

Wednesday, March 30, 2011

Day 2: Vegetable shopping!

26th March, Saturday
Toulouse

In the morning, we went to the Market to buy some vegetables, taaza taaza! :). some tomatoes, chilli, beans, carrot and some hard bread - Occitane?. We had poha in the morning and prepared sambar in the evening. We lazied away the afternoon. In the evening, we were invited for Tea. Their daughter Amilie very very cute, speaking short french words.
Papa - Dad (same as hindi :))
Mama - Mom
Bebe - Baby

After gaining some energy, we took a long walk to jean jauras (thats how I heard, excuse me with the spelling), a place at the centre of Toulouse. Toulouse, as a fact is teh fourth largest city in France. My laptop is still without power. A power converter was available in the stores, but its too costly (8 Euros). The day ended very fast... like a blink of an eye.

Au revoir (Bye)
Bonne journee (Have a good day!)

Day1: Paris, Blagnac and St. Cyprien

25th March, Friday
Saint Cyprien

It was an extended morning and as we landed at the Paris airport, Charles de gaulle airport, the first step on foreign land and the first sight of non Rupee. We quickly changed terminals for our next flight. I found myself alone at the terminal waiting for the next flight. There was pin drop silence. From nowhere, a blonde came and asked "What would you like to have for breakfast?". I shook my head to see that I was still in the aircraft and a grumpy lady was waiting for my answer.

Aircraft landed (really!) and now officially, the first mighty step on foreign soil, first breath of foreign air, first smell, first sight...whatever. Immigration procedures took over and now waiting near the boarding gate. Few minutes before the flight, the boarding gate was changed, but that was close by too. We kept hearing the new sounds of the language and trying to enjoy on every possible phrase uttered, we were probably over-elated.

We boarded the flight to Toulouse and cut --- we reached Blagnac Aeroport. Thankfully, my luggage was already on the conveyor. Our colleagues received us at airport and drove us to the Saint Cyprien, the Aparthotel (Apartment cum hotel). The room (house?) has a living room, a kitchen, and a bedroom (and of-course, a washroom).

I quickly noticed that my laptop's power cable would not suit the socket requirements. Oh no! :( Strange power sockets! We ate our first french lunch, goat cheese, honey, nuts (noix). Burp!

TIP 1: Always check the power specifications of the destination country and get a suitable adapter if necessary.

We were tired but excited... that kept us awake. Went across streets and found a supermarket, Carefour (pronounced care-fu), bought some groceries, few bottles and cans.

Dum maaro dum... :S

Sunday, March 27, 2011

Day 0: Destination Toulouse

24th March 2011
Bangalore

The euphoria of my first journey abroad kicked in to all my nerves. Not that it was not there before when I heard about my travel, but only that this is the "D-day". All bags packed and somehow I had the feeling that due to this, there was every possibility of forgetting things necessary for mundane activities. To ensure things were right, triple checked all things that were packed.

I had a good bath and went out for dinner, just then received an SMS that the Meru cab had arrived to pick up for the airport. I called the Meru cab driver from the SMS I received earlier and to my astonishment, he was still finding his way to my new abode. Lucky that my room-mate guided the driver to my residence. Allz well and picked my co-traveler cum colleague.

It took an hour to reach the airport. We quickly weighed our bags to check for any extra luggage weight as Air France allowed only 23kgs of check-in baggage. Our third traveler had arrived after the said "30 mins" - was actually over an hour.

Next step was the routine check-in and issue of boarding pass. This time, the only difference was that I had to hold my Passport along with the ticket. Now, the first time for immigration, was little on my nerves - what should I fill in the immigration form, what would the official ask, what if I forgot a document. It was my turn for the immigration check. A small conversation history I could remember:

Officer: Are you travelling abroad for the first time?
Me: Yes
Officer: Where are you going?
Me: Toulouse
Officer: Why?
Me: -answered-
Officer: Which company?
Me: -answered-
Officer: Can you show me your company id card?
Me: Oh, yes (where did it go? did I keep in the check-in baggage?... Found!).. here it is.
Officer: What is your employee number?
Me: (puzzled for a moment and trying to interpret his question)
Officer: STAMPED, here you go.
Me: Thanks!

This was it? Wow.. not bad. Then, the usual security check and boarding. This was a Boeing 777. The "Tempo class" (Economy) had 3-4-3 seating arrangement. We internet-checked in and reserved the seats in advance, for some strange reasons, I dont knw why, the website showed only 15 seats can be selected -- that too 26 hours in advance!? . Two of us as a last resort chose the center seats of middle row of the "3-4-3". I settled down just behind them in one of the center seats of the middle row. This was the only uncomfortable part of the journey. "OK"! adjust maadi. I sleep now (I slept).

I woke up to find that I had crossed the Arab world. Only a few more hours to CDG! (Charles de gaulle airport, Paris). I gained a day, did I? -- Timezones allow us to stay young :P

Thursday, October 14, 2010

The fate of two bits

Currently a bit represents two states OFF and ON state. We also call it as 0 and 1.

· 0

· 1

Similarly, through natural progression of numbers, a two bit number can represent a maximum of 4 numbers:

· 00 => 0

· 01 => 1

· 10 => 2

· 11 => 3

When we generalize, the number of symbols that can be represented through a ‘n’ bit binary is 2n.

For, 1 bit => 21 = 2, 2 symbols can be represented.

22 = 4 …

For a byte (8 bits), 28 = 256 unique symbols can be represented.

---

Now, what if a bit can represent more than two states? Say a bit can represent 3 states…

· 0

· 1

· 2

Then, two bits (each 3 states) can represent…

· 00 => 1

· 01 => 2

· 02 => 3

· 10 => 4

· 11 => 5

· 12 => 6

· 20 => 7

· 21 => 8

· 22 => 9

To generalize, n bits (each with m states) can represent (m)n symbols.

Practically, two bits can represent 4 symbols when a single bit can have two states… (Since our computers are designed to handle 2 states, we usually assume that a bit has only 2 states).

Like we have 64 bit computers, when would we have 64 mbit computers... Wonder how C programming would turn to look like! :)

Saturday, September 4, 2010

The news of C++

C++, this world opened up for me only in the mid of 2000, almost 10 years [#woo.. I did not realise it was 10 years till i just recollected it was 2000], was started way back in 1983 by Bjarne Stroustrup [#not born then]. It was predominantly C until then [#although many other languages did exist], thanks to simula and Stroustrup,C ++ was born. It introduced OOPS and came with it, a lot of features encapsulation, abstraction, polymorphism, inheritance and modularity [#these are the ones I remember]. Those were concepts, the language per say had new programming constructs, keywords, etc... example: class, templates[# Please excuse, if templates were not part of C++ earlier], enum, private(all 3 Ps), friend, etc and one important thing... guess what? ... its backward compatibility with its predecessor C [#debatable on good or bad].

Now time for standards, Around 1998, ISO C++ working group introduced a standard called C++98 [#today, most of the compilers support this]. It had defects and were fixed by 2003. Typically around this time (may be little earlier, 2001), a need was felt for a host of new extensions and improvisations to the existing C++, the most successful and popular C++ libraries -- Boost (a good part of it was just macros, meaning just a few header files :)), plugged most of the holes in the standard C++. Realizing this, a technical report was prepared by the standards comittee called C++ Technical Report (popularly known as TR1, careful, its a PDF) which had suggestions similar to boost library [#mostly stolen from boost :P]. But, But, But, TR1 was not a standard, but a draft which compilers could implement. (I think VS2008 implemented TR1 under the namespace std::tr1)

A very recent development, not yet released [#but still, lots of blogs on it], next version of C++ standard, C > C++ > C+=2? [#people would kill me for this :P] its called C++-0x , and would be published by the end of 2011... We will not be getting to use the new additions till few more years?? ... draft needs to be released, published, implementors analyse and implement into compilers, libraries, ..... Nah Nah..! Most of implementors have already begun work on this! As most of these additions were specified in TR1, the game is already ON. [# I always dreamed of using the C++ language to its boundaries, now with the boundaries expanding, i am left with a :x ]