In case the situation isn’t clear:

  1. NJ county buys electronic voting machines.
  2. Princeton prof offers to help independently verify the vote from said machines.
  3. Maker of machines threatens to sue if independent verification occurs.

Would anyone like to tell me when corporate interests trumped democracy? How is this different than some goon with a baseball bat standing at the voting station telling me “Don’t worry… we’ll make sure your vote gets counted.”

Closed, unverified electronic voting machines are a threat to democracy.

From the Star-Ledger:

Union County has backed off a plan to let a Princeton University computer scientist examine voting machines where errors occurred in the presidential primary tallies, after the manufacturer of the machines threatened to sue, officials said today.

A Sequoia executive, Edwin Smith, put Union County Clerk Joanne Rajoppi on notice that an independent analysis would violate the licensing agreement between his firm and the county. In a terse two-page letter Smith also argued the voting machine software is a Sequoia trade secret and cannot be handed over to any third party.

Using the Mozy backup service has turned out to be a horrible choice on my part.

In near the start of 2007, I purchased a new MacBook to replace my Powerbook that had been stolen. I suffered a hard drive failure, but had good backups. When the drive was replaced, I went ahead and subscribed to Mozy, which provided an automatic means to backup all of my pictures and other important data.

In October of 2007, my hard drive failed again. I had 30GB of data backed up on Mozy.

I tried using their desktop client to restore my data; somewhere in the middle of a 600MB test recovery (just one (large) folder), it said that one or more files were corrupted, and could not be restored. Mozy’s software neither 1. told me which files were corrupted, nor 2. was capable of restoring everything except those files. Either of these things would have been useful.

I had several very unsuccessful rounds with incredibly poor support from Mozy. One person did tell me the names of the five (!!!!) files that were corrupt in that one 600MB folder. That’s five files out of several tens of thousands of files. If that sounds like a small number to you, consider that some of those files were part of the Google TechTalk that I presented last April. (I have other archives of this, but my point is that a single metadata file inside of the presentation archive corrupts the whole presentation.)

I then tried using the WWW restore. It took a long time to download 30GB of data. I then started to decrypt it using their decryption utility. Again, somewhere in my archive are “corrupt files” that cannot be decrypted. The decryption tool fails, and refuses to go further.

I’d like to point out that I have bazillions of files in those 30GB. I have no idea which files are corrupt. Nor does Mozy’s software seem willing to report this information to me (a feature that would be very, very usable to me). Furthermore, I have no idea why those files are corrupt in the first place. For them to be corrupt implies to me that Mozy’s software corrupted them at the time of backup. How could their software completely fail to do robust checksums on backup, I’ll never know… because it did it silently, and any logs of its transgressions were lost with the death of the hard drive.

Either way, I currently have 30GB of data that I cannot decrypt because of some unknown number of bad files within the millions contained in the restore. Mozy has failed to provide me with instructions (despite multiple requests) on how to decrypt my data using tools other than theirs. Given that the data is encrypted using a 448-bit Blowfish cypher, I assume I can use OpenSSL or similar to do the decryption… but this should not be necessary. And, given that it is necessary, it should at least be possible, and ideally, documented.

Am I near-ranting-frothing? Yes, and no. This is now months past; I’ve given up on the data. It is gone. (I still have the 30GB restoration images, but I have no way of doing anything sensible with them.) I put my faith in a crap backup solution. Mozy provided a completely worthless service for which I paid $5/month for a number of months, and now that money, like the data, is gone. I cannot recommend Mozy to anyone, and have no reason to believe that their tools work in a robust and reliable way. Additionally, I have no way of decrypting my own data except through their closed-source, proprietary tools. Until I figure out how to do that through some other mechanism, it means that data backed up using Mozy’s software is not only suspect (because Mozy will clearly silently corrupt data while backing up), but it is also a hostage situation, because only their software can decrypt your data.

My hope is that there are enough keywords in this weblog post so that people will find it when researching Mozy, see my rant, and say “Maybe there is some other way I could back my data up that doesn’t involve giving it to a company that writes buggy software and then provides poor support for such a mission-critical application.” I had hoped that it was an affordable, easy, reliable backup solution. I was wrong, and given the things I’ve been reading lately, I should have known better.

In short, Mozy is buggy software that is unsafe and cannot be trusted for the backup of your data. Use anything else. My next experiment is with Amazon S3 via JungleDisk.

