Archive Page 2

Where 2.0 Online – More on iPhone sensors

Derek Smith (SimpleGeo)- augmented reality SDK for the iPhone

3 important technologies – camera, location, and compass. With data from location and compass can plot objects. Can calculate bearing and distance of objects from the device of an object. Device will be at origin of graph. That’s the first stage. The viewport (what the device can see) is the second stage. The third is sizing the objects according to distance. Implemented in OpenGL ES for you. Most of the UI framework doesn’t gel with OpenGL so you have to get creative. If you work in 2D you have to implement your own pipeline, but you can use the standard UI framework.

This was not a very together presentation, but the SDK looks like it will be very interesting when it gets released.

Nicola Radacher – Mobilizy –

example of wikitude client.

GPS signal – accuracy can be bad due to city density or fog. What can you do to improve it? One way is image recognition. Take a picture, send it to a server, compare to data in database, correct user’s location. You need a lot of data for any big city.

What to do if there’s no compass – Calculate position through GPS signal changes. Don’t need user feedback, but it’s inaccurate. Alternatively, ask the user to help – tell them to adjust the phone to point north, for example, or point it to the sun (not good in Seattle!). More accurate than GPS (perhaps), but still not great.

Alok Deshpande (loopt) – CoreLocation in Practice

Nice abstraction built on several technologies. Shields you a little bit from having to worry about which technologies are available. It’s a subscription model. You can specify accuracy and how often you want to be updated. You’re then sent location events with location info. What accuracy do you need? How frequently do you need to be notified of changes? Tradeoff is response time and battery use vs. accuracy. Example: Where’s my car? Simplest way to start is with MapKit framework instead of CoreLocation. Supports showing a user’s location. To do anything more substantial you need to use CoreLocation itself. Probably want to set user’s location to as accurate as possible and continuous update (as they’re walking to the car).

Nick from Skyhook Wireless

CellID, WiFi, and GPS. Skyhook uses WiFi to calculate location. Available on many platforms.

Cell – Universal, 150-700m accuracy, 1-2 sec response, low power.
WiFi – Urban indoor/outdoor, 20-40m accuracy, 1-5 sec time to fix, low power
GPS – Outdoor/ limited indoor, 10m accuracy, 1-60 sec time to fix, medium power

Typical GPS receivers need -140dBm or better. Most cannot decode below -145dBm, or -155dBm with assitance. 140dBm = 10(-14)mW.

WiFi positioning – scan for signals, trilaterate to determine location. in iPhone reports lat/long to CoreLocation

They drive around collecting wifi signal fingerprints then calculate AP position by reverse trilateration.

Martin Roth (Reality Jockey)- Augmented Audio – A new musical world (the mic as sensor)

http://rjdj.me/

What is RjDj? a reactive music player. Reactive music? it changes with your environment and actions.

Uses PureData – visual signal flow programming language to do the input processing.

iPhone has a number of audio frameworks. Media Player gives you access to iphones library. Av Foundation Framework gets you up and running. Audio Toolbox framework plays audio with synchronization capabilities, access streams, convert formats,etc.

Audio Unit framework uses audio processing plugins

OpenAL framework – meant for games.

Where 2.0 Online – Alasdair Allan

I’m participating in O’Reilly’s Where 2.0 Online conference – fall 2009 – the topic is An emphasis on iPhone sensors.

First up is Alasdair Allan – http://www.dailyack.com/ – author of a book on iphone programming. The sensors in your iphone.

GPS (core location) – abstraction layer in front of different methods. Abstracts cell towers (12km falling to 1-3km), Skyhook wireless (approx 100m), GPS (approx. 40m). Have to check if location services are enabled first. iPhone simulator will always report location of 1 Infinite Loop in Cupertino.

Distance filter – can set to update based on distance of a change, so you don’t get so many update messages.

Can set desired accuracy using locationManager.desiredAccuracy

Delegate methods:locationManager gets messages when location changes – new location and old location.

Accelerometer – measures linear acceleration of device – roll and pitch, not yaw (except iphone 3gs if you combine with magnetometer) x=roll, y=pitch. 1.0 = approx 1 gravity. z=front side up or front-side down. 0.0=edge-on to the ground.

