Tuesday, November 13, 2018

Sql Server Cursor

I had to write a sql server cursor.  I tend to put things into my blog so that I can keep them around for my own memory.  Here is one that I wrote:
begin
Declare @TournamentId bigint, @token uniqueidentifier
declare tourncursor cursor for select Tournamentid from Tournament where Token is null
open tourncursor
fetch next from  tourncursor into @TournamentId
while @@fetch_status = 0
begin
update Tournament set token = NEWID() where Tournamentid = @Tournamentid
fetch next from  tourncursor into @tournamentid

end
close tourncursor
deallocate tourncursor
end

Sunday, October 28, 2018

Why did Sears (and other established companies) Fail?

This isn’t just a sears problem, but seems to be a problem across the board with many companies, not all, but many.
The issue is that companies find something successful and they start to grow. They can get really big. For example, sears at one time was the largest retailer in the US, much bigger than Walmart. Then the founders, and those that are associated with the initial growth move on. It could be old age, wanting new challenges, whatever. Who fills in the spots? It’s not people with the same type of thinking. It’s typically MBAs and people that are accountants, or at least lean that way. The result is typically that growth grinds to a halt. These people try to optimize the business. In the really old days, this was called Morganization, after JP Morgan. Many times this means trying to sell and do things for no other reason than for trying to increase profit margins. When these people win, and shareholders always love these stories, sales start to fall. Why? Because customers tend to not buy on price, but on value. When the value of the product falls, they tend not to buy. Customers want more value for less money. Not less value for the same money.
AT the same time, other companies find out things and give these features to customers. The market place tends to change. If you don’t change with the marketplace, you end up with problems.
Big companies tend to have problems with innovation. Not only is there the Morganization going on, but there is the general problem of innovation in a large company. Sustaining innovation is hard. The finance department and hr tend to be against innovation. The finance department is about controlling costs. Hr is about hiring for known jobs. Both are really hard to do under innovation. In many companies, the hr and finance departments win this battle.
It wasn’t just sears. GM, Chrysler, and ford have this problem. Many retailers have this problem. Ibm is on this trail. It is much more common than people think.

Saturday, July 7, 2018

Making your Golf Charity Scramble Memorable


You really want to make your charity/foundation golf scramble a memorable experience.  You want people to come back year after year.  You want to expose your sponsors to people in more ways. You want your golfers to clear the golf course as quickly as possible.  Your golfers have lives.  Sure, they love talking a bit after golf, but they don't like waiting around 90 minutes for the scores to be tallied.  You and your staff of volunteers have been at the golf course since 6:30 am.  They are hot.  They are tired.  They want to go home.  The golf pro staff is human.  They make mistakes.  They have been at the course for many hours.  They are hot and tired as well.  They really don't want to then spend the next 90 minutes chasing down scorecards and then having to total them up.     And when there are ties, they aren't looking forward to going through the work of the USGA tie breaking system. 

What you need, is the Tournament Director Scramble application to make your event truly memorable.  Here is a video of this at the Boys & Girls Club Phillip Fulmer event.  Watch the video as the players input their scores on the course in real time.  Your sponsors get full attention on the scoreboard.  Sponsor logos are displayed prominently in the header.  Each reload of the screen results in a new sponsor being displayed.  The scoreboard updates after each hole.  Ties are broken via the USGA recommended tie breaking algorithm.  Now, there is no fuss in getting this done.  Everything is handled automatically.

Tournament Director, LLC software is available on a subscription basis as well as on a per event basis.  Please contact us via our website.

Thursday, July 5, 2018

Stableford Real Time Scoring


We revamped our scoring for a golf stableford scoring system.  The problem with Stableford is that it is in general hard to figure out during a round how your team is doing in relation to your quota.  The scoreboard is fast and shows the scores as well as your position within the event relative to your quota.  The performance is also lightening fast.  check out the video.  This shows the display of the scores over each hole per group and the scoring is updated per the USGA guidelines for tie breaking.  I'm quite proud of this.

Monday, June 25, 2018

Night Golf - Video, Commentary, Scores and a Lot of Fun

