You’re a smart guy, figure it out!

Mike Grushin’s thoughts on everything tech-related and more…

NAB 2013

Posted by mikeg on April 19, 2013

Web Video

High Speed Transfer

Portable Production Studios

Telecasters

Professional Video Equipment

Useful

Random/Interesting

  • www.dvidshub.com – Defense Video & Imagery Distribution System
    • In accordance with the US Department of Defense Principles of Information, the mission of DVIDS is to provide the public and news media access to US service members and military operations worldwide
    • Free iOS app: Military 24/7
  • http://www.cinetransformer.com/ – movie theater in a bus
  • www.LeyardLedDisplay.com – ultra definition LED wall, very impressive, up to 60ft wide
  • CatCall from Cat and Mouse – Managed Skype video chat for live broadcast TV

Posted in Conferences | Tagged: | Leave a Comment »

Xamarin Evolve 2013 – Day 2 Sessions

Posted by mikeg on April 19, 2013

Building Great Experiences with Scalable Cloud Services

  • Presenter: David Poll, Parse
  • Good presentation, good set of features, reasonable price

Building Hybrid Apps with Xamarin

  • Speaker: Ryan Paul, Xamarin
  • Disadvantages of HTML
    • lack of consistency between rendering engines
    • difficult to get optimal performance and acceptably responsive user interface
    • Lack of native controls means that you can’t match the platform’s native look and feel
    • No access to platform-specific functionality
    • HTML rendering engines confine you to a lowest-common-denominator user experience
    • FB moved from HTML list to native – resulted in my higher user engagement

image

  • Advantages of Native Development
    • Access the full range of rich device capabilities and native performance
  • Hybrid Advantages
    • pegasus and unicorn, not crocodoc

image  image

  • Displaying HTML content in Native Apps
    • An HTML view can be a highly effective tool for displaying rich content in native applications
    • Ideal for use in scenarios where you need complex formatting and want to intersperse graphics
    • With responsive design techniques, content can be made to seamlessly adapt to different screen sizes and orientations
    • Razor templating engine can be used by native apps to render HTML
  • Demo: Razordex

image

  • Hybrid Communication Techniques
    • Expose C# function to JavaScript – Android specific example was provide, supposedly no easy way to do on iOS
    • Intercept a Link Handler – <a href=”message:this is a test”>test</a>, catch “message” link in ShouldOverrideUrlLoading
    • Call JS function form C#: web.loadUrl(“javascript:function…”)
  • Look into jsbridge on github – pass JSON from/to native to JS
  • http://caniuse.com/ – HTML5 support across different browsers

Posted in Conferences, Xamarin | Tagged: , , , | Leave a Comment »

Xamarin Evolve 2013 – Calabash – Cross-Platform Automated UI Testing

