Computer Tips for Physicists

Well, not so much "tips" as admonitions (HOWNOTTOs). A quick list of the most important and easy to fix computer goof-ups that physicists do. Table of contents:

JPEGs

Do not use JPEGs for anything but photographs. The JPEG format uses lossy compression which makes line drawings look terrible. Essentially any other format is fine. For raster images, I recommend using PNGs, which offer very good lossless compression and are supported by all modern programs. In many cases, you want a vector image, probably as a PDF (although hopefully some day we'll standardize on something better than PDF).

Since JPEGs are so poorly suited to line drawings, their file sizes are actually larger even though they are throwing away information in an attempt to save space! To illustrate, here's a PNG, the same image as a JPEG with the same file size, and again as a "high quality" JPEG with a much larger file size:


11 kB PNG
11 kB JPEG
45 kB JPEG

The second JPEG (at four times the size of the other images) looks acceptable on most screens, but will not look good if printed.

Greek on the web

  • When you want to have a Greek letter on a webpage, the only way you should do it is to use, for example, θ to make a θ. The full official list of such things is on the W3 site.

    Do not type a normal (Latin) letter and specify a different font for it. This is more work for you and will generally come out wrong on other browsers and operating systems. Try also to avoid using images to represent text, also, since the images will not scale with the rest of the page and cannot be viewed by search engines, blind people, or people using text-only browsers. If you feel you need to use an image, include an alt tag that gives the same information, for instance: <img src="complicated_formula.png" height="100" width="200" alt="The integral of e to the quantity i delta squared x dx equals seven pi" />.