Daniel's Stuff

I write code

Category: Web

Titanium Appcelerator == yuck

After spending considerable time recently working on a fairly simple iOS app using Titanium Appcelerator I have come to the conclusion that I am never going to use it again if I can avoid it. Β The app size isn’t too much of a problem, but the fact that even this simple app crashes on startup on some devices makes me very nervous. Β I was hesitant to use the product at the start of the project, but the client wanted to be able to produce an Android app from the same code base, so I agreed. Β I suspect that I would have been able to build both apps from scratch using the native tools by now even though I’ve never made a production Android app before. Β Live and learn I guess.

JRuby, Rails and Development mode

Well, that was fun…  I spent quite a bit of time today beating my head against a “memory leak” only to remember that JRuby + Rails + Development mode = very leaky.  Switch to production mode and the problem goes away.

A simple little Rails app with one controller and one model is all that is needed to exercise the problem.  Run rails in development mode, and hit it with requests, memory usage soon skyrockets and the app starts to fall over.  Switch to production mode and the same app runs really nicely πŸ™‚

DeltaSync decompression progress

After quite some time I finally have some code that seems to decompress the message data returned from Windows Live via the DeltaSync protocol.

The code is AWFUL, but the results are looking pretty good.

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danielparnell.com>

X-Message-Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

Received: from randymail-a4.g.dreamhost.com ([208.97.132.207]) by bay0-mc8-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668);

Thu, 29 Jan 2009 16:06:38 -0800

Received: from 192-168-1-101.tpgi.com.au (60-241-72-192.static.tpgi.com.au [60.241.72.192])

(using TLSv1 with cipher AES128-SHA (128/128 bits))

(No client certificate requested)

by randymail-a4.g.dreamhost.com (Postfix) with ESMTP id 97A67194DD3

for <danielparnell@live.com>; Thu, 29 Jan 2009 16:06:26 -0800 (PST)

Message-Id: <8EEE4310-25CC-47BE-8FCB-330EBCD75A21@danielparnell.com>

From: Daniel Parnell <me@danielparnell.com>

To: danielparnell@live.com

Content-Type: multipart/mixed; boundary=Apple-Mail-33–583770588

Mime-Version: 1.0 (Apple Message framework v930.3)

Subject: more test messages

Date: Fri, 30 Jan 2009 11:06:23 +1100

X-Mailer: Apple Mail (2.930.3)

Return-Path: me@danielparnell.com

X-OriginalArrivalTime: 30 Jan 2009 00:06:38.0411 (UTC) FILETIME=[9F1AB1B0:01C9826E]

–Apple-Mail-33–583770588

Content-Type: text/plain;

charset=US-ASCII;

format=flowed

Content-Transfer-Encoding: 7bit

this is another test message

–Apple-Mail-33–583770588

Content-Disposition: attachment;

filename=”AGL Energy Advisor.zip”

Content-Type: application/zip;

x-unix-mode=0644;

name=”AGL Energy Advisor.zip”

Content-Transfer-Encoding: base64

UEsDBAoAAAAAAANIPToAAAAAAAA********XABAAQUdMIEVuZXJneSBBZHZpc29yLmFwcC9VWAwA

q9WASWXVgEn1ARQAUEsDBAoAAAAAANFGNzoAAAAAAAA********mABAAQUdMIEVuZXJneSBBZHZp

c29yLmFwcC9fQ29kZVNpZ25hdHVyZS9VWAwAZdWASRnreEn1ARQAUEsDBBQACAAIAANIPToAAAAA

AAAAAAAAAAAzABAAQUdMIEVuZXJneSBBZHZpc29yLmFwcC9fQ29kZVNpZ25hdHVyZS9Db2RlUmVz

b3VyY2VzVVgMAK7VgEll1YBJ9QEUALWYWbOqOhbHn/t+it37sa27VcSBrnPPLQUUEBFwYHjZxSRE

hmAIg376xj30PbdO8FR17X7RaMgvK4t/1lrJtz+bNHmqAlQAmP3xPHwZPD8FmQd9kIV/PB/2y99n

z39+/+3bP7ktu7dU/ilPQIGf1MNCFtmn59/7/XmeJ0G/z+25J1UWd/unltHv88rz03OEcf7vfr+u

6xfn/tSLB9P7g0VfRTAPEL7KLez3dsCLj/3ndpp3+t/Maf/1gYe///aPb3Fw/X4CSVB869+b7T8f

