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]

benefits of twitter lists

I really like twitter lists.  JobMob blogged about how to use them.  I agree with what they said, but have a different personal use for them.  Here’s my take on twitter lists.

I use twitter in several different ways.  Lists help me deal with those ways.

Current tweets

This is the traditional see things as it happens model that twitter was founded on.  I don’t read everything this way, but it is good for seeing a small number of the most recent tweets.

Before lists: I used TwitterFox now EchoFon to see tweets that come when I happen to be online.

After lists: Same.

Reading a lot of tweets

I get home after work and am curious what kinds of things have been tweeted that day.  This is where lists shine.  Even if you were reading the same number of tweets, it is faster to read them in logical groups rather than time.  And lists let you skip ones you don’t feel like reading.

Before lists: Follow less people so they wouldn’t clog up my tweet stream.  Use an RSS feed for some topics so they wouldn’t clog up my tweet stream but I could still read them.

After lists:

One time setup

  • Follow the people I was following by RSS so now I’m following everyone I want to
  • Add *all* my contacts to one list.  Some public lists and some private lists
  • Open all my lists in Firefox tabs and bookmark the set

To read

  • Open all tabs in Firefox.
  • Look at the ones I am interested in.  (for example, read jokes tab when I need a pick me up)

Reading tweets on a topic

Before lists: Scan tweet stream, search

After lists: Open the list pertaining to the topic.  Easy!

Public vs Private Lists

Public lists are good for things like

  • listing the JavaRanch moderators
  • jokes
  • topics of interest.

Private lists are good for things like:

  • hobbies you prefer to keep quiet
  • more sensitive topics (like the society of secret _____)
  • less than complementary lists (I have a “people-who-post-way-too-much” list for people who I am interested in periodically, but don’t want to read all their stuff)
  • “other” – a kitchen sink list until there are more people in that category – it doesn’t really make sense to others

Conclusion

Lists may not have been out long, but I rely on them already.  Combined with tab bookmarking, they are very powerful.  I imagine this twitter clients will catch up soon.

Follow me on twitter @jeanneboyarsky

http://twitterfox.net/