Benjamin Hysell
Software, Projects, and People

MvvmCross – Custom MvxTableViewCell Without a NIB File April 16, 2014

Summary

Programmatically create a custom MvxTableViewCell without using a NIB file.

Source Code

https://github.com/benhysell/V.MvvmCross.CustomCell

Research

Introduction

As I venture deeper into MvvmCross based development I had a need to create a custom MvxTableViewCell without using a NIB file. There are several examples of how one can use a NIB file to complete this task, but as a general rule I try to stay away from NIB files and choose to create all of my iOS interfaces in code.

Problem Domain

I’m working on a application that allows an engineer to track their time spent against all the projects they are working on. My example user interface for this demo has a calendar with a UIDatePicker allowing the engineer to select the date and then show all of the entries they have made for that date.

iOS Simulator Screen shot Apr 16, 2014, 3.43.25 PM

My data source for this example is a simple class containing the job name, a job id, and the number of hours spent on that job:

    public class EnterTime
    {
        public string JobName { get; set; }
        public string JobId { get; set; }
        public decimal Hours { get; set; }        
    }

Attempting to display all three elements in a standard MvxTableViewCell wasn’t working, thus the need for a custom cell.

View and ViewModel

FirstView and FirstViewModel are standard MvvmCross Views and ViewModels…no real magic needs to take place in these for us to use a custom cell. In this example code FirstViewModel provides functionality that simulates an async server call to retrieve data for a given date provided by the user. FirstViewModel is also setup for pull to refresh, delete, and select from the UITableView. Thanks again goes to James Montemagno for two great Gists to make pull to refresh and swipe to delete happen:

MvxDeleteTableViewSource

I used James Montemagno‘s MvvmCross TableView Swipe to Delete as a starting point for my TableViewSource and proceeded with a few key modifications.

Register Our Custom Cell Class

In the constructor we need to tell the UITableView which class we will be using for our cells, this is done via RegisterClassForCellReuse.

        private IRemove viewModel;        
        public MvxDeleteTableViewSource(IRemove viewModel, UITableView tableView)
            : base(tableView)
        {
            this.viewModel = viewModel;
            tableView.RegisterClassForCellReuse(typeof(HoursEntryCell), new NSString("HoursEntryCell"));
        }

Derive From MvxTableViewSource

Originally MvxDeleteTableViewSource derived from MvxStandardTableViewSource, this however caused issues with data binding failing to work for my custom cell. Deriving from MvxTableViewSource and implementing GetOrCreateCellFor solved the data binding issues.

        protected override UITableViewCell GetOrCreateCellFor(UITableView tableView, NSIndexPath indexPath, object item)
        {
            return (HoursEntryCell)tableView.DequeueReusableCell("HoursEntryCell");
        }

Custom MvxTableViewCell

The HoursEntryCell turned out to be straight forward…in each constructor call CreateLayout and ensure data binding is initialized.

    [Register("HoursEntryCell")]
    public class HoursEntryCell : MvxTableViewCell
    {        
        public HoursEntryCell()            
        {
            CreateLayout();
            InitializeBindings();
        }

        public HoursEntryCell(IntPtr handle)
            : base(handle)
        {
            CreateLayout();
            InitializeBindings();
        }

        private UILabel jobId;
        private UILabel hours;
        private UILabel jobName;

        private void CreateLayout()
        {
            const int offsetStart = 10;
            Accessory = UITableViewCellAccessory.DisclosureIndicator;
            jobId = new UILabel(new RectangleF(offsetStart, 0, 75, 40));
            hours = new UILabel(new RectangleF(UIScreen.MainScreen.Bounds.Right - 85, 0, 55, 40));
            hours.TextAlignment = UITextAlignment.Right;
            jobName = new UILabel(new RectangleF(jobId.Frame.Right, 0, UIScreen.MainScreen.Bounds.Width - jobId.Frame.Width - hours.Frame.Width - (3 * offsetStart), 40));
            jobName.AdjustsFontSizeToFitWidth = true;
            jobName.Lines = 0;
            jobName.Font = jobName.Font.WithSize(10);
            ContentView.AddSubviews(jobId, jobName, hours);
        }

        private void InitializeBindings()
        {
            this.DelayBind(() =>
            {
                var set = this.CreateBindingSet<HoursEntryCell, EnterTime>();
                set.Bind(jobId).To(vm => vm.JobId);
                set.Bind(hours).To(vm => vm.Hours);
                set.Bind(jobName).To(vm => vm.JobName);
                set.Apply();
            });
        }
    }

Conclusion

The big hurtle I had with creating a custom UITableViewCell in MvvmCross without using a NIB file was deriving from the wrong MvxTableViewSource. Once I had that sorted out everything worked as expected, and I can now create my custom cells all in code without a NIB file.

Comments (0)
Tags: Categories: development

MvvmCross – FlyoutNavigation, Hamburger Menu, Sliding Menu for Android and iOS April 5, 2014

Summary

Provide a unified architecture for a FlyoutNavigation/Hamburger Menu/Sliding Menu across Android and iOS using MvvmCross.

