awkward silence |

I find this amusing…

Catalog of Unfindable Objects

No tags

Everywhere you look these days you read about iPhone users screaming for multitasking. Here’s one counter opinion.

Yesterday I was trying to shoot off a quick text message. I was happily typing away on my iPhone 3G when the keyboard became unresponsive. You know what I’m talking about — type along and nothing appears, no comforting click, click, click of the keys. Then a familiar ‘vling!’ of the You’ve Got Mail variety, then several words of my typing spill forth.

That’s multitasking on the iPhone and I don’t like it.

When I’m actively doing something, anything, on my iPhone I want it to be all about me. When I’m done, or if I’m dull and slow and the wee CPU can get some work done without my even knowing, fine.

Maybe I’m the only one who doesn’t use or care about Pandora. I also don’t believe in human multitasking, so having just a single app open that I’m focused on and actively engaged with suits me just fine.

I just hope with whatever iPhone 4.0 brings us that my iPhone doesn’t forget about me and spend all it’s time on background tasks leaving my keyboard slow and chunky. It would really ruin the user experience, which should be all about me.

·

I’ve been working on setting up a database for an iPhone app. I haven’t worked with sqlite before so it’s yet another new thing to learn. I’ve been going through a few tutorials on the web and was partway through this one when I took the advice of his sidebar at the end of Step 3 to keep my database definition in sql and have it built when the app compiles. He linked to this screenshot by way of a how-to, which unfortunately didn’t work for me.

First off, to find the build rules for your project, right click on Targets in xcode and select Get Info:
main.m - GameDay

I also added a check to see if your db already exists to avoid build errors if it doesn’t. I decided to put it into an external file and execute that from the build rule. Here’s what my build rule looks like:

Target 201CGameDay201D Info
Uploaded with plasq‘s Skitch!

Here’s the bash shell script:

#!/bin/bash
cd ${TARGET_BUILD_DIR}
if [ -f ${INPUT_FILE_BASE}.db ];
then
rm ${INPUT_FILE_BASE}.db;
fi
cat ${INPUT_FILE_PATH} | sqlite3 ${INPUT_FILE_BASE}.db

Put it in a file (sqlbuildrule.sh, for example) and place it in your project directory and set it to executable:
chmod +x sqlbuildrule.sh

At the end of the rule, click the + below “with output files” and enter this:
$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).db

The script will look for a .sql file in your project directory and build it with the output going to your target build directory.

If you need to edit the shell script or change the “with output files” setting of the build rule, note that the way you use the environment variables is different. The shell uses them as regular bash variables: ${MY_VAR}, where Xcode uses parens: $(MY_VAR).

No tags

I’ve started looking into development on iPhone and was a little surprised that unit testing was challenging. I found this project by Google that seems promising:
iPhoneUnitTesting – google-toolbox-for-mac – Google Code – How to do iPhone unit testing.

I’m going through Bill Dudney’s book from the Prags, which seems very good. You get up and running quickly, though it isn’t (and doesn’t claim to be) an in-depth resource on Objective C. I also got Daniel Steinberg’s Cocoa Programming book, which is a great quick start and good companion to the iPhone book.

Now I just need an iPhone… :P

I coach my kids’ soccer teams and needed a way to set up games as far as positions and so forth. I came up with a stencil for OmniGraffle and posted it here. Let me know if you try it and if you spot any issues or have other suggestions.

No tags

I found an example of a Document-based Mate application out on Google code, referenced here and here on the Mate web site.

It’s pretty nice, with good examples of the LocalEventMap, etc. He’s built it using the Presentation Model design pattern which seems to be a natural fit to both Flex and Mate.

Paul Williams of Adobe has a series of articles on various design patterns including Presentation Model.

And of course Martin Fowler has some thoughts on the Presentation Model, aka Application Model pattern.

It could be a nice starting point for developing multiple document applications. And the Presentation Model pattern looks like it would provide some nice benefits, keeping the views nice and simple and making them a lot easier to test.

This project also has excellent documentation and about the only info I can find on LocalEventMaps.

No tags

I’ve been using Mate for some time and liking it very much. I wanted to be able to use Flex Builder’s ability to navigate to and view the source of included types. With only having the downloaded .swc file in my /libs directory that wasn’t possible. It took me some time to sort it out, so here’s my recipe in case it helps anyone (and so I can remember next time).