Pe9dfBa2w6OXJEfw3J+7sMRHENQvGXA/B7QjHOzcG9cef+FySztW2mipj6XEDYflXhiN5Pkf9+f6

nw8S0GyQJAbAkYqAF5Dx6+0llK+cPlkem7XB0bZyxVg6mjdY/xLPBdgBSbfpMTjMx0dpYDkncMhp

YTUYORtFp3qA/yV744DMAJkPO9gDYz7t3/aTTW9gjvHhths4Q4dLo9lW+yVbh/DN4SzMMIJJEiDy

HPlAPK98iOBJiDZwe3J2HKp4k42Hv55jhx0cdLtmyeiet7TOVapM48QoEm8rq24jzUyyazDASZAG

GS5e3qT3M7Ggx2yxGBYpxS91xh4qIFlq46gxkUggqnEoZif4MyYbTy+cSmP7JHNDxO7okTFY0LJ2

vpEMc+7afYlwmvxMkvjcnvWzPS0ulN3OvIl6qUv61qdrknCdssDISYDzkmfhz7CNGjnLycW8wNOu

NxkEKeNeaS0fwAEkwFzHi0MEy8wn0/qaaNsLoPrmeImHjO33ArQyR9edRxNpOEIQpmSWLZin887C

RhRsljU7WotpJfDVXspnD1ivkQOQj66t9IjUCAgYJAalhc1pv6DWdmDYUNCT5OQ9pEJct7pDUXD/


And so on.  Once I’ve got things cleaned up a bit more I hope to post what I’ve been able to come up with.

Bob Lives!

After a couple of false starts with dead voltage regulators, Bob (my daughter named it) the PIC based ethernet device lives in a more permanent incarnation.  Bob is made from bits and pieces I had around the place (I now have several very dead network hubs).  The budget for the project was zero πŸ˜‰
My Dad provided me with the PIC prototyping board pictured above and many of the pieces as well as the PIC18F452.  The ENC28J60 ethernet controller was kindly provided by Microchip through their very generous free samples.
The original voltage regulator on the PIC prototyping board didn’t seem to be up to powering both the PIC and the ethernet controller, so I went through my old retired networking gear until I found a 3.3V regulator.  Unfortunately I think I popped it in the process of removing it from the board and it no longer worked :(.  In the end I used a 7805 5V regulator and then ran the output of that through a pair of diodes in a bridge rectifier (thank again for the help with that one Dad) to drop the voltage down to about 3.5V or so.
Now I need to get my PIC Forth running on this hardware and then I’ll have a networked Forth device I can play with πŸ™‚

What I’ve been up to lately

I’ve been really busy recently and have not had much time to work on my side projects.
One that I’ve been working on off and on for some time is a networked PIC micro-controller.
This morning I finally got it responding to ICMP echo request (ping) πŸ™‚

The next thing I need to do is make a board for it.  That brings me to another project I’ve just started.  I have started a port of the awesome PCB program to Cocoa.  Things are coming along really nicely πŸ™‚

What I’ve been doing recently

Today I found out that an application I built for the iPhone has become available on the iTunes store.  It’s a simple little app to estimate electricity bills for a household.  Check it out on the iTunes store via the following link πŸ™‚ AGL Energy Efficiency
I’ve also been working on the Windows Live Mail compression code some more and have gotten some good results.  Below in an example of what I’m getting

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danie******pl <m********.com>-Status: n:0Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

ReceLjEE7*d: from randymail-a4.g.dreamhostm>-S ([208.97.132.207]) by bay0-mc8-f11.bay00***.hot-a4. ([2*with Microsoft SMTPSVC(6.0.3790.2668);

Thu, 29 Jan 2009 16:06:38 -080


and this is what I should be getting.


X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danielparnell.com>

X-Message-Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

Received: from randymail-a4.g.dreamhost.com ([208.97.132.207]) by bay0-mc8-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668);

         Thu, 29 Jan 2009 16:06:38 -0800


I’ve been throttled

OH NO!  I’ve used up all of my download limit for the month and have been throttled down to 64kb/s.  It’s like being back on dialup again πŸ™

localhost.localdomain-billion-month.png

Admittedly it is all my own fault.  As you can see from the chart above there was a period of sustained download earlier this month when I was downloading a very large torrent.

Ah well…  I just have to wait another 5 days for the next billing cycle to kick in to get my speed back to normal.