Source Code

https://github.com/benhysell/V.FlyoutTest

Introduction

FlyoutNavigation, Hamburger Menus, and Sliding Menus (from here on out I’ll refer to this type of control as a slide out menu) all describe a popular method on mobile devices of navigating application windows via a menu that slides/flies out onto the screen providing a user multiple choices on which screen they want to navigate to next.

In my own app Goal Weight I used the popular Xamarin component FlyoutNavigation to show/hide access to settings, set goals, and view weight history.

Menu

For my latest project I’ve started development of a time tracking application that will run on Android and iOS. Thus, I found myself needing a cross platform slide out menu.

Existing Work

After Googling and researching StackOverflow I had a couple of contenders for an out of the box solution:

The only rub was neither one of these methodologies shared a common MvvmCross .Core project, and I didn’t want to support multiple/different .Core projects for different platforms. I also had experience with the FlyoutNavigation component and wanted to use it for the iOS solution. Thus I set out to create a unified architecture.

Source Code Walkthrough

The source code up on GitHub is used to demo this unified architecture…think of it as a road map on how to implement a cross platform MvvmCross slide out menu.

The demo application has four ViewModels:

  • HomeViewModel – Holds all of the ViewModels that will appear in the slide out menu
  • EnterTimeViewModel – ViewModel accessible from the slide out menu. In the demo this view is blank.
  • CreateNewJobViewModel – A second ViewModel accessible from the slide out menu. Also blank for this demo.
  • AddNewHoursEntryViewModel – A ViewModel that is created from the EnterTimeViewModel when the user presses a button on the upper right hand corner of the navigation bar.

Android Architecture

Background – http://motzcod.es/post/60427389481/effective-navigation-in-xamarin-android-part-1
Source – https://github.com/jamesmontemagno/Xam.NavDrawer

Android has a slide out menu built into later versions of Android called a Navigation Drawer. James Montemagno does an amazing job implementing the Navigation Drawer on Android in his blog post, so I decided to use his code as a starting point/inspiration for my .Core and .Android projects.

For a full detailed breakdown of the Android architecture read James’ blog. The short version is the HomeViewModel holds the slide out menu items and EnterTimeView and CreateNewJobView are fragments that are swapped in and out of the View as commanded by the slide out menu.

I tore through James’ GitHub code and re-implemented it in my example application to ensure I understood it well enough to keep moving forward. I liked the idea of having one ViewModel to hold all of the menu data and carried this idea over to the iOS application.

iOS Architecture

Warning – Although the iOS architecture works, it doesn’t “feel correct”, i.e. it has a little code smell than I would not normally feel comfortable living with. However I’m happy enough with the solution for now.

With the iOS architecture the idea is simple, construct a FlyoutNavigationController and build up the Views that will populate it in the HomeView.

First build the FlyoutNavigationController and add it to the View.

  public override void ViewDidLoad()
  {
        base.ViewDidLoad();
        NavigationController.NavigationBarHidden = true;
        Title = "Home";
        this.View = new UIView { BackgroundColor = UIColor.White };

        navigation = new FlyoutNavigationController();

        View.AddSubview(navigation.View);
        this.AddChildViewController(navigation);

One key point here is NavigationController.NavigationBarHidden = true;, for Views that will be managed from the FlyoutNavigationController we want to use the FlyoutNavigationController‘s navigation bar and not the one supplied by MvvmCross.

Next, we’ll build up the ViewModels and menu elements for the FlyoutNavigationController. Data for the ViewModels and their names are held in the HomeViewModel

//names of the views shown in the flyout
var flyoutMenuElements = new Section();
//views that will be shown when a menu item is selected
var flyoutViewControllers = new List<UIViewController>();
var homeViewModel = ViewModel as HomeViewModel;
if (homeViewModel != null)
{
    //create the ViewModels
    foreach (var viewModel in homeViewModel.MenuItems)
    {
        var viewModelRequest = new MvxViewModelRequest
        {
            ViewModelType = viewModel.ViewModelType
        };

        flyoutViewControllers.Add(CreateMenuItemController(viewModelRequest));
        flyoutMenuElements.Add(new StringElement(viewModel.Title));
    }
    navigation.ViewControllers = flyoutViewControllers.ToArray();

    //add the menu elements
    var rootElement = new RootElement("")
    {
        flyoutMenuElements
    };
    navigation.NavigationRoot = rootElement;
}

Creating the UIViewControllers in CreateMenuItemController

 private UIViewController CreateMenuItemController(MvxViewModelRequest viewModelRequest)
 {
       var controller = new UINavigationController();
       var screen = this.CreateViewControllerFor(viewModelRequest) as UIViewController;
       controller.PushViewController(screen, false);
       return controller;
 }

Lastly, we need to listen to two messages that will be emitted by all Views that the FlyoutNavigationController will show. One message to toggle the FlyoutNavigationController‘s menu, and another to show and hide the MvvmCross navigation bar.

var messenger = Mvx.Resolve<IMvxMessenger>();
navigationMenuToggleToken = messenger.SubscribeOnMainThread<ToggleFlyoutMenuMessage>(message => navigation.ToggleMenu());
navigationBarHiddenToken = messenger.SubscribeOnMainThread<NavigationBarHiddenMessage>(message => NavigationController.NavigationBarHidden = message.NavigationBarHidden);

One last item needs to be addressed in our HomeView, setting the size of the Views that will be shown in the FlyoutNavigationController.

public override void ViewWillAppear(bool animated)
{
        base.ViewWillAppear(animated);
        navigation.View.Frame = UIScreen.MainScreen.Bounds;
        navigation.View.Bounds = UIScreen.MainScreen.Bounds;
}

If we fail to set the FlyoutNavigationController View.Frame and View.Bounds the FlyoutNavigationController will draw all of our views at 2x the Frame size than they should be.

Our HomeView is now complete, let’s take a look at EnterTimeView.

EnterTimeView

The EnterTimeView is going to show the slide out menu button that when toggled will show the slide out menu, plus it will show another view, the AddHoursEntryView with a button on the upper right of the navigation bar. We’ll add two buttons to the navigation bar with delegates to send message back to the HomeView to perform these actions.

public override void ViewDidLoad()
{
        View = new UIView { BackgroundColor = UIColor.Blue };

        base.ViewDidLoad();
        Title = "Enter Time";
        NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Pause,
                                          (delegate
                                          {
                                           //message to show the menu
                                           var messenger = Mvx.Resolve<IMvxMessenger>();
                                           messenger.Publish(new ToggleFlyoutMenuMessage(this));
                                           }));
        NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add,
                                       (delegate
                                       {
                                       //hide MvvmCross navigation bar and show next view
                                       var messenger = Mvx.Resolve<IMvxMessenger>();
                                       messenger.Publish(new NavigationBarHiddenMessage(this, false));
                                       var viewmodel = ViewModel as EnterTimeViewModel;
                                       if (viewmodel != null) viewmodel.ShowFirstView();
                                       }));
}

