Lesson #1: InvalidDnDOperationException Ruins Sanity
A friend with whom I am currently working on a programming contract called me today to tell me that the latest build wasn’t working. At all.
This irritated and confused me, as I hadn’t worked on that particular project for a week or so, and couldn’t remember having any issues with it.
I booted into Windows (I use Linux mostly), downloaded Eclipse and imported the project.
Sure enough:
java.awt.dnd.InvalidDnDOperationException: Drag and drop in progress at sun.awt.dnd.SunDragSourceContextPeer.setDragDropInProgress(Unknown Source) at java.awt.dnd.DragSource.startDrag(Unknown Source)
This error had attacked me before, but a quick investigation revealed that the issue was different this time. Joyous news.
I poked about in the (too many) classes that make up this project, but discovered nothing of use.
After some fruitless Googling, it occurred to me that during the great Refactoring Storm of August, I may have changed some of the DragGestureRecognizers’ DnDConstants to ACTION_COPY instead of ACTION_COPY_OR_MOVE.
A short, smaller storm of refactoring esued, during which all ACTION_COPY_OR_MOVE DnDConstants were changed to ACTION_COPY.
Why was this an issue at all? I was using evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); to accept the drops, which I guess I must have assumed would accept an ACTION_COPY drop. Seemed to in Ubuntu, anyway. Maybe the Windows JRE is more strict (re: mental)?
Why this issue hid itself until now, I don’t know. Perhaps Ubuntu just likes me more.
Lesson: test software on the target system BEFORE giving it to your team-members.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Gmail Usage Caveat
Quite some time ago I awoke to an inbox full of messages from friends, associates and family (everyone in my Gmail address book) why I thought they’d be interested in purchasing “cheap good goods from convenient service import site”. My Gmail account had been hacked – I even had an auto-responder set up – also advertising the same site.
After panicking, then changing my password, I did a little research. It seems that it is possible for some sites to access Gmail accounts if one browses to said malicious site with Gmail open in a different tab.
The oracle, from Revelations From An Unwashed Brain gives a very informative description of the problem here: Gmail Accounts Hacked – Unpatched Hole Exists.
So how to avoid this? Never open Gmail in a tab – run it in a separate browser. If using Ubuntu, one could use Gmail in Epiphany, and browse the rest of The Internet with Firefox.
Even better, use Thunderbird with Gmail & IMAP.
You’ve been warned.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Wife Joins the Blogosphere – piggypeach.com
My wife has a blog!
I’m not how often she’ll post, or if she will post at all, but she’s got one. I guess she’ll write about makeup and cooking, and maybe what it’s been like for her, being a Chinese person living in New Zealand.
Who knows.
She made the whole site herself with Rapid Weaver. I did help, but every time I made a change I reversed it so she’d be able to learn, heh.
It’s pretty cute, from the domain name to the content :)
Check it out: PiggypeacH!
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
.Mac is Awful
Went to the park yesterday. Didn’t write about it last night because I was struggling with .Mac, which is terrible. It is like a dog defecated then rolled in it, then jumped up into your lap. I use a program called Rapidweaver to create and maintain this website. Rapidweaver is great, because I can’t be arsed actually learning HTML/CSS/PHP, but I still want to make a website that doesn’t look like I was limited to 5 colors and one frame. HTML isn’t fun, not like C++ is, because I can’t easily write cool programs with it, like my “How many primes below x?” program. HTML is lame, Rapidweaver is not. Anyway, .Mac is really awful. Every time I wanted to upload some changes to this site, I’d get some stupid “.Mac: unknown error” message. I’ve had other errors, so getting an error wasn’t so bad, it was the fact that it would not only happen EVERY TIME, it would happen on seemingly random files, with no consistency. Errors like that make me think something is seriously wrong, so I bothered to do a google search on the problem. It seems that a lot of people hate .Mac. I started to regret impetuously jumping into this pile of filth, but as I had already, I thought I may as well try to fix it.
Turns out there is no fix for this error, only suggestions that I had already tried myself, as I’m not a complete idiot (though, as I bought a .Mac account, this is no longer certain). I tried about twenty more times to upload the site, with the same outcome. Utterly annoyed, I Googled: “dot Mac refund”, and found a blog where some guy was bitching about his crappy .Mac account, and the hoops he had to jump through to get a refund. Excited by the prospect of having even ten cents refunded, as this would make me feel less of a chump, I a read through the terms and conditions, which stated that if a .Mac account is less than 30 days old (mine is), then the owner may cancel their account and receive a prorated refund. Hooray!
Finding how one is supposed to apply for this refund was not simple, but I managed it. I am now eagerly waiting for a reply to my message:
“Cancellation please:
I purchased this account so that I would be able to create a website with Rapidweaver.
This has not worked properly once, and thus I would like a refund.
Regards
Mike.”
Take home lesson: Mac make great computers, but their .Mac service is more repulsive than a hobo’s pants.
After managing (hopefully, Mac’s response pending) to wriggle out of .Mac, I needed another place to host this glorious site.
I bothered to do some research this time, and was sucked into buying from the first hosting service I saw. The company offering this service is called “Hostmonster”, which is an awesome name. Their service is cheaper, and better than .Mac. Like all real hosting services, they support PHP, which makes my life a little easier. Also they have lots of other benefits, which I can’t be bothered listing. You can read about them here: www.hostmonster.com.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
The Beggars of Shanghai
I thought, after the last post, it would be a good idea to write an entry about those whose lifestyles are rather different, beggars.
New Zealand doesn’t really have beggars, not like China.
We have ‘transients’, or ‘homeless people’, but they aren’t the same. You see, our country has a welfare system, whereby people (unless they screw the system) are guaranteed at least enough money to eat when time gets rough (or the rough get lazy). China doesn’t have that, people rely instead on their family, or when that fails, begging.
Some of them (the beggars) are probably just lazy. Walking around the streets, one can’t help noticing large amounts of blue overalled workers sweeping or picking up (the plentiful) rubbish. Doesn’t look like fun, probably isn’t. It wouldn’t pay well either. I’d say their job is about as low as it gets, maybe slightly above sewage duty. These people will be making barely enough money to sustain themselves, performing quite labour intensive jobs. It isn’t hard to imagine that at least a small number of them chuck it in and resort to street begging, or maybe some of them just use it as a secondary source of income on their off day/s. Diversification is the key to success, so many newspaper-advert finance advisors claim.
Yvonne claims that a lot of the beggars change occupations because they find they can actually make more money begging than they could sweeping, and as an added bonus they get to sit/lean/stroll all day. It is this class of beggar that seems to have spoiled it for the legitimate ones, the ones who actually can’t work due to injury or illness. Also, once they get used to the filthiness that accompanies such an activity, the ever foraging beggar has a veritable smorgasbord of treats available to him/her in the form of discarded trash.
I’ve been called callous and inhumane for my lack of empathy for my fellow humans that find themselves in such sorry states, criticisms that I can understand when I consider how my views might appear to someone so misguided that they don’t understand how our western society works. You see, we, those rich enough to have had sufficient education to read this page, need to maintain the status quo, else we’ll lose our cushy lifestyles. Those of you who don’t believe it, think about where your crappy throw-away consumables come from, and why they are so cheap! You get them from China and India (and maybe South America soon), the result of cheap and ready labor camps. Without these hives of industry, it’d be our country being polluted all to hell, and you working fourteen hour shifts at the Nike factory six days a week. I know you wouldn’t be able to handle that, because you’re accustomed to a high value dollar and all the benefits that brings. I’m not inhuman, not at all – I used to feel sorry for the beggars of the world too, but then I realised: the world is like a pyramid, richest highest, poorest lowest. Put another way: fewest highest, most lowest. This is the truth, get used to it, go join the other crazies and volunteer; or shut up with your holier-than-thou proclamations about how sad and messed up the world is (we know), go back to the couch and watch your Dr. Phil or daytime infomercials, shows like that are designed to make people like you forget about the nasty world, let them do their work.*
Taking photos of beggars is actually quite a challenge, because no-one wants to be chased by a possibly diseased angry wretch. They have nothing to lose, and your camera to gain, whereas you have a desire not to contract AIDS. I walk past the beggar, ignoring his/her pleas for loose change, and go around the corner. Then I poke the camera around the corner and quickly snap of some shots. Or I just wait until they aren’t looking and take photos. Either way is fine, so long as one is prepared for anything.
A few times I’ve seen beggars actually eating from the trash! Yep, gross – glad he didn’t see me taking that photo
So, beggars huh. Feel sorry for them if you like, hell, even give them money, but don’t be surprised if they turn around and spit in your face, they know where they stand more than you do.
*The paragraph you just read may offend, please don’t read it
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title





























Recent Comments
The Best Photographer In Shanghai
When we pick them up :( Don't know when that will be yet!
Chose another 49 today
Wed, 13 Jan 2010 14:13:21 +0000
The Best Photographer In Shanghai
When do we get to see them!!!!!
Tue, 12 Jan 2010 19:08:51 +0000
Installing Jdownloader In Ubuntu
Thank You!!!!
It works like a charm!!!!!!!!!!!!
Tue, 05 Jan 2010 13:02:35 +0000
Arrived In Shanghai
Done, look left!
Sun, 03 Jan 2010 15:37:03 +0000
Arrived In Shanghai
Hi :)
I'll see what I can do!
Sun, 03 Jan 2010 14:23:07 +0000
Arrived In Shanghai
Hi Mike. It would be very useful to have the time date and weather conditions in Shanghai, on your site. Be seeing you soon. Love NZMum.
Sat, 02 Jan 2010 23:30:41 +0000