Monday, February 08, 2010

Knowing what's unacceptable


The company I work for currently has an office provided by a company offering "serviced offices". That is the company provide all the services for the companies renting offices there. Amongst other things, this includes phones (including a reception service), internet access, cleaning and teas & coffees.

Apparently, over the weekend the ISP for the building was changed. When I got to the office, just before 10 (I start late on Mondays to take my son to nursery) there had been problems accessing the internet that morning. By half past 10 access to the internet was completely gone.

Just before lunch time someone came round and told us they were very sorry about the problems. They didn't know when they would be fixed and they knew it was "unacceptable".

Just what was unaceeptable wasn't clear though?

Was it unacceptable that there was no backup system?
Was it unacceptable that the phones use VOIP so no internet meant no phones?
Was it unacceptable that systems were changed with no overlap so it wasn't possible to go back to the old system when/if there was a problem with the new one?
Was it unacceptable that there wasn't an SLA from the service provider for a time to fix?


Lots of companies in the building sent some staff home in the afternoon.  While this may have just been a kind gesture, I can't help but think that a 5 minute walk into town to sepnd a few quid on a 3G dongle would have been a good use of time and money.

Monday, February 01, 2010

Visualising Product Sales

Displaying sales data in a bar chart has got a bit boring. So, I've been exploring some different ways of displaying this information.