We recently had night golf at our club.  Night golf is played as a scramble at our club.  We started about 9:30 pm or so and our group finished about 11:30 pm.  It was great fun.  The tees, the golf holes, the flags, and the golf carts are illuminated.  There is a lot of laughing at each other.  It is much harder to hit a golf ball when it is dark with no light than you think.

Here are a few things to high light in our application:
  • Because the scoreboard is on the web, you can send links to any one that you want to.  Your family at home can see the scoreboard.  Fyi, my family loves it because they can watch the team my son is on and their scores.
  • The video.  Even thought it was dark, it is possible to watch the golf ball in the air due to the golf ball being lit.  We have some great videos from that night.  One is Alan White's ball ending up about a foot from the hole on the third hole.
  • Pictures.  
  • Player commentary.  I'm not saying it is trash talk, but there is the ability to make comments from within the app and the commentary is displayed on the scoreboard and for other players to see.
This is definitely something that you want on your course and your club.  Contact me to see how to license Tournament Director for your golfing fun at your club.  


Monday, June 4, 2018

Multi-Round Stroke Play Golf with Markers, Rulings, Video, Photos, and Commentary

This past weekend, our golf course had it's Medal Play Championship.  It was a two round event (Saturday and Sunday June 2nd and 3rd, 2018).  The inclusion of our application gives the event a real high level experience not only for those that are playing, but for course members that are at home.  This is a first rate experience for everyone.

Markers

Markers are an important part of golf.  "A 'marker' is one who is appointed by the Committee to record a competitor’s score in stroke play. He may be a fellow-competitor. He is not a referee."
a. Recording Scores
After each hole the marker should check the score with the competitor and record it. On completion of the round the marker must sign the score card and hand it to the competitor. If more than one marker records the scores, each must sign for the part for which he is responsible.
b. Signing and Returning Score Card
After completion of the round, the competitor should check his score for each hole and settle any doubtful points with the Committee. He must ensure that the marker or markers have signed the score card, sign the score card himself and return it to the Committee as soon as possible.
But what happens where there is a conflict between what the player thinks that they scored and what the marker thinks that they scored?  You shouldn't have to wait until the end of the round.  These should be checked at the moment that they occur. When a player and their marker disagree on the score a player enters, our application
  • Lets the player and his marker know that there is a disagreement in scores.
  • Detects the difference via a report in our system. The golf pro staff does not want to disqualify a course member unless it is absolutely required. Instead, the pro staff would prefer to let the players know that there is an issue and let them resolve the issue before a dq becomes necessary.
  • Displays the difference when a user attempts to sign our electronic signature application.
The last thing anyone wants is to be disqualified because of a simple misunderstanding between the player and their marker.

Media

The following is our basic summary screen.  It shows the players, ordered by their current score relative to par for the event.  Their name is shown, their place in the event, their score for today, how many holes that they have played today, their current total score, and finally what hole that they are on.  Please note that the hole that they are on and how many holes that they have played can be different.

So, this is all well and good, but what about commentary?  I dog food everything in our service.  That means I am out there.  I spent two years at our golf course every weekend in 2015 & 2016.  I know how nearly all golf events are run.  I did this to make sure that our customers are successful.  There's no throwing the software into the app store and saying "Good Luck" from me.  The commentary, photos, and video are me testing everything out.  I have a TD Media app that I have created.  This app allows for a club member or golf staff to enter comments, pictures, or videos into our service.  These are shown right below the score of an event.  The comments, pictures, and videos are available to every event.  Comments & pictures are available on every scoreboard (yes, we do have words that are not allowed).

Video

Video is available for those that are not at the golf course watching, or can be for watching these events afterwards.  Here are all of the videos in the event.  In this top level video, it is Ryan Greer making the final birdie on 18 to finish at -4 for the event, and win.  The videos are available from a PC as well as a mobile device.


From a PC standpoint, you can get some better detail.  For example, I've captured Ryan's shot from the bunker on 11 to 4-5 feet.  On a PC in full screen mode, you can watch the ball and see it stop right up at the hole.

Reception