AddHoursEntryView

Since we are showing the navigation bar for MvvmCross when we show AddHoursEntryView we need to send a message back to the HomeView to hide it again once AddHoursEntryView is dismissed by the user via the back button.

public override void ViewWillDisappear(bool animated)
{
        if (!NavigationController.ViewControllers.Contains(this))
        {
            // Back button was pressed.  We know this is true because self is no longer
            // in the navigation stack, hide MvvmCross&#039;s navigation menu
            var messenger = Mvx.Resolve<IMvxMessenger>();
            messenger.Publish(new NavigationBarHiddenMessage(this, true)); 
        }
        base.ViewWillDisappear(animated);
}

With this last step we have a working slide out menu in iOS that shares a common .Core solution with the Android project.

Conclusion

I have the warning about the iOS code smell because of the extra steps we need to take in the Views to toggle the menu and show/hide the MvvmCross navigation bar. I can’t place my finger on the exact code smell, the solution works…but to me just doesn’t feel “correct” in an Ivory Tower sort of way.

That being said, I believe the extra messaging is a small price to pay to use the FlyoutNavigation component without modification, and to have iOS and Android share a common .Core project.

Go grab the code and try it out, https://github.com/benhysell/V.FlyoutTest

Comments Off
Tags: , , , Categories: development

Goal Weight October 22, 2013

Just a quick post to announce I’m on the app store!

https://itunes.apple.com/us/app/goal-weight/id693001074

http://goallineapps.com/app/goal-weight/

 

Comments Off
Categories: Uncategorized

Are You an Athlete? February 9, 2010

Lord Stanley’s Cup

I grew up playing hockey.  My parents had me on the ice when I was two, and I have been playing ever since.  Growing up, winters were spent traveling every weekend throughout upstate New York, and weeknights were spent at practices in rinks that only had three solid walls, the forth being a tarp.

Summers were spent traveling from hockey camp to hockey camp, picking up new techniques, and learning edge control from a figure skating coach who emigrated from the USSR.  Once we were home in the summer my brother and I would break out the street hockey nets and start pickup games in front of our house.

It is safe to say hockey dominated my childhood.

The Transition

After high school I stopped playing competitively.  Now, twice a week I break out the equipment.  Pickup hockey is on Sunday night, and Tuesday is league night.  My league team won the championship last fall, yes I am a member of a championship team, a championship beer league team.

Transitioning from competitive hockey to a beer league can be jarring at first.  For one, no more contact.  The game completely changes when you know you are not going to be hit.  Secondly, the amount of ice I see in any given season is drastically less; there are no practices in a beer league.

There are a couple of upsides to playing in a beer league.  Since I know I’m not going to be hit anymore I participate in a lot more risky plays than I did in the past.  Fancy passes, dekes between the legs, having a little “fun” on the ice talking to the players on the other team, most of these things would have been a “no no” in competitive hockey.  Now, however, since nothing is really on the line every game is a fun game where I can go out and really enjoy playing for the sake of playing.

Plus, let’s not forget about the beer in the locker room after the game.  One really couldn’t call it a beer league if there wasn’t beer in the locker room after the game.

