Arduino Boards

Is the programming language and codes same for the uno,leonardo,duemilanove,mega?

Yes, mostly.
Leonardo behaves slightly differently and has some additional capabilities because it has direct usb connectivity.
Mega has much more RAM and code space than the others.

Since you've mentioned several boards, perhaps you haven't made a choice yet. Most people tend to concentrate on the Flash memory that each machine has, but in most cases the most restrictive limitation is the amount of SRAM. It's the SRAM that will hold most of your data. If you need a lot of Flash and SRAM, the Teensy 3.1 has 256K of Flash and 64K of SRAM, is clocked about 4x faster than most Arduinos. You can use the Arduino IDE to program it. The best choice depends upon what you want to do with it and the depth of your pockets.

The Teensy is USD 19.80 on the Arduino store. And the 16u2 on the Uno can be reprogrammed (see my signature). The Mega is great if you need lots of i/o.

1284P has twice the SRAM of a Mega, 16K. Great if you have lots of variables and need 12 more IO than an Uno.
DIP package so you in you smoke it you can replace the chip.
I offer boards in several form factors, here's a couple:



It's worth noting that the Teensy is based on an ARM chip, as is the Arduino Due (most arduino boards are based on ARM chips)- this reduces compatibility with some libraries; further impacting compatibility is the fact that both of them are also 3.3v units (though the Teensy3.1 has 5v tolerant pins).

If you don't need the ram/flash, I recommend an AVR based board for starting out, since you'll find much more help for it here, and compatibility is better. The Uno is a great board to start out with, though depending on your project, you may need the pins/flash/ram of a 1284p or Mega.

How could I forget Bobuino?

@DrAzzy: Correct. I know that some libraries have issues, but I haven't run into one yet. As far as a good place to start, I think the Nano is a good choice. It's smaller than the UNO and costs less. I just bought 3 for $8US, including shipping.