VicinityBuzz Update: Windows Phone 8 & More

VicinityBuzz on Win Phone 8

While attending Codemash a few weeks ago, I ended up in a Windows Phone development precompiler (Codemash’s name for a training session). It was my plan to hit mostly mobile and analytics sessions, but I was not originally planning on attending this session. With Windows Phone still struggling for market share, I wasn’t in a rush to work with it. However, other sessions were cancelled because weather had delayed some presenters, so I ended up in this session. Microsoft’s Jeff Blankenburg was teaching the session, and I have enjoyed some of his presentations and a Silverlight fire-starter event in the past. It’s one of my rules of conferences to attend sessions based more on good speakers, rather than based solely on topic.

With regards to marketshare, Jeff made the point during the session that with a less crowded app store, you do have a bit more discoverability. Even if that doesn’t hold up, the platform shares enough similarity with Windows 8 that a port to the Windows Store will be trivial. The Windows App Store isn’t exactly setting the world on fire either, but I’d like to see my app on all of these platforms, and as Windows 8 adoption rises with new machine sales, that marketplace should see constant upticks.

Having worked with Silverlight in the past, I found it pretty easy to get going on Win Phone 8 development. There was some definite rust on my XAML skills, but it came back to me fairly quickly. One thing to keep in mind is that you want to keep things relatively simple on a mobile platform. I have worked on some WPF projects in enterprise settings with MVVM frameworks, dependency injection frameworks, and more. While I followed an MVVM pattern, I just rolled my own with a simple base class.

My project was to do a version of an app I already have in the iOS App Store, VicinityBuzz. It does location based searches of twitter. You can search around you, or by entering an address. The radius is a configurable setting. I like using the app at conferences like Codemash to catch all the chatter that may not have a hashtag. One catch is that obviously only tweets that included location will be found. If folks have that feature turned off in their twitter app, then it won’t show up.

Since I had written the app before (in phonegap for iOS), I knew the feature set and domain cold. The challenge was just getting up to speed with the latest API’s for search and geolocation, and then implementing within a new platform. One of the biggest benefits of this project was getting up to date with the latest Twitter API. I still need to update the version for iOS, as it’s currently non-functional because of api changes over the last several years. I plan on doing that very soon now that I know the latest version.

Anyway, I won’t go into the development details here too much, but I finished a version 1 of VicinityBuzz, and it is now in the windows phone store here, and it’s free. So go check it out. If you like it, I’d love to have some more reviews.

Also, if you are inspired to do any Windows Phone development yourself, you may be interested in a device to do some real testing. I recently found there are some prepaid phones new on Amazon that are dirt cheap for that purpose. Check out the Nokia Lumia 520 and Nokia Lumia 521 on Amazon.

Watch this blog for upcoming posts about working with the Twitter API, and some of the things I learned working with Windows Phone 8. And more mobile in general. I have the bug again…

XBoxOne’s Problem With Mixed Metaphors

Blue Ocean Strategy is a powerful thing. The Wii took great advantage of this, as has Apple and others. Some people try to cite this as an example of the direction for Microsoft’s upcoming XBoxOne. But that ocean isn’t blue anymore. Older parents and grandparents that bought Wii’s aren’t looking for another box. Certainly not one with 3 Operating Systems and a camera.

The Wii was an innovative and mass-market product that hit big before tablets, and during the early days of touch phones. They have taken over the “casual” gaming market.

So what does that leave? The Smart TV / Living-Room audience. That was the stated goal of the XBox project when it launched… to “invade the living room.” IGN in particular has been jumping all over this point when defending the strategy. Saying the mass market is so much bigger than the gaming market. So what of that argument? Sony and Nintendo aren’t making serious runs as the all-in-one living room box. Is that the win for Microsoft?

That argument forgets Roku players, Apple TVs, Google TV, tivo, smart TVs and all of the other sub-$100 products in this market space. Sure, they don’t do as much. And that innovation could come at a much lower cost.

How hard would it be for Apple or Roku to make an ipad app with Siri features that controls an Apple TV or Roku box? Now I have a touch screen remote and voice commands for my entertainment.

And all of those companies are good at consumer devices. Much more consistent than the Microsoft track record with Zune, Surface, etc.

Add to it things that don’t work in a new digital world. Take today’s Penny Arcade discussion on backwards compatibility for digital assets. Microsoft didn’t think that one through.

I’m not trying to pile on. I hope there are multiple good next-gen consoles. But if you’re going to play in the consumer device model, you have to remember who’s already there, and what they have conditioned consumers to expect.

Strange NuGet Error

One of the projects that I work on uses NuGet for library management. We have a rake task that runs build, clean, etc. One of the rake tasks runs NuGet.exe which is stored in a tools directory. That way, everyone uses the same version of NuGet even if they have different versions installed in their program files directory.