I’m not longer striving to be an athlete in hockey, but I am still out there enjoying the game I grew up playing.

The Athlete’s Mentality

Athlete’s practice day in day out, hit the gym, run on their off days, and are constantly preparing for their next game.  Beer league players pick up the equipment once or twice a week, enjoy a relaxing game, and get up the next morning and head into work.  For most of us we can no longer be athletes on the field, but we can each take our athletic mentality and apply it now where it counts the most, in the office.

Do you train and compete like an athlete in the office, or are you merely showing up, collecting a paycheck, and putting in a beer league performance?

To see if you are a beer leaguer or still working on making it to the pros ask yourself a few questions:

Do you read about your industry?

I feel reading is key to staying a head in software development, a topic I have touched on before in My Digital Reading List, http://benjaminhysell.com/archive/2009/01/my-digital-reading-list/.

  • Athletes read about their industry in their spare time.
  • Beer leaguers enjoy not knowing about what is happening outside of their cubical.

Do you try new techniques, software packages, and play with new hardware?

Our industry moves fast, staying on top of what others are doing, researching, and implementing is key to staying ahead of the curve.

  • Athletes are always playing with the latest and greatest, they know when to stay with what works, or jump to newer technologies.
  • Beer leaguers wait to be told what hardware and software they should use.

Do you try to learn about tools and techniques outside of your core field of competence?

There are a lot of other industries out there besides software development,

::I know I was shocked too when I heard this news, but there really is!::

…what can we learn from those industries and bring back to our own?  The restaurant industry has been working with and managing teams of people for decades, do they have tools or techniques we could then apply to software development?

  • Athletes learn about other industries outside of their own to learn from them, and see how they would fit in with their primary fields.
  • Beer leaguers have already found their set of tools and don’t want to know what others are doing.

One might not be able to “go pro” in their job, but who are you likely to want to hire, work with, start a startup with, given the chance?

Comments Off

Breaking Down the Game Film – Voting with Your Dollars February 2, 2010

“Breaking Down the Game Film” is a term commonly used to analyze tape from an already played sports game to dissect what went right and what went wrong.  In this series I’ll be taking published articles from around the web and break them down.

Topic: Voting with Your Dollars

Article: “Will Anyone Pay for Anything”

Author: Guy Kawasaki

Links: https://www.openforum.com/idea-hub/topics/the-world/article/will-anyone-pay-for-anything-guy-kawasaki and video http://www.building43.com/videos/2009/07/24/will-anyone-pay-for-anything/.

Guy’s article sums up the video nicely, but I highly suggest watching the video just so you can hear what the panelist say with your own ears.

In the event you are short on time, I’ll save you the click through to the article and the video and sum them both up here:

Guess what teenagers and twenty-somethings are willing to pay for online?

NOTHING!

There were only two services any of the panelists were willing to pay for:

  • Gmail
  • Xbox Live

Facebook, Twitter, YouTube…they won’t pay for any of them.  This panel never clicks on banner ads, and if any of the services started charging them money to use them they would move on to find a new service to meet their needs.

Millions of users, and Facebook might loose them all if they ever wanted to charge money.

That is scary.

It turns out developers of all ages are not too different, well, it appears we don’t click on ads at least, as Jeff Atwood laments, http://blog.stackoverflow.com/2009/11/our-amazon-advertising-experiment/,

If Stack Overflow, a site that does a million pageviews a day, can’t make enough from AdSense to pay even one person half time — and let me tell you, that’s being overly generous based on the actual income it generated — how does anyone make a decent living with AdSense?

Thus, teenagers, twenty-somethings, and developers don’t click on ads on the Internet.

I then asked myself two questions:

  1. How does anyone stay in business online?
  2. What would I pay for online if it wasn’t free?

Question one has a myriad of answers that I won’t dive into in this post.  With question two I spent a few minutes and came up with this list:

  • Gmail – Nope, I would put up my own email server if push came to shove.  I already have one on standby just in case.  Better safe than sorry, :-).
  • Xbox Live – This I do pay for, mainly because there is no alternative to play the Xbox online.
  • Facebook – Gone.
  • Twitter – Gone.
  • Flickr – I have already moved to Facebook.  See above for how I feel about paying for Facebook.
  • Stackoverflow – Tougher decision, however there are too many free alternatives out there to fill the void.  Right now when I Google a programming question I’m still finding plenty of links to non-Stackoverflow sites with very good answers.  Someday, but right now, it is a no.
  • Google Reader – Plenty of alternative RSS readers.
  • All of the feeds in my Google Reader – There isn’t a feed/website in my reader that I couldn’t live without.
  • Google – Would I pay for Google?  Again, there are too many free alternatives.

It would be painful to move, change, or lose any of these services/websites, but not painful enough to pay any amount to continue to use them.

Scary thought.

Or…

What happens in a world where no one pays for anything and you are the one person who will pay for something?

You might just get everything you ever wanted.

Look at the cartoon Family Guy, from our friends at Wikipedia:

