javaranch forums go mobile

Want to know what went  on behind the scenes of JavaRanch’s mobile site creation?

Timeline

  • January 2009 – We started talking about how poorly the site renders on a BlackBerry
  • July 2009 – I got a BlackBerry for work.  And ugh.  The forums do look horrible.
  • August 2009 – Tried out BlackBerry emulator and explored the minimalistic approach possible to creating a mobile version (see next section.)  That didn’t work and I wasn’t prepared to spend a lot of time on it in the summer.
  • mid November 2009 – Start discussing design/UI.  Noted it took 4 minutes to edit a post via BlackBerry.  Very excessive.
  • late November 2009 – Restart development using approach #2.
  • December 2009 – Weekly deployments to production using “secret URL that only the moderators know” for beta testing.
  • January 3, 2010 – Mobile URL announced to public and added to e-mail notifications

Approach #1 – Mobile CSS

My original theory was that the easiest thing to do would be to just add a mobile stylesheet that would hide some columns.  It wouldn’t shrink the pages of course.  But as a first step: slow and readable beats slow and un-readable.  I quickly ran into some problems:

  1. The BlackBerry doesn’t like mobile stylesheets.  Bushido covers the options in a lot of detail.  Search for “Alright, alright. Gimme the code already!” for the ugly CSS imports.  The real problem is that you don’t have a mobile stylesheet with this technique.  You have a stylesheet that everyone uses called mobile and the main stylesheet which cancels out the main one.  Developing for this is crazy as you are compromising what stylesheets appear to do.  And it will break when RIM finally gets their act together.
  2. JForum uses a largely table based layout.  This doesn’t go well with CSS for hiding things.
  3. The table layout made changing anything incrementally very difficult.

Approach #2 – An actual mobile site

This approach is definitely more mobile friendly as the pages are designed to be mobile sized.  They are also written from scratch and get to use <div>s.  Basically what I did was take the real page, pick the most important parts and create div layouts for them.  Once I had one done, the rest followed easily.  There are a few limitations documented in the JavaRanch announcement site.  But overall, I’m happy with it.  It is certainly way better than what we had before.  And we will continue to tweak it.

Testing

I tested locally using the BlackBerry simulator and later with the Droid emulator. I also tested using my real BlackBerry after deploying to the test server.  The aggravation of using a real mobile device isn’t captured on the emulators!  It is possible to use testiphone.com as an emulator.  It is not completely accurate though.  In particular, it didn’t show the viewport problem.

<meta name=”viewport” content=”width = 320″ />

We also tested on a variety of real devices.  Many moderators tested on their personal handhelds and we got a good variety that way.

I’d like to thank a few people in particular.  Thank you to everyone who let me test on their device, especially

  1. Gregg Bolinger – for instant feedback in testing the viewport fix at 11pm on both the iPhone and the Droid.  (And more testing than anyone else.)
  2. A few coworkers (at my real job) – for the wide variety of devices I got to put my hands on.  The simulators really aren’t the same.  Five minutes on the real handheld at lunch really helped.
  3. Chuck from the NYC Spin for offering his tiny touch screen device (the smallest I’ve tested on) without my even asking!

Marketing

You know how sometimes marketing picks a ship date and it overrides “doneness” ?  Well, I really wanted to announce this on January 3rd – the one year anniversary of us being on Java based software.  There are some things that I wish were more resolved like why Google Mobilizer is injecting itself in links. Overall, I think it is in good shape and ready for people to try out though.

—

What do you think of the new site?  Share in the JavaRanch announcement thread or as a comment here!

how to test a local web application in droid simulator

In August, I blogged about how to use the blackberry simulator because information was so scarce.  I’m happy to say the Android emulator documentation is much better.

My goal

About a month ago, beta testers of  JavaRanch’s JForum implementation told me the iPhone and the Droid had a large blank column on the right side of the screen.  Hence needing an emulator to try to fix it.  (This all happened weeks ago – just didn’t get around to blogging about it.)

Note: I didn’t install the Android Eclipse plugin because I’m not doing BlackBerry development.  If you want the plugin, you can install the toolkit.

Steps to download the simulator

  1. Download the SDK for your platform from the Android download site.
  2. Run “SDK Setup” executable from the download
  3. Choose the required available packages for download.  (I wasn’t sure what I needed so I had downloaded all of them.  You definitely need Android 2.0.) .  This step took a long time to install since it downloaded at 55KB/sec – dialup speeds.  I let it run overnight to completion.  It probably took a few hours.

Steps to initially configure the simulator

  1. See what targets are available
    android-sdk-windows\tools>android list targets
    “Android 2.0” version 5 should be a choice. This is the Droid.  The target looks like:
  2. id: 1 or “android-5”
    Name: Android 2.0
    Type: Platform
    API level: 5
    Revision: 1
    Skins: HVGA (default), QVGA, WQVGA400, WQVGA432, WVGA800, WVGA854
    etc

  3. Create the AVD (Android Virtual Device)
    android-sdk-windows\tools>android create avd -n Droid -t 1

