Sunday, August 28, 2016

Cloud Services: My thoughts (Part 2)

Some one responded to my discussion post wondering what is a better deal, paying for a software suite once or paying monthly and continuing to pay after you have paid the equivalent to cost of purchasing the software suite once.   They used Adobe as an example, and here is my responsive.

The big thing with paying monthly is that, as I mentioned, if I were to have bought the Master Collection when a new version comes out I have to purchase the next one, forking out another '2,600 USD'.  A new version of the Master Collection could come out every year, every other year, every three years, or whatever.

Before Software was released and the consumer bought the software, there weren't really any updates to the software, then the software companies started putting out updates that the user would have to download and install, then the software companies started automatically updating the software through the internet and there was less of a version system and more of the software update system that we are used to today.  With this new update system it makes more sense to pay monthly, it makes more sense to the user and to the company providing the software.

The point I am trying to get to is that instead of buying a brand new suite of software every time they come out with a new version, they pay for the product monthly and get all updates and newest versions when they come out.  so in a way they are saving money. 

a new suite of software comes out every other year cost 2600 USD that comes up to 6,500 for 5 years, so with what you said 'The current model lists a couple of ways to pay for the equivalent CC version with the cheapest coming out to just shy of 600 USD a year (Creative Cloud pricing and membership plans | Adobe Creative Cloud, n.d.). That means, within 5 years, I will have purchased a copy of the Master Collection - except that I will keep on paying for the CC suite. So which one is cheaper over the long term?'  I would say that by getting every update over the 5 years and automatically getting the new versions of the software, without paying a single lump sump is cheaper over the long term.

This is really a good play for the software companies as well,  having a product that costs soo much money up front makes it very hard for a lot of people to afford the software, this is what ultimately leads to people looking for bootleg copies of the software, this causes the company to lose money because they aren't being paid for their software.  The boot leg copies of the software might still be available with this model, but being able to pay a small amount per month encourages users to buy the product or at least use it on a monthly basis. Another thing about monthly payments is that if the user doesn't normally use the software but needs it for a month, they can purchase the software for a single monthly payment, this is very nice compared to what it used to be where a user would have to purchase the entire application if they wanted to use it, even if they were only going to use it once or twice, but being able to purchase a one month use for a small amount of money makes it more feasible for a user to actually purchase the software legally and then the company also makes more money because of the different market that would use the software for a single usage.

I think you can start to see the benefits for both the Company and the users more accurately now, Joel?

Better for the Customer because it is cheaper and their software is always up-to-date and their software is always the 'latest and greatest' that the company has to offer.

Better for the company because they have a more regular cash flow and a more loyal customer base.

Saturday, August 27, 2016

Cloud Services: My Thoughts (Part 1)

IDaaS and Saas

Identity as a service is super nice because it allows the administrators to maintain access to restricted areas all in one place.  Identity-as-a-Service is also nice because you can use it to give users access to certain cloud based applications, maintaining the usage of the applications on a per user basis gives an accurate record of what the company is using and what they are not using as far as Software-as-a-Service applications.   before SaaS, a company would have to purchase a number of licenses for the application and keep that list of license keys somewhere safe on their network so that the application could be installed and licensed appropriately, and then someone would have to make sure that the licenses were up to date and that each person that had the application installed on their machine actually had a valid license for their copy of the application.  That all seems daunting just typing it out.  but now we have Software-as-a-Service which allows the company to grant the authority for certain users to be able to install/use the application and then if the user actually uses the application, the company is charged for the usage of the application.  In this scenario, if the user doesn't install/use the application during that billing cycle the company is not charged for the usage(or lack thereof), there are no licenses to keep track of, and there is usually a nice way to keep track of the people using the application, so there is a nice way to audit the usage of applications. 

Another nice thing about Software-as-a-Service is the painless upgrades,  the software provider handles upgrading the software so you don't have to maintain the update schedules for the application, and if for some reason something goes wrong with the application's update, the software company already knows and works on a solution, this process is nearly seamless.  If there is a hot-fix for some reason all you need to do is refresh the application.

The biggest benefit I see for a company to switch to software-as-a-service is that in the past they would have had to buy a Company License to run certain types of server based applications on their machines or even regular applications they would buy a Company License and it would give them x amount of licenses, this wasn't very economical for some companies.  Let's say the company had 30 users that needed Application X and a company License gave them 25 application (licenses for 25 machines) if they wanted more they had to purchase another Company License because of the way that they are using the application this is the only option.  they would be wasting 20 licenses or wasting the money they spent on that company license.  With Software-as-a-Service the company pays per user using the application so they only pay for 30 people using the application,  if someone else needs to use the application, then they pay for one more "use" they would pay for 31 people using the application. 

