blogging from app security usa with my ipad

Presuming the internet holds out, I’ll be blogging from the App Security USA conference for the next two days. Scott and I tried this at The Server Side Java Symposium a few years ago. I have a newer iPad (air) now with keyboard so it will be interesting to see how the iPad blogging experience differs.

Adding a link
I didn’t realize right away that Safari now shows you only the domain name unless ou click on the location bar to see the real link.

Typing
New keyboard. Need to get used to it. I seem to have to press harder on the keys than I like.

WordPress

  • The visual view isn’t working for me in the iPad WordPress browser editor. Since I have a real keyboard, at east I can type HTML to make it happen in text view.
  • As with last time, two finger scroll helped.
  • Additionally, control arrows helped with end of line and end of text area

Case/stand
I have the Kensington keyboard and folio. The idea is that the iPad screen is propped up at a nice angle as you type. That works. The problem is that my lap isn’t the most stable surface for this to be sitting on. It mostly works. However twice so far (within the first two hours),the iPad slipped out an started to fall. Luckily, the folio is magnet supported so nothing bad happened. And Safari considered my catching it to be a delete message and prompted me for whether I want to delete or cancel. This seems like an accident waiting to happen so I’ll make sure to save often! And try to get to sessions early enough to get a table seat.

Caps lock
The keyboard is very clear on when caps lock is on. There is a red light. I think I’m accidentally turning on the iPad caps lock at times though as sometimes caps lock appears “backwards” on the keyboard

upgrading to mavericks – problems including broke eclipse/ant java for jmockit – and how to fix

I didn’t upgrade to Mavericks right away because I was getting FIOS.  If there were internet problems, I wanted to know they were Verizon’s fault and not be in a position where they could claim it was my computer’s problem.  I’ve had Mavericks long enough that I can write about the experience.

The problems describe here:

  • git
  • Eclipse/Java/Ant/JMockIt
  • OpenOffice crashing

How long it took

Not counting the download, the install took 2 hours.  Much of which was Apple saying there were “17 minutes” left.  I left it alone and it didn’t finish though.  I’ve seen reports of significantly faster installs though.

Problem #1 – git

The first problem I ran into was the error message The “git” command requires the command line developer tools.  Not a big deal.  It was a two minute install.  I was just surprised as I was expecting what was installed before the upgrade to  be installed after.

Problem #2 – Java and Eclipse

And now for the meat of this.  Being able to develop again in Eclipse was by no means seemless.

Error: Ant can’t find Java

Exact message: Specified VM install not found: type MacOS X VM, name Java SE 6 (MacOS X Default)

Solution – for each Ant build:

  • Run > External Tools Configuration
  • Run in same JRE as the workspace

Error: JUnit tests don’t run in Eclipse view

When running from Eclipse, I got the stack trace:


java.lang.IllegalStateException: Unable to load Java agent; please add lib/tools.jar from your JDK to the classpath

at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:102)

at mockit.internal.startup.JDK6AgentLoader.loadAgent(JDK6AgentLoader.java:74)

at mockit.internal.startup.AgentInitialization.initializeAccordingToJDKVersion(AgentInitialization.java:41)

at mockit.internal.startup.Startup.initializeIfNeeded(Startup.java:271)

at org.junit.runner.Runner.<clinit>(Runner.java:25)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:35)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

java.lang.NoClassDefFoundError: org.junit.runner.Runner

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Solution:

First I tried switching creating a new installed JVM of type MacOS X JVM.  That didn’t help directly.  I left it like that since I didn’t want to muck around with my original configuration.  Then I added tools.jar to the installed JRE.

  1. Eclipse > Preferences
  2. Java > Installed JREs
  3. Click target JRE
  4. Edit
  5. Add external jars
  6. Add  /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/lib/tools.jar

Warning: The first time I tried this procedure, Eclipse hung.  I had it to kill it.  When I opened my workspace, I saw “unable to load plugin x” in every single view.  I used Time Machine to restore to before I tried changing the JREs and then re-did that change.  The second time it was successful.

I could have added tools.jar to my classpath for the project instead.  I choose not to because I was hoping updating it in the JVM install would solve the Ant problem (described below) as well.  It didn’t.  I also didn’t want to change the project .classpath as that is shared in Subversion and I didn’t want to make a change that affects others.

This whole exercise felt like a hack until I read the JMockIt instructions.  This leads me to believe I was running with a different JDK before the Mavericks upgrade.

If you are developing on a JDK of version 1.6 or newer on Mac OS X, add <jdkDir>/lib/tools.jar to the classpath, where <jdkDir> is the home directory for your local JDK 1.6 installation.