Launching and running

  1. Launch your local Tomcat (or other app server)
  2. Launch the emulator
    android-sdk-windows\tools>emulator -avd Droid
  3. wait a while – it says “Android…” then “ANDROID” in shiny letters
  4. Ignore error message that says “sorry application messaging is not responding”
  5. Test away.  Note that you must use your computer name rather than localhost.  (On windows this is the %COMPUTERNAME% property.)  Thanks to ASP forum for this tip.

Actually using the simulator

Some impressions of using the simulator:

  • It’s great and intuitive.
  • That’s it!  If you read my BlackBerry post, there were a pile of things to get used to.  The Droid just worked.

The goal

The trick is that the Droid and iPhone need to be told the width of the page or they assume it is larger.  It’s an odd effect, but easy to solve by adding the following tag to the header.

<meta name="viewport" content="width = 320" />

female programmers and programmers to be

Kathy Sierra has been tweeting about Women in Technology over the last week or so.  Today’s tweet really got me thinking.

Tired of being a Woman In Tech. I’m a programmer. I’m female. Does it have to be SO political/significant? Sometimes a coder’s just a coder. -Kathy Sierra

While I certainly haven’t been in the field as long as Kathy, I am a female programmer.  And I haven’t really thought about it since college.  Until recently.  It’s not significant to me; I don’t think it is significant to people I work with.  And yet in some ways it is.  My response to this tweet was:

@KathySierra sorry; you’re a VISIBLE female programmer & a role model for the next generation(aka me); don’t have any at work so branch out -Jeanne Boyarsky

And this is why I’ve been thinking about it.  Whether I notice or not, I am starting to become a role model to some people.  I know because they told me!  Sometimes it is people I know and sometimes it is people who read my posts on JavaRanch.

High schoolers

Kathy has also been writing about getting girls into IT in the first place.

Do high-schoolers choose a career based on who speaks at conferences? To claim even a trickle-down effect (respect! exposure!) feels wrong. -Kathy Sierra

@jeanneboyarsky agree in principle, just that conference keynoters are NOT on teen girl’s radar and don’t “count” as visibility/motivation. -Kathy Sierra

I agree with her that high schoolers don’t choose a career based on who speaks at conferences.  I do think some more awareness of women in tech is helpful though.  In the Spring, I volunteered at a high school robot competition.  A college professor asked me if ANY of teams had girls on them.  With thoughts like that influencing careers, it isn’t very encouraging.  I heard my share of “girls shouldn’t go into IT” when I was in high school as well – 1995-1999.  (The answer in case you are wondering is of course there are girls on teams.  In fact, there were a few all girl teams.)

This school year, I started volunteering as a mentor with FIRST robotics as a high school programming mentor.  The lead student programmer is also female. Nobody thinks much of this.  Which is the point.    People want to be accepted.  Being accepted for being a techie is better than people thinking differently of you because you are female.  It’s just a part of me as is my brown hair.  Or at least that is how it should work.

Female Architects

I think another reason for the dearth of female role models in technology is that less females tend to stick with it over time.

@KathySierra: “women speakers in tech?” I always wonder why ‘women’ are different. Don’t we want good _people_ in these sessions? –Steve Johnson

I think Steve makes an excellent point.  Of course we want good people in these sessions.  And I do see women at conferences.  I just tend to see them in “softer” roles like talking about social media than “harder” programming parts.  And absolutely favor strength over gender when choosing conference speakers.

Where I work, there aren’t yet any female architects. And by that I mean the really senior folks who have been doing this 20-30 years like Bear Bibeault and Ernest Friedman Hill rather than the watered down “developer with 7 years experience” definition.

I think this is due to a number of things:

  1. The culture of the past – If many years ago people were pushed a certain way, it affects the present.  I can’t speak to the past since I wasn’t there at that point.  But I do think it has an impact.
  2. The greater chance a woman would go into management than stay in technology – soft vs hard skills? preference? social conditioning? path of least resistance?
  3. Interest in keeping up with technology – you have to really like something to stay with it in your free time; money isn’t enough

Yes, I want to be an architect someday.  But I want to get there because I’m good at what I do, not because I am female.

What can we do

Thinking about three things I and people I know do to make things a tiny bit better:

  1. Like what you do; be passionate about what you do – Male or female, this is the core of why technology is fun!  If you happen to be female, let this excitement shine through and let others see it.  I’m volunteering as a programming mentor for robotics because I enjoy it.  Being a positive role model for the students is a side effect.
  2. Point out the “she” – If you are female and someone refers to you as “he” or “sir”, correct them.  This is how we introduce visibility into the fact that there are strong techies out there.  Scott Selikoff does so if someone calls me “he” in a blog comment. Some people do this so often at JavaRanch that Campbell Ritchie has made it a running joke. But it helps.  It serves as little reminders that we do have strong female technical females running around.  Not to the the teens of course.  But to the existing programmers.
  3. Look to the future – Things change over time.  The senior architects of the today were largely born in the 50’s, 60’s and 70’s.  This was before people had the internet in their homes.  The students of today are growing up with social networking.  Computers aren’t as geeky.  There is more social interaction in the job.  In another couple of decades people my age will be those senior architects and then there will be more female role models.

[edited to add “when choosing conference speakers.” per comments on redit]