this is really a no brainer for just about any company,  why pay for more electricity then you are actually using?  Why pay for 100,000 gallons of water when you have only used 20,000 gallons of water?  Why pay for 25 gallons of gas when you only pumped 15 gallons of gas into your car?  Same thing with the upgrades, only this is a little ahead of everything else because the second they release an upgrade to the application you get that upgrade, you get the better version of the application,  this would be comparable to someone upgrading your washer and dryer every time there was a breakthrough in saving energy that made your washer and dryer use less energy, only it happens for every washer and dryer that the company sold, instantaneously at the same time across all the units.

The Benefits of SaaS - Learn Why Software as a Service is the Future - salesforce.com. (n.d.). Retrieved August 27, 2016, from http://www.salesforce.com/saas/benefits-of-saas/

Sylos, M. (2013, September 18). Top five advantages of software as a service (SaaS) - Thoughts On Cloud. Retrieved August 27, 2016, from http://www.thoughtsoncloud.com/2013/09/top-five-advantages-of-software-as-a-service-saas/

Wednesday, May 18, 2016

What causes bugs?

I think that developers have a good handle on the idea of bugs in the code, but the thing that I want to focus on is informing other people, who are not developers, how bugs form.   If we can help others to realize how bugs can form we can eliminate the amount of communication that is wasted trying to explain where the bug came from or why it happened all of a sudden. 

We have all had those changes because of business requirements that everyone that isn't a developer blames for creating bugs until the next major change.  What "everyone that isn't a developer" doesn't realize is that there are other variables that play a major factor in the creation of software bugs.  

As technology increasingly gets better, faster, more convenient, etc. the list of things that directly affect your code increases greatly and there is probably a formula for it that follows the Fibonacci sequence or some other fun algorithm like that.

What "everyone" might not know is that an increase in traffic to a site or server can cause things to change on the server, or cause an admin to make changes that will adversely affect your code.  You will not be notified of these changes, whether they be from traffic flow or an admin. In the ideal world, you would know the second a change happens that is going to affect your code,  you can plan for these things and you might even have alerts set up to tell you when traffic increases to your site or application, but if an admin makes a change to a server or a setting on the server, you may never know until something goes wrong with your site or application, and you will be banging your head against the wall trying to figure out why all of a sudden this bug appears out of nowhere.

Another thing that can really throw a monkey wrench into your code is something that was meant to keep bugs away or increase security,  an update.  I am not talking about the ones that "everyone" is thinking of, like the updates that you (or someone in your team/company) have made to another part of the application,  this is what "everyone" immediately thinks broke the application when something isn't working the way it previously did, this is the major update that "everyone" blames bugs on.  I am talking about updates to operating systems, IE, Edge, Cortana, text readers, PDF readers, other browsers, just about anything that needs updating that has to do with some part of your application.

Something else that "everyone" doesn't realize affects your application is the hardware that it is run on, not just your user interface but also the data server, the web server, the application server, the whatever server.  This likely won't cause issues with your application, but it is a possibility that it could cause an issue. Sometimes when we are creating a site and we use certain frameworks, those frameworks rely on a certain hardware structure or a combination of hardware structure and software settings on that piece of hardware, so when the combinations are changed, there is sometimes a chance of it causing a bug in your application.  Let's say that there isn't a lot of memory usage on the server, so someone says hey let's dial back the memory on this server and use it somewhere else (the things you can do with Virtual Machines), now something that doesn't run all the time gets run and you get an out of memory exception, it didn't happen before, why is it happening now?  now you have to do one of two things, rewrite the code to use less memory for this one process, or convince the controlling party that you need X amount of memory on call.

Knowing that bugs happen and how they happen, helps you to prepare for them to happen and how to communicate what happened to who needs to know this bug happened.

So, what causes bugs?

EVERYTHING

Wednesday, April 6, 2016

Installing XNA for Visual Studio 2015

I was asked about installing XNA into Visual Studios 2015 because I noted that it was very simple and straightforward.

I knew that there were others like me who are still using XNA so I knew that a Google search would do plenty to help me find how to get my project working in VS2015 (community)

My search quickly brought up a a Stack Overflow answer that points to an updated post by MXA with the title "XNA 4.0 Refresh (Visual Studio 2015)", which was last updated in November of 2015.

This site gives you a single downloadable .zip file to download, and then instructions on what you need to do to install all the components necessary for installing the extension itself