Declare view controller class UIAccelerometer instance. Start the accelerometer. Can set update frequency (e.g. .1 sec) – can calculate orientation from that in radians.

Magnetometer (digital compass). Combining heading info (yaw) with roll and pitch, can determine orientation in real time. Only 3gs has this, so important to check whether heading info is available in core loocation with locationManager.headingAvailable.

Magnetometer is not amazingly sensitive – 5 degrees is good for most purposes. Check to see that new heading is >0. Returns magnetic heading, not true. If location services are enabled, then you can also get true heading.

Heavily affected by local magnetic fields.

Camera – you can have the user take a picture and grab it.

Proximity Sensors – turns device’s screen on and off when you make a call – infrared led near earpiece that measures reflection. UIDevice object. Sensor has about a 3.5 cm range.

phonegap is an open source framework for building web apps that become native apps on iPhone and android. http://phonegap.com/

Alasdair recommends the iSumulate app from Vimov.com to be able to simulate acceleromater events in the iPhone SDK – http://vimov.com/isimulate/sdk

Run static analyzer (in xcode in snow leopard) to check your code before shipping to Apple – because they will.

A couple of useful scripts

I’m posting this mostly for my own reference, but maybe it will be of use to others too.

I’m teaching this quarter in the Information School at the UW (INFO447, Computer Supported Cooperative Work, syllabus here). Three times during the quarter the students are giving presentations using the Ignite! style of presentations (five minutes, 20 slides, slides auto-advance every 15 seconds). I needed to be able to randomly mix up the order of the students in the class so they wouldn’t come in the same order each time.

I started with a class list file that has the names of the students, one per line. Here’s the shell script I used to output a randomly ordered (or unordered) list of those names. It outputs a file named the same as the input file, with “.new” appended to the file name. I run it from the terminal on my Mac. It gives an error message (“line 12: syntax error in expression”) but the output file is there just fine. I have this saved as shuffle.script.


#!/bin/sh