I love our golf pro and I love my fellow players, but sometimes, the reception is funny to see.  On the first tee, I'm talking with our pro.  I mentioned several of these new features (they aren't really new, just not sure he had heard about them).  He says he's not sure about the comments or the video and didn't want people using their phones like this on the course.  After the two of us were watching the last group for about 5 holes, he says something about "It would be great if people could make comments and stop people from making overly rude comments. And what about a staff member adding in some video while on the course?  What about some pictures?"  We had a good laugh.  I showed him the video, comments, and pictures I had already put on the scoreboard.  Once I had more of a chance to explain what I had done, he was really positive on this.  As we got to the back nine and people started seeing the scoreboard, the response was even more positive.  Everybody really loved the feature set.

Your Course

What about your course?  Just contact me, and let's talk about we can add this to your course, raise the value to your club members.  Our office phone number is 865.693.3004.  Lets take care of your course and improve the quality of golf at your course.

Monday, April 9, 2018

Stockholm Syndrome of Software

I've talked about how customers get so attached to failed code, trying to save some form of cost from a failed software project and unwilling to part with the disaster, that I've come up with a term for it.  I refer to it as the "Stockholm Syndrome of Software."  The basic idea is that customers get so attached to failed software projects, they will try to do anything to save the investment, including trying to sprinkle a new software project with failed pieces of software.

It is understandable.  On the surface, this makes sense.  Surely somewhere in this pile of code, there is something that it makes sense to keep. Or, another view of it is that we, the company, can just throw out the old developers, bring some newer/better developers in to solve our problems.  These new developers, all they need to do is to cut the head off of a live chicken, perform a voodoo dance around a keyboard, presto changeo, and we have a fully running system.

This is a nightmare.  The code failed for a reason.  If the previous set of developers didn't know what they were doing, why do you think the architecture that they started is worth a damn?  Why run on top of the old software?  Why would you want to infect good code with bad?

Sorry folks, software that doesn't work and never reached the level of being acceptable for use by being deployed is not really suitable for use.  Instead of spending good money on top of bad and trying to keep software on life support that should be shot, go ahead and admit that the software is a sunk cost.  Throw the non working code away.  Get a set of developers that are trustworthy and can deliver.  Don't micromanage them.  Don't tell them to just put a few tweaks on the non working code.  Don't cling to the old code, trust me, you will be better off.

I find that this problem is rampant.  Everyone thinks that they can save a few bucks by going the cheap route.  The cheap route doesn't tend to work.  The cheap route costs more with software that doesn't quite work.  It fails in weird places.  It craps out with 5 users.  It does all the wrong stuff at the wrong time.  Trust me, you are better off without cheap, crappy code.  Let it go, and do it right.

Monday, April 2, 2018

Sound in Xamarin Forms

Do you want to add some sound into your Xamarin Forms apps? 

We all know how to enjoy audio and video on our phones, tablets and computers. We click on a link or button and the screen is typically taken over as some video shows up and the accompanying audio begins to play.

For Xamarin.Forms mobile developers, a related issue that might come up is how to play some audio to provide a sound effect in an app, and specifically how would you play it in response to something like a button press.

In this article, I'll look at exactly that: how to play audio in the background when the user touches/clicks on a button.

Sunday, March 11, 2018

In Depth App-to-Market: The Business of Risk


Description: Your life isn't like the movies. In the real world even the best ideas can fail spectacularly if the risks aren't managed. It's time we talk about risk and what it can mean for success or failure of your app.  
Remember that scene in Risky Business where Tom Cruise stays upright as he slides across the floor in socks and tighty-whities, lip-syncing Bob Seger? In the alternative universe, sometimes he slips and falls. Some startups will slide through and succeed, and others might just land with a thud. That's real life.
Whether you're a developer taking your first step or a seasoned veteran of dozens of startups: Taking your idea from app to market is risky business. That's the subject of this ongoing series: How technologists take on risk in their startups and how risk affects your business.

What is Risk?