Shortly after the third season of Family Guy aired in 2001, Fox canceled the series.  However, favorable DVD sales and high ratings for syndicated reruns convinced the network to renew the show in 2004.

http://en.wikipedia.org/wiki/Family_guy

Family Guy was dead in the water, with no hope to ever see the light of day again.  Then, something crazy happened.  People voted with their dollars, bought the DVDs like crazy, and watched all of the reruns over and over and over again.  Fox woke up, picked the series back up, and Family Guy is entering it’s 8th season.

I’ve decided to start “voting with my dollars” online by monetarily contributing to the following projects that create the plug-ins I use on my blog:

I also purchased an iPhone game I normally wouldn’t have, but I bought it based on the author’s excellent blog posts.  Check out Monkeys in Space from Streaming Colour: http://www.streamingcolour.com/blog/2009/09/22/monkeys-in-space-escape-to-banana-base-alpha/ and check out Owen Goss great iPhone development blog at http://www.streamingcolour.com/blog/.

It is my hope to continue to support developers and their projects by contributing to them on a regular basis to further their development.

Next time you find a project, blog, or application you really enjoy I urge you to support it.  By voting with your dollars we have a lot more power online than we realize to influence what survives and what withers.

It is time we all start voting with our dollars!

Comments (2)

Whose Brand are You Building? January 28, 2010

Towards the end of 2009 there were two great articles published by two of my favorite bloggers, Joel Spolsky from Fog Creek Software and David Heinemeier from 37signals.

Joel’s post wonders if growing your company too slowly means your company is bound to die:

http://www.inc.com/magazine/20091101/does-slow-growth-equal-slow-death.html?partner=fogcreek

David responds to Joel in his own post on his blog:

http://37signals.com/svn/posts/2002-bug-tracking-isnt-a-network-effect-business

Normally, I would save each one of these links and break them down in my series “Breaking Down the Game Film,” however, there was something else here in these two posts that I thought was more interesting than their primary messages.

Scroll to the bottom of each of the posts and look at the number of comments attached to each one.  I would venture to say there is more written in the comments than in the original posts.  I’ve seen this before, but there was something that really struck me oddly as I compared and contrasted these two articles.

The idea of commenting on an article on the Internet seems to be one of the founding principals of the Internet.  Take http://www.slashdot.org, for example, Slashdot is built around people commenting on articles posted all around the Internet.  I have never found this phenomenon of people wanting to comment on other people’s work too interesting before.  In fact I would spend a considerable amount of time reading each one of the comments, never posting mind you, but normally reading the majority of the opinions listed below the articles.

Then something happened, I completely stopped reading comments on other websites.

When I first stopped reading the comments I attributed it to a lack of time-who has the time to scroll through 120 comments for just one article?  After that personal revelation I haven’t given it too much thought, however, lately, after a year of maintaining a technical blog, I realized what my real issue is with comments, and it boils down to this, whose brand are you building?

::We have a blog title, J::

David Heinemeier could have just as easily added his comments below Joel’s article, but he didn’t, he brought the conversation to his own blog.  On 37signals David controls the content, and most importantly of all, he will be able to find his comments again if he ever wants to.  He has a collection of all of his content and thoughts in one location, building his own brand, and his company’s brand on his servers and under his logo.

His thoughts won’t disappear if the server Joel posted his article on ever crashes or that company goes out of business.  His brand is being built in a location he has ultimate control over, and he can assure it never goes away if he chooses to.

Jeff Atwood has covered this topic on his own blog, referring to people who provide content to websites as “digital sharecroppers”.  Jeff doesn’t call out people who comment on blog posts directly, but rather cites the larger trend of people supplying content to the Facebooks and YouTubes of the world: http://www.codinghorror.com/blog/archives/001295.html.

Ironically, below his post the comments are full with the people doing just what he suggests they shouldn’t.

I agree with Jeff that one should focus on building their own brand.  I’m not suggesting you don’t comment on what you read on the Internet, but rather, if you feel passionately about something you have read take that thought or idea and turn it into a post on your own website, expand upon the points made by the author, and strive to control your own brand.

Comments Off
Tags: Categories: blogging comments

Doing More With Less January 26, 2010

Did you know Dr. Seuss’ Green Eggs and Ham was written on a bet?  Neither did I, until I came across a collection of bronze statues of his characters at the Hotel del Coronado in San Diego, California.  I snapped this picture of a plaque next to the statue for Green Eggs and Ham.

A full tour of all of the statues can be found at http://www.drseussart.com/hotelgallery.html, sadly most of the plaques are not included in the picture tour.

If you can’t read the plaque in the picture, Wikipedia has you covered…

Bennett Cerf, Dr. Seuss’s publisher, wagered $50 that Seuss could not write a book using only fifty different words.[2][3] The bet came after Seuss completed The Cat in the Hat, which used 225 words.

http://en.wikipedia.org/wiki/Green_eggs_and_ham

Dr. Seuss created an American children’s classic on a bet where he was resource limited.  Dr. Seuss, in this instance, embodied the mantra of “doing more with less.”