if [[ $# -eq 0 ]]
then
echo "Usage: $0 [file ...]"
exit 1
fi

for i in "$@"
do
perl -MList::Util -e 'print List::Util::shuffle ' $i > $i.new
if [[ `wc -c $i` -eq `wc -c $i.new` ]]
then
mv $i.new $i
else
echo "Error for file $i!"
fi
done

The class list file I have has the names in lastname, firstname order. I wanted to show the names in the more friendly firstname lastname order. Here’s the one line awk script that reorders them based on where the comma occurs:


awk -F"," '{print $2,$1}'

I save this as reversenames.script. To execute it from the command line, use reversenames.script < yourinputfile

Educause 2009 – Day 2

Thursday started with a bang – a typically brilliant and inspiring talk by Lawrence Lessig, where he systematically expounded the reasons the same copyright paradigm that might work for big entertainment artists doesn’t serve the needs of creative artists, science, or education. The video should be available at this link so I won’t try and recap the session, but it’s worth watching.

Lessig did have a great Peter Drucker quote that I wanted to capture: “There is nothing so useless as doing efficiently that which should not be done at all.”

Educause’s leadership award was presented to the late, much lamented, Seminars in Academic Computing meeting (the Snowmass meetings, which took place annually from 1971 until 2007). Bob Gillespie, formerly of the UW, was one of the founders or SAC and was one of the folks there to accept the award. They had a great slide show of photos from the years of Snowmass – made me realize just how much I had learned from attending that meeting, how many relationships had been formed. It’s sad not to have that intimate and informal gathering venue anymore.

I spent some time catching up with ECAR’s Toby Sitko, and we discussed updating my 2007 ECAR Research Bulletin on social software. I’d like to devise a way of involving the community in the authorship and editing of such a document.

Greg Jackson gave a session on the institutional requirements around p2p file sharing mandated in the Higher Education Opportunities Act. The Dept. of Education rules that lay out how to interpret the law’s requirements were finally issued just last week. Under the rules institutions have to have “written plans to effectively combat the unauthorized distribution of copyrighted material…” The session made me think that I need to go back to the draft of the plan we’ve been working on and make sure that it includes all of the required elements. We also need to make sure that the notice that is sent to students regarding copyright contains all the elements required in the rules. Educause will be maintaing a list of legal downloading sources that institutions can point to to satisfy the requirement to “To the extent practicable, offer legal alternatives to downloading or otherwise acquiring copyrighted information…” That list is now available at http://www.educause.edu/Resources/Browse/LegalDownloading/33381.

During lunch there was a meeting of ITANA (IT Architects iN Academia) that was well attended. The group laid out areas to work on during the future conference twice-monthly conference calls. The next meeting, this coming Thursday, will feature an analyst from the Burton Group discussing enterprise workflow systems, which the group has been working on.

I spoke on a panel discussing research support at universities in the net@edu Campus CyberInfrastructure working group meeting. Other panelists included Kurt from Princeton, Kevin Moroney from Penn State, and a fellow from Guelph University. Seems like research support is an area that’s emerging with some differing models at different campuses. There seemed to be some interest in finding a venue for continued discussion of these support models with an aim of discovering and sharing strategies that work (and perhaps those that don’t).

Jim Loter and I met with Jim Helwig who leads the portal team at the University of Wisconsin, Madison. We spent some time discussing the re-visioning effort they’re going through – they discovered that not only do people want to access everything in the portal, they also want to access portal content in other locations where they are, like iGoogle, Facebook, SMS messages, etc. Jim showed us in some detail how they’re using uPortal to organize university content. They have (at least) three ways of building content into channels in the portal: actual portlets built to the JSR168 standard; RSS feeds; and an “active menu” type of channel that they built.

I met with Klara Jelnikova from Duke. We both serve on the Common Solutions Group (CSG) Steering Committee, so we spent some time discussing the future of CSG, which is undergoing some reconceptualization this year. We both agreed that much of the value of CSG is in the sharing of information among like-minded institutions and in forming loose common directions, rather than in trying to formulate concerted group action. I was struck by the thought that I would hate to be thinking of CSG in the same past tense nostalgic way as the Snowmass meeting.

Klara and I talked about trying to do some work around understanding federated Active Directory infrastructures that integrate well with our campus ID infrastructures. There appear to be four use case areas: federating multiple ADs within a campus; federating ADs across different campuses and institutions; and federating AD with other identity and directory platforms. I need to sit down with RL Bob Morgan and Nathan Dors and get their thoughts on this set of topics.

Klara and I hooked up with Asbed Bedrossian (USC), Charlie Leonhart and Heidi Wachs (Georgetown), and Jim Loter (along with Charlie’s mom) and had an excellent dinner at TAG in Larimer Square. Lots of good conversation and bonding ensued.

Educause09 – Day one

Educause is in Denver this year. Despite the fact that it snowed last week here, this week the sun is out and it’s hitting the 70s during the day – beautiful weather. Not that I’ve seen much of it, being busy running around the convention center.

It’s nice to see a lot of folks who I haven’t seen in over a year and renew some relationships – Lev Gonnick, Hae Okimoto, Joan Gettman, Kathy Christoph, Jim Phelps, Greg Jackson, Terri-Lynn Thayer, and loads of others.

Started off last night at the opening reception at the exhibit hall. Got a chance to chat with some folks from MediaSite about our questions about using external storage with MediaSite servers – the answer is MediaSite doesn’t care as long as it looks like a Windows drive. I also got a chance to meet Alex North, one of the Google Wave developers from Google’s Australian office.

Then we were off to a reception with Microsoft. Spent a bunch of time talking with some folks from Louisiana State and then yakking the night away with Frank Lobisser about Microsoft, UW, our kids, and skiing.

This morning started off with the keynote address by Jim Collins, author of Good To Great. Some insightful leadership insights, and I can see why he’s a high-paid, in demand speaker – he’s very effective.

I met with David Lipari and Andrew Petro from Unicon to chat about uPortal and LifeRay portal software and the future for portals in general. Andrew made a nice observation that web portals serve both as an initial discovery point for resources and as a default interface when you can’t use your highly configured device.

I learned that uPortal is better than Liferay at dynamically reading users & groups from external sources (Liferay wants to store that data within its system). The permissions system within uPortal is replaceable, so you could theoretically just use an external permissions system instead of the internal one.

uPortal 3.2 will have a mobile theme, based on detecting the mobile user agent from the browser. It is possible to pass the user agent string to portlets so they can also configure themselves differently for mobile devices

Liferay has more content management features within the portal.

uPortal has a more developed story for accessibility than Liferay does at present.

Shibboleth access is built out for uPortal with user attributes. Unicon did a project with the University of Chicago using Shibboleth and the web proxy for delegation of authentication, which might be of interest to us.

I had lunch with Kent Wada from UCLA, where we talked about various policy initiatives around privacy, e-discovery and the like.

This afternoon I attended a session given by Sayeed Choudry from Johns Hopkins on the Data Conservancy project, which is a NSF Datanet project.

David Morton and Jim Loter and I met with Jason Ediger from Apple to chat about iPhones in higher ed. He’s got a great glassy stare he gives when asked about Apple’s future plans.

I then attended a session by David Staley, Lev Gonnick, and Adrian Sannier on “Leading the University as a Platform”, where they differentiated the role of the “platform” from the old style command and control environment. Lots of good thoughts in this one.

Next was a discussion group on ITIL in higher ed. A group of people from some schools had done some implementations of ITIL, mostly around incident and problem management, which was interesting to hear about. Everybody recommends starting with small steps, mostly around the service catalog (which we did!).

I closed out the afternoon at a session on Google Wave, which featured two Wave engineers actually building waves in real time. That was quite a useful session. I think Wave has the potential to be a very significant tool as it grows up.

Went by the Google reception at the Public Library, but it seemed like the Google student representatives outnumbered attendees, so I left and went and had dinner with David Morton.

Tomorrow – Lawrence Lessig, and I’ll be on a panel about research support at the net@edu cyberinfrastructure meeting at 3:30 – come on by!

Dev Days – Cody Lindley on jQuery

Cody Lindley (Ning)

coauthor of JQuery Cookbook, due out next month
Authored a pdf book of examples called JQuery Enlightenment

jQuery – Intro for Developers

Who uses JQuery?

35% of all web pages running Javascript are running jQuery. 1 out of all 5 sites.

What is JQuery?

- A Javascript library
- helps ealing with the DOM
- Simplifies DOM events and animations

JS Bin – a very cool tool that allows testing of Javascript and HTML.

Shows an example of coloring every odd row of every table on a web page in one line of JS code. Adds roll-over coloring with a couple of more lines.

Why use JQuery?

Helps simplify and speed up web development
Allows us to avoid common headaches associated with browser development
Provides a large pool of plugins.
Large and active community
Tested on 50 browsers on 11 platforms
It’s for both coders and designers

Where to get jQuery?

Download source from google code (moving to github soon)
Use a CDN

Concept 1: Find something, do something.
- use the jQuery function to find an element in a page, and then do something to it.

Concept 2: Create something, do something.
- You can create elements in the DOM.

Concept 3: Chaining
Can use a single jQuery wrapper set and statement to execute a sequence of methods.

Concept 4: Implicit Iteration
E.g. when we call add class it loops over every element contained in the wrapper set.

Concept 5: jQuery() parameters
First parameter – can be passed CSS selectors, HTML, DOM elements, or a function shortcut.
Second parameter – can pass CSS selectors or DOM elements. Tells the engine the context in which you want to search. Default is the document or body element. Important for optimizing JS to narrow search.

Overview of jQuery API
- Core
- Selectors – see http://codylindley.com/jqueryselectors
- Attributes
- Traversing – can manipulate text nodes with the content method.
- Manipulation
- CSS
- Events
- Effects
- Ajax
- Utilities

Put your Javascript code at the bottom of the page to speed up when it executes.

Shows an example of creating a jQuery plugin in 6 steps.

Dev Days – Joel Spolsky on Fog Bugz 7

Joel Spolsky – FogBugzz 7 (now with an extra z)

We help developers make great software. FogBugz is the platform.
Planning projects (wiki, feature lists, backlog), Managing projects (assigning and tracking, scheduling), tracking bugs (web reports, crash reports, screenshots), talking to customers (email, discussion groups). Launching a plugin called kiln which provides source control. Uses Mercurial for version control and also manages code reviews.

FogBugz manages different projects.

The idea is team members come in in the morning and see what they have to work on.

Create a new project.

Build a list of features you want to have.

You can assign an order (scrum concept of a backlog order – truth is you only need to order the next couple of weeks of work).

Can use the wiki to write a spec

FogBugz 7 has an “exhaustive” plug-in architecture. Shows Balsamic, which lets you mock up UI, so you can have conversations about UIs in the tool.

You set Milestone dates and assign them to people for implementation.

FogBugz has hierarchy for tasks, so you can include as much detail as you want. He tells his developers to break it down to 2 day tasks, otherwise estimates are useless.

THe tool can show you remaining tasks and hours, and probability of reaching a particular milestone on a date. You can see when each team member is going to be done and what the probability for each completing tasks at which dates. Data is coming from historical analysis of what each person has done in the past and what their estimates were. You tell FogBugz what task you’re working on as you work, and it tracks time. It runs a Monte Carlo simulation, giving a probability distribution. Article on Joel’s website about how that works.

Per user timelines – what will a team member be doing at any particular point in time by probability. Shows when a team member is likely to be blocked due to dependencies not met.

Version control is integrated so you can drill down into code checkins for a specific bug.

Kiln adds the code review feature on top of the version control. When you want to do a code review, it assigns it as a case in FogBugz. Then shows you code and you can comment on it.

Easy to add new bugs.

Plugin architecture allows custom fields and workflow customization.

Can manage mailboxes for a team – sucks it all down and then applies filters, using Bayesian filters that can be trained. Then you can have lots of individuals assigned to reading and responding to specific topics within a single email box. “Designed to be a heavy-duty email feature for customer service” so you can do things like define lots of keyboard shortcuts. Also can tag email.

Runs on .NET, 7.1 will run on Mono for Linux or Mac.

10 users $1899, Unlimited $9999, On demand, 25/user/month, $599 up to 150 users

Students and startups free.

Kiln – hosted Mercurial and code reviews, Now in beta. Requires FogBugz on Demand. Free during beta. $5/user launch price.

Dev Days – Scott Hanselman on ASP.net MVC

Scott Hanselman – ASP.NET MVC

Visual Studio 2010 Beta 2

ASP.NET MVC does not dictate which database is used for Models, so new projects open with an empty Models folder.

URL structure is a user interface. ASP.NET MVC sets up predictable urls by default – a structured convention.

MVC built on top of web forms ASP.NET > MVC > Web Forms. MVC programmers can use all the existing stuff, but there’s like a new vehicle – webforms is like a minivan, but MVC is like a motorcycle – you could kill yourself, but you can go a lot faster.

Pluggable view engines.

Shows haml – which uses indentation and significant white space to make code cleaner.

Now shipping jquery in ASP.NET and MVC – MS contributing to the open source project.

By default C# code is compiled but views are not.

DevDays – Rory Blyth on Developing iPhone Apps

Rory Blyth – (rory@rory.me) iPhone development

What do you need to get started?
- A Mac
- Are you sure?
- yep
- But I heard…
- you heard wrong

Besides a mac -
- the iPhone SDK
- learn Objective-C
- read Apple’s design guideline docs (they’re really finicky about how your app looks and performs) – not really guidelines – they’re laws and if you don’t follow them your app will get rejected.

You don’t need an iPhone to get started because there’s a simulator. If you want to deploy to your phone you have to have a paid developer account. What if I don’t have an iPhone? The simulator is your frenemy.

What are some of the rules?
- One user app at a time
- No background (user) apps
- Effect the appearance of multitasking – it’s amazing how much attention has to go to restoring state.
- Don’t be a little resource piggy – scrolling tables can take up 45% of cpu. Need to carefully manage memory.
- Gracefully handle interruptions

Where does the magic happen?
- In your sandbox
What’s in my sandbox?
- Your app bundle.
Can I play in other sandboxes?
- No
There is a url mechanism for calling other apps, like the google maps app, passing it a query string.

Native apps vs. web apps – what gives?
If you’re gonna buy an iphone you got it because of the capabilities – not just a browser. A web app will not give you the same level of hardware interaction and richness that the native tools do. Just go native. Do web stuff elsewhere (not sure I agree with Rory here).

He likens building iPhone web apps to connecting a VCR to your HDTV.

Objective-C
- Looks weird – based on smalltalk, but built on c.
- Get header files (.h) and source files (.m)
- Define interface – here’s whay my type is going to do, not the implementation.
- Protcols are basically the same thing as interfaces in .Net and Java.
- id – the “anything goes” type – if you don’t know what the return type will be.
- Posing – swap out an existing class with your own in a sneaky way. “Objective-C lets you blow your foot off”
- Categories – extend existing classes without inheritance
- Properties, etc.

Apple’s Dev tools
- Xcode is the free IDE
- Interface builder to build UI
- these tools are definitely old and weird (based on NextStep), but they work.

The simulator is somewhat limited – don’t have access to all sorts of things that you have on the phone, but it works ok.

In the iPhone world you only get one window – so don’t create a “window-based app” in xcode.

When you’re designing, read the guidelines, and when you have questions, go to your phone and find an app and see how somebody else did it. Because if it’s on your phone it got approved, so it’s a good model.

Objective C doesn’t really have garbage collection – you have to increment and decrement persistence counts for objects. Calls it garbage inspection. Lots of memory leaks in badly written apps.

Shows writing iPhone app with MonoTouch, where he can write iPhone apps in C#, which he prefers. MonoDevelop is the open source IDE.

DevDays – Joel Spolsky on simplicity and power

Stack Overflow DevDay 21 October 2009 – Benaroya Hall, Seattle

Joel -

How much we get interrupted by our computers that want us to make decisions – especially Windows, which wants to know whether we want to make the decision we just made?

Sometimes software makes you make decisions that are just stupid – like on Rhapsody where the only way you can search is to choose which index (artist, song, etc), unlike iTunes.

Can’t even turn your computer off without deciding from among six different ways.

The debate between simplicity and power – simple apps that are highly simplified and do one thing well, obeying the 80/20 rule, vs. the Powerful software with lots of capabilities, features, and options. Example: the Swiss Army Knife that comes with a saw so small that you can’t use it for anything, vs. the hardwood floor nailer that only does that function.

Features lead to choices. Choices are the negative side effect of features. Quotes the famous experiment from Stanford where they set up sample tables at a deli one with 6 flavors and one with 24 flavors. 60% stopped at the 24 flavors, while 40% stopped at the six, but the opposite is true of actual purchases. Book – The Paradox of Choice, by Barry Schwartz.

37 Signals advocated less choice, simpler apps in their book Getting Real. Do less than your competitors – solve the simple problems and leave the rest to Microsoft.

Every time you have option in a dialog box, you’re asking someone to make a decision. People don’t like to make decisions – e.g. look at Tools/Options in any big app. The only reason those boxes are there is so you can accidentally get one wrong, so your computer will behave strangely until you get a new one.

The end result is these decisions make people feel stressed out and blame themselves.

Why is simple so popular?
When you’re a two person startup, the only thing you can advertise is “simple!”

Everybody tells you they love the simplicity, but…
They’re surprised by what your version of simple doesn’t include.

At Fog Creek they’ve discovered that the more sales you have, the more features you have – because you have customers that are asking for features, and when you give them what they need, they like it. Everybody only uses 20% of the features, but everybody uses a different 20%.

Conclusion – Powerful software does sell more and make more money.

What do people care about? Specifically, your users.

Long tangent about all human motivation coming down to DNA wanting to replicated itself – your use case should be there’s a 22 year old student living in a dorm room – how will your software get him laid?

People want choices and features that support their work. When you’re a programmer on a team you think it’s important – you think the user thinks about the same things you do, which is completely untrue. The computer does not have the ethical right to set the agenda for users. You are not in charge of what your users do. You do not have the moral right to put up a modal dialog box – ever.

Good design is making decisions. When you make the right decisions, that is good design.

Definition of Elegance. Example of iPhone silent ring switch, vs. Nokia’s 4 choices that require menus to set. By eliminating two choices you eliminate all the mnus etc. Lots of choices are disappearing – Apple’s driving a lot of that. Elegant takes a lot more work – especially user interfaces. Example of Amazon 1-click. Worth doing – give people the power in a simple way.

« Previous PageNext Page »


subscribe

Pages

Latest tweets

interesting links

What I’m listening to

 

March 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728
293031