Risk is a term that gets thrown around a lot, but what does this mean?  The general definition of risk is the potential to lose something that has value, or to have a decrease in the value of something. 
Discussions of risk tend to be very subjective.  What is risk to one person, might not be considered risk to someone else.  I have also seen risk defined as anything associated with an unknown – it was a popular way of defining it when I worked at The Coca-Cola Company in Atlanta.  In fact, TCCC would pay extra just to remove risk.  I saw many things that were about the elimination of any risk no matter how small.“It’s not real money, it’s Coca-Cola money, so we should do this," is how my boss there would justify it. "It eliminates risk.” 
That's the thing: Completely eliminating risk can be very expensive. If you are at a large company and have money that is not yours, that may be okay.  But most startups don't have the resources of a large company like TCCC, and we definitely don’t have the money to completely eliminate risk. There is typically a tradeoff with risk of money and/or value. Taking the appropriate risks can result in the creation of value or at least some type of savings.  Startups can easily create value, as well as cost saving, by knowing when to take risks.  Let’s look at several types of risk that are commonly found in startups/business.

Angels and Venture Capitalists

The world of angels and VCs tends to be filled with risk.  Look at most of the financial news and you'll see lots of angels and VCs  making a lot of investments, but very few get reported on as being successes.  Why would anyone want to get into that world?  It just makes no sense.  However, by managing that risk, success can be found.  Let’s look at these investments by the numbers:
Let’s start with the assumption that the angel/VC is not a fool and does not just throw their money away in bad investments.  Assume that the angel/VC can get a 10 percent success rate.  Ten percent of the investments rest in a successful company, and 10 percent of their investments will lead to a successful exit.  That means that a single investment is unsuccessful 90 percent of the time.
To keep the numbers simple, let’s assume that the angel/VC makes 10 investments.  This means that .9010 is the probability of complete failure.  This equates to roughly 34.8 percent, and so this means that there is a roughly 35 percent chance that nothing will be successful.  This is a worst-case scenario.  And guess what? It is a bit worse than it appears.  For a technology startup, the results are typically either win big or get nothing.  Any software that is written is not typically salvageable.  This is different from something like a real estate investment where if the investment does not work out, there is typically some land or a building that can be worked with. 
From a mathematical standpoint, the surest way to success is to continually invest in companies.  Each investment will knock down the probability of total failure.  This goes along with the view in the investing world that the surest way to success is deal flow.  The more investments that an angel/VC makes, the higher the probability there will be some number of paybacks.  Increasing the number of their investments reduces their risk and tends to increase their income.  From the standpoint of math, this makes sense.  When it is your money, it is a different scenario, and you can be a bit gun shy to continually toss money into what looks to be a losing set of investments.
Let’s assume that an angel/VC is making 10 investments of $50,000 each.  This means that there has been a total investment of $500,000.
Investments tend to have a return distribution where one out of 10 is a great return.  A great return for an early-stage investment would be something like a 40x return.  A couple of them are good investments that return three times the investment, and the rest are dogs that return nothing, like this:
$50k x 40 = $2 million return
$50k x 3 x 2 = $300k return
A total return of $2.3 million
The numbers can change depending on the situation.  For example, if there is only a one-in-20 chance of making a great return, then the projected return would be $1.3 million.
In looking at the numbers, the only thing that really matters are the big winners.  The small wins just don’t matter that much.  This is the reason why angels/VCs chase what are called "unicorns."  The big returns (unicorns) make an investment fund work.  This is one of the counterintuitive things about investments.  Good wins, where you return 2x, don’t tend to matter.  For the VC system to work, you have to have big wins.
Over the course of a VC fund, it is looking to make multiple investments in a company  If a series A was made by a fund on day 1, then several years later, it is looking to make a follow on investment.  If a VC doesn’t make a follow on investment, that tends to look bad to other potential investors.  The VC will need to keep some money in the fund for those follow on investments.
So, let’s analyze this series of investments.  These returns sound great until the time value of money is factored into this.  With the time value of money, a dollar today tends to be worth less than a dollar tomorrow.  This is due to inflation and the fact that there are other investments out there. 
Angels and early stage VCs tend to have a long time from investment to a return.  As of late 2015, the time frame for a payback can be as much as 8-to-10 years.  Assuming that there is an average 10-year timeframe to get money back, it depends on the options if this is a good investment or not.  Assuming a 7 percent return in a relatively safe investment vehicle, an investment of $500,000 would become $983,000 over the same timeframe.  The investment roughly doubles, the money is much more available, and the investment tends to be safer. 
If there is a big winner out there, an angel/VC can be a big winner.  If there are no big home runs in the investment portfolio, the fund will be a loser.  Remember at the beginning, there is a 35 percent chance of having no return in a series of ten investments. 
So, which makes more sense for an investor?  High tech investors will understand these probabilities.  However, I have watched investors -- who did not understand technology investments -- put $25 million into technology investments and come out with nothing. I wish I had gotten in on receiving that money.  The investors wish that they had made other investments now in the aftermath.  I’ve also watched others make this work, because they understood the risk and how to manage it. 
A word of warning: Just because someone dresses nice and is in a pseudo-government position, it does not mean that they understand technology investments.  But let's move on…
How can you work better knowing this?  The key to you and your startup is to show the angel/VC community that you can be the next big winner for their investment.