I’ve been traveling quite a bit lately, and haven’t been able to get things up on the ‘net very easily. However, I thought it was important to drop a pointer to Michael’s blog post about a patent Microsoft has recently applied for. If you missed the Slashdot post pointing to it, you can catch it here.

Mercy.

I’ll categorize this under “exceptions” and “mistakes.”

I could have let it go. But instead, I decided I needed to reply to Bob’s last note, since he was so polite.

No worries, Bob. I live fairly close to a FedEx station, and can easily deliver it for you. You’ve already paid for most of the shipping anyway from the auction—I’ll happily pick up any extra.

If you send me your grandson’s address, I can package the camera up and send it to you myself. Please make sure to include his phone number—FedEx won’t deliver without a phone number!

Thanks,

Matt

Bob, not surprisingly, was very obliging. He happily sent me the information I needed to mail my digital camcorder to his grandson.

Hello Matt,

Here is my fedex account info and my grandson address that you need in used in sending this item.I will like you to write the carraiged value to $20.00 so that he won’t be billed much when deliverying the item to him,and don’t forget to send the tracking number to Pay Pal so that they can credit the funds to your account.so check your paypal mail for the payment confirmation from PAYPAL.once you get the payment confirmation you can go ahead with the shipment.

NAME: KOBBY G. FISHER
ADDRESS: FEDERAL HIGHWAY BARRACKS BLK ‘W’ FLT30,
CITY: AGEGE
STATE: LAGOS STATE
ZIP CODE: 23401
PHONE NUMBER: 2348013427097
COUNTRY: NIGERIA
FEDEX ACCOUNT NUMBER: 350743286

And remeber you have to sent the tracking number to paypal customer care service at (paypa.lcare@consultant.com) in other for them to verified the shipment and credit the funds into your account immediately, and please i will like you to sent me the tracking number also so that i can give it to my grandson in other for him to know when the item will be arriving.hope to hear from you soon.asps

Thanks.

Bob Foster.

What is great is that he actually mistyped the FedEx number, and sent me a second message shortly thereafter. Note the effective use of ALL CAPS.

PLEASE DISREGARD THE FIRST ACCOUNT NUMBER I SENT TO YOU THERE WAS A MISTAKE NO IT.YOU’RE TO USE THIS.ACCOUNT NUMBER

FEDEX ACCOUNT NUMBER 350732624

Now, with that information, you can actually call FedEx (I called 1.800.Go.FedEx, or 1.800.463.3339). In fact, if you call, and tell them you think you’re being scammed on eBay, and someone from Nigeria has a FedEx shipper number, they’re incredibly accommodating. So much so that they say “Oh! The Nigerian FedEx shipper scam!”. You do have to navigate the electronic, voice-activated menus, however. It took a while to find a person.

As it turns out, the credit card used to open that FedEx account (probably stolen) was registered somewhere in Washington State. So all around the board, Bob really wasn’t a very nice man. Of course, at this point I’m tempted to drop a note and say that the FedEx number didn’t work, and perhaps he has another…

Here’s my summary of the “gotchas” I seem to have stumbled over in being an infrequent eBay seller. If anyone has any comments, or anything to add, please leave a comment below. Someday, perhaps I’ll find a more permanent home for this document.

Many thanks go to the eBay community who quickly responded in such a positive and supportive manner to my original forum post. While I have not cited all of them here, their suggestions were the inspiration for much of this learning.

Many thanks.

This document was written on August 16, 2006. It may contain very dated information. Your milage, when you read it, may vary greatly, and in no way should this be taken as a substitute for the policy of eBay, PayPal, and any other business or service you use in auctioning your posessions online.

Notes for the infrequent eBay seller

Before selling

  1. In your posting, note what conditions you will sell under. It is not clear whether these conditions are binding or not. However, stating that you will adhere to policy rigorously cannot hurt. For example, you could clearly state that you will not ship to buyers who have an uncomfirmed ship-to PayPal address.

  2. If you want to protect yourself on the PayPal end, you should set your “Payment Receipt” options to block payments from users who do not have confirmed addresses. This may reinforce #1.

  3. If you are not already familiar, read the linked resources below. As an infrequent or new seller, you are likely in the dark about how things work since the last time you used the service, and therefore must educate yourself.

  4. If you’re really paranoid, use an escrow service. That means that a trusted third party—a business, who charges for the service—will act as an “middle man” to make sure that both parties honor the transaction. Well, that’s the short version, anyway. If you’re selling something on eBay that is so valuable as to require such a service, it is up to you to investigate it fully.

  5. Be explicit in your auction description; do not leave anything unclear or underdescribed. As eBay user “horse-shoes-and-hand-grenades” pointed out, a scammer will likely attempt to make use of a SNAD clause, or “Significantly Not As Described.” This is their trump card—as eBay and PayPal are inclined to side with the buyer. Make sure your auction is explicit about what is being sold and the condition it is in. This means using clear language and digital photographs to describe the item in detail. Your buyer will appreciate it, and you’ll help cover your own behind in the case of a scam.

