my2cents

29. July, 2007

SunSPOT will now exit

Filed under: Sun SPOT — frightanic @ 00:18

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

I just discovered another mysterious error while working with SunSPOT.

For whatever reason I was no longer able to deploy an application via the base station to a free-range SPOT using the -DremoteId= switch. The log said among other things:

“Device reported:  Verification of command failed: Signature verification failed”

But it also said that I should try to run “ant settime” on both the base station and the free-range SPOT (directly connected via USB). I did as instructed, but the problem remained.

In the end I disconnected the base station, hooked up the free-range SPOT directly to the USB cord, and deployed my app without the -DremoteId= switch. That did the trick. After that I was able to deploy to a remote SPOT again.

Advertisements

26. July, 2007

Stock market is on the blink

Filed under: Apple & Mac,Life — frightanic @ 23:43

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

You may or may not have followed the iPhone hype, but here’s a little story to indicate just how nuts and irrational the stock markets – or their players – act.

Introduction

When Apple launched the iPhone on Friday June 29th, 2007 their exclusive mobile network carrier AT&T was so overwhelmed with the number of registrations that a considerable number of customers suffered from long delays in the registration process of their mobile service contract. Meaning: by Monday night there were a lot of people who had bought the iPhone, but the mobile phone service was still not activated. Both AT&T and Apple refused to release any information as for how many units were sold during the first 2 days.

Showdown

This last Tuesday July 24th, 2007 AT&T announced their financial results for the last quarter. This time the whole world was watching as one expected them to announce how well the business with the iPhone had started. AT&T said they had activated 146’000 iPhone contracts during the first two days. So, they were talking about activated contracts while everybody was waiting for the number of units sold to be released.

Bummer! And the crowd goes: what, only 146’000 iPhones sold? But analysts expected between 400’000 and 700’000… What happens to AAPL (the Apple stock symbol)? It plunges over 6%! For no reason. The only interest one should have in the figure announced by AT&T is to find out how big the discrepancy between activated contracts and units sold really is, which would show how big the mess that AT&T created with their activation delays is.

So, ok AAPL plunged for no good reason, but only one day after AT&T’s report Apple itself was reporting their quarter figures. This was yesterday afternoon Wednesday July 25th, 2007. Steve Jobs reported that they had sold 270’000 iPhones within the first 30 hours. Considerably less than what the overly enthusiastic analysts had hoped for, but still a fair number! More than that, Apple reported record high earnings. Now that’s a reason for a soaring share prices. APPL compensated for the stupid 6% fall with a 9% plus. Is all well that ends well? No!

Conclusion

Never trust a company’s share price, because it is irrational. Of course, it’s the pure ‘supply and demand’ principle that I love so much but with a group of people on the demand side that is, what, out of their minds

Ohhh, and lesson learned for Apple? Why did they allow AT&T to report on the number of activated contracts? They’re out of their minds, too. Wasn’t it obvious that the public would somehow not be able to comprehend the true meaning of those numbers? Even a stock market novice like myself could predict what would happen after AT&T’s report. I’m still shaking my head over this.

9. July, 2007

A song that moved me

Filed under: Life — frightanic @ 00:51

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

I’ve been listening to (American) Country music at http://www.181.fm through iTunes lately quite a bit. While I don’t share the overly religious, simplified, and USA-centered basis of most of the songs I still enjoy the music. I respect all the hard-working country folk most songs are dedicated to. Nonetheless, some songs can bring you close to tears because they’re so touchy – even if the artist seems to have fallen into almond paste (marzipan) when he wrote it. They ooze with pathos.

One such sweet piece is Tough by Craig Morgan. It’s an ode to strong women i.e. traditional women i.e. house wifes. Wonderful!

Artist: Craig Morgan
Song: Tough
Album: Little Bit of Life

She’s in the kitchen at the crack of dawn
Bacon’s on, coffee’s strong
Kids running wild, taking off their clothes
If she’s a nervous wreck, well it never shows
Takes one to football and one to dance
Hits the Y for aerobics class
Drops by the bank, stops at the store
Has on a smile when I walk through the door
The last to go to bed, she’ll be the first one up
And I thought I was tough

Chorus
She’s strong, pushes on, can’t slow her down
She can take anything life dishes out
There was a time
Back before she was mine
When I thought I was tough

We sat there five years ago
The doctors let us know, the test showed
She’d have to fight to live, I broke down and cried
She held me and said it’s gonna be alright
She wore that wig to church
Pink ribbon pinned there on her shirt
No room for fear, full of faith
Hands held high singing Amazing Grace
Never once complained, refusing to give up
And I thought I was tough

Chorus
She’s strong, pushes on, can’t slow her down
She can take anything life dishes out
There was a time
Back before she was mine
When I thought I was tough

She’s a gentle word, the sweetest kiss
A velvet touch against my skin
I’ve seen her cry, I’ve seen her break
But in my eyes, she’ll always be strong

There was a time
Back before she was mine
When I thought I was tough

4. July, 2007

How Java exceptions can fool you

Filed under: Java,Software Development — frightanic @ 23:15

My blog stats clearly indicate that many visitors find my posts through search engines. What is mostly queried are solutions or hints for software problems. That’s why I’ll keep posting solutions to interesting problems.