Once you have unpacked the .zip file, just install the pieces one by one in the order given, they don't take long at all.

Before install extension:
  1. Install DirectX
  2. Install Xna Framework 4.0 Redistribution
  3. Install Xna Game Studio 4.0 Platform Tools
  4. Install Xna Game Studio 4.0 Shared
Once the last one finishes, just double click the extension and it will install it, and you are ready to roll.  

I wasn't paying complete attention to my computer while I was doing this, so I can't give you a good estimate about how long it really took.  the download was painfully slow because of the connection that I was on, but the installing the packages didn't seem to take very long at all. 

My Project was already created prior to installing XNA into VS2015, so I don't know how easy it is to get started or set up the different types of projects.  I look forward to doing some development in XNA though.


Windows/XboX/Windows Phone Game

With the recent Microsoft Build event showcasing a lot of mobile development and Gaming development, I really got to thinking about the game where I started with a basic tutorial and expanded the game play dramatically.  

Currently it is a 2D scroller type game, but it scrolls in all directions on a defined World(Space/Universe) map.  My goals up until now had been to further develop the 2D game with the final goal being to interpret it into a 3D game that would support online game play.  The more I thought about the game and the aspect of mobile development along with flying quadcopters I came up with the idea of creating an interactive game play where the user could control the player by turning or tilting the screen in order to turn the player piece.  I think this is a wonderful idea for the small game that I have so far and would make it very playable for the mobile platform.  my thoughts are that once I created the game for Windows phone that I could port it to the Android market immediately once I figured out the best way to do that.  

I haven't yet looked into porting to the Android devices but I don't think that it should be too difficult given that Xamarin is now free with Visual Studios and there is a current build of XNA for Visual Studios 2015 as well. 

Over the weekend I updated Visual Studios 2015 Community edition and installed the Xamarin portion, I also installed XNA into Visual Studios 2015 which was a lot easier than it had been in the past to install into other versions of Visual Studios.

I do have a lot of code to clean up, I keep trying to tell myself not to be so hard on myself, I did write the code many years ago and didn't know as much about coding standards and such as I do now.

I am also going to be looking into Azure for testing and hosting for the game itself.  I am not going to lie to you, but the main reason is because of the demo during build for Age of Ascent,  I was really impressed with what they showed there and the way that you can push out updates to the code to different servers that are all hosting the same game instance.  

I am looking forward to implementing some more code into my game and making it enjoyable for everyone. 

I am not so much of an Apple person, but I have also thrown around the idea of porting it to the iPhone market as well, but that is for another set of posts, I am sure there is going to be a lot going into that as well. 

Tuesday, March 29, 2016

Null-safe Dereference in C# 6.0

Wow, how did I make this far and not know about this?

I love these, although I am still unsure as to how clean they make the code, or if they are going to make me a lazy coder by using them as opposed to what I have been doing.

I came across the null dereference because I was reviewing some code on my favorite code review site, CodeReview.  The code is being used to track downloaded applications in a set of applications that are being downloaded at one time.


if (lastRuntimeDetails != null) //at least one application was already downloaded
    if (lastRuntimeDetails.Ip != runtimeDetails.Ip || 
        lastRuntimeDetails.Port != runtimeDetails.Port)
            _requestExecutor?.Disconnect();

As I was reviewing this code there was an awkward if statement that was nested without brackets (yuck) so that was my first line of business.  The objects that were being compared were being created from a custom class called RuntimeDetails, the first object that is created is called lastRuntimeDetails and is being used to track the last application to make sure that the same application doesn't get downloaded a second time and to keep track of the IP Address and Port for each download. 

Anyway, at first I wanted to get rid of the outer if statement, it looked to me like it was extraneous, at first I was thinking that if the properties were null that they just wouldn't be equal to each other and give a false value to the condition statement.  

Comments were made about Null Reference Exceptions and a lot of thought went into how to do this, I kept thinking about the null properties, and that's when I found Null Dereference Operator, so I set up some tests to make sure that I had a good grasp on things

I created two classes, one to create objects and the other to return comparisons on the objects



public class Class1
{
    public string One { get; set; }
    public string Two { get; set; }
    public Class1()
    {
    }
}

public static class Class2
{
    public static bool returnBoolean(Class1 inputA, Class1 inputB)
    {
        return (inputA?.One == inputB.One);
    }
    

    public static bool checkOnNullProperty(Class1 inputA, Class1 inputB)
    {
        return (inputA.One == inputB.One);
    }

}

and then I eventually came up with the following tests