After the auction

  1. Look at your buyer’s eBay rank. This alone should not make you nervous—everyone has to start somewhere! However, if it is zero, you should look a little deeper.

  2. Check when the eBay account was opened. Scammers will not use a single account for very long. Therefore, the account may have been created minutes, or even days, before your auction. This alone, however, is not cause for alarm… a new account could just be a new account.

  3. If you have someone with no eBay rank, and the account is very new, you can search to see what other auctions they have bid on. Click on the “Advanced Search”, and then “Items by Buyer”, on the left as of this writing. Enter your buyer’s eBay ID. Include completed items, and those where they were not the highest bidder. An honest, first-time buyer will likely have only bought from you. A fradulent account holder will possibly have made a number purchases, simultaneously. Why? Because they play the numbers—hopefully, at least one of their sellers will make the mistake of shipping goods.

  4. Speaking of shipping goods: NEVER SHIP TO ANYONE WHO DOES NOT HAVE AN UNCOMFIRMED PAYPAL ADDRESS. Read the protection policies; currently, 3.b.ii of the PayPal Seller Protection Policies (August 16, 2006) are quite explicit about how to determine if a ship-to address qualifies you for protection.

  5. Communications: if you are dealing with a scammer, they might even try and get you a second time. As always, never follow suspicious links in emails, never enter your eBay username and password anywhere that you aren’t 100% sure is the real deal, and keep your virus scanner and SPAM filters running!

  6. To reiterate, as “twangy1″ said in the seller’s forum: “Do NOT click on links in any email you receive from them no matter how official it looks. The links usually send you to a fake site they created in order to get your passwords.”

  7. If it all looks good, and you ship, make sure you take several steps to further protect yourself. First, ship confirmed delivery requiring a signature; you might even want to pay for a return receipt—this is an active notification, from the USPS, that your item was received. Second, require insurance for the value of the transaction. This way, if anything happens to the goods, you might be able to claim the value of the auction that way (good luck). In all cases, you should keep receipts and documentation regarding all transactions associated with the auction.

  8. If you have a digital camera, make good use of it. Photograph everything you ship outside of the packaging, as it goes into the box, and the box itself. Electrons are cheap—snap away!

  9. If you think you’ve got a scammer, but you’re just a little bit savvy, you should be fine. They probably won’t pay in a secure way (remember the confirmed PayPal address?), so you can just refuse/refund payment to them until they make themselves legit in the eyes of eBay and PayPal. If they don’t pay “safely”, then you’ll just have to file an unpaid notice with eBay and move on.

If it all goes badly

This guide doesn’t go that far. You’ll have to read the eBay and PayPal arbitration policy if you think you’ve been screwed as a seller. This was just the collected wisdom of an infrequent seller who, after his first sale in several years, realized that eBay isn’t quite as straight-forward as it used to be.

Resources

If you get caught in an eBay scam, you’ll probably receive several messages. I thought I’d include those scammer messages here, in case anyone else goes looking.

The door-opener

The first thing the scammer will do is send you a personal email, to assure you that all is good. It will be sent outside of the eBay system, so no trail is generated. In my case, the scammer’s eBay account had been suspended before they even sent this message.

From: BOB FOSTER <fosterxx39@yahoo.com>

Subject: I have made out payment to you for this item purchase (200017964338)

To: Me

Hello Matt,

I have made out payment to you for this item purchase (200017964338),So check your mail for the comfirmation mail from paypal.Get back to me immediately if you receive the confirmation mail from paypal and don’t forget to send me your physical contact address and your phone number so that i can arranged for the shipment okay,and the exact time you will be at home today.So that i can schedule Fedex to come and pick it up from you in other to reduce the stress of you driving down to their location to send it.Then i can send you my grandson’s address and fedex account number.Hope to hear from you soon.i will arrange for the shipment on TOMORROW,so send me your contact address.so that i could arrange for the shipment.