This concept of “doing more with less” isn’t new in the field of computers, and is one of the mantras of 37signals.  A quick Google of 37signals more with less kicks up two great articles:

I’ll save you the trouble of a click through: “Less is More” implies that more is better. It’s not.  Less is less.  Less is just right.  Less is better.

I’ve tried this technique of “doing more with less” in how I manage my time and the tasks I would like to accomplish at home.  For example, before I would come home from work and have all the time in the world and a long list of things I would like to accomplish.  I would keep thinking to myself, “I’ll get to writing that blog post, or playing that new Xbox game, I have hours before I need to be in bed.”

The rub was since I thought I had hours upon hours of time on my hands I would wind up not focusing on any one particular task, get sucked into something on TV, and never accomplish anything.

Every morning I would wake up and ask myself, “Where did all of the time go?”

Thus, in an attempt to live the “less is more” mantra I have restricted the amount of time I allow myself to spend on any one given task at night.  I have restricted the amount of time I have to write, program, and play Xbox.  By restrict the amount of time I give myself to complete a task I actually spend my time more wisely, accomplishing more than if I just gave myself all of the time in the world.

::Well, I’ve been productive writing and programming, I’m not sure you can call my Xbox time “productive”.  However, now I actually finding myself playing my Xbox instead of it collecting dust under my TV.  Productive?  Microsoft might think so, my wife and dog are not so sure.::

The only thing keeping me from creating the next Green Eggs and Ham is to make a crazy bet with my publisher, which will happen, once I get a publisher.

Comments Off

Linchpin January 24, 2010

My name is Benjamin Hysell, and I’m proud to say I’m an artist.

I’m not sure I could have made that statement before reading Seth Godin’s new book Linchpin, but I am now proud to stand up and count myself as one of the many artist in the world.

Background

This past December Seth Godin put out a call on his website, http://sethgodin.typepad.com/seths_blog/2009/12/preview-copy-of-my-new-book.html, offering his readers the opportunity to obtain a review copy of his latest book, Linchpin, at his expense.  These books were not review copies that the publisher would have sent free to the press.  Seth mailed out the books on his dime to interested readers on one condition; Seth asked everyone who was interested in a book to make at least a $30 donation to the Acumen fund.  I went and checked the Acumen fund out and found something I liked:

Acumen Fund is a non-profit global venture fund that uses entrepreneurial approaches to solve the problems of global poverty. We seek to prove that small amounts of philanthropic capital, combined with large doses of business acumen, can build thriving enterprises that serve vast numbers of the poor. Our investments focus on delivering affordable, critical goods and services – like health, water, housing and energy – through innovative, market-oriented approaches.

http://www.acumenfund.org/about-us.html

I signed up, donated, and received my book just a few weeks ago.

::Seth posted on his blog a few days later…he raised over $108,000 for the Acumen Fund through this offer in less than 49 hours.  I’m not sure how many books he actually ended up sending out; as he states, some people gave more than $30, but needless to say, a lot of books were sent out into the world and I happen to have one of them.::

I have since read the book twice now, and on the second read through I was having trouble separating my progress bookmark from all of the other pages I bookmarked that I wanted to come back to for this review.

My Verdict

In the vein of many great artists I’m going to tell you how this review ends right at the beginning.  The last thing I want you, the reader, to do is to stress out and have to read a couple hundred words to figure out if I liked the book or not.

  • Go buy this book.
  • Read it twice.
  • Tell your friends.

I enjoy Seth’s blog on a daily basis, his posts are short and to the point, allowing me to digest his daily message quickly over my morning cup of coffee.

Seth’s precision as a writer is his greatest gift, and he has brought this gift to Linchpin by assembling themed chapters out of smaller, self-contained, individual thoughts.  These smaller individual thoughts, or “thought-lets”, within the chapters can completely stand on their own, giving one ample opportunity to bookmark them, and come back to them on a regular basis.  As you can see in the picture above, I bookmarked quite a few of his thought-lets.

Reading Linchpin was like consuming a shotgun blast of Seth’s blog posts, printed out, and bound for my reading pleasure.

The Wakeup Call

We have all seen the manufacturing jobs disappear and move overseas.  Seth argues manufacturing jobs were the easiest jobs to move because factory work is easy to describe, manuals can be easily created, and cheaper overseas labor is very easy to train.

Linchpin is a wakeup call to all of us doing white-collar work.  We may think our jobs can’t be replaced with cheaper labor, but it is already happening all around us.  Call centers are mostly overseas, programming jobs have been going to India, even lawyers are having their jobs shipped overseas.  Each one of these jobs have become commoditized, figured out, and moved overseas in the search for cheaper labor, and higher corporate profits.

The trend isn’t likely to stop.

Seth spends considerable time laying the groundwork for Linchpin by telling us how the world is, how we got to where we are, and where the world is likely going.  Seth then throws down the gauntlet by challenging us to become indispensable at our jobs by becoming artists.

The Artist Within

Seth argues the common thread between white and blue-collar jobs that have been moved overseas is they are all explainable, they can all be broken down into a “script” anyone could follow to complete the job.  Once a map is made on how to do a job, almost anyone can do it.