Software Choices – Technology Risk

While technology choices don’t matter a lot to the success of a startup, there are some choices that do matter.  One of the goals in a startup should be to eliminate as much technology risk as possible.  What is technology risk?  Tech risk is often thought to be any type of risk associated with the technology.  This could be one of several issues including:
·       The technology does not get supported long term.  An example of this is Silverlight in the area of cross platform software web development.  Silverlight looked really great in 2007 in all the demoes that were done showing off cross platform development.  Unfortunately, the technology landscape changed with mobile (iPhone and Android).  With no ability to get on mobile devices, the technology languished and finally died by 2012.
·       Developers that want to look cool by doing something different.  It may seem that it is “micro management” to define the libraries that are allowed to be used.  Unfortunately, developers tend to think of solving problems now, and don’t necessarily look at the tools that will be there long term.  For example, I was working for a startup once.  We needed to do some HTML dom manipulation.  Even in 2007/8, it was clear that jQuery was the solution for this.  No, somebody else wanted to use a library called Scriptaculous.  Why?  Because jQuery was too popular.  A little bit of thought and it was obvious that Scriptaculous was a loser and that jQuery was going to win.
·       Just adding libraries -- with, at best, questionable benefits -- to a project because it is cool or innovative is not acceptable. One can easily find the various code repositories rife with cutting edge or nifty open source libraries that have been abandoned or not updated in the last 5 to 8 years.  So, just because a library saves developers a couple of lines of code doesn’t mean that that library should be added to your project. When you add a library, choose the most popular one, not the fourth-most popular one.  The key in such a scenario is not to add libraries because you want to explore a library; instead, use more common libraries with lots of community support and momentum in the marketplace.  Even then, common libraries can still be dangerous if support for them stops -- I’ve seen that happen, too. And then what happens when you need to upgrade libraries? So, use as few external libraries as possible and when you must go outside of what is provided “in the box” be very careful with your choices. 
·       I often see code written that tries to take advantage of some new or little known feature of a language/platform.  Unfortunately, trying to be clever often leads to more problems than it solves.  While the person who wrote the code will think that it is great and is obvious to everyone else, the reality is often quite different.  If you have your startup poised to launch with some code written using some unknown feature of a framework, what happens when someone else has to take over that code?  Is it going to be clear to them?  Code should be written with a thought that someone else needs to come behind you to make it work, fix a bug, add a feature, or something else.  Code not written with this in mind may see delayed bug fixes, delayed features, or a need for a possible rewrite depending on the nature of what was originally done.   Bottom line: Your code needs to be as simple as possible to solve a problem.
I know it now sounds like I have said that you should not do anything new, try any new library, or do anything besides use what comes in some software installation package. But that's not what I'm implying at all.  If something is needed, then clearly use it.  However, you must understand the choices that you make. It all comes back to risk.
·       How do you minimize/eliminate Technology Risk?  There is always risk out there with everything.  However, the keys to minimizing Technology Risk are:Build your Minimum Viable Product.
·       Add features to your MVP.
·       Be careful with the technology choices that you make.
·       Iterate, iterate, iterate.
·       Keep talking to users.