Thanks.

Bob Foster.

 

The “Payment” email

The hook will be followed by the false payment. Note that I did not receive any money in my PayPal account, nor did any appear in the actual PayPal account I specified for payment. Therefore, it is unclear how PayPal could generate this message. I’ll talk about the warning signs in this message below; some are obvious, some are not.

If you use HTML email (with pictures, and pretty text, and crap like that), you’re a Bad Person. You should switch to “plain text” right now. It is safer, and you are less likely to get tricked—because you take away one of the scammer/spammer’s most powerful tools, which is the ability to make their message look like something it is not.

Return-path: <paypa.lverified@accountant.com>
Received: from webmail-outgoing.us4.outblaze.com ([205.158.62.67])
by untyped.vm.bytemark.co.uk with esmtp (Exim 4.50)
Received: from unknown (unknown [192.168.9.180])
by webmail-outgoing.us4.outblaze.com (Postfix) with QMQP id 518D81800D6E
Received: by ws1-3.us4.outblaze.com (Postfix, from userid 1001)
id 5B07B1024D; Thu, 17 Aug 2006 00:37:51 +0000 (GMT)
From: “service@paypal. com” <paypa.lverified@accountant.com>
To: Me
Date: Wed, 16 Aug 2006 19:37:51 -0500
Subject: Mr. Bob Foster has sent you $ 213.35 USD Cash with Pay Pal,
Online Auction Payment Confirmation ID # 9PY9285155180850S
Received: from [196.207.0.146] by ws1-3.us4.outblaze.com with http for
paypa.lverified@accountant.com; Wed, 16 Aug 2006 19:37:51 -0500
X-Originating-Ip: 196.207.0.146
X-Originating-Server: ws1-3.us4.outblaze.com
Message-Id: <20060817003751.5B07B1024D@ws1-3.us4.outblaze.com>

PayPal

You’ve got cash!


Protect Your Account Info

Make sure you never provide your password to fraudulent websites.