While deploying a Struts based application on a co-worker’s Eclipse/Tomcat installation we were faced with a nice ActionServlet exception (org.apache.struts.action.ActionServlet abbreviated as ActionServlet):
javax.servlet.UnavailableException: Parsing error processing resource path
/WEB-INF/config/salesstories/struts-config.xml
at ActionServlet.handleConfigException(ActionServlet.java:1035)
at ActionServlet.parseModuleConfigFile(ActionServlet.java:1014)
at ActionServlet.initModuleConfig(ActionServlet.java:955)
at ActionServlet.init(ActionServlet.java:470)

We knew that the path to struts-config.xml was correct, but we couldn’t get to the root of the problem. So, we started debugging ActionServlet#parseModuleConfigFile(). We found that the “real” exception was a SaxParseException due to “premature end of file”. That left us even more puzzled as struts-config.xml was a perfectly valid XML file.

So, we started to play around with that file. Erase the encoding declaration, remove certain segments, etc. Nothing helped. Then I discovered that the SaxParseException with the misleading message “premature end of file” carried a InvocationTargetException as its cause. Now that started to look interesting. That exception’s message brought me to the real problem: “Unsupported major.minor version“!

My co-worker had set up Eclipse to use a Java 5 JDK to compile his code, but had run Tomcat using a Java 1.4 version. Ok, this doesn’t necessarily cause problems unless you set the compiler’s compliance level to 1.5, which my co-worker had done.

3. July, 2007

More Jazoon coverage

Filed under: Jazoon — frightanic @ 22:55

I need to cover some of my “blog debts”. Just didn’t around to persist my other Jazoon notes.

On Thursday afternoon Terrence Barr one of Sun’s Java ME evangelists gave a talk on “Developing Java ME applications using Sun’s open source platforms”.
Said but true, what I mostly remember is Terrence’s rush through his slides. He mentioned in the beginning that it was gonna be tight (time-wise) as the sessions at Jazoon are 10 minutes shorter than at other conferences. Be it as it may, can’t I expect a speaker to prepare accordingly? After all he seemed to have noticed beforehand that time constraints are different. You can’t just take your standard PowerPoint slides and squeeze them into a much smaller time box. As a listener I felt being served luke-warm Java.
Hot was the topic, though. Open-source Java ME is appealing. As I’m a novice to the Java ME world I’ll have to dig deeper to see what it can do for me. http://www.mobileandembedded.org will see me soon!
As a share holder of a major provider of commercial Java implementations for mobile devices I’m also eagerly following the market share of Sun’s open-source alternative…

Later that afternoon Simon Hefti, managing director of Zurich-based Netcetera AG, gave us an insight into what he calls “artificial complexity build-up”. He started with wonderful analogy for the problem:
Assume you bring in your car for maintenance. A few days later you’ll find yourself looking at a horribly high invoice although only a minor part in the engine had to be exchanged. However, since the faulty component was buried so deep down in the engine it had to be taken apart completely.
Artificial complexity imposes extra constraints on a problem solving process as it does not allow you to proceed straight forward. The problem itself may be easy to solve, but the context in which it lives makes it difficult. One key issue here is that weakening separation of concerns increases artificial complexity. This is true not just for the software industry. Simon talked a great deal about choices we make in terms of (third-party) components we bring into a software project. One might call this artificial complexity, of course; however, one might just as well speak of dependencies that complicate matters – something every developer will agree upon.
For a given set of desired functionality component A might cover 75%, component B another 20% while overlapping with what A does in certain areas. This still leaves you with 5% missing features although you’ve already introduced two external dependencies. Nonetheless, sometimes the bad boys are inside i.e. your own code. Simon cited from a study that showed that in more than 50% of cases where developers tried to anticipate future requirements and prepared accordingly (e.g. over-engineered or overly flexible APIs and thus increasing complexity) they were wrong.
Of course, there’s no generic solution to that, but raising awareness certainly helps. KISS!

2. July, 2007

FTP issues in OS X and Dreamweaver

Filed under: Apple & Mac — frightanic @ 08:25

From time to time opening FTP connections in Finder results in error messages that don’t reveil much about the cause of the error. What I see most often is “The Finder cannot complete the operation because some data in (address) could not be read or written. (Error code -36).” What is Finder trying to tell me? I found a hint that including the user name in the FTP URL usually fixes this problem. So, instead of ftp://myurl.ch, you would connect to ftp://myuser@myurl.ch. It’s a valuable hint, indeed. It fixed all my connections problems at least.
Btw, don’t worry about including a “secret” user name in the URL. It’s not less (in)secure than without. Standard FTP sends user name and password in clear text across the wire anyway. If this bothers you, don’t use standard FTP.

By coincidence the very same URL that caused problems in Finder (see above) gave me a headache when I set it up in Adobe/Macromedia Dreamweaver. I can’t remember the exact error message, but whatever I tried the connection couldn’t be established. Dreamweaver only reported that I might try to switch on “passive FTP”. However, when I checked my System Preferences (Network -> choose your connection -> Proxies) I found that PASV was already activated. What the Dreamweaver team failed to mention in the error message is that the Dreamweaver specific “passive FTP” switch is only available in the advanced configuration dialog for your sites. At least in the OS X version of Dreamweaver that small Basic/Advanced button at the top of the dialog is so small that it can easily be missed.

Blog at WordPress.com.