This should also work for any project that you can download the source for, that just happened to be Mate for me. I’m using Flex Builder 3 — not sure what would be different if anything with FB2.

1. Download the source using the directions here

2. Create a Flex Library Project in Flex Builder, let’s call it ‘MateLib’

3. Import the source into the project, leaving out all the .svn directories, such that your folder structure looks like:

MateLib
   /bin
   /com
      /asfusion
         /mate
            /etc....
   manifest.xml

4. Right click the project in the FB Navigator view and select: Properties -> Flex Library Compiler. Set the Namespace URL: to “http://mate.asfusion.com/” and Mainifest file: to manifest.xml

5. Save and build the project.

6. In your project that uses the library, select Properties -> Flex Build Path and click Add SWC and navigate to the MateLib project -> /bin folder and select the MateLib.swc file there.

Now you can use the standard way to include Mate components in your mxml, with:

xmlns:mate="http://mate.asfusion.com/"

And you’ll be able to view the source code by command-clicking (control-click on Windows I think) a Mate component. You can also select the text, e.g. Dispatcher, and use the F3 key. And… the classes will also come up and be navigable with the Open Type, command-T, navigator.

No tags

Jul/08

21

Merb with Phusion Passenger

I just got Merb running under Phusion Passenger on my OS X Leopard MacBook and it all went well but with a couple gotchas. I looked at Manfred’s and TopFunky’s notes, but I couldn’t get Merb to kick in.

It turns out I was missing a config.ru as they were running straight Rails apps and Merb has to (gets to?) run as a Rack app. This page on Merbivore has all the info. I was being a bit dense about actually taking that first bit of code (# config.ru, etc) and putting it into a file at the root of my Merb app named config.ru. Once done Merb fired right up and it’s working swimmingly.

No tags

In April I changed jobs, moving from a position with a company-supplied phone to one without. I decided to go with AT&T as I wanted to make the plunge and get an iPhone. However, being a loooong time Apple customer (first Mac: 1984) I was aware that the new version was right around the corner, so I got a cheap LG flip phone and figured I’d upgrade when the new iPhone came out.

You’re probably already shaking your head at my naiveté. I’ve never been a heavy cell phone user — my plan before my company provided phone was a pay-as-you-go with Virgin, which suited my pretty well actually. I’m not a big talker, but I am a big emailer/web browser, etc., hence the iPhone lust.

So here’s some numbers I’m running through my head — the cost of my LG phone (a refurb, fwiw) was about $10 — they seem to be going for $80 used — I’d imagine AT&T would have gotten them for that at most. So say they funded $70 of my phone.

I have the cheapest phone plan at $40/month with a $10 media plan. So far:

AT&T -> Tom $70
Tom -> AT&T $50/mo * 3 = $150

Now, due to that $70 AT&T won’t provide me the upgrade price, but will generously allow me to upgrade for the open price of $399/$499 — although in order to do so I would still be required to extend my plan. Why? I don’t know.

What I would like to do:
AT&T -> Tom $200 (iPhone subsidy)
Tom -> AT&T $70/mo + $5/mo for text

I would even be happy to pay off that $70 debt I have for the LG subsidy. AT&T would be $25/month ahead, meaning they’d pay back the LG subsidy within a few months and have $300/year more of my cash indefinitely.

It’s just hard to not feel penalized as an existing customer and boy, do I regret not doing a pay-as-you-go plan for a while. At this point looking into alternatives like a cracked phone and switching providers would look good, if it was feasible. It just makes me want to leave AT&T. Here they have a chance to increase their revenue from me, but they manage to turn that around and make me an unhappy customer.

Sheesh.

No tags

I’ve been trying to load a local file with some dummy data and hitting a security warning. I was running out of FlexBuilder 3 and trying to read a local file, so wasn’t sure why I was getting a security error.

I’d come across many references to adding a cross domain policy to a web server, but this is the first full explanation of the security sandbox that made sense to me. Following this, I added:

-use-network=false

To the custom compiler line in the project preferences and all is well. Here’s the link with a great explanation:

http://blogs.adobe.com/flexdoc/2008/06/the_security_sandbox_in_flex_b.html

No tags

Older posts >>

Theme Design by devolux.nh2.me