Traveling Abroad with the iPhone

Recently, I visited London and Cardiff on vacation and took my iPhone with me. I knew ahead of time I would like to get the most use out of it, without incurring ridiculous roaming fees, so I planned ahead. This article discusses a number of different solutions and the benefits and limitations of each.

My Goal: Use maps with GPS tracking while traveling abroad

Although the native Google Maps application will not function on the streets of London without an Internet connection, there are applications that you can download ahead of time that will. One application that I liked in particular was OffMaps for the iPhone. It allows you to download maps of any city or region ahead of time, as well as select city guides. The map download is extremely customizable, including selecting the map’s level of precision. The only downside was that these maps/guides have to be downloaded directly by the iPhone (WiFi or 3G) and can take hours to retrieve. I would have preferred an option that let you download the maps from iTunes, utilizing a wired Ethernet connection. Also, you must download maps for all areas you intend to visit ahead of time, as even WiFi connections can be costly and limited abroad.

While I did try other, often city-specific applications, but I wasn’t as impressed with them as OffMaps. Plus, I was able to configure the same application for multiple cities prior to my trip.

After downloading an offline map application, my second goal was to enable GPS. This as it turns out, is trickier than I thought.

Solution 1: Leave the iPhone at home

I considered leaving it at home, but it’s really hard to organize a car service on your return trip if they have no way to reach you. Also, it’s useful to check the time and recent e-mail since my cell phone has replaced my watch as my mechanism for keeping time. Finally, the iPhone is nice for watching TV and movies on the plane as well as listening to music while traveling.

Solution 2: Put the iPhone in Airplane Mode for the entire trip

Most blogs I visited prior to departure recommended putting my iPhone in Airplane Mode for the length of my trip, as it allows you to use WiFi without any possibility of incurring roaming fees. The problem, though, is that it also disables the phone’s GPS, so that you cannot track your current location. Goal failed.

Solution 3: Disable Cellular Data and Roaming

One obvious solution is to go into the General > Network settings and disable cellular data and roaming. There’s a few problems with this though. First, you’re trusting your cell phone not to accidentally charge you for usage. Based on some of the stories floating around the net about being charged thousands of dollars for roaming, that’s just a leap of faith I’m not personally able to make. Second, your battery life is going to be severely limited, because the iPhone will be searching for a signal during the entire trip. Finally, there’s no guarantee some data features won’t continue to process, such as voice mail. With Apple’s Visual Voicemail, the iPhone downloads audio files automatically every time someone leaves you a message. Think of it as a charge anytime someone leaves you a message.

There are steps you can take to disable voice mail while traveling, but I do not recommend them. AT&T has to actually switch your data plan while you’re away, there’s no option to simply disable it. For those with no-longer-available unlimited data plans, switching our data plan can make us a little edgy. Also, there’s no guarantee GPS will work in this environment, although it probably should.

Solution 4: Replace the SIM card

Those absolutely needing international access can buy a SIM from a local carrier. Given that I’m using a US iPhone, and AT&T has severely restricted non-AT&T usage, I wasn’t convinced this would work without jail-breaking the iPhone. Also, there are some security risks from letting your passwords/access transfer over a network you may not be familiar with. Ultimately, I decided this option wouldn’t be worth the headache. If I had a more open, European iPhone, though, I may have felt differently, since in those markets the phone and the SIM are not extremely interconnected.

Solution 5: Lock the SIM card

One excellent recommendation was to install a 4-digit PIN code on the SIM which requires entry every time the iPhone is started and disables all cellular/data communication if not present. The advantage to this is that GPS continues to work in this environment. The only down side is that you have make sure not to forget your PIN code. Also, I had to do a bit of searching to find the ‘default’ pin code that programmed into my SIM card.

Solution 6: Remove the SIM card

Similar to Solution #5, I realized I could just pull out the SIM card. No special tools required, just a paper clip and a plastic bag to put it in (the new Micro SIMs are tiny and easy to lose). Unlike some of the other solutions which rely on software features, this completely prevents data roaming but still allows WiFi usage and GPS support, so it’s the solution I went with. I just left the SIM in a hotel safe and carried the phone around all day. I was successful with my original goal of simulating Google Maps with tracking, as the offline maps and GPS functioned as expected. The only thing I noticed is that true GPS requires much clearer line of site with a satellite. In other words, GPS only functioned when I was out in the open, and sometimes took a while to acquire an initial signal. This is to be expected with GPS technology, but having the iPhone’s data network fix a location faster than traditional GPS has spoiled me over the last few years.