To safely and securely access the PayPal website or your account, open a
new web browser (e.g. Internet Explorer or Netscape) and type in the
PayPal URL (https://www.paypal.com/us/) to be sure you are on the real
PayPal site.

PayPal will never ask you to enter your password in an email.

To learn more about protecting yourself from fraud, visit the Security
Center. Click “Security Center” on the bottom of any PayPal page

Protect Your Password

You should never give your PayPal password to anyone, including PayPal
employees.

Payments by PayPalDear Matt Jadud,

This email confirms that Bob Foster have paid (my email), $ 213.35
USD for an eBay item through PayPal.

Bob Foster, just sent you money with PayPal.

Bob Foster, is a Verified buyer.

Bob Foster


Payment Details:

Seller’s User ID: risersheriff

Seller Email: (my email)

Amount: $ 213.35 USD

Shipping & Handling: $ 0.00 USD

Insurance: $ 0.00 USD

Total Amount: $ 213.35 USD

Current status: Payment pending

Transaction ID: 9PY9285155180850S


Pay With PayPal

PayPal makes it easy to receive Bob Foster money. Click below to received
this payment:

VisaMasterCardDiscoverAmerican ExpresseCheck

For security purposes, this PayPal payment has been deducted from the
buyer’s account but it is Pending when the shipment tracking number is
sent to our customer care at(paypa.lcare@consultant.com) for shipment
verifications, then we can process and credit funds into your account. We
are sorry for the inconveniences we might have cost you, as this is our
new policy to protect both the Seller and the Buyer.And if there is any
problem within you and the buyer you are to contact our customer care
representative immediately, For more information please contact our
customer care at the above link.


Item Information

eBay Item #: 200017964338

eBay User ID: risersheriff

eBay Item : Samsung SC-D353 miniDV plus bag, warranty

Quantity: 1

Unit Value:

$ 213.35 USD

Message

Note: I will be using my fedex account for the shipment ,so all you have
to do is to sent me your physical contact address so that i can arranged
for the shipment and i will be sending you a fedex label that contain
bouth my grandson’ address and my fedex account number


Shipping Information:

Address: Verified.

Address Status: Confirmed.

Thank you for using PayPal!

The PayPal Team

Official PayPal Seal

PAYPAL PAYMENT VERIFIED

PayPal and eBay Transaction confirmed!


PayPal Email ID PP304

 

I’ve included the whole message here; it’s a bit much, really. First, and most importantly, note the reply-to address: paypa.lverified@accountant.com. PayPal does not send mail from an address called “accountant.com”. Furthermore, the email was bounced through servers owned by a company called outblaze.com. Perhaps they are evil, perhaps they are not. Either way, they’re helping this particular scammer do his dirty work.

There is no ship-to address in the message. Instead, we have this odd note:

 

I will be using my fedex account for the shipment ,so all you have to do is to sent me your physical contact address so that i can arranged for the shipment and i will be sending you a fedex label that contain bouth my grandson’ address and my fedex account number

 

Will the scammer actually send me a FedEx shipper label? I’m so curious.

But I don’t think I intend to find out. Or, perhaps I should? And then send them some bricks…

I think I might currently be the target for attempted eBay fraud.

I was, at first, unsure, because a brand-new eBay account was created last night, shortly before the owner of the account bought my camera. So, I asked on the eBay seller forums if this was normal. Then, because of comments being made there, I realized I could search through the buyer’s previous history.

Granted, the account is brand new. It has existed for less than 24 hours. And, in the first 10 minutes, the owner of that account made over $1500 in purchases.

ebay-fraud

So far, my buyer has made no further purchases, nor have they responded to my two messages. I’ve politely requested that their PayPal “ship to” address be verified. We’ll see if they get back to me or not.

I just hope I don’t get screwed in this process. As far as I can tell, eBay and PayPal are primarily concerned about protecting the buyer; as the seller, it appears to be far too easy for me to be the victim. I don’t like this at all.

I just want to sell my camera.

I caught this linked off of Scripting News:

Bye Tin Machine. Bye dPod. Bye Sprocket. I’m going to miss you guys. And I’m especially going to miss all my year’s of data; pix of Aimee and good friends and my first Burning Man. Videos of artformula hooping in the barn with such grace. My various outlines, containing my thoughts, dreams, ideas. My old emails, that I was saving forever, in order to remember the love I felt at one time for another human, and the ensuing email exchanges that lifted my heart. Goodbye to all the calendar entries that I dutifully entered into DayLite, content in knowing that I could look back at my past using this filter to see how far I’d come. Goodbye to my lovely red backpack which always seemed to fit just the right amount of stuff and hang so well on my back. Some of this was backed up, most not. You know how it goes. Well, hopefully not.

These kinds of stories always scare me. I’ve considered building an online service using technology like that from Coraid to establish a storage farm, but I think Amazon already did.

Which leaves me with some simple questions for Amazon’s S3 team:

If I encourage my parents to back up all of their pictures to your service, how long will you be around? How robust is S3 as a backup? Is it truly geographically redundant storage? Can I *trust* it?

It seems like the best option available to me to date. Other than that, I need to purchase a quality tape drive and become a backup-admin for myself and my parents.


Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2020

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2392

Warning: implode() [function.implode]: Argument must be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3345

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3368

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3409

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3461

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606

Warning: Invalid argument supplied for foreach() in /home/jadudm/sububi.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3606
All the world’s a stage, and this quote, often abused.

M. Jadud

What can an Actor do? Not as pressing a question as What Would an Actor Do? (WWAD?), but certainly an important question never-the-less. I want to remind the gentle reader that I have many grand schemes about great, sweeping themes and stories about agent-based programming in Java using Greenfoot… but at the moment, I’m just wandering around. And in my wanderings, I’d like to make the mushrooms in my LumpWorld wander around, too.

Of course, I don’t know how to do that. I could try and use Google to find out how, or I could go back and read the tutorial. However, I want to try something a little different. I’ll read some documentation.

Now, I know some of you are saying “Matt! Reading documentation! That’s awfully extreme, isn’t it?” Well, my friends, it is. Very extreme. And, for the record, it is very, very exciting. And Greenfoot has plenty of documentation hidden inside it, if you know where to look.


greenfoot-actor-classes

Documentation be hidden in them thar classes…

Lets start with the Actor class. If I double-click on the Actor class, I get a whole mess of Java.


greenfoot-mess-o-java

Double-clicking the Actor class yields a mess-o-Java.

This mess-o-Java is not for the faint-of-heart. If you look at the top of the file, you’ll see that it is written by @author Poul Henriksen, which means that a crazy person wrote that code. And we all know what happens when crazy people write software. So be careful if you spend any serious time looking at this code. What is more interesting is in the upper-right-hand corner of this window: a little drop-down menu. It has two options: Implementation and Interface Go ahead and select Interface.


greenfoot-interface-documentation


Documentation regarding the Actor class.

This is more like it! The interface documentation tells us about all the things we can do with an Actor object. For example, in my last example, I used the setRotation method; we can see that it is documented here, and not just in the Wombats tutorial. Along with it is a method called setLocation. The method summary is really quite straight-forward:

void setLocation(int x, int y)
          Assign a new location for this object.

This method consumes two integers, and returns nothing. I’m guessing it is a magic teleport method, and probably should have been called magicTeleporter(int x, int y), because it will magically make your Actor jump to anyplace in the Greenfoot World. I’m going to take my existing act() method:

public void act()
    {
        lump_rotation = lump_rotation + 1;
        setRotation(lump_rotation);
    }

and I’m going to modify it just a bit. I’m going to make my mushrooms wander around while they’re rotating.

A first attempt

The neat thing about sitting down to a piece of software as rich as Greenfoot is that you can find things you don’t expect. Put another way, I can come to the table with all kinds of assumptions, pre-conceived notions, and expectations about how Greenfoot should or will work, and then be surprised when it doesn’t work that way. Since the point of this blog is to wander around Greenfoot “kicking the tires” (so to speak), I might as well talk about some of my failures along side some of my successes, no?

Here was my first attempt at making a Lump that would march across the screen:

public class Lump extends Actor
{
    private int lump_rotation;
    private int lump_X;
    public Lump()
    {
       lump_X = getX();
    }
 
    public void act()
    {
        lump_rotation = lump_rotation + 1;
        setRotation(lump_rotation);
        // Move the Lump around!
        lump_X = lump_X + 1;
        setLocation(lump_X, getY());
    }
 
}

My previous post explored making my Lumps rotate around their axes; this would have them spinning and marching around. However, this code has a significant problem that didn’t really make sense to me at first:

java.lang.IllegalStateException: The actor has not been inserted into a world
                                 so it has no location yet. You might want to look at the
                                 method addedToWorld on the Actor class.
	at greenfoot.Actor.failIfNotInWorld(Actor.java:537)
	at greenfoot.Actor.getX(Actor.java:103)
	at Lump.<init>(Lump.java:23)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at greenfoot.core.WorldInvokeListener$2.run(WorldInvokeListener.java:150)

You see, I put the call getX() in the constructor for my Actor. (The constructor is a special Java class method that is called when a new object is created. It always has the same name as the class—in this case, it is called Lump().) When I right-click to create a new Lump() object, everything is fine… until I try and put it in the world. At this point, the object is created, but it doesn’t yet exist in the world. So, everything goes badly for my Lump, and this exception is thrown.

That’s cool. Since this post is about reading documentation, I then went back to the documentation I mentioned earlier and started reading. Sure enough, the docs tell me that I can’t do what I tried to do. Because I’m a slow monkey, it looks like the documentation might become even more explicit about this point—that would be cool. While reading more carefully, I discovered the addedToWorld() method. This fits in thusly:

  1. You right-click to create a new Actor object
  2. You drop your Actor on the World
  3. Your Actor’s constructor is called
  4. Your Actor’s addedToWorld() is called

Now, I’m sure other nifty things happen in there, but this is enough for us to be getting on with.

A second attempt

Now that I’ve learned to stop fearing Greenfoot, and learned to love the documentation, my life has been much, much better. My next attempt at making my Actor wander around was much better.

public class Lump extends Actor
{
    private int lump_rotation;
    private int lump_X;
    public Lump()
    {
 
    }
 
    public void addedToWorld(greenfoot.World world) {
       lump_X = getX();
    }
 
    public void act()
    {
        lump_rotation = lump_rotation + 1;
        setRotation(lump_rotation);
        // Move the Lump around!
        lump_X = lump_X + 1;
        setLocation(lump_X, getY());
    }
 
}

Now, my Lump correctly drops into the World! Woot! What happened next, however, was not expected; I’ve created a video to demonstrate what I encountered next.


greenfoot-exception-image

A video of my first Greenfoot exception! (6.9MB, right-click to download.)

An exception! In particular, this text popped up on my screen: