Although I have done countless web sites in PHP, today I completed my first completely object-oriented site. As I coded this one, I have tried to look around and get a feel for the overall use of Objects in PHP. For those who code in PHP, leave a comment about your take on OOP.
Welcome back for more safety tips. Last time we learned how not to use a soldering iron and today we will move on to probably the next most popular nerd/geek tool which is, of course, glue.
Glue, as we all know, is a compound in a liquid or semi-liquid state used to bond things together... I could go on but then that's what wikipedia is for.
1. As with a soldering iron, ventilation is suggested.
2. Don't forget to cap or close any glue and not just put it down on your work space while you hold two pieces of a model together. I've scraped more than one tube of dried glue off my desk.
3. Avoid contact with skin and eyes. Because while we all have joked about gluing ourselves to model bits or to yourself it's a lot less funny when you realize that you have just created a nice bond between your two model pieces and both of your thumbs. It's also less funny to try to separate yourself from the pieces and from yourself while your apparently heartless significant other takes the opportunity to laugh at you until she cries.
4. Use care when opening glue containers. Most super glue comes in a small tube with a sealed nozzle. This nozzle is opened with a small barb (of course try not to stab yourself). Now make sure to hold the nozzle at its base and not the soft tube itself. If you hold it by the tube and apply pressure you may luck out and open your tube of glue - or it may instead explode, covering your hand in a thin layer of glue (like it did to me). Thankfully because of the quantity of glue you should be able to pull the ruined tube off your hand before the glue sets (but sometimes pieces remain, and they are sharp) and with luck you will look like you have a molting reptile hand for only a month or so as the glue and your skin slowly fall off.
And so, glue... simple and surprisingly dangerous. And remember if you do manage to glue yourself to something or to yourself (or someone else) don't just rip or pull yourself free, unless you really don't like skin being attached. Warm water will help with a lot of glue issues or Dawn cleaner. Failing that, you might want to see a doctor. Don't forget to stop by next time for more lessons learned through my pain.
If you missed it, read Hardware Hacking Helpdesk, Part 1: Soldering
When he's not keeping strange hours producing even stranger prototypes, we sometimes let our resident mad scientist out of his lab. Hans is a huge fan of the annual Tucson Gem & Mineral Show, so we always release him for that.
If you've never been to the show, imagine if tents popped up in parking lots throughout your city and convention halls, warehouses, and local hotels converted their rooms into storefronts for the world's largest rock, fossil, and mineral marketplace. Even as the show starts, collectors around the world are frantically hoisting their finds out of the earth and preparing them to exhibit -- fresh new finds often arrive in Tuscon by land, air, and sea several days into the event.
If you go, you'll be guaranteed to see many premieres, where new finds are exhibited for the first time anywhere. It's often the first place and sometimes the last place you can find these objects for purchase -- some leftovers might show up on eBay much later, but many will disappear into private collections. If you've just read about a dig in Scientific American or New Scientist, and you want that four-by-two-foot opalized mossasaur-chewed ammonite mortality cluster in matrix as your new coffee table, this is the place to go. You might have to get there early and outbid the Smithsonian, though. But it's not all million-dollar sales; there are bargains to be had and deals to be made (especially toward the end).
Peekskill slice Hans took to Tuscon.
The show isn't just about seeing amazing rocks for sale -- it's also where collectors go to learn from the experts or to bring items from their collections to have them worked on. This year, Hans took a couple of planetary rocks (meteorites containing rock from other planets) and a Peekskill slice to Luc Lebenne for cutting. Luc cuts meteorites so brilliantly they sometimes seem to glow.
On the last day of this year's show, meteorite hunters around the country felt a great disturbance in the force, or at least in their plans -- amazingly, a meteorite was caught on camera streaking across the skies of Austin, Texas that afternoon. One of Hans' favorite dealers, Geoffrey Notkin, headed directly from Tuscon to locate the fresh fall. Check out Geoffrey's inspiring article about the race to recover the West, Texas meteorites!
Since the bulk of Slashdot have probably at one time or another thought it might be fun to solder something or make a model, I thought I could offer some suggestions on how not to harm yourself.
In today's installment I'll be talking about the use of the ever-popular soldering iron. Used for such tasks as soldering circuit components and well... I guess you can burn wood with it to make signs like that one guy that seems to be at every flea market.
1. Always use in a well ventilated area, I'm not sure what is in the fumes that soldering gives off, but after the initial buzz wears off you're left with just a pounding headache.
2. Make sure to clean the soldering iron between uses with a wet sponge. There's nothing quite like examining your new project to find bits of burned slag in the solder point.
3. Use a good stand for your soldering iron, like a weighted coil stand. Not the little horse shoe shaped bit of metal that comes with the iron because two seconds after you put the soldering iron on that stand and start to arrange your Xbox mod chip that thing will flip right over sending the still flesh searingly hot iron onto the tip of your right middle finger giving you a second degree burn. And because you thought it would be a fantastic idea to work on your Xbox on a week night at 2am you can't scream or you'll wake up your significant other who needs to get up early for class, so you have to try and scramble up one-handed out from under your coffee table (because that's really the best place to use a hot piece of metal) trying to limit the number of times you jam your newly blistered finger into things while you try to get outside to the Pennsylvania winter and curse at the snow.
So as we've learned the soldering iron can be used to create any number of fun projects and to potentially let you compare your skin to the images on google to see what level of burn you have. So either way the whole process is still educational. Stop by next time for more safety tips.
April Fools' Day is huge at ThinkGeek. The highest point in our traffic graphs every year. Here's one codemonkey's experience on the big day this year.
Beltway Prophet writes
Setting: Jacob finally gets to sleep at 5:15 this morning after 22 hours of uptime leading up to April Fools' Day at ThinkGeek HQ. Two hours later, his company phone starts making its "alert" sound. PHONE: Bleem! SUPEREGO: Uh-oh! Somewhere, a server's in trouble! JACOB opens eyes, looks at phone PHONE: Bleem! ID: I don't hear anything.
Setting: Jacob finally gets to sleep at 5:15 this morning after 22 hours of uptime leading up to April Fools' Day at ThinkGeek HQ. Two hours later, his company phone starts making its "alert" sound.
SUPEREGO: Uh-oh! Somewhere, a server's in trouble!
JACOB opens eyes, looks at phone
ID: I don't hear anything.ID sings tonelessly: lalalala
JACOB picks up phone, reads SMS messages
ID: Dude, Jennifer's on call. And she probably had one more hour of sleep than you. Let her deal with it. Anyway, it's just db4. I'm sure the site's fine.
SUPEREGO: Yeah, but it's my responsibility too, and she might not wake up.
EGO: Well, why don't we check the site and see?
JACOB opens ThinkGeek in the phone's browser.
SUPEREGO: It seems really slow.
ID: No way, man. It's just the phone. The phone's slow!
SUPEREGO: That's true. Well, to be specific, the wi-fi reception tends to be a bit spotty. Not as spotty as my PowerBook talking to the Time Capsule at work, but...
PHONE interrupts, closes browser, opens SMS app emphatically: Bleem!
EGO: Okay, well, since this fscking thing isn't going to stop "bleeeem"ing anyway, let's just get up and deal with it.
PHONE [relieved]: Bleem!
JACOB logs on
JENNIFER [via IM]: Please tell me you are doing maintenance and forgot to shut off Nagios again.
JACOB: I wish.
JACOB wakes up a very understanding sysadmin in California, where it's three hours earlier
CHRIS notes the cause of the OOPS and reboots the box.
JACOB restores database replication.
Moral of the story
Always reboot your servers before a big day: uptime shmuptime. All it takes is one flaky kernel module to desynchronize your databases and ruin your morning.
Like all true believers, we ThinkGeek code monkeys have our own holy scripture: Perl Best Practices. But if we had a bible, its first chapter might go something like this...
Beltway Prophet writes
1n 7eh 6391nn1n9, Jen-Willie-Scott (PBUT) were alone among the blinkenlights. And then the Jon came, the first of the codemonkeys, and configured the Server and coded the Perl and sent Apache daemons to enliven it, and it was good. And JWS brought forth t-shirts and bumper stickers and Linux stuff and called it "ThinkGeek," and it was good. And they all went out to see The Matrix, and it was pretty good, too.
And lo, for forty days the Server ran. It ran on a Pentium II 450 with 128 megs of RAM, and Jon saw that uptime was good. And JWS went among the people, and told them about the t-shirts and the Linux stuff, and the people came, the fat and the skinny and the pocket-protected and pimply-faced and the pocket-unprotected and the smooth of skin alike. And JWS told the sysadmins and the codemonkeys and the technicians and the designers and the fabricators. And the telling brought forth smart masses, and they came. Then came the Slashdot, and washed over ThinkGeek, and the RAM did fill up, and the pII trembled and grew hot.
And Jon saw that it suffered, and brought forth a companion for the pII to share its burdens, and laid RAM at their feet to comfort them. But Jon's daemons were yet weak; each Apache Jon sent forth was cut down by the forces of the Slashdot. And Jon cried out, "O JWS, why hast thou sent this Destroyer to destroy my daemons with its destructive ways?"
And JWS spake unto Jon, saying, "Codemonkey, thou art clever but not yet wise. See how thy 'Destroyer' works upon your daemons! It is not to weaken but to strengthen them!" And Jon was enlightened, and brought forth MySQL to accompany for the Perl and the Apache, and the daemons prospered, and ThinkGeek's uptime grew long as the KVM cables and long as the great pipe through the ceiling to the ISP on the third floor. And the Jon did attend them, from his Desk and from his Couch, in the day and the night.
And it was good.