Reflections

Ultimately, downloading the offline maps was the single best step I took prior to my departure. Removing the SIM card was also quite easy to do and gave me peace of mind that the software wasn’t going to ‘accidentally’ allow data connections while traveling. Also, the battery was significantly better with no SIM card, and the iPhone could go for days without charging. I guess the data network usage really does chew up the battery.

Ultimately, GPS was only partially useful, as I was able to figure out where I was on the map pretty quickly based on landmarks. However, had I been traveling in a more difficult-to-navigate city or had a worse sense of direction, I would have probably used GPS more frequently.

visio uml 2 for java (scea)

After taking SCEA part 1 and Core Spring, it is time to work on SCEA part 2.  Or should I say Oracle Certified Master, Java EE 5 Enterprise Architect part 2.  OCMJEA?  It doesn’t matter.  This post isn’t about the SCEA/OCMJEA per se.  This post is about using Visio for current Java UML modeling.  Here’s what I learned or re-learned about Visio.

Why Visio?

You may be wondering why I chose Visio in the first place.  After all Star UML is free.  My original thought was that I have Visio 2002 installed on my machine because I bought a copy when I was in grad school and I am experienced in using it.  In hindsight this wasn’t the best idea.

UML 1 vs UML 2

Visio does not support UML 2.  The SCEA wants UML 2 diagrams.   It looks like the biggest differences are conditional support for sequence diagrams and a new shape for components in component diagrams.

Luckily there are UML 2 stencils for Visio for almost every version of Visio.  Installing them was easy.  It is key to install the stencil before you start creating diagrams as Visio UML shapes can’t integrate with a UML 2 stencil diagram.   The stencils don’t have much documentation, but I found this chart helpful.

Java stereotypes

To add new stereotypes for Java to a diagram, follow these steps to register them.  Then just select the relevant stereotype in your diagram.

  • UML menu > Stereotypes
  • New
  • Stereotype = @Entity (or whatever you want to add)
  • Baseclass = Class, Component or Dependency (depending on the type of diagram)

Java types

To add Java specific types, follow these steps to register them in your diagram.  Then select them in your attributes/operations/methods.

  • UML > Packages
  • New
  • Java types
  • UML > View > Model Explorer
  • Right click java types in model explorer > new >
  • datatype > name

Hiding attributes/operations section in a class diagram

  • Right click shape
  • Shape display options
  • under suppress, click attributes or options

Add documentation to shape in component diagram

  • Right click shape
  • Shape display options
  • Check properties
  • Can add custom property (or documentation) with more detail

jeanne’s SCEA/OCMJEA 5 part 2&3 experiences

Today I got word that I passed the SCEA/OCMJEA exam.  I passed part 1 in July and then took a break for the Core Spring certification.  Overall, the process is do part 2, take part 3 then e-mail part 2 and get grade in 4-6 weeks. (I got it in 18 days.)

Week by week

People often ask how long it takes to do the project.  Sun/Oracle says 40-80 hours.  Cade/Sheil says 25-35 hours.  As with part 1, here’s a sense of what I did each week and how long I spent each week.  [I’ve also added notes on what was a bad idea]

It took just over 27 hours and either 4 or 10 weeks depending on if you count weeks I didn’t work on it.  Well within the estimate by Cade/Sheil and way under the estimate by Sun/Oracle.  I think this is because Cade/Sheil assume you are already know about architecture and have some experience.

Week 1 (3 hours)

  • Bought part 2
  • Read assignment
  • Re-read chapter 9 of Cade & Sheil
  • Decided to use Visio 2002 because I bought a copy in grad school.  [I recommend not using Visio, but here’s some tips if you do.]
  • Created template for the deliverable – index.html, links, etc.  That way I exercise them as I do the assignment and know they work and are readable/usable.

Week 2 (6 hours)

  • Re-read assignment listing assumptions/risks/major architecture thoughts/major technology thoughts
  • Configured Visio to like UML and UML 2
  • Started deployment diagram and class diagram

Week 3 (2 hours)

  • Created drafts of sequence diagrams
  • Found my UML book from grad school to make sure I am getting the “academic” points of UML that we don’t use in practice into my diagram.  [I recommend using an actual UML 2 book rather than what you have laying around from years ago.]

Weeks 4-9 (0 hours)