Error: JUnit tests don’t run from Ant

When running from Ant, every test failed with:

Caused an ERROR</span>
<pre>
null

java.lang.reflect.InvocationTargetException

at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

What I learned:

  • I tried setting JAVA_HOME at the command line to no avail.  I confirmed javac is on the path. (/usr/bin/javac); it was.
  • I tried adding tools.jar to the classpath in launch configuration in Eclipse for running Ant.
  • If I change to fork=”no” in the <junit> task in the Ant script, most of the tests pass.  (Some of them require the JVM be forked which is why it was in the first place.) Showing the problem is when a new JVM is created, it doesn’t inherit the tools.jar from the previous step.
  • If I hard code the classpath entry for tools.jar in the Ant build file, all of the tests pass.

Solution:

If you need to fork the JVM, add the following insider you <junit> task.

<classpath location="/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/lib/tools222.jar" />

I don’t like this solution.  I also didn’t like the hack for Eclipse so my unease is pretty uniform here.  Luckily Ant doesn’t choke if you include a file (or disk or filesystem) in the classpath that doesn’t exist.  Which means this won’t hurt others working on the same project.

Problem #3 – Open Office crashes when opening a document

The solution was to upgrade from Open Office 3.3.0 to the latest (4)

My favorite new feature

It’s a minor one, but I like the feature to synchronization of “Read Later” between my Mac and iPad.  (I haven’t tried it yet so it may not be that nice in practice.)  Most of the new features are things I don’t need.

the path to fios (and no longer having a copper phone line)

I upgraded from DSL to FIOS internet on November 1st.  I was hoping to keep my copper phone line but that was not to be.  This is the story of how Verizon runs customer service along with the actual FIOS setup.

Low expectations

It took Verizon 10-12 days to do a straightforward transfer to phone/DSL between apartments which set my expectations for this to be quite low.  I have had better experiences with Verizon Wireless and the Chromebook so was hoping FIOS was more like that.

Lying salespeople

When I asked at CodeRanch if people had any FIOS advice, Pat Farrell immediately wrote “The Verizon sales folks are lying bas****.”.  In addition to telling me that I could keep my copper phone, they tried to sell me on using FIOS for tv.   I told the first sales guy I was using bunny ears for TV thinking that would end the TV sales pitch.  Nope!  Instead, Joey tells me that once Verizon finishes wiring the area for FIOS, bunny ear antennas won’t work anymore.  That doesn’t even make sense.  Bunny ears pick of over the air waves.  Which are broadcast from Manhattan; not supplied by Verizon.  (While I do own bunny ears, I actually use Time Warner for TV and want to continue.)

Friday – The onsite visit

This actually went well.  Verizon gives a 4 hour window for the arrival of the tech.  (8-12).  The tech called me shortly after 8am to tell me I was his second job of the day.  That was useful as there was no need to expect him too early.  When calling the Verizon # from my home phone, it then informed me the tech would arrive between 11 and 12.  The tech actually arrived at 10:30.

The FIOS box needs to be located near a three prong outlet.  I asked for it to get behind the fridge as it is rather large and my closet doesn’t have power.  The tech was fine with that and didn’t make a mess drilling the two small halls too put it there.  He also fixed the wire Time Warner left hanging in the hallway when they had been there the previous week.

The tech did need to wait over an  hour for the ONE guy who can do the end of the job.

The installer did tell me that his workorder said they would switch phone too because I have a double play package.  While he was there, I called Verizon and was told:

  • Call #1 – Frank – Because I’m in an apartment building, I have to choose between copper and FIOS.  (The installer said it is possible to keep both because others in the building still have copper.)
  • Call #2 – My hope was to speak to someone else.  Verizon detects I already called and tries to connect me to the same agent.  No!  I wanted a second opinion.  Luckily Frank was busy and I got connected to another rep.  This rep Ms Boven? says it doesn’t show I will be changed to FIOS for the phone.

Copper and FIOS do work simultaneously

When the tech left around 3:30, my old copper phone line and FIOS data did both work at the same time.  This was also the case at 4:15.  Since Verizon tech’s hours end at 4, this tells me he didn’t turn it off.

This aggravates me because it means the ONLY  reason you can’t have a copper phone line is because Verizon says so.

A sidebar: why copper is better

I understand that Verizon is making a concerted effort to get people off copper so they don’t have to support it.  I understand I would have to switch eventually.  But while other people in the building still have copper phone, I don’t see why I can’t pay more to continue it.