For some strange reason I was getting errors when running the rake task that updated the packages. Sometimes it was a generic error, sometimes “Archive file cannot be size 0”. I verified that the NuGet version hadn’t changed. I tested on other machines. I tried running the command by hand to take rake out of the equation. On one machine, it wouldn’t work. Every other machine fine.

I even wiped the folder and checked out again with git. No luck. Finally, I decide to look for a NuGet local cache and see if I had bad packages. Delete the contents of C:\Users\YourUsername\AppData\Local\NuGet\Cache\ and this problem will go away. Hopefully this info saves you some time.

Flex is a Relic and Silverlight is a Zombie

…or some other catchy metaphor that will grab your attention. These technologies were hot over the last 5 years. Flex gained a particular amount of popularity in the Java community where UI technologies have a bit of a spotty record (that’s like saying my Bengals have a bit of a spotty record over a lifetime). Silverlight gained a lot of traction among Microsoft developers who actually cared about design and UX. Many alpha-geeks of the Microsoft space were running around giving conference talks about the MVVM pattern, and sharing code on codeplex. So what happened?

Both of these technologies are going to fade on the public web. Tablets and mobile devices are too big a share to ignore. Html5, phones and tablets did them in. The heavy hand of Steve Jobs probably gets credit for the coup de grĂ¢ce. The browser vendors and phone OS creators have really put their weight behind Javascript and Html5. If you have have that skill-set right now you can create:

  • Web Content
  • Mobile Web Content
  • Mobile Apps via Appcelerator
  • Mobile Apps via PhoneGap
  • Windows 8 Metro Apps

That’s a pretty wide reach for a markup / scripting language set.

So what do you do if that’s your trade? You work as an AIR/Flex developer or Silverlight developer, what do you do? There are good options for each camp, and some universal options.

Flex Developers

I think this is the slightly less promising path in the long term (despite it hitting a much higher peak than Silverlight). That said, Flash and Air will live on for a while, and you have some time to make a transition. Additionally, the ability to use the Adobe tools to make mobile applications provides a bridge to the hot mobile market. And you can make long term plans to transition to another cross-platform tool (PhoneGap, Appcelerator, etc), or go native. If you’re in the Adobe camp, new tools like Edge are likely to ease the transition to the standards-based technologies of the web.

Silverlight Developers

Similarly, Silverlight won’t be gone tomorrow. Intranet applications that need rich functionality (and simple deployment) are still a nice fit for Silverlight Desktop applications. And the adjustment to WindowsPhone 7’s flavor of Silverlight is straightforward, though I would be cautious and investigate the financial realities of that market. Finally, while Windows 8 Metro Apps don’t specifically use Silverlight, they can use C# with XAML and a subset of the .Net libraries that emphasize a security sandbox and async data connections. Sound familiar? That’s because they re-animated the corpse of Silverlight and made it an option for writing Metro apps. Long term, you should probably learn to use the Html5 / JavaScript hooks for Metro due to the ubiquitous nature of those skills. But isn’t it nice that you can learn the new API (WinRT) while keeping C# and XAML, and then make the languages switch at your leisure.

For Everyone

Both camps should embrace these newer web technologies and the UI skills they picked up during their time with the respective technologies. Good user experience and design are rare skills in developers, and retraining the languages and tools should be the easy part. Keep your black turtlenecks and invest in the next tools rich applications. You already have a leg up.

Windows Search Service Fix/Hack for Windows 7

I’m not sure why, but Windows Search Service is broken on my installation of Windows. I’ve posted on Microsoft forums, and found other people with the same issue, but no fixes that have worked for me. The service will work, but every time I reboot, the service is disabled and stopped. I have to change it to manual or automatic, and start the service. It’s annoying, and if I forget to do it, I get messages (and slow searches) when using OneNote or Outlook.

Finally, it occurred to me to powershell this. It’s a 2 line script:

Set-Service -Name WSearch -StartupType Automatic
Start-Service -Name WSearch

Then I created a scheduled task that runs the script file on windows startup. The job is something like the following, depending on your path:

powershell.exe -noexit D:\tools\scripts\WSearchFix.ps1

The Scheduled Task

Note a couple of things. First, WSearchFix.ps1 is just what I named the powershell script from above, name it as you please. Second, the -noexit is not necessary, especially once you’ve run the script and verified it works from the task scheduler.

The most common problem is that if you don’t use powershell scripts, they are disabled by default. You can either sign them and use a semi-secure policy, or just open it up with:

Set-ExecutionPolicy Unrestricted

Finally, I went into the advanced options for the schedule tasks trigger and put it on a 2 minute delay. This is just a hunch, but I think something is setting the service to disabled on boot, so I wanted that to be done before the fix ran.

Of course this is a hack, and I would like to just have the service work and stay disabled. But all things considered, this is a band-aid that works.