[TestMethod]
public void TestMethod1()
{
    var input1 = new Class1() { One = "string" };
    var input2 = new Class1() { Two = "string B Two" };
    var test = Class2.returnBoolean(input1, input2);
    Assert.IsFalse(test);
}

[TestMethod]
public void TestMethod2()
{
    var input1 = new Class1() { One = "string" };
    var input2 = new Class1() { One = "string B Two" };
    var test = Class2.returnBoolean(input1, input2);
    Assert.IsFalse(test);
}

[TestMethod]
public void TestMethod3()
{
    var input1 = new Class1() { One = "string" };
    var input2 = new Class1() { One = "string" };
    var test = Class2.returnBoolean(input1, input2);
    Assert.IsTrue(test);
}

[TestMethod]
[ExpectedException(typeof(NullReferenceException))]
public void TestMethod4()
{
    var input1 = new Class1() { One = "string" };
    Class1 input2 = null;
    var test = Class2.returnBoolean(input1, input2);
    Assert.IsFalse(test);
}

[TestMethod]
[ExpectedException(typeof(NullReferenceException))]
public void TestMethod5()
{
    var input1 = new Class1() { One = "string" };
    Class1 input2 = null;
    var test = Class2.checkOnNullProperty(input1, input2);
    Assert.IsFalse(test);
}

[TestMethod]
[ExpectedException(typeof(NullReferenceException))]
public void TestMethod6()
{
    Class1 input1 = null;
    Class1 input2 = new Class1() { One = "string" };
    var test = Class2.checkOnNullProperty(input1, input2);
    Assert.IsFalse(test);
}

Someone pointed out that if the object itself is null it will throw a Null Reference Exception, once they said that I looked at the code again and sure enough the container was created but no object was placed inside of it.


 RuntimeDetails lastRuntimeDetails = null;

So my initial thought of removing that outer if statement was wrong, but now I had new information that could be used to make sure that the Properties didn't throw a Null Reference Exception if the object was created but the property were null.

So here is the code that I suggested to replace the original code.


if (lastRuntimeDetails != null)
{
    if (lastRuntimeDetails?.Ip != runtimeDetails?.Ip ||
        lastRuntimeDetails?.Port != runtimeDetails?.Port)
    {
        _requestExecutor?.Disconnect();
    }
}

The object could be created with null properties now and then we could remove the outer if statement entirely.  I believe that the better solution is to set the properties on creation to some default and then when they are assigned they will be different from the default so the comparison could be made without the need to check for nulls thus removing the chance that future development would have to worry about checking for nulls.  or that the initial creation of the object, instead of being set the object to a null object, we create the object with null properties and then if the object's properties are null then they will give a false when compared to anything other than null (using the Dereference)

The Code Review Question in Question

and

My Answer

Thursday, March 24, 2016

Which Coding Languages should I learn?

I read a couple of articles this morning,

1. I’m gonna puke if you compare Angular to React again; here's why!
2. Which Tech Should You Learn Now?

From the tone of these two articles it seems that JavaScript isn't going anywhere any time soon.  Another thing that I picked up from the second article is that developers with AngularJS or ReactJS experience/knowledge, on average, earn more money.  The second article also says that you should learn React (and Node) first because it is becoming more and more popular, in other words if you have the choice learn React (and Node) first then learn Angular, the article bases this on statistics given by Stack Overflow's Developer Survey and last year's JavaScript Scene Survey.

So, given that information, I am going to take it and mix it into my list.

Recall my list:
  • AngularJS
  • Ruby
  • Python
  • Java
  • C#/VB/.NET (better working knowledge)
  • JavaScript (better working knowledge)
  • Other JavaScript frameworks
  • BootStrap
  • CSS3
  • HTML5
  • BASIC
  • ALGOL
  • KTurtle
  • Programming Logic
  • Programming Design
  • BootStrap
  • CSS3
  • HTML5

I don't want to get too burned out on JavaScript Learning, so I am going to season my list with JavaScript and move some things around, maybe see if I can confuse myself between using semi-colons and not using semi-colons.

  • AngularJS
  • Ruby
  • Python
  • ReactJS
  • NodeJS
  • Java
  • KTurtle
  • F#
  • BASIC
  • Scala
  • ALGOL
then I could mix in some intermediate/advanced learning of all the stuff that I already know

  • HTML5
  • CSS3
  • BootStrap
  • C#
  • VB
  • VBA 
  • JavaScript
Season these lists with Logic and Design reading as well, also various programmer's blogs as well.

Am I missing anything?  

Should I change the order of my list for some reason?

Please feel free to comment below.