There were only two reasons to have a home phone number instead of VOIP.

  1. It worked in a power outage.  FIOS phone works for up to 8 hours in a power outage.  Potentially more if you have a backup battery.  Where I live in NYC, I’ve never experienced a power outage less than 8 hours.  They are rare, but long.  This advantage is gone.
  2. If you call 911, they can automatically detect where you are down to the apartment number.

This means that home phone is like an insurance policy that happens to make/receive phone calls.

Friday – 7:30pm – bye copper

I pick up the phone and no longer have a dialtone.  I call Verizon and Richard did a line test.  He had me unplug both phones and rebooted the internet/phone  I saw the internet go down for 2 minutes.  The problem is clearly that Verizon turned off copper service, but I’m required for a tech to come by as their records show I am still on copper phone.  My choices are Monday morning or Wednesday morning.

Saturday morning – text confirmation

Verizon sends me “1/2” texts to confirm appointment.  The second text never arrived.  I do get an email that my service call was completed (referring to Friday’s) which was a bit confusing.

I go online to read my service ticket which simply says “new install. no dial tone.”  I updated it with a description of the problem.  It limits the # characters you can submit without an error message or character count.  I wound up counting on another side and copying back in.

Monday – onsite visit

Verizon called at 8:15 to give an ETA of 20 minutes.  The tech confirmed that they did in fact switch me to FIOS for phone and set up a wire to my phone.  (This could have been done on Friday.)  Claims I can be switched back. He says I need to call the business office.  Great.  I get to spend the day on the phone with Verizon and make up my work later.

Monday am – follow up from onsite dept

I gave Verizon a low rating for customer satisfaction for the Friday visit since it ended with not having a phone at all.  Jeff called to see if the problem was with his tech.  No, his tech was fine.  He called again a few days later to see if the problem was resolved.  I’m actually impressed with their onsite department.

Monday – am calls

I waited on hold for 10 minutes at 9:06 before giving up and calling back later.  I called again at 9:39 and Lisa in tech routed me to customer service.  Rochelle claims that she sill switch me back and it will work in 45/60 minutes.  She even gives me a confirmation number. There was a ton of background noise and I could hear two other conversations.  While I’m on the phone, she tries to sell me on other service, my favorite being a triple play.  We’ve already established I don’t WANT FIOS phone, but by all means read off the script anyway.  After this call, I get an email that I was switched to the Freedom Essentials (more expensive phone plan.)

Monday – setup

I’m going into Manhattan lunchtime, but need a way to know whether they really did switch me back.  What I do is put my answering machine attached to the copper line.  This means if the answering machine picks up, I don’t need to complain anymore.

Monday – noon calls

I get to spend lunch with Verizon on the phone.  At 12:20, I speak to Portia who claims I wasn’t switched to Freedom Essentials.  I think someone switched me back since the online system says I’m still on Regional Essentials.  She again tells me that my records say I am on copper and that this phone plan is copper only.  Well, apparently it isn’t.  Kirk in repair says he seems that I’m on digital voice.  I’m glad he sees that, since it is true.  Susan in copper tells me you have to be on DSL if on copper.  Their statement is that you can’t have both at the same time.  At this point, I have a meeting so need to let this go for the day.

Tuesday – 8:30am

I immediately say I want to speak to a supervisor.  The person who answered the phone said I need to explain the problem to her first.  I lead with the fact that I’ve spoken to more than six people about this issue and I want to speak to a supervisor.

The supervisor Timothy in Massachusetts was the last person I spoke to on the issue.  He gave the story that they migrate an area to FIOS when their are widespread outages and everyone will be forced to change to FIOS in the future.  (I agree with the later.  However, my apartment building applied to be wired for FIOS.  Others on the block, let alone with area, still have copper.)  He said once they switch you to FIOS, they refuse to go back and don’t allow mixed media.  He said some people were grandfathered into mixed media to my counterexamples.  The conclusion was they will give me a credit for 4 days of service and mail me a backup battery.  And I think I only got that because I had a list of everyone I spoke to and accused them of fraud/false advertising.  Because before that, all I got was an apology.

Getting the battery

They didn’t put my apartment number on the box.  Which is part of my address.  At least they sent it.

Other tech changes

My answering machine is really old so I had to buy a new one.  (Old machines send a signal that FIOS interprets to mean phone # not in service.)  I bought one with two phone receivers so one can live near the FIOS box and one call live near my bed.

Conclusion

Verizon: If you want to force people from copper to FIOS, that’s your right.  But why do you have to be weasels about it?  Just say FIOS is better and it is the future.  Don’t have your reps giving all manner of conflicting information.