Here are the products sold at a bar (sorry - can't tell you which one or where) as a tag cloud.


Obviously this isn't appropriate in all situations but as an indication of which products are the most popular it makes a pleasant change.

Have you written off all search engines apart from Google?

What's going on in the world?

First there was talk of Bing becoming the default search engine on the iPhone. Yes, the iPhone as made by Apple!?!

And now the Bing toobar is being bundled with Java!  Yes, Java - from Sun who are now owned by Oracle.

Have you written off every other search engine except Google?

Have you written off Microsoft?

It seems that when it comes to a lot of big companies, when considering Google and Microsoft, the enemy of my enemy is my friend.

Thursday, January 28, 2010

iPhone developers, welcome to some new headaches courtesy of the iPad

A, hopefully, slighlty different take on the bandwagon jumping and hype that is the iPad:

For a long time I (and many others) have been saying that developing for the iPhone is not the same as developing for what's commonly referred to as "mobile".

By creating something (app or website) that specifically targets the iPhone developers do not have to deal with many of the problems and challenges experienced when creating applications or websites which run on a wide variety of mobile devices.

Arguably the number of iPhones in use has meant that by targeting the iPhone you can still have the same number of potential users as if you targetted a number of different devices but without some of those headaches.

Of course, I'm not saying that developing an app that works on the various generations of iPhone and iPod Touch is without challenges due to variations in functionality available from the SDK or the actual device. e.g. not including 'phone' or camera related functionality on the iPod Touch.  It's just that as of today those challenges just got a lot bigger.

I'm not going to go into great detail here as I'm working on a larger, more complete discussion of the issues you may face. However, here are a few questions to get you thinking:

  • Do you dectect visitors to your web site using an iPhone and show them something different?
    Do you show them an optimised version? How will that optimised version cope with being displayed at 1024x768 (or 768x1024)? Are you sure that your detction can tell the iPhone and iPad apart? does it matter?
  • Do you not show some information on screen because of the limited available real estate? Could you redesign your pages/views to make better use of the increased space available on the iPad?
  • Can you display information in a better/clearer way with more space available?
  • With more space do you want to change what is displayed based on orientation? Possibly similar to the way the iPad email client does.
  • More space on screen means you can show larger, more detailed images. But how are you going to show an image of appropriate detail for different size screens? Can you afford just to let the browser resize larger images for you?  Is that what's best for the user?  What if the difference is in the resolution of dowloaded video? Does the increased time (and cost) of always downloading the larger file matter?
  • Can you do somethign new with the iPad which you weren't able to do on the iPhone? Maybe something that you considered for the iPhone but wasn't practical based on a restriction or limitation that doesn't apply to the iPad.
  • Does the size of the iPad mean it's likely to be used in differeent places/ways that the iPhone typically is? It's propbably to early to say for sure, but does this change in context mean that you wish to design your application or web site to be better suited to this different context?  This may mean making different features or options available.
And many more questions....

Can you afford to do nothing?
Despite what you may think of my opinion, what does the fact that Apple have redesigned all their apps for the iPad say?

If you are an iPhone developer the very next thing you should do is read Apple's "Introducing Universal Applications for iPhone OS" and start preparing for the new wave of challenges ahead.


I'm not in a position to pass judgement or share an opinion on the iPad at the moment as I haven't used one.  It sure looks interesting and I'd be keen to try one out though.

Friday, January 22, 2010

What every web developer must know about URL encoding

What every web developer must know about URL encoding

Wednesday, January 20, 2010

Code Offsets for bugs

I've written about code offsets previously and I think it's a noble idea.  In reality I don't find the idea of paying on a per Lines Of Code written basis practical.  Instead I'm keeping track of reported bugs I've introduced and offsetting each bug for a credit.
I see it as giving something back without going bankrupt.

Thursday, January 14, 2010

I don't know da time

Bad puns FTW!

When Jon Skeet announced his intention to port JodaTime to .NET I said I would be interested in helping in the process.

NodaTime was born and I have carefully following the discussions in the groups and seeing contributed code as it's checked in.

Unfortunately a number of other commitments and the realisation that I actually have only about 8 hours a week free time (for all my interests - not just writing my own code) have so far prevented me from making any kind of contribution to the project.

Despite my lack of involvement I've learnt some interesting and hopefully valuable things from looking at the code already contributed to the project and from reading the discussions around it's development.

Based on this experience I'd recommend that any developer follows the discussion and looks at the code from new open source projects.  It's a great way to see how other people work and solve problems. Of course if you have the time and opportunity to contribute also then all the better.

Monday, January 11, 2010

Some times I like doing support

Not sure if this is ego stroking but the following have certainly cheered me up.
I don't know if it is appropriate to respond to this email but I wanted to let you know that the download did work fine the second time.  I wanted to thank you for your excellent customer and technical support.  Your response was very quick and your assistance was extremely helpful.

Plus
First of all, I would like to thank you for responding my e-mail on a timely  manner.
I have successfully finished downloading the movie I desired with your kind help.
Again, your help and support are really appreciated.


Thanks Andy & Max. You cheered me up.

Tuesday, January 05, 2010

Times are hard

Working with time is hard. Especially when working with multiple threads - which seem to have their own timers.
I just posted a reply to someone in Outlook 2007. Then, briefly my list of Sent Items looked like this:




It seems that even though I sent an email at what it knew was 00:00 which can (should) only ever be today something hadn't updated the date for the comparison of now and the date the messages was sent.

This is one of those issues which just looks foolish when you see it but very few people will ever see it.  It's also something that'd likely be very hard to test and unless you knew this sort of issue could occur you'd be very unlikley to look or test for it.

I guess this is merely just an observation. It's not like this would be easy particularly or worthwhile to fix.  I merely note this here so you might think about and avoid similar issues in any code you write.

Monday, January 04, 2010

A little blog post analysis

While it's popular to do blog reviews at the end of the year I'll miss that band wagon and provide you some anlaysis of what was popular on my blog in 2009 now - in 2010!

Top 10 Posts of 2009

  1. 10 Firefox Add-ons for Mobile Developers
  2. What's new in Windows Mobile 6.5?
  3. In C#: generate a class for an XML file
  4. Vista "Program Files" Virtualization   
  5. StackOverflow DevDays - sad rant :(
  6. Comparing touchscreens - Capacitive V Resistive
  7. Holiday scam? - 0800 988 9900
  8. My StackOverflow DevDays app - in action
  9. Windows Phone Advert
  10. DDD South West

Top 10 posts in 2009

  1. Installshield: Change product name, but not MSI file name
  2. broken hal.dll with XPSP3 - will not boot   
  3. Installshield conditions
  4. Checking database permissions in SQL Server 2000
  5. 10 Firefox Add-ons for Mobile Developers
  6. Checking for default constraints on SQL Server 2000 AND 2005 - CORRECTION!
  7. SubVersion Vs Vault
  8. What's new in Windows Mobile 6.5?
  9. In C#: generate a class for an XML file
  10. Incorrect shortcut icon in start menu


project52

If you look over at the right hand side of this blog- and probably down a bit - you'll see links to the archive of my posts.  It shows I've made a lot fewer posts last year when compared with the two previous years.  In an attempt to try and encourage myself to post a bit more and with more frequency, I've committed to taking part in Project52. 

In simple terms, the project is simply to commit to publish a new blog post each week in 2010.


Find out more at: http://project52.info/

10 Programming Proverbs

I'd like to call out this excellent post on the 10 Programming Proverbs that Every Developer Should Know.


http://www.kevinwilliampang.com/post/Programming-Proverbs.aspx

Tuesday, December 15, 2009

In my last project at work I used:

Technologies used in last project, in no particular order:
  • ASP.NET MVC (1.0)
  • SubSonic (2.1)
  • MvcContrib
  • WMR DRM
  • Castle Windsor (for IoC)
  • jQuery
  • NUnit
  • a 3rd party CDN


This was all to produce:
  • 2 Websites
  • 1 WinForms App
  • 1 Console App

Monday, December 14, 2009

DevEvening CodeFest

One of the things I've been keen to do at DevEvening is to see what would happen if we did a session where everyone came and wrote code.

For this reason we had an event and called it the 'Christmas CodeFest'.  (Yes, the name wasn't very good but the event was.)

From the original event advert:
We all learn in different ways. While it can be good to learn by hearing people present and demonstrate new techniques, it can also be good to learn by seeing how different people solve the same problem.  That's what we hope to do at the CodeFest.

The plan is for everyone to write automated players for a simple game.  Don't worry if this sounds complicated, it will only involve implementing an interface containing 4 methods (and one of them just returns your name!).  The logic therein can be as simple or complicated as you want to make it.  It will be practical to achieve something good in the time frame available and plenty of examples will be provided to get you started.

In addition to having each persons 'player' compete against each other we'll also look at the way each person approached the problem and how successful that was.

My initial expectation was that this may not be a popular event - after all I'm not aware of any other user groups having done an event like this before.  Perhaps there's a reason why?

Writing something productive and fun in about 2 hours is actually quite hard. If you want to make it possible for people with varying skill and experience to be able to achieve something in the time limits things further.

If you've scanned down to the image below you'll see that the game used was Connect 4.  This was deliberately not made known before the event so no-one could get a headstart on working out any game logic or tactics.

What I provided for those who came along to use:
A solution containing:
  • A WinForms 'host' application which displayed the board, managed 'players', etc. (This host also allowed manual playing of each player.)
  • A WPF user control to represent the game board.
  • A set of tests to verify the logic in detecting wins, etc.
  • A library containing the interface that each player was required to implement
  • A copy of MEF Beta 2 Preview 8 (which was used to load players from the individual DLLs)
  • A sample player written in C#
  • An identical sample player written in VB.NET
What each person had to do to implement their 'player':
  1. Open Solution
  2. Add new class library
  3. Add reference to ComponentModel (project)
  4. Add reference to IConnect4Player (project)
  5. Create a class that implements IGamePlayer (make sure to include necessary export attributes)
  6. Write some code to implement your player!

The competition
The aim was simple: everyone has about 2 and a quarter hours (including a break for food) to write the code to implement their player.  We then allowed each player to compete against the others in a knock out tournament (using the sample random players to make up the numbers - so no one got a bye). 

2 players were beaten by the random player in the first round. Boo!

The games were played projected onto a screen so everyone could see what was going on.  The host app automatically called each player in turn until there was a winner.  There was a slight pause (500 milliseconds) between each each move.  This gave everyone a chance to see what was happening and allowed for some audible reactions as people were blocked from winning moves or failed to make winning moves.  The host app I had developed required manually loading the players each time. In practice it would have been useful and saved time if the players could all be loaded at once and it take care of managing who played who and recording the results.

The final came down to a best of three between Jeremy and Mark. Mark won the best of 3 games by taking the first 2.


A selection of swag as prizes from our generous sponsors (http://www.devevening.co.uk/links.aspx) was available on a winner gets first choice style.  People who found bugs in my code also got a choice of prize.

Speaking of which. Unfortunately a couple of bugs were found in my host app code.

Both of the people who were using VB.NET found a bug (now fixed) in my host code where I didn't handle the player returning the 'GiveUp' move correctly.  At the time I was happy to dismiss this as a bug in the way I had done something which affected interacting with VB in some way.  They were both certain that they were never returning a GiveUp result.
In my subsequent analysis of their player code I discovered that for one 'player' there were valid paths through their code to determine which move to make next which returned the default value for an enum. Sneakily of me this default value was 'GiveUp'.  I looked at working out where the error in the code was but it was highly complex (lots of conditionals and recursion) and used lots of single letter variable names so I decided to pass.
After a bit more digging in the other VB player's code I found that on certain passes through multiple nested loops it tried to access an array element which didn't exist and then threw an error.

Both of these issues show me the importance of making code easy to read and follow. Also to be very wary of complex nested loops.  I actually used nested loops in some of the host code which checks for wins.  During the evening I had a discussion about this issue.  I chose to use nested loops only once I had a large number of tests in place and beccuase it allowed me to massively reduce the amount of code I had to work with. Nesting loops is definitely a tick in the negatives column so to use them they must provide a benefit which puts a bigger tick in the positives column.

A bug was also found where it sometimes reported the wrong person winning. Oops.

One of the players was not developed with the instructions I gave. Instead they customised one of the sample random players.  This caused problems when the developed player was drawn to play against the random player.  Based on my very limited knowledge of MEF the problem experienced was one that shouldn't be possible as both players were loaded in different containers.  I'll definitely investigate this further when I have the time. Maybe we've found a bug in MEF?!

What I learnt from organising the event

Unsurprisingly it was a very different DevEvening to 'normal'. Part of me was expecting that I'd be running around answering questions, etc.  I hadn't expected that most of the time everyone would be quietly working.  In theory this is a good thing.  In practice it's something to be aware of for the future.

Analysis of what people did (a random collection of observations - not marking any code)


  • Some people still use Apps Hungarian notation for variable naming.
  • The people who used TDD had code that was really easy to follow.
  • The people who used detailed, explicit names created code that was easier to understand.
  • Some people use properties for things that I assumed would always be constants.
  • I'm more positive about opening a code file for the first time if there is an accompanying test file (even when I haven't seen the tests)
  • Assumptions documented in comments in the code are reassurring that the original coder has thought about what they are doing and have to do.
  • Seeing lots's of TODOs in the code is reassurring that the original coder has thought about what they are doing and have still to do.
  • I've learnt that there's a 'Assert.Inconclusive'
  • I've seen some people default "unwritten" tests to return true. I'm not sure this is a good idea.
  • Some people, seemingly, started by using using the sample random code and replaced this bit by bit as they wrote their own. - Seems like a good plan.
  • Code is easier to read when spread across multipel lines.
  • I find use of the conditional shorthand operator (? :) difficult to read when all on one line and I'm not familiar with the code.
  • 2dimensional arrays seem to lead to code that is just as complicated to understand as a number of Lists (or equivalent) - at least when there are a small number of 'Lists' in use.
  • Hooray for amusing comments!
  • Comments which add no value are disappointingly common.
  • Lots of people wrote code which they didn't use - presumably because they thought they would need it later. This seems a bad but understandable thing to do when very limited with time.


What I got from the experience
  • I got to exposure to the way some other people work.
  • I got new ideas for how to solve a problem.
  • I had an excuse to do some practical development with MEF.
  • I had an excuse to do some more work with WPF (embedded in a Winforms app)
  • I had an excuse to use T4 in an actual project.


Some random/assorted statistics I gathered on the night:
  • Teams/people who made notes on paper before starting: 1
  • People who used the internet for reference: 0
  • People who looked at the code I wrote for reference: 0 (assuming everyone was honest when asked.)
  • Teams/people who wrote tests (of any sort) for their code: 4
  • Which external libraries did teams/people use: only NUnit
  • Teams/people who felt they had "finished" in the time allowed: 0
  • Players developed by pairs fo developers: 3 (of ten players)
  • People who used a black background in Visual Studio: 5


If I can come up with another suitable task/game/project we'll definitely do this again.  The feedback from the people who came was very positive that they'd come again.  I'm not sure how well this would work with much larger groups or how we'd fit many more people in

If you're interested in knowing more or running this or something similar at another user group drop me a line.

Thursday, November 19, 2009

Donate at the office!


The reason they want you to fit in...

http://sethgodin.typepad.com/seths_blog/2009/11/the-reason-they-want-you-to-fit-in.html

Monday, November 16, 2009

Assorted mobile web notes

Another assorted collecction of notes from some old notebooks - including some from Mobile Web 2.0 Summit.

mobile: point of inspiration & entertainment & need
users value dependent on relationship with other users
value in getting data from device
* combine knowledge of users across different screens
valuable data can't easily be replicated/recreated
who owns data? - Key Q

Monetisation is complex
- getting the right, loyal customers
contextual advertising doesn't work in socail media
value is in context + contacts
target people, not content/context
profile based on demographics/behaviour/social interaction
how to calcualte the value of mobile marketing?
Privacy - users must be able to utilise data themselves

1 billion people own a Nokia phone
Nokia make - 450M devices a year / 15 per second
1/2 sale price goes on R&D (£6B) - Europes largest - workd 3rd largest researchers
Devices are all alike - what it does for the user is the differentiator
unlimited is the key to packaging services
Nokia want mobile web browsing at same speed as desktop
- Users want it now
Must make service work across devices

The real battle for real estate is in users pockets!

Users expet the ability to do desktop stuff on mobiles
Younger people want more from/on mobiles
make it REALLY easy for uesrs to do things

people communicate with those closer to them with their mobile.
- content changes in context

people would do more on mobile if it was faster

Most important features on mobile:
1. Internet
2. SMS
3. voice

targeting marketing based on device > which are targetted at demographics

users want to buy via operator portal as they trust it

mobile apps for social networks
- 2 times as often
- 4 times the page view

Make advertising/marketing social graph friendly

apps are hard to change - the web is easy

massive users volumes only come from operator portals

focus on what is key of service - not the platform optimising for.

UX is harder to get right - 10x harder on mobile (as screen is 10x smaller?)

software is the future of differentiation
- software will become key for operators

optimising for more powerful devices is likley to become an issue in the near future.


75% of Africans will never have a PC!
Businesses, not consumers willing to pay for content when consumer has very low disposable income.

turn customers into fans

reexamine business practices - don't just evolve

web browser as runtime
- reuse web developers skills for mobile.
mobile web - moving to apps, not just pages

widgets at epicenter of mobile and web convergence
widgets -for social applications(?)

do we need standards? - who benefits?

 You don't have to be a destination - e.g. Twitter.

Turn users ito a community:
- Engage - reason
- Content - useful or entertaining
- Convergence - acknowledge cahnges in user behaviour
- Loyalty - GREAT experience
- Analytics - Use them - to understand audience need.

"digital" connecting web & mobile.

lots of scope for sponsored experiences/apps
mobile advertising has little opportunity to do big things
where's the value of ads in social networks where content has little or no value.

need for local/regional/national variations of global systems
- things won't be the same across cultures but may be able to learn something

league tables as loyalty drivers
Get users doing something, not just watching
realtime feedback enhances participation
showing location of other users  builds community & loyalty
people want to be part of something - don't need to have a conversation
everyone likes to play - "underappreciation of frivolity"

the thing people want to do mpost with their phones is communicate
8 year mobile adoption curve
netbook as biggest mobile web usage device
mobile - a world of fads

communities may/can/do live longer thna the event/product/property they were created for

make payment simple - tightly integrate with app store / payment channel

will governments end up paying for essential infrastructure?
- if no long term business model to provide it at a price people are willing to pay
- would we want that?

captured informaiton is enriched by knowledge of context

look at web and mobility at the same time

charge for more than just the web - depth of network interaction

converged address book =? defacto social network

where data is physically located affects legal access to that data

open not necessarily free

Digital dividend - mobile opportunity based on digital divide

smart objects
sensorconomy

devices drive everything!!
people will pay for
- new types of devices
- deep integration of services

customers understand and will pay for services

use of web as a platform is accelerating
browser as client for the cloud

OS not a differentiator

dConstruct notes

Just been going through some docs and found my notes from dConstruct.

Please be aware that this is unlikely to be of use or interest to anyone but me.


Elements of a Networked Urbanism
People blame themselves - when usability is poor.
Ubiquitous computing - the future!?
Networked urbanism - but surely not everywhere?!
sustainability - empowerment - privacy
City: "a layered representation of experiences over time"
More than half the world live in cities (including slums & favelas)
squallor & vitality
Component / Resource
- Everything: addressable -> queryable -> scriptable
Consistent / Variable
- static > fluid
Latent / Explicit
- information revealed/available:
-- now actionable responses
-- know more than you want to?
Browse / Search
- choice drives option
-- less happenstance/chance
-- removing personal/local/insider knowledge
-- democratization of information
-- expertise becomes harder
Held / Shared
- possibly easier
- contribute back
Expiring / Persistent
- history reamins and becomes available in new ways
- including new levels of personal information
-- personal reinvention becomes harder
Deferred / Real Time
Passive / Interactive
Wayfinding / Wayshowing
Object / Service
- improved utalization of objects
- increased abstraction
Vehicle / Mobility
Ownership / Use
- change in understanding of consumerism
Schelling / Schoaling
- location of common meeting / soft appointment place/time
Community / Network
- changes in level of minimal acquaintance
- society & community based on levels of not knowing
- association by choice / association of circumstance
-Beware:
-- speed of change
-- changing what don't understand
-- what don't understand (almost certainly more than you realise!)
Consumer / Constituent
- Variation
- require: sensitivity/intelligence/tact
Privacy of information
Serendipity is good - you don't want to remove it


Let's See What We Can See (Everybody Online And Looking Good)
Show you/user and others on a map
- creating a virtual community is a good thing
Social is more important than visual (MySpace?)
Indicate:
- Importance
- Popularity
- Relationship
Holisitc views / Peripheral viewing
Include textual representation of what is being shown
Highlight specific information amongst complex screens
From language to behaviour
- experiencing daat
A physics of information
- applying a dynamic display
- visual models
Indicate possibility
- "sculpt the data into the statue of your choice"
Tuning in patterns
Synesthesia
- one input/experience triggering memory of another
Medium = message - depending on representation
Experience!


What’s Next? How mobile is changing design 
What is our perception of the future?
- Influence
- Bias
Now
- everything is touch
GenY - do things collectively
Mobile generation = born after '91
- have greatest buying power
iPhone - fastest consumer ramp up since DVDs
Touch - 4th largest OS (by popularity)
WebKit - 95% of devices accessing the web
Universal language: HTML + CSS + JS + APIs
Are we already designing for the web of tomorrow?
AppStores - more iPhone apps than Mac apps
Mobile apps are now moving to the desktop (Tweetie)
Constraints of mobile design - lead to greater focus
Design for medium or context?
Context = circumstance/settings
The era of single context web is over
web widgets on TVs
Neurolinguistic programming
Audity|Visual|Kinesthesic
Design is a multifaceted experience
what's next?
- anything
- everything
The future will come from investments made in mobile today!
people/user driven
We are the gatekeepers to the information age
portable + personal + always connected
- collaboration
-(-) "we already know the answer"!

Make It So: Learning From SciFi Interfaces
research behind anthromorphism attempts in software
sound is enought to represent something
- audio interfaces
- can create empathy/emotion with sound
behaviour good - likeness better
- giving more than expect
representaiton embodies/implies additional information
constraints ease learning curves
Inputs should know affected stated
- don't respond to something unusual when users wouldn't really want you too



Loving Your Player with Juicy Feedback

Unpredictability
Variability
Aiming for desirable emotional response
emotional investment
challenge - fellowship
Perception of achievability
Mechanics -> dynamics -> Aesthetics
meaningful activities
avoid clutter
create iteration
avoid feature driven design
Don't fix what isn;t broken
QWAN - Quality Without A Name
Juciness
- constant feedback
- No goal (task)
- Responsive audio feedback
- Aim to produce an emotional response from user
Bubble wrap
Make user care and think it's cool.
Not for it's own sake (feature)
Interpreting more than what's shown
remove arbitrary constraints



Experience and the Emotion Commotion
It's often counter intuitive
Play - in everything(?)
Experience v object
work/play
prickles/goo
Dialectic - no dualism
embedded intelligence in objeccts
embedded emotion in objects
simple questions = complex answers (& vice versa)
emotion = a mental reaction to physical experience/responses
system output > user input


Materialising and Dematerialising A Web of Data. (Or What We’ve Learned From Printing The Internet Out)
"the front of the train is less crowded"
post digital
real objects - digital identities
beyond digital infatuation & analogue nostalgia
"things I would rather read on paper"
new combination of existing things = all new things
victory/success is a dnagerous thing
screens are a cliche
are we just solving the problems we are causing?
- what about entirely new things?
stuff takes up space and is expensive to move
physical things have more importance
redomaining!

Thursday, November 12, 2009

Everyware: Adam Greenfield



 A few quotes and notes that caught my attention while reading "Everyware: The dawning age of ubiquitous computing".  I was inspired to finally get this after hearing Adam speak at dConstruct earlier this year.

Present IT development practices as applied to everyware will result in unacceptably bad user experience.

"If computers are everywhere they had better stay out of the way."

Build it as safe as you can, and build in all the safeguards to personal values that you can imagine.

"in dreams begin responsibilities."

It will not be sufficient simply to say, "First, do no harm."

We're not very good at doing "smart" yet, and we may never be.

"some problems routinely put forward [in ubicomp] are actually AI-hard."

Ubiquitous systems must default to a mode that ensures users' physical, psychic, and financial safety.

ubiquitous systems must not introduce undue complications into ordinary operations.

Tuesday, November 03, 2009

WMRM DisableOnClockRollback

I've been working on a project which involves using Windows Media Rights Manager (WMRM) Digital Rights Management (DRM).  As part of that project I have been applying rights to specific content (movies in this case)
to meet the rules specified by the client.

Unfortunately I was receiving an error and serchin on the error message returned exactly no hits.

{"Error HRESULT E_FAIL has been returned from a call to a COM component."}
 
at WMRMOBJSLib.WMRMRightsClass.set_DisableOnClockRollback(Int32 pVal)


In case anyone else runs in to this in the future, here's how what the bug actually was.


I was setting a DisableOnClockRollback value of true, but was getting the error when I did so.  A short MSDN search later and and I found http://msdn.microsoft.com/en-us/library/bb649390(VS.85).asp. In it is the line:

This property works only if you have set an expiration date first.


That'll be the problem then.  Another case of the person making the decisions not knowing the whole story.  Ho Hum.

DevDays CountDown App: My Analysis

I promise, this'll be the last time* I post about my DevDays CountDown App.

Now it's all over, it seems a suitable time to do some analysis:
  • Why did I write it?
  • Why did it get picked?
  • What helped me develop the application?
  • What did I learn from the process?
  • What would I do differently next time?

Why did I write it?
 A few reasons:
  • I thought it'd be cool to write an app that got used in quite a cool, high profile event.
  • I had an idea that I thought was quite good.
  • I thought it'd be a good opportunity to build some experience with WPF and particularly with WPF animation.
  • To prove to myself that I was able to produce a good piece of software that meets a clients requirements.

Why did it get picked?
Officially:
"... because of the twitterfeed and because the graphics are actually appropriate"
I think there are several reasons:
  • Because I actually produced something that met the requirements. - I was surprised by the number of entries that didn't. (Users won't [usually] use[/buy] a product that doesn't meet their needs.)
  • Because I actually delivered something. - There were a lot of comments from people who said they were working on something but never posted anything. (There's no reward for not showing up.)
  • Because the graphics were appropriate. - While I also had some novel. alternative, ideas I knew these wouldn't tie in with the StackOverflow or DevDays brands. (A bit of marketing knowledge helps in software development.)
  • Because I did more than was asked. - The twitter element wasn't part of the original requirements. (Having something unique is always a good selling point.)


What helped me develop this application?
  • I made sure I understood what was wanted. - I read the requirements thoroughly. I asked questions and madde sure I understood the answers. I read other people's questions and answers.
  • I understood the domain. - I go to quite a few conferences and am keen on understanding their organisation and how they are put together. (This partly ties in with my experiences of organising DevEvening.) Knowing the application domain is essential to good software development!
  • I've seen lots of different ways twitter has been used at conferences and other comparable events. - This guided how I incorporated the twitter element.
  • I have a desire to only do things well, or not at all. - Loads of people can do average. Fewer people will put in more effort to make something really refined and polished. - Good enough isn't good enough!
  • I focused on my strengths, not my design skills. - By basing the design on an existing layout, colour scheme and images.



What did I learn from the process?
  • Make the first user experience great. Optimise for it. (User input handling wasn't brilliant in the first version.)
  • Visually stunning (slick?!) and different is good for creating a good first impression. Animation is a good way of adding something new, different and visually appealing to traditional desktop apps.
  • Make user input handling really solid, smart and tolerant.
  • People love seeing their own contribution/thoughts (tweets) on screen.
  • TweetSharp is cool (despite a few temporary problems) and fluent interfaces are really nice to use. 
  • There are a lot of ways user input can get into an application. Consider all of them and 3rd party libraries and APIs as external input and treat them with caution.

What would I do differently in the future?
  • Better caching of tweets retrieved from the twitter API. So can download many at once and then stagger their display.
  • Better error logging. - Currently swallowing quite a few exceptions with no logging. - It didn't really matter for this case but could help with debugging.
  • Better messages to display if no new tweets to show.
  • Add unique images for fake tweets.
  • Add processing rules for tweet inclusion. Possibilities to consider would include: ignoring retweets; profanity filtering; spam detection and ignoring.
  • Ability to play music?
  • Better validation of all input.

Right. Must be time to go back to some of my other projects.


*This year! - who knows about the future.

Monday, November 02, 2009

WebAIM: CSS in Action: Invisible Content Just for Screen Reader Users

WebAIM have a cool, useful article here: CSS in Action: Invisible Content Just for Screen Reader Users

I had originally liked to this while experimenting with Posterous, but it had been a bit enthusiastic in including content from the site.

Getting IIS6 working in 32bit mode on a 64bit machine

I had a server up and running hosting various sites.  One of those sites needed to be able to apply DRM wrapping to movies (WMV) files.

Unfortunately the DRM libraries are only available in 32bit versions and it's not possible to call 32bit DLLs from 64 bit processes.  The way round this is to have IIS run in 32 bit mode.

The same applies if  needing to reference any other 32 bit DLLs ffrom 64 bit ASP.NET/IIS.

Based on what I read on the internets, making this change should be quite straight forward.  Despite all the instructions on the web saying ti was just one script to run to make this change I found that more needed to be done.  Incase anyone else has the same problem, here's what I did to get it working.

Uninstall the 64bit version of ASP.NET 2.0.
c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -u

Configure IIS to run in WOW64 mode.
cscript.exe C:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

Install 32bit version of ASP.NET 2.0
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

Enable 32bit version of ASP.NET 2.0 in IIS WebService Extensions

Recreate the existing websites in IIS using same setings as before.  This will use the 32bit versions of ISAPI extension executables, etc.  I tried changing these manually but that didn't seem to be enough.  I assume that there's more to change than I'm aware of. Recreating the web site takes care of all that for me.

Done.


IIS is all or nothing when it comes to using the 32 or 64 bit version.  Yes this meant that all websites on that server needed to be changed to run at 32 bit.  We therefore lose the benefits of the 64bit OS.  If the site becomes as big as the client is hoping we'll move the site doing the DRM wrapping to a different box and put everything back to 64bit so we can make the most of the 12GB of memory installed.

Saturday, October 31, 2009

Stack Overflow Dev Days: London

As promised previously here's my review/notes/random thoughts from DevDays London.  Plus I'm keeping this positive this time.


As I was slightly invested in seeing the countdown app in all it's massive screen glory. I was trying my best to arrive in plenty of time.  Unfortunaltely my 3 year old son had other thoughts on me leaving early.  Fortunately I arrived in the "great hall" with a sign on the screen saying "Dev Days starts in 43 seconds". Nothing like cutting it fine!  Seeing all the elements on the screen slide out during the fade to black on a screen the size of my house was definitely cool.


In good tech conference tradition the day started with a comedy video.   I lost count of the in jokes and I've never seen a punchline coming from so far off as the 6 to 8 week deadline estimate.  Plus I'm looking forward to HTML6 and the tag.  Hopefully they'll post the video somewhere, but in the mean time you'll have to make do with this: http://www.youtube.com/watch?v=H3slPNJdbF4.
Pair programming: "You're born alone. You code alone. You debug alone. You die alone."
The first session of the day was Joel (complete with Union Jack flag and I <3 London tshirt) Initially I was concerned that this was just going to be the same presentation he gave at Business Of Software last year. Fortunately there were some new twists on things and some new ideas. My notes:
  • Always search everywhere. Never ask the user to say which fields to search.
  • Decisions are about balancing simplicity and power.
  • Do you do one thing well v/s have lots of features
  • More features mean more choices.
  • Choice is attractive but too many choices prohibit purchases.
  • "The paradox of Choice"
  • Less features v/s a defining sense of self
  • Don't ask questions the user can't answer.
  • Users blame themselves when selecting the wrong option.
  • Most people need more than simple.
  • Sales increase when features are added
  • Power = features; options; capabilities; $
  • What do users really care about? - Make something that responds to that. Either directly or indirectly.
  • Computers shouldn't set the users agenda.
  • Not all features are created equal. There are good & bad features.
  • Good features come from or are the result of good design.
  • Help users achieve goals v/s interrupt users
  • Elegance: don't go on about how good/clever you are.
  • [Having to make] decisions waste[s] users time.
  • Elegant code is not the same as clean code.
  • Elegant code is more than clean. If elegant it "doesn't look like there's enough code".
  • Elegant UIs take more work.
  • Not requiring user confirmation requires users be able to 'undo' the decisions you make for them.


Didn't pay much attention to the Python talk as it didn't seem that appealing and I was exploring helloapp. - Until my phone died that is.


Due to a last minute reorganisation of speaker order. Joel was back with the rundown on FogBUGZ 7. I already use this at work and for my personal projects but was prompted to investigate some features I wasn't using: integrated crash reporting; the backlog plugin; subcases & tags.  Joel also introduced Kiln.  I'm a beta user for this already but it was nice to see someone else using this.  The surreal side to this whole presentation was that Joel was using the example of developing the countdown app used at each devdays and how you could use FogBUGZ in that process.  I did. Very Deja Vu.


Android
Things that caught my attention:
  • No app review process - suprising!
  • Home screen widgets
  • Background services
  • Interprocess comms 
  • Universal (in app) search
  • 2.0 introduces:
    • Bluettoth support
    • Integrating contacts from multiple accounts
    • Camera APIs
  • Device targeting via custom device specifying via IDE plugin - create your own emulator
  • Tried to claim that a slow emulator is a good thing. - It forces you to make it fast on the emulator thereby ensuring that it's definitely fast on an actual device
  • Form/window/control layout is XML based
  • Activities = forms
  • Intents (really must find out what these are)
  • Native support for SQLite - can share stored data with other apps via a content provider
  • New GoogleMobile Analytics tools can be included in apps
  • Registered developers can buy developer phones (fully unlocked and available with no contract.)

jQuery
  • Uses TestSwarm - for cross browser testing
  • Find something > do something
  • Create something > do something
  • $ is an alias for jquery method
  • test code at jsbin.com
  • Don't select by just a class name as very inefficient in older browsers (which are slower anyway)
  • It fails silently - so if it seems to be doing nothing...
  • use single methods for setter and getter
  • .live() - allows updating selector for changed/added DOM element
  • a pluging is a custom function that's reusable and distributable
  • Mobile version coming


Jeff Atwood


Qt
Note. Ducked out of demo (second) part of this session to get some lunch/
  • Nokia's solutions for native development
  • "Being able to debug is the most important thing fro developers" - the reason for the need for Open Source
  • Lowering the entry barrier for developers is the key for driving adoption
  • Success comes from 3rd party Innovation
  • Claims to be "the Java we never got"
  • Less code needed to achieve the same as lower level languages (C) - Saving money in maintenance phase
  • FREE
  • Has it's own IDE - QtCreator

Jon Skeet (& Tony the Pony)
  • Users want programs that do what is simple and obvious to them, at that particular time.
  • Architects design/create systems that are just as complicated as the real workd by slightly different.
  • Evolution has cheated us by not giving us 16 fingers. I would have made us better at counting.
  • We (developers) struggle with the difference between continuous and discrete numbers.
  • We (developers) struggle with Text: multi-byte chars; combining chars; Turkish
  • We (developers) struggle with Time: 12/24 hours; date formats; timezones; Daylight Savings Time.
  • Know a bit more than you need to. What problmes are you likely to have if the app/code was extended.

iPhone
  • Objective-C is like marmite.
  • "and that's why we have to say the same words twice" - WTF?!?
  • Obj-C is opinionated and includes a lot of historic baggage. :(

How not to design a scripting language
  • Don't read the dragon book. Recommended alternatives: Engineering a Compiler and Modern compiler implementaion in X
  • Foreign Function Interfaces: bad in principle but allow calling out to C libraries when need code that executes faster.
  • "A good rule for life in general: Don't expose yourself!"
  • Things that are bad: eval() and dynamic include/import

Yahoo! Developer Tools

"every browser is a bastard"
Some browser are "differently-abled"
JS Libraries are edge cases
YUI - looks useful, especially CSS grids
YQL - WOW! (see http://www.youtube.com/watch?v=SA4Et1DiVbE)



MISC
A couple of quick notes on the organistaion of the event and applicable to any such event:
  • Have a countdown that the speaker can see so that they know when they running out of time, or out of time.  - This is always preferable to someone coming on to the stage to tell them they have X minutes left.
  • Have a backup microphone on standby.
  • There's no excuse for having unprepared speakers.
  • There's no excuse for having unreheased speakers. Speakers need to know how long they will take and what they can do in the time they have.
  • Text and code must be visible on the screen to everyone watching (if that's what you're trying to show) - zooming in is fine to highlight a specific thing. Staying zoomed in and having to keep scroll around while zoomed in is not good for anyone. 
  • If doing a talk introducing a subject cover:

    • What can you do?
    • What do you need to do it?
    • What are thre fundamentals people need to know?
    • What gotchas should people be aware of?
    • What recommendations/tips should people know about?
    • What are the answers to the frequently asked questions?
    • Show a few cool and easy examples.



Thursday, October 29, 2009

StackOverflow DevDays - sad rant :(

Yesterday I was fortunate to be able to attend StackOverflow DevDays London.  I'm planning to do a detailed write up about the event shortly.  But just wanted to have a quick moan about a couple of bad points about the day.

Firstly, my phone did this very early in the day:

Phone = paper-weight!

Fortunatley I also had my blackberry with me so was able to take this picture but it only had a little bit of battery left to only allow me a couple of tweets during the rest of the day.  This meant I couldn't be my usual twittering self at a conference thereby missing out on what I find to be a useful part of such events.  This was further compounded as it meant I couldn't engage with helloapp.  I had heard about this when FOWA was on and was keen to see it in action.  On top of not being able to interact via twitter, I didn't take a laptop so couldn't use the web based site.  There was no dedicated mobile interface and the AJAX requirements of the site meant it was unusabel on mobile devices.  I noticed a lot of other people trying and failing to get it working on various mobeil devices. If Carsonififed are interested in adapting helloapp for greater mobile interaction and thereby allowing more people to use it and engage with other attendees I'd love to have that conversation.

Second issue of the day;
At the start of the lunch break I had a chance to talk to Joel about the CountDown app I wrote and he used at the start of the day and during breaks.
  • Yes this is the code he used in his Fogbugz/Kiln demo. I had a strong sense of Déjà Vu during this as I used FogBugz to track features and fixes during it's development and also hosted the source in Kiln, as an early beta user.
  • Yes this is the app I've written (banged on?) about before.
Anyway, because I was talking, I joined the lunch queue late. Before I got to the front of the queue we were told that food had run out but more would be available in 4 minutes. About 10 minutes later we were told some food would be available shortly. A few minutes later the lunch break was over and it was back to business - but still no food available.

Yes, I could have raced to get food when the lunch break started but that wouldn't have helped the 50 or so other people (my estimate) who were still queuing and also didn't get food during the break

I gave up waiting when Jeff came on to give his talk. I then skipped the Qt talk to get a sandwich.
All very disappointing.


Proper review and details of all the good bits will follow. Promise!


Note to self for future conference attendance:
1-Take loads of phones (not a problem - but must make sure they're charged!)
2- Get a netbook so can get online while there. This will allow doing things which don't have mobile support - (Boo!). Plus, anything larger than a 10" screen seems to big to carry around all day.