Posted by mikeg on April 17, 2013

  • Speaker – Karl Krukow
  • Xamarin purchased LessPainful, makers of Calabash (http://www.calaba.sh) https://github.com/calabash
  • UI Test Automation for iOS & Android
  • Code reuse for logic but by nature of different UIs there will be different test logic
    • Objective C, Java and Ruby
  • Native and Hybrid apps
  • Ruby API (C# API in the making)
  • Behavior Driven Development (BDD)
    • it is NOT
      • programming in plain text
      • writable by your boss
    • specification
    • readable by all project members
  • High-Level Architecture

image

image

  • Sample high level test case (readable by business people), click on each line to go into code

image

  • Images show code for each line – they are generic enough to be XPlat, but then .login implementation is platform specific

imageimage

  • iOS Implementation of .login

image

  • Android implementation of .login

image

  • Running the tests

imageimage

  • Ability to drive the app through the console

image

  • Including map and screen rotation

imageimage

  • CI is fully supported
  • Hybrid apps are supported through CSS selectors

Posted in Conferences, Development, Mobile Development, Xamarin | Tagged: , , , , | Leave a Comment »

Xamarin Evolve 2013 – Day 2 Keynote – Josh Clark (founder of Global Moxie)

Posted by mikeg on April 17, 2013

  • http://globalmoxie.com/about/index.shtml – Global Moxie specializes in design strategy and user experience for a mobile, multiscreen world. Founder Josh Clark is author of Tapworthy: Designing Great iPhone Apps
  • Buttons are a Hack – look for opportunities to eliminate buttons: gestures
  • Examples
    • How would a child manipulate things on the screen
    • Paint app – how to select color
    • Clear Todo App – gestures to manage todo list
    • Touch up app – instead of changing brush size, zoom in canvas while keeping brush size the same
    • adobe proto – alternative to visio, omigraffle. uses natural gestures, similar to
  • http://www.amazon.com/Fred-Friends-OCD-Cutting-Board/dp/B004TEZD64
  • Finding what you can’t see
    • Content is the label – salt/pepper in clear containers analogy
    • Don’t make it “look like” without making it “act like” – Apple’s calendar/datebook didn’t allow swipe from day to day for first 18 months till they fixed it
    • 3 year olds are better than we are in beta test because they are not poisoned by 30 years of desktop experience
    • Play more video games – game teaches as you go
      • Coaching – point out things as you go. Make first interaction easy and success. Do not repeat if user already interacted with the feature
      • Leveling up – intro one element at a time.
        • Fantasy Blade example during battle sequence – freeze the action and allow to practice block/dodge
        • Switch in scrolling direction during Mac OS upgrade required user to scroll before enabling Continue button
      • Power ups
  • Be generous – no standard ways to do things yet, need to share as an industry to figure this out

Posted in Conferences, Mobile, User Experience, Xamarin | Tagged: , , , , , | 1 Comment »

Art Expo NYC 2013

Posted by mikeg on April 16, 2013

Had a chance to attend http://artexponewyork.com/ (March 2013) and found a few artists whose work I enjoyed. As expected most of what I liked didn’t really coincide with what my wife liked… Smile

Here a few artists in no particular order

Posted in Art | Tagged: , | Leave a Comment »

Xamarin Evolve 2013 – Rdio – Beating Android Fragmentation

Posted by mikeg on April 16, 2013

image_thumb

  • Presenter: Brett Duncavage, Rdio, Session Info
  • Rdio is on 2704 different devices
  • Basic Defense
    • Set targetSdk to the current highest API level
    • Use helper classes to encapsulate OS version checking logic. Reflection will not work, But you can check Build.VERSION.SdkInt
    • Optionally set minSdk to the lower bound of Android API level your app supports
    • It is possible to have multiple APKs in Google Play that support different Android API levels
  • Stas:
    • Rdio’s long tail – top 10 devices are only 23% of users
    • Devices with over 1000 users is only 2%
    • Devices with 1 user 31
    • Devices with >1 and <100 – 67%
    • 255 devices represent 85% of all users
    • 894 devices have exactly 1 user
  • How to get data
    • Not Google Play
    • Embed Build.Model, Build.Production, Build.VERSION.SdkInt into User-Agent header
    • A service that pings an API endpoint every 24 hours
  • Samsung Galaxy S3 has at least 5 unique model strings – important to be granular because Rdio had specific bug on one of the versions
  • Pick your battles
    • Use data to drive your development focus
    • Make smart decisions on where you cut off support
    • Focus on device-specific issues with most of your users
  • Use SDK tools to help during design
  • Tools
    • Android support library – adds support for certain features (such as fragments) all the way back to 1.6
    • ActionBar Sherlock – open source lib that adds support for ActionBar to all versions of Android
    • android-ui-utils: https;//code.google.com/p/android-ui-utils
      • Asset generator
      • device preview
  • Use Fragments – Activities are heavy, fragments are light – speed went up 2x-3x after starting to use Fragments
  • Think in Points, not Pixels
    • You can’t make a pixel perfect implementation, don’t try
    • 9-patch is your friend. If designers are not using 9-patch, make them
  • Design for Android
    • Use Android UI idioms
    • RTFM! Google provides excellent resources on how to design and develop apps to support different display types
  • Level-up your layout
    • dimens.xml and integers.xml
    • Use Android’s resource directory structure to include multiple versions
    • use layout aliases – this saves you from having duplicate layouts residing in different Layout directories
  • Don’t Forget about focused state – without the focused state, the pointing device becomes useless
  • Hardware Fragmentation
    • Use manifest (requires camera, etc)
    • Use available APIs to determine fallback action at runtime if optional peripheral is not available (Ex: SensorManager)
    • check for Memory Class (16, 32, etc) to make decisions on how much to buffer, put in memory
  • External Storage
    • Not always external or removable
    • Never use a hardcoded path! /sdcard is wrong
    • Environment.ExternalDirectory can return a path to internal storage
    • Store vital application data on internal storage (sqlite database, etc)
  • Media Framework
    • OEMs use many different vendors for their media hardware needs
    • OEM can’t always use default Android MediaPlayer
    • This means MediaPlayer can behave in insane ways
  • How Rdio mitigates device issues
    • Trial and Error
    • Beta users group
    • Send one-off test builds to affected users
    • Remote device laboratories such as DeviceAnywhere and Perfecto Mobile – bad experience with both
  • Using Xamarin for over a year
  • sample app around layouts, etc : https://github/bduncavage/evolve2013

Posted in Android, Conference, Mobile Development, Xamarin | Tagged: , , , , , | Leave a Comment »

Xamarin Evolve 2013 – Conference Keynote

Posted by mikeg on April 16, 2013

imageimage

  • 400 training attendees
  • 630 conference attendees, from 15 countries
  • 1K of live stream attendees
  • Today: 2.6 Billion Devices, soon 7B
  • Nat’s favorite book on developing mobile apps: Tapworthy by Josh Clark
  • 15K Paying Customers
  • Featured Apps:
  • Xamarin’s goal is to “Delight Developers”
  • Miguel:
    • Loves C# – solved a lot of challenges while providing performance
    • C# was a life changing event
  • Since launching component store 6 weeks ago:
    • 40 new components
    • 2K developers using
  • Featured Components/Vendors
    • Signature Pad by Timothy Risi
    • Shinobi Controls – charting components, data is being rendered by GPU – fastest and more interactive
    • Cocos2D – 4K apps created, library for education and gaming
      • now supported on all platforms
      • angry ninjas – open source sample app
  • Backend Services
    • Azure Mobile Services – if you don’t have backend: auth, data storage, push, etc
    • Parse – Data, Push, Cloud Code
    • Dropbox
  • Responsiveness
    • iPhone refreshes screen 60fps – need to be below 16ms to feel “responsive”
    • 32ms is ok
    • 64ms – 15fps start choppy
  • Announcements
    • C# 5.0 Async, An Async Primer
    • Support for F#
    • Rebuild of Mono compiler/VM
    • iOS Designer outside of XCode (Visual Studio is coming, for now in Xamarin Studio)
    • Xamarin Test Cloud – Automatically test your app on 100s of real devices in the cloud
      • Bunch of great features – as you step through test cases you can see memory utilization and responsiveness of the app
      • Calabash – widely used open source tool for automated UI testing. LessPainful (authors) were acquired by Xamarin
      • http://xamarin.com/test-cloud – Beta with a number of customers

image

  • Android Fragmentation
    • Samsung has 27 different screen sizes
    • Facebook: “top 100 of android devices cover about a third of our users” (Mark Shaver, Engineering Director, Facebook)
  • Automated UI Tests

image

    • No good tools today
    • Why aren’t we using automated UI Testing
      • Test labs require expensive devices are difficult to setup
      • High-realist test scripts are difficult to create
      • Image recognition-based test are fragile
    • The real mobile testing solution
      • tests your app at the UI level
      • Takes minutes – not days – to get started
      • Tests on hundreds of real devices
      • Is resilient to visual changes in UI
      • Has a delightful user experience

Posted in Conferences, Mobile Development, Xamarin | Tagged: , , , , | Leave a Comment »

Xamarin Evolve 2013–Training Days

Posted by mikeg on April 16, 2013

Overview

We are done with 2 days of Xamarin training sessions – conference itself starts tomorrow. So far very much impressed with the technology and the company itself – everyone we’ve met seems to be very knowledgeable, friendly and really enjoying what they do. Sounds like a recipe for success. A few general comments:

  • While Xamarin technology allows C# developers to develop native mobile apps, there is still a pretty steep learning curve for web developers. Web developers are used to dealing with single-page requests where native app development is very different – dealing with performance, responsiveness, background threads, various hardware, etc makes it a lot more complex
  • With that said the fact that C# and general .net knowledge can be reused is very powerful – especially the fact that developers can continue working in arguably the best development environment (Visual Studio 2012)
    • Task Parallel Library is a very convenient way to handle async tasks and seems a lot simpler than native iOS/Android approaches
    • Code sharing and using nunit for unit testing of shared code is great
    • Xamarin Component Marketplace holds a lot of promise in making development easier – I expect vendors (possibly available already) such as Telerik and Infragistics start offering XPlat components that will further increase code reuse while look native on respective OSes

Below are notes from the sessions – mostly useful/interesting links/comments that were made during the sessions

 

MVC

  • MVC was created in 1979
  • iOS approach to MVC:
  • Controller
    • Wires Everything together
    • Listens for Requests from View
    • Manages Other Controllers
    • Populate View from Model
  • Views and Controllers in iOS
    • Responsible for UI in CocoaTouch
    • Views and Controllers – UIKit
      • UIViewController – just a controller, slightly confusing name
      • UIView
    • First Controller = Root Controller
  • Navigation Controller
    • UINavigationController – controller has its own UI (navigation bar)
      • Hooks for Forward Navigation
      • Title Bar and Back Button
    • Other methods of Navigation
      • Tab Bar Controller
      • Split View Controller
  • PushViewController
    • Segues are Great, but won’t work for everything
      • Dynamically loaded screens
      • Screens defined in Code
    • Have to Push Programmatically
    • NavigationController.PushViewController

Tables in iOS

  • Most commonly used – anything that looks like a list is likely to be a table, including “grouped” lists
  • overview
    • UITableView
    • UITableViewCell
    • UITableViewSource – this is what usually is used to connect to Model
    • NSIndexPath – a reference to section and row of what was “touched”
    • UITableViewController
  • layoutSubviews() – robust way of laying out content to react to different screen sizes , rotation, edit mode

Android

Cross-Platform Navigation

  • Navigating Stacks  – “back stack”
    • iOS – “local” to the stack you are in
    • Android – used to be hardware button
    • Windows – hardware button
  • Tab Alternatives – Satellite Menu (Path app)

image

Introduction to Cross-Platform Development and Visual Studio

  • UX in iOS != Android != Windows Phone
  • UX Metaphors are different
    • Navigation Controller vs. Back Button
  • Write-Once, Run-Anywhere is Problematic – Users Expect Native UX
  • Minimize Device Targets
    • Start with single OS first and then add additional
  • For Android, focus on top 5 phones at that time
  • Develop with Xplat Architecture
    • Good Architecture will Maximize Code Reuse
    • More expensive to change later
  • Code-Sharing Options
    • Two Major Options
      • File Linking
      • Portable Class Libraries (PCL)
    • File Linking is Generally Recommended (easier to setup, not architecturally pure)
    • PCL support is still under dev and complicated to setup and use
  • File Linking
    • Easy
    • can use conditional compilation
    • note: in visual studio there is “project linker” extension that makes this easy
    • also able to share folders, not just individual files
  • Platforms + Devices vary widely
    • File locations for DBs, etc
    • Some shared code needs to be platform-aware
  • Devices differ widely, even within a platform
    • hardware features: camera, compass, nfc
    • form factor: screen sizes, ratio, density
    • API differences between hardware vendors
    • check for device feature before using
  • Conditional Compilation (page 12 in PDF)
  • use sqllite.net orm
    • tasky pro shows how to access DB 
  • Architectural Abstraction
    • Inheritance/Polymorphism
      • Interfaces
      • Virtual Classes
    • Provider Pattern
    • Inversion of Control (Simple Dependency) – same as provider pattern
  • Cross-Platform Libraries
    • Xamarin.Mobile & Xamarin.Social
    • Monotouch.Dialog
    • Third-party libraries
      • MonoCross (http://www.monocross.net) cross platform forms
      • MvvmCross
      • Vernacular – localization library build by rdio
      • MonoGame – XNA port
  • Visual Studio Highlights
    • Can use one solution for iOS, Android and Windows
    • Android dev is nearly identical to Xamarin Studio
    • iOS is somewhat different

Web Services

  • System.Net.WebClient – blocks main thread
  • Json.NET – robust library for JSON
    • ServiceStack.Text – small quick
  • Calling Async
    • *Async versions of methods. Example: WebClient.DownloadDataAsync()
    • Start a background thread
    • Task Parallel Library (TPL) – Recommended
  • object stores
    • Axure Mobile Services
    • ServiceStack
    • Parse

Components & Social

  • Add awesome functionality quickly from the Xamarin Component Store
  • Xamarin.Mobile
    • Photo Library & Camera
    • Image Filtering
    • Access to Social Networks
    • Address Book
    • Email

Patterns

  • Data Transfer Object – simple, properties only
  • Adapter – translate a class interface to a different interface that is required by the consumer
  • Façade (or Manager) – encapsulates complex logic in a simple, higher-level API
  • Provider – build multiple implementations of an API for use in different scenarios (or on different platforms)
  • Model View Controller
    • View and Controller are usually platform specific
    • Model – Shared (might include Façade)
  • Model View View Model (Microsoft)
    • View – Platform Specific
    • ViewModel & Model – Shared
    • it’s like an adapter
  • Field Service pre-build app – MVVM example (TODO: review)
  • XPlan UI
  • Maximize Shared Code
    • SQLite-NET
    • Web Services
    • Business Logic
    • Input Validation
    • File Operations (& caching)
    • Background Tasks
    • Localization

Memory and Performance Best Practices

  • Reducing Pressure on Garbage Collector
    • Two things to care about
      • How often collections Occur
      • How long they take – depends on the size of the objects (t-shirts vs winter coat analogy)
    • Generational vs Non-Generational GC
    • Avoiding Collections
  • Be careful with container.AddSubview() – creates Strong Reference
  • Dealing with Strong Reference Cycles
    • Set Link to Container to Null
    • Remove Contained Object From Container
    • Call Dispose on the Objects
    • Use WeakReference<T>
  • Avoiding Strong Reference Cycles
    • Remove Event Handlers When Done ( –=)
    • NSObject-derived Classes Shouldn’t Keep Strong Reference to Parents
    • NSObjects Shouldn’t Keep Strong References to other NSObject Ancestors
  • Reducing App Size
    • Don’t build with “Don’t Link”
    • Build for Single Architecture (ARMv7)
    • Don’t enable debug
    • Use LLVM Compiler for release – slower but worth it from app size
    • Link All Assemblies
    • Create shared code
  • Creating Responsive Apps – recommendation to use TPL
  • Additional Performance Tips
    • Avoid Garbage Collection in Tight Loops
    • Use SQLite.NET
    • Test on All Platforms
  • iOS Specific Tips
    • Performance Considerations
      • Emulator vs Device – always profile/optimize on the device
      • Screen refresh rates for games
      • Core Animation performance hits
      • Avoid code generation – while your code doesn’t do it, library you are using might so need to test
  • Profiling/Diagnostics
    • Tools menu in Xamarin Studio – Launch Instruments
      • iOS – Memory – Allocations
      • Choose Target – choose app
      • Use search bar to search for specific type (UIImage)
    • CPU analysis can point to C# code

Posted in Conference, Mobile Development, Xamarin | Tagged: , , , , , , , , | Leave a Comment »

I am at Xamarin Evolve 2013

Posted by mikeg on April 14, 2013

We are developing quite a few mobile apps lately and these days it is no longer just about iOS – in most cases it is also Android and some customers are also interested in Windows 8 (desktop and phone)

The idea of code reuse is obviously very compelling and it seems that Mono has a new application in the mobile space – make sure to click around on www.xamarin.com and docs.xamarin.com for information on how it works. The idea is very slick and it is run by very smart folks: Nat Friedman and Miguel de Icaza

http://xamarin.com/evolve is split into 2 parts: 2 days of developer training (fundamentals and advanced tracks) and then conference itself (presentations, vendors, etc)

A few points from developer keynote:

  • Xamarin was created in May 2011, bootstrapped for about 12 months till reaching break even
  • As of April 2013 company is 70 people. Offices in SF and Boston with employees across 14 countries
  • I think I heard that there are 400 people attending – not clear if all 400 attending training or conference
  • Xamarin talks to a lot of clients and overwhelmingly they hear that there are not enough mobile devs
  • Study was quoted that .Net developer makes ~25K less than a mobile developer these days
  • According to analysts companies will be spending 4x more on mobile than on desktop (didn’t catch in which year and not clear what is meant by “desktop” – traditional desktop apps or web apps as well. If i had to guess just desktop)
  • For iOS secret sauce is ahead-of-time compilation
  • For Android secret sauce is Mono VM – mature virtual machine with higher performance than Dalvik. “Apps written in Xamarin will most of the time run faster than apps written in Java and fixes a lot of issues that exist in Dalvik (heap size, etc).”
  • Xamarin android UI designer is best of class for Android
  • Conference attendees will be the first ones to have access to certification, free for attendees
  • Useful links:
  • docs.xamarin.com – 800 pages of documentation, sample apps, etc
  • forums.xamarin.com -
  • chat.xamarin.com – staff, EST time
  • stackoverflow.com/tags/xamarin

Posted in Conferences, Mobile Development, Xamarin | Tagged: , , , , , , , | 1 Comment »

How to change default “inline reply” in Outlook 2013

Posted by mikeg on April 10, 2013

Default behavior of Outlook 2013 is to reply inline within reading pane. It mostly works well but my problem is that it changes the keyboard shortcuts: when editing in a separate window shortcut for Home menu is Alt-H, but inline it is Alt-M

Here is how you can change it:

image

I also find it useful to check the “close original message…” option

Posted in Productivity | Tagged: , , , | 4 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 183 other followers