Tag Archives: Eclipse

add-ons CVS development environment extension firefox how-to IDE php plugins procrastination science science project source control sun tools web-development XUL

How to build an eclipse viewing box with your kid

You should never look at a solar eclipse directly, but building a simple eclipse viewer is easy. It’s also a fun project to do with your kids.

Step 1. Get a long box.

Eclipse viewer box

I got a really long square box from the UPS store for ~$10. The longer the better – the more distance between the end pointed at the sun and the viewing end, the larger the image of the sun will be.

By the way, this picture is just showing off how long the box is – you won’t actually be looking through the box when we’re done.

Step 2. Decorate the box.

Decorating the eclipse viewer

This might be the most important part of the project if you’re doing it with kids. Kids love to draw planets, comets, rocket ships, and all sorts of fun things. This is also a good place to illustrate exactly what’s going on when the sun starts to disappear.

Step 3. Close the box and cut a hole in one end.

Eclipse box

This end will be pointed toward the sun.

Step 4. Cover the hole with foil and put a tiny pinprick in the middle.

eclipse viewer pinhole

You want to block out all the light except the pin prick. It will cast an image of the sun on the other end of the box.

Step 5. Cut open a small section of the side near the bottom.

Eclipse viewer ready to go

The picture illustrates this pretty well. You want a small section open so you can see the image in the bottom of the box. I also put a piece of white paper in the bottom, that shows off the image better than cardboard:

image of the sun

You’ll need to find something to use to prop up the box and aim it toward the sun. I used a tripod, but a chair will work as well. You’ll need to keep moving the viewer as the day goes on to keep the image in place.

Enjoying a solar eclipse

Caught in an eclipse without a viewer? No worries! Anything with a hole in it that can cast a shadow will show the eclipse – even your fingers or the leaves on the trees!

solar elcipse shadows

Cresent eclipse shadows

Setting up a Firefox extension development environment

Procrastato, a Firefox productivity extension I have a Firefox extension called Procrastato.  It reminds you to get back to work when you’re mindlessly surfing the web.  Procrastato is a very simple add-on but I’ve found that getting started in developing Firefox add-ons isn’t so simple.

Although I’ve just dipped my feet into the world of XUL and Firefox Extension development I thought I would share what I’ve been using to get up and running.

First things first – take a look at the Building an Extension page at Mozilla.org.  Make sure you at least read through that page before getting started.  It can be a little disappointing to see how much you need to have in place in order to do a simple “hello world” test extension, but it’s worth getting an overall picture before jumping in.

Also, before getting to “hello world,” there are a couple of extensions that are useful for developing extensions:

If you’ve used Eclipse for Java or PHP development you’ll probably want to use it for extension development with the XulBooster plugin.  XulBooster is useful for two reasons:

  1. It helps with housekeeping chores like setting up your install.rdf and chrome.manifest and exporting a .xpi package.
  2. It give you some code coloring and syntax highlighting for those .xul files.

Now you should be ready to go.

A couple of notes:XulBooster will automatically include an empty <em:updateURL/> element in your install.rdf.  If you don’t have a secure URL for updates (starting with https://), you might get this warning from addons.mozilla.org when you try to upload your new version:

Add-ons cannot use an external updateURL. Please remove this from install.rdf and try again.

Just open the install.rdf file and deleted that line to solve the problem.

How do you set up a PHP development environment?

DSCN1377-1Are you a budding web developer wondering where to start?  An old hand looking for new tools?  Let me tell you a little bit about how I do my PHP / web development work, and maybe some it will be of use to you.

I am starting up some work on Mealographer again.  It definitely needs it, I did a usability test about a year ago and still haven’t fixed the issues I uncovered.  I haven’t been doing a lot of work in PHP recently, at my day job is all Java all the time.  I used to be happy with a text editor, a server somewhere and a browser, but since I’ve been using Eclipse I’ve become spoiled by better tools.

So what do you need to get started?  If you just want to play around, all you need is:

A text editor.  You can use Notepad, but I’ve used HTMLKit in the past.  It’s free and it does basic stuff like syntax highlighting nicely.

A server.  You can set everything up on a remote server, many have PHP accounts for as low as $5/month.  Right now I use Site5 [referral link].  I also want to give a shout out to Q5Media, though PHP isn’t their main thing.

A browser.  This is pretty basic, but worth mentioning.  You need Firefox, which is free to download.  You’ll also want to test things in IE, which you probably already had.

You can do real work with just the above.  It’s worth taking advantage of all the great tools out there, though, including:

An integrated development environment (IDE) – I’m pretty happy with Eclipse for Java development (or the related IBM RAD 6).  What about for PHP?  Right now I’m trying to decide between PHPEclispe and the PDT plugin.  Anyone have an opinion on which way to go?

A local development server – If you want to run PHP locally on windows, you can install Apache or get PHP working on IIS.  In my experience, though, you can’t beat WAMPSERVER – it includes Apache, MySQL and PHP and makes configuration pretty easy.

Source control – There’s no way to keep track of a project of any real size without a change management system.  I have used CVS a lot, and SmartCVS is a good free client.  There are also CVS plugins for Eclipse.  I have heard a lot of good things about Subversion as well.

Web developer plugins for Firefox – seriously, if you don’t have these, you might as well tie your hand behind your back when writing JavaScript of CSS.  Here’s a good list of Firefox plugins.

So that’s what I use – what am I missing?  Post suggestions in the comments below.