In Seth’s words, artist don’t follow a map, they create the map.

Artists can’t explain what they do.  Sure, artists write books on how to paint, but not what to paint.  Artist can’t be replaced, or if they can be replaced, it is very painful to the organization doing the replacing.  How can you replace something that you can’t explain, can’t follow, and can’t write a manual to describe what they do?

Seth asks, “What if we all were artists?  What if our workplaces were full of artists?”

He passionately argues that we can all be artists, that we have the choice to either follow a map and work ourselves out of a job, or we can choose to become very difficult to replace by becoming invaluable, by being artists.

I’m choosing in this review to focus on Seth’s idea that we should all choose to be artists, I will leave it to the reader to read Seth’s book to understand why we struggle as a species to make it happen.

What Does it Mean to be an Artist?

Several of the common artist themes Seth lays out in Linchpin are:

  • Art doesn’t mean you work with paint and canvas, artist create, regardless of medium.
  • Artist give gifts.
  • Artist produce output.

Paints, Pencils, and Watercolors

Seth argues art doesn’t have to be paint and canvas.  Seth points to several examples of famous artists who worked in the conventional “art” mediums and asks aloud what would they be doing today?  If the Internet was available to Shakespeare would he have still written his plays?  Would Picasso still have painted?  Would Shakespeare and Picasso team up for the next great Xbox game?

When asking yourself if you can become an artist, Seth challenges us to not confine ourselves to the classic definition of artist.  Seth points out excellent customer service is an art, an amazing chef is an artist, a business owner who can make a million dollars a year is an artist.

I can’t draw for beans, but I can organize a team of freshly minted developers to create a data management system that organizes 50 plus gigabytes of data a month.

I can’t mix primary colors to create just the right shade of orange to paint a sunset, but I know how to architect a bare bones iPhone alarm application.

I can’t play an instrument to save my life, but I write a pretty darn good blog about software, project management, and managing people.

I can’t do anything a classical artist can, but at Seth’s urging I consider myself an artist.

The Act of the Gift

It used to be people who gave the most gifts actually had the most power, not the people receiving the gifts.  Seth spends quite a bit of energy convincing us about the power of gifts.  He does this by exploring a few lengthy examples of the power of gifts in culture, and the bond the act of gift giving creates between people.

Seth states that giving away your art is a key step in becoming an artist.  Speaking up and sharing with the community, providing something without an expectation of compensation, the act of giving a true gift to others can not only enriches those who receive the gift, but giving can feed an inner human need that could never be bought with a paycheck.

I feed my inner desire to gift by writing this blog.  I write because I want to change how our industry operates.  When I publish an article I am not paid or compensated.  My payment is the thought that when others read this blog they think about the topics I choose to write about, and further interact with me in my comments.

“Real Artist Ship!”

Seth uses this famous Steve Jobs quote it to make a point, if you can “create art”, but not publish, you are not an artist.

I have been working on this book review for six hours, I have restarted it four different times, and if I don’t publish it what was all of this effort for?  Sure, I might have created something special and unique, but no one would ever know about it if I don’t hit the “publish” button on WordPress.

I can refactor and clean up this posting for the next two days, but if I don’t ship it out the door for the world to enjoy I have not created art.  The art only lives once it has left my MacBook Pro, otherwise all I have done is given my fingers a great keyboard workout.

The Choice is Yours and Yours Alone…Good luck.

Seth provides a very compelling argument in Linchpin hopefully causing us to step back, think about what we do on a daily basis, and hopefully decide to change from being cogs in the factory of white-collar work and transition to being artists.

Seth states we are all not artist all the time, but it is his hope in this book that we will all be inspired to try to up our artistry in our jobs and in our everyday lives.

Comments (6)

November Reading List November 24, 2009

Just last night I finished reading Zen and the Art of Motorcycle Maintenance, and decided it was high time to update My Bookshelf with what I’ve been reading lately.

Zen and the Art of Motorcycle Maintenance is not a breezy read, nor, sadly, does it have much to do with motorcycles or Zen.  I should have paid more attention to the authors note, which I’ve included here:

What follows is based on actual occurrences.  Although much has been changed for rhetorical purposes, it must be regarded in its essence as fact.  However, it should in no way be associated with that great body of factual information relating to orthodox Zen Buddhist practice.  It’s not very factual on motorcycles either.

That being said you will not be disappointed if you pick this book up.


Zen and the Art of Motorcycle Maintenance: An Inquiry into Values by Robert M. PirsigI’ve tried to summarize this book for a couple of people, and have come up woefully short in every attempt. A few of the key points that I did extract from Zen are:

  • Where do ideas come from?
  • What is Quality? Is it subjective, objective, or something else?
  • Does our system of education really teach people anything, or are people rewarded for actually not learning and regurgitating?

However, the one idea that I’ve run into a few different times, in a few different texts can best be summed up by a webcomic from xkcd:

Dad, where is Grandpa now?


