Wednesday, August 29, 2007

Do you know how to install Java? You need to get what is called as the JDK. At the time of writing, Java is now currently Java 6, that does not mean that the previous versions were 1,2,3,4 and 5. It was 1.0 then 1.1, 1.2, 1.3, .14 and then when it came upto 1.5, they renamed it as Java 5 and so 6 is also 1.6. In this huge ocean of Java developers that the world is, don't be taken aback if someone says that he works on the Tiger (Java 5 was codenamed the Tiger). In fact, the project which set about making Java was called "project Green" (now you know how to ask something back).

So, back to installing Java, you basically need a java compiler. If you are scraed of the word compiler, its something which makes a "program" out of the statements that you write in Java. It's the black box or the magician which converts your file which has the System.out.print("hello"); statement you typed to a program which prints "hello".

Some information about the Java Compiler Software:
-> It is also called the JDK (Java Development Kit)
-> It's also called the J2SE (Java 2 Standard Edition)

In fact, JDK 6 is called "Java Platform, Standard Edition 6 Development Kit".
Here are some interesting TODOs:
-> Find out what Java 6 is codenamed as.
-> Go to java.sun.com and see what that website is all about.
-> Find out what J2EE and J2ME mean.

Wednesday, August 22, 2007

Java Java Java

The name "Java" is everywhere.... everyone knows it.. the layman thinks of it as a strange name of a coffee bean which means something big in computing. We programmers, designers, developers, testers and everyone else know it as the most ubiquitous language today, probably used in your next door coffee shop billing application, as well as in NASA's Rover project to Mars.



This is not a book that will drill you down into the basics and then try to teach you each part of the language in a systematic fashion. I have been into Java for about nine years now and I have never, ever finished reading a book on Java -start to end. This is going to be a journey for the pragmatic java programmer, who looks to java for solving anything, and everything. We look at java's powerful libraries and see how they can be used to solve our modern-day problems. and along the way, we learn the language as well. So, this book is meant to be read when you are ready aside your computer and not by the bedside where you use this to ease yourself into sleep (as I used to do).



Let us get going then. Like every other book on any other computer language does, this one is also going to provide you with a "hello world" program (i know you will start complaining "what's so different about this one now" ) , but in the process, we will look at a lot of stuff you will rpobably never know even if you are an experienced Java programmer.



Do you know how to install Java? You need to get what is called as the JDK. At the time of writing, TBC

Sunday, August 19, 2007

How to make a pinhole camera

An ordinary camera has a lens that makes an image on film. In a pinhole camera. a small hole replaces the lens. You can construct a pinhole camera using:

  • corrugated cardboard from a box, or stiff cardboard from the back of a pad of paper
  • black paper
  • black tape
  • a cartridge of 126 film*
  • aluminum foil
  • two large rubber bands
  • a ruler
  • a pencil
  • scissors
  • a sharp knife
  • a straight pin or sewing needle


Making a pinhole camera

The diagram shows the basic construction of a pinhole camera. The body of the camera is a cardboard box that is open at both ends. To make this box, cut a rectangle of cardboard that measures 5 3/4 inches by 2 inches.

Divide the long edge of the rectangle into four equal sections. as shown. Use your knife to score the cardboard along each of the lines. Fold the cardboard along the scores to make an open-ended box.

Before you tape the edges together to make a box, you need to make the interior black to minimize reflection of light within the camera. You can cut a piece of black paper and fold it to make a black lining for your box, or you can cover the inside surface of the cardboard with strips of black tape. You could also paint the inside flat black with spray paint or tempera.

Now tape the edges together to make a box, and tape all the box's edges and corners to prevent light from leaking into the camera.

Insert the box into the film cartridge as shown. It should fit tightly. When you hold the open end of the box up to your eye, you shouldn't see any light leaking in where the box fits into the cartridge.

To make the front of the camera, cut a rectangle of cardboard that measures about 1 3/4 by 3 inches. Cut a square hole that measures about 1/2 inch by 1/2 inch in the center of the rectangle. Line the inside of the front of the box with black paper or tape, leaving the hole open.

Tape a 1-inch square of aluminum foil over the square hole, and make a small pinhole in the center of the foil.

When you aren't taking a picture, you need to cover the pinhole with black paper. We made a shutter that slides into black paper guides. as shown.

To ensure that no light can leak in, tape the box to the front with black tape. Fasten the camera to the cartridge with rubber bands, as shown.


Taking photos with your pinhole camera

Through the window in the back of the film cartridge, you'll see arrows. Use a coin as shown in the diagram, turning it clockwise to advance the film in the direction of the arrows. Eventually, you'll see the frame number 1 through the window, the first in a series of 1's. Stop advancing the film when the third and fourth 1 in the series are both visible through the window. Now you're ready to take a picture.

To get a sharp photo, it's important to hold your pinhole camera steady To keep the camera steady. one of our staff suggested that you "tape it to a brick." He attached his pinhole camera to a tripod with rubber bands.


This photo was taken with a pinhole camera.

Using ASA 200 film in bright sunlight, we found that we got good pictures with exposure times varving from one to three seconds. The ideal exposure time will depend on the size of your pinhole and the brightness of the day. Experiment with different exposure times, and you'll learn which times give the best results.

After each photo. advance the film until the third and fourth number in the series of frame numbers appear in the window. When you've finished the roll, you can take your film to a commercial photoprocessor for developing.

* Kodak still has a limited supply of 126 cartridges. You can get them directly by calling the Kodak Info Center at 1-800-242-2424 x10. They accept MasterCard and Visa only. If you buy directly from Kodak, you will be paying full retail prices. If you need a large quantity, contact a local dealer who can special order them at dealer cost and possible give you a discount.