What About New Choices?

New choices are an interesting thing.  They don’t have track records.  They are by definition new, do not have a community behind them, and do not have any type of track record of success.  How is a developer going to determine what the best mechanism to go forward is?  I’d like to share my views on what I chose to do with two products that came out within a year of each other with the idea that this might help you in choosing what to do in a situation going forward.  Hopefully looking at the decisions that were made will help you make the right decisions and reduce risk in the future for you:
·       Silverlight.  One of the problems of cross-platform libraries is that they have to provide native device features.  Users expect that applications built with a tool will take advantage of all of the features of that platform.  For Silverlight to be successful, it had to have full platform support in various operating systems, including Windows, Mac, and the up and coming mobile platforms of the iPhone and Android. 
My concerns on Silverlight were that it did not seem to have the ability to reach beyond the Microsoft community.  Apple was already making noise that browser plugins were not going to happen in their war on Flash.  How would Silverlight be any different?  Silverlight lacked support from platform vendors outside of Microsoft.  Neither Apple nor Google were going to be involved. Silverlight also presented a non-native UI when it ran outside of the browser.  For these reasons, I did not invest a lot of my time in it beyond customer requests.  That was a good non-investment and blind luck for me.
·       Xamarin.iOS/Monotouch.  While Xamarin.iOS’ success today is obvious, it was not necessarily obvious in 2009 under the wing of Novell.  It was clear that I could write native apps that looked, smelled, and tasted just like every other iOS app back then.  These apps were downloaded by users from the Apple iOS App Store just like every other app.  These apps used what are called native APIs.  A UITableViewController in ObjectiveC looked, smelled, and tasted just like a UITableViewController in Xamarin.  The only difference is that between a developer’s code and the underlying UITableViewController is a C# callable layer and somewhere in there is the Mono/.NET Framework.  The key is that for the users there was no visible difference between an application written with Xamarin.iOS and an application written in ObjectiveC/Swift.  From a user standpoint, there is no difference.  For the users, there was no user risk. 
For the developer, there was a certain degree of risk.  Apple could disallow apps not written in their tools which might have happened due to a one time misunderstanding in the language in Apple’s developer SDK.  Something could happen to Novell, which did happen but got cleaned up.  Any of these issues could have required a developer/company to rewrite the app and to lose some amount of money/value due to this rewrite.  Thankfully, all’s well that ends well.  Xamarin has been going well for the last 4+ years out on its own growing and becoming a better tool each and every day.  Finally in early 2016, Microsoft purchased Xamarin.  This definitely eliminates risk.
What’s the advantage to taking on this risk of using Xamarin?  There are several.  You don’t have to learn a new language or IDE.  This saves significant time.  For me personally, this was months saved in the learning process.  There is no need to switch between languages, which also saves time when development is happening.  With the advent of Xamarin.Android, I can now design my application for iOS, properly segment it, and be on my way to already having an Android application and vice versa.  This was a good (and lucky) choice that I made, and it has resulted in payback.
Note:  I’m not trying to say that I am clairvoyant or brilliant.  I’m just going back through two major decisions I went through in the 2008 – 2011 timeframe.  I have some less than stellar decisions also in my past.
·       To be more general in all of this, the question of risk associated with building web applications with <>.  Tools built on standards tend to not have much user risk associated with them.  Users won’t be able to tell the difference between an app generated with PHP, Ruby on Rails, Node, ASP.NET MVC, or any other framework.  These tools and frameworks don’t have much risk of going away either.  What happens when you are looking at a new tool?  That’s where the problems can come in.  Using a new framework depends on a number of factors and there is no one choice that will eliminate risk.  There are valid reasons to go with something new that depend on your specific situation.

Summary

Risk is all around you.  Your investors and project managers have to deal with risk every day.  For investors, risk can affect their choice as to whether or not to invest.  Project Managers can look at this risk regarding what platforms they choose to use.  Developers also have to deal with risk in the choices that they make.  You need to understand the risk that you are involved with, so that you can properly manage the risk in your given situation.  Good luck with the choices that you make and how they affect your startup.