Deadeye Dick: A Novel by Kurt ConnegutI have thoroughly enjoyed every Vonnegut book I have picked up thus far, and Deadeye Dick did not disappoint. I enjoy Vonnegut’s pacing, sense of humor, and overall style. In true Vonnegut style, around 50 pages in he tells you how the book is going to end…I always may know the destination, but I never know how he is going to take me there.

If you are also working your way through Vonnegut’s collective works do not skip past Deadeye Dick.


Rigged: The True Story of an Ivy League Kid Who Changed the World of Oil, from Wall Street to Dubai by Ben MezrichI have a thing with people named ‘Ben’…I’m sure its mostly me and not them, but I have a thing.

I have yet to met another person named ‘Ben’ that I liked.

It begs to be asked, if I ran into myself would I like me?

Think about the recursive loop that little meeting could spin into…

Or, or pickup Rigged by Ben Mezrich. This Ben might be one of the few I might enjoy if I were to ever meet him in real life.

You may or may not know Mezrich from his more widely known book 21: Bringing Down the House – Movie Tie-In: The Inside Story of Six M.I.T. Students Who Took Vegas for Millions.

::…if you haven’t had the chance to enjoy Bringing Down the House, Mezrich’s first widely known outing, skip the movie they based off his book and grab yourself an excellent Vegas thriller.::

Mezrich brings his signature storytelling style to his latest outing. Mezrich starts with an Ivy league grad seeking direction in his life and places him in the middle of dark underground world full of colorful people and larger than life events.

When I pickup a Mezrich book by this point I know the formula, I just don’t know what he will plug in for characters, locations, and main ‘event’. In Rigged we start with a recent Harvard Business School graduate, graduating into one of the worst job market for MBAs, the fall 2002. Take said graduate and introduce him to a powerful person, head of the NYMEX, inject a little oil trading, and let the fun commence!

Its not a bad formula…I’ve grown to enjoy it.

Comments Off
Tags: Categories: bookshelf

Auto Fail November 19, 2009

Lately I’ve been pondering, “Why is it that most people design the user interface last?”

It would seem, to me at least, if one were to design a product for the mass market, one would focus a lot of time and energy on how that product would be seen by that market.  What will it look like, how will it function in peoples’ hands, how will people interact with it.

Seems logical, if you want people to like your product they need to enjoy using it.  Spend a lot of time making that product enjoyable to use and people will love you.  If on the other hand, you make using your product painful, awkward, and hard people will tend to shy away from using your wares, and you can bet they will tell their friends about their horrible experience.

I was inspired for this posting on a recent trip to San Diego where we rented a nice economy car for the trip.  I snapped a few pictures of the car’s “user interface,” or inside, to share with you some of the pain I experienced on our trip.

I give you, auto fail.

Figure 1, the steering wheel from our rental car.

Steering Wheel

Figure 1. Steering Wheel on Our Rental Car

Seems to hold the function of most steering wheels, its round, it was fairly comfortable, as so much it wasn’t wrapped in barbed wire, and when I turned the steering wheel the car also turned…so far so good.

Let’s take a closer look at the two controls they deemed necessary to include on the left hand side of the steering wheel.

IMG_0297

Figure 2. Up-close and Personal With the Steering Wheel

Two buttons are included in Figure 2, they must be important, right?  I mean someone took the time to make a mold of the steering wheel and cut out those two buttons, then run wire all the way up the steering column to connect to these two very important buttons.

These two buttons control:

  • The information that is displayed on the dash, mpg, average speed, distance to empty.
  • A return button.  Honestly, I’m not sure what it actually returned from.

In most every car I have ever driven these buttons are replaced by a stalk that comes out of the dashboard, or they are on the end of the turn signal.  They are never given prominence of being placed on the steering wheel where so many more important buttons could go, like radio controls, cruise control, anything that could actually help me while I was driving!

And what type of great information did these two buttons deliver?

IMG_0299

Figure 3. Information Display on the Dash

You get the coolant temperature…

What am I going to do with the coolant temperature?  Is it going to change the way I am driving?  Should I shut off the AC?  Should I change a tire?  I have no idea what this piece of information on my dash serves me as I drive.

So far I have two buttons on this car that take up some prominent car real-estate, strike one.  On top of that these buttons show me information I can’t even do anything with, strike two.

Strike three comes in the form of the emergency brake.

Emergency Brake Usable

Figure 4.  The Emergency Brake

At first blush the emergency brake looks perfectly functional.  Figure 4 was taken with the armrest up.  Figure 5 is how the emergency brake is normally in the car.

IMG_0306

Figure 5.  Normal View of the Emergency Brake.

The emergency brake is completely covered by the armrest.  Every time I park I need to lift the arm rest to use the emergency brake.  Every time I want to start driving again I have to lower the arm rest to make it functional.  A fairly simple task, parking and then driving, complicated by constantly having to raise and then lower the arm rest to get to the piece of equipment I want to use.

If I owned this car it would drive me insane, (no pun intended), every time I went to use the car.

Needless to say I had a horrible experience driving this car and I’ve now told all my friends about it.

Comments Off