Did nothing for six weeks dues to a series of trips during the week and catching up on other things on the weekend.  [This is a bad idea.  I completely lost my momentum and “un-loaded” all the information about the project from my mind.  I also paused right after finishing the “fun part” so it wasn’t motivating to get back to the project.]

Week 10 (16.25 hours)

Decided I was going to finish before Halloween.  This has been dragging on too long and I wanted to get it done before my next trip.

  • Finished all diagrams
  • Switched to UML 2 syntax
  • Added the stuff nobody does in real life.
  • Asked for a review from a colleague (per Cade/Sheil) to see if the problem was discernible from the diagrams
  • Make sure clear, updated formatting, spell check

What did I read?

  • Chapter 9 in the Cade & Sheil study guide
  • Questions people had in  JavaRanch/CodeRanch‘s SCEA forum
  • JEE 6 tutorial- Basic concepts because a publisher mailed it for me to review.  While it refreshed my memory about JSF, it certainly wasn’t essential for the project.
  • I used the first edition of Using UML as a reference because I had it from grad school.  The first edition covers UML 1.X so I don’t recommend it.  It is better to use a UML 2.X book since that is what the exam wants you to use.

My impressions of SCEA Part 2

Part of part 2 was fun to do.  This was the part where I created the design, thought about it how met functional/non-functional requirements, made the risk list, etc.  Then there was the tedious “do the stuff Sun/Oracle wants that nobody does in the real world”.  Like put JSPs on a class diagram.  And the time spent stressing over reading Sun/Oracle’s mind on what they want despite them not commenting on it.  Unfortunately I took a break between the fun part and the tedious part which made it seem worse because I lost flow.  My thoughts on each section are:

  1. Class diagram – I’m not a mind-reader about what they wanted.  I did what I felt was appropriate, plus a bit more detail.  I had a feeling this decision cost me $300, but it didn’t – I passed on the first shot.  Cade’s example doesn’t look like there is any way it is worth 40 pts.  I had 2 class diagrams containing 26 classes and 11 JSPs.  (I would never put JSPs in a class diagram, but I thought they wanted it.)
  2. Component diagram – I would never put this much detail in a component diagram.  Especially JSPs!  I also noticed Cade has both a UML 1 example and UML 2 example despite being supposed to use UML 2.  I have 16 boxes in my component diagram.  I didn’t go overboard here either.
  3. Deployment diagram – This was straightfoward with only 7 boxes.  It  seems like it is worth too many points for the effort.  I did put some text on suggest hardware since Cade said to.
  4. Sequence diagrams – Despite being hardly worth anything, these are useful. I didn’t go into the detail people said they did on the forums or include the design patterns because that obscures the meaning.  I did not show the flow of framework code. I had 6 sequence diagrams for the 4 use cases.
  5. Risk list – I had a blast writing this. Writing about risks you don’t have to deal with is easier than on a real project where every risk is a potential problem.
  6. Assumptions – I wrote too much because I wasn’t sure what to take for granted.  It turned out a lot of this was addressed in part 3.  I did learn that I wrote “we” much more than “I.”   I had over 34 we’s vs < 5 I’s because I felt like I was presenting an (imaginary) team design to an outsider.  I changed them all to I before submitting so the reviewer doesn’t think someone else did the work.
  7. Other documentation – I wrote some text explaining a high level overview of my design, what design patterns I used and how I met the non-functional requirements.  While “a picture is worth a thousand words”, short paragraphs describing certain things let the reviewer see my thought process without having to guess.  (I only used 4 design patterns.)

My impressions of SCEA Part 3

Part 3 was fun!  It was writing about the things I found fun in part 2.  My notes:

  • They gave 120 minutes instead of the 90 I thought we had. This included reading terms of agreement.
  • I spent 70 minutes on the 8 questions, but I wrote a lot.
  • Advice: read all questions before starting: some are similar.  I did not do this and wound up answering later question in earlier ones and then having to repeat because there is no copy/paste.
  • Some questions were about non-functional requirements or why you choose to do something.  Some were scenarios or why you didn’t choose certain alternatives.
  • I’m glad I was warned the score = 0 (fail) when getting printed report after taking the exam.

And the end

I think this thread summarizes the part 3/submission process well.  I got my pass in the mail along with a note to login to very my address.  Then the certification bundle will be mailed.

– finished diagrams, asked for review (per Cade/Sheil) to see if problem clear, formatting, spell check
re-did sequence diagram – much better to use – can putl ines closer together, feels more natural, right click to change

things