Posts
415
Comments
233
Trackbacks
42
Wednesday, October 1, 2014
Teaching Old Dogs New Tricks

Backyard20140918 (9)_1

Old developers can easily get set in their ways especially if they work in one environment for a dozen years or more.  So how do you overcome the “that is the way it has always been done” mentality that sets in?

The first thing you have to do is be patient.  Don’t try to force them to change all at once.  Too much change at one time can be a shock to anyone’s system.  Gradually introduce new ideas and new techniques. 

The next thing you need to do is to make sure that you demonstrate examples and explain how the changes will benefit them in their daily work.  One of the main resistance points is that people don’t understand why change is needed.  If they can see the payoff they can more easily make the transition.

The most important thing you can do though is get management’s support.  This does a couple of things.  First it gives you a fall back when you encounter resistance.  Secondly it relieves the existing developers of the mental responsibility for old habits.  They are just doing what is expected of them.

Even with all this said thing aren’t likely to be smooth sailing, but at least you will have a fighting chance.

Posted On Wednesday, October 1, 2014 10:08 AM | Comments (0)
Friday, August 1, 2014
Getting Started With WiX

WiXLogo

Up until this week I had not even heard of WiX (Windows Installer XML Tools).  As with most open source projects I found myself spending a large amount of time trying to find resources to explain how to use this tool.  I figured if I was struggling there might be a few others that could use some help.  In this post I will cover a number of topics to get you started with WiX.

First thing you need is the toolset itself.  You can get it here.  Once you run the install be sure to restart your machine so that the new templates will show up in Visual Studio.

Now that we have the tools you are on your own.  I found a video that gives you the absolute minimum information required to create the equivalent of a “Hello World” install.  Of course there are a number of things that the video does not cover and I will address a couple of those below.

The WiX toolset has a set of default dialogs, all of which are customizable.  The one that I think is useful to the most people is WixUI_InstallDir.  This simply has the user accept a EULA and then allows them to set the install directory for your software.  This feature can be added by including the WixUIExtension assembly and adding the following namespace attribute to the Wix tag in the wxs file.

xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"

When you use the Install Directory extension it comes with a generic license.   You can customize it by simply adding an RTF file with your text and referencing it in the main wxs file inside the product tag.  It looks like this.

<WixVariable Id="WixUILicenseRtf" Value="MyLicense.rtf" />

Likewise the banner image at the top of the installer can be changed with a similar entry.

<WixVariable Id="WixUIBannerBmp" Value="..\Secure PDF\Library\Banner_PwC.bmp" />

Additionally you may want to check if a particular version of the .NET framework is installed.  The simple setup template allows you to do this if you reference the WixNetFXExtension assembly and add its namespace reference.  If you want to actually install a framework you need to use Bootstrap project template.  In order to do the actual check you will need to add the following tags.  The location doesn’t seem to matter but I put them inside the product tag.

<PropertyRef Id="NETFRAMEWORK20"/>
<Condition Message="This application requires .NET Framework 2.0. Please install the .NET Framework then run this installer again.">
  <![CDATA[Installed OR NETFRAMEWORK20]]>
</Condition>

In all WiX is a very useful and flexible tool and since Visual Studio 2013 no longer provides installer projects you will need to learn these tools.  Hopefully these hints will help you get started.

Posted On Friday, August 1, 2014 3:09 PM | Comments (0)
Thursday, July 10, 2014
JSON: The Good, The Bad And The Ugly

Over the past several years JSON has become the darling of service message standards.  These days you are shunned if you offer a SOAP service.  The more I use JSON service though the more I question if they are really the answer.

The Good

The main feature of JSON that makes it attractive is size of the data over the wire.  The structure tagging method is a more compact that that of SOAP/XML messages.  For high volume or large message services that could be a critical performance improvement factor.

The fact that JSON was created for use in Javascript also makes it ideal for client side development.  So if you develop with a heavy client Javascript coding you will be pretty happy.

The Bad and The Ugly

I have three main complaints about JSON.  The first is discoverability of services.  Traditional SOAP service have a WSDL service definition associated with them that gives you a list of all the methods in the service and the structure of the calls and returns.  Now if you want to obscure the methods you are publishing then JSON is the right tool for the job from what I have found so far.  If that is not your goal then you better have very complete documentation that is easily accessible to developers.

My next gripe is about readability.  One of the stated goals of the standard is to make it human readable.  I would argue that it can be readable it is only if you tools that will format the message for you.  I’m not saying that it is less readable than XML, but most development tools have formatters built in for XML which is not the case for JSON.  For the moment that means it is harder to inspect JSON messages.

The last thing that frustrates me about JSON are the available tool for interacting with services within Visual Studio.  We can serialize JSON messages, debug through them and even past messages as classes, but we still don’t have tools to make service proxies the way we do SOAP services unless they are part of a WCF service.

The Lesson

If you are creating services for general consumption you should take into account who will be leveraging them and what tools they have available.  Make their life as easy as possible by either providing a discovery mechanism or at the very least complete and up to date documentation.

On the other side, if you are a consumer of JSON services you need to invest time in discovering the tools and techniques that will allow your development to be successful and painless as possible.

In the end we are stuck with JSON until the next defacto standard comes along.  Whether you agree with its appropriateness you need to become well versed with its usage from whatever platform you develop for.

Posted On Thursday, July 10, 2014 2:00 PM | Comments (4)
Thursday, May 8, 2014
Enhancing Your Model In MVC 5

logo-asp_net-mvc-285

Simple views in ASP.NET MVC 5 are simple, but once you start getting a lot of conditional content formatting in the view things can get very messy.  Once you get to the point where your Razor code has way to many if/else blocks and they start repeating you have to come up with a way to abstract and simplify your code.  I looked at functions and partial views as possible solutions.  Both of these have their place but an alternative that you may want to entertain is implementing your model as more than just a DTO (data transfer object).

The advantage that that this approach gives you is that you can more directly take advantage of the data in the model.  If you create a function in Razor you need to either have page variables or pass in a number of parameters to accomplish the same ends.  You can use the return value of your methods to set attributes in your HTML or simply to compress your code.

This does break the MVC pattern strictly speaking, but as I always suggest you should use standards as guidelines and not absolutes.  Follow the pattern as long as it makes sense and when it gets in the way do what needs to be done to achieve your goals.  This is one alternative for a specific problem type.  Use it for what it is.

Posted On Thursday, May 8, 2014 3:57 PM | Comments (0)
Monday, March 24, 2014
Project Spark Maze Making Technique

image

When I first started creating Project Spark worlds I would try to build a mountain and then tunnel through it to create halls and rooms.  This really became a test of patients.  Once you have created a narrow space with ceilings it is hard to get your camera in the right place to know which direction your tunnels are heading, how close you are to the outside of your terrain and good luck placing props.  The solution is actually pretty simple.  Use the Add tool with the cube brush and make your corridors and rooms with an overhead camera as displayed above.  Once you have the first level laid out paint the room floors and wall, add props and light sources.  From there you can then use the Add tool again to create the next layer of your maze which creates you ceilings of the first level as you go.  I realize this isn’t anything amazing, but sometimes it is hard to see simple solutions.  Enjoy

Posted On Monday, March 24, 2014 9:04 AM | Comments (0)
Friday, March 21, 2014
Project Spark Development On Windows 8 With A XBox Controller

ProjectSparkLogo2XboxController

As you may have noticed, I really enjoy building Project Spark games.  Until recently you have only been able to create them on Windows 8.1.  Now you have the option of playing Project Spark on XBox One with XBox 360 coming in the future.  While I don’t have an XBox I have realized that there are just some things that you can’t do without a controller.  The biggest one for me is manipulating the size of trigger zones around props.  In order to gain this capability I picked up a second hand controller and quickly found that there was even more of a learning curve than using mouse and keyboard.  I figured if I found this a challenge others might and so this post will cover some of the basics.  As a starting point check out the control layout diagram here.

Zoom Camera

When you first come into the Spark environment you will find that you are zoomed all the way in to the cursor.  This is where the RB is your friend.  The thing you have to realize is that when you hold RB it is going to show you a button menu.  this is for you to change camera modes.  What it doesn’t tell you is that if you hold the RB and move the left joystick you can zoom the camera.  At any time you can tilt and pan the camera with the right joystick.

Switching Tools

This one isn’t that difficult.  The A button allows you to open the tool panels and the left joystick allows you to navigate through them.  Once you are in a tool the arrow pad allows you to navigate the pallet at the bottom of the screen with the up arrow opening the detail menu.  The big difference between between mouse and controller is the fact that with the mouse you click a tool a second time to get its alternate function and with the controller you use the left trigger to apply the tool’s alternate function.

Props

This is the area where I have the most aggravation.  When you are arrowing through the pallet use the right trigger to create a prop.  If you only want the one hit the B button.  If you want more clones just continue hitting the right trigger.  Likewise if you want to select and existing prop put the cursor on it and hit the right trigger and the B button to drop it.  If you want to rotate or scale the prop hold the LB and select the function from the pallet using the arrow pad then while still holding the LB affect the change with the right joystick.  Just remember that the B button and the Back buttons are your friend.  They can get you out of most situations that you didn’t intend to get into.

Terrain/Paint/Biome

Another significant difference when you move to the controller is the concept of setting the height of your brush above the surface.  The mouse is always set to touch current surfaces.  With the controller you need to you the X and Y button if you want to move your brush vertically.  Just keep an eye on the dotted line below your brush to see if you are at the level you want to affect.  Otherwise most of the rules for selecting from pallets apply the same as props.

Brains

Creating Kode in your brains is much slower for me and takes a lot more concentration with the controller.  The nice thing about keyboard development is that if I know the tile I want to use I can start typing the name and filter directly to it regardless of how deep it is in the tile tree.  Conversely, I am probably learning more about the tile tree using the controller.

To get into a brain select the prop with the right trigger and then hold the LB and press the Y button.  To insert a new line or tile where one already exists press the left joystick button.  While you are in the tile tree RB and LB will navigate through the pages of the same level.  RB and LB will also allow you to navigate through your brain pages.  If you are on a line number and press A you will get the arrows to move or indent the line.  Pressing A again will leave this mode.

Test/Save/Settings

The Start button will bring you to the screen where you can test and save your work or change settings.  While on this screen if you hit the Back button it will take you to your profile screen (always have to know progress on your challenges).

Summary

That should cover most of what you need to get started. Experiment with the popup button menus and enjoy. 

Posted On Friday, March 21, 2014 12:05 PM | Comments (1)
Monday, March 17, 2014
Presenting Project Spark At Chicago Code Camp

ccclogoprojectsparklogo

It is conference time again and this year I am speaking at the Chicago Code Camp on my latest addiction: Project Spark.  This is the game that is currently in beta on Windows 8 and XBox One which doubles as a game development environment.  Come and see how you can enjoy this and even spend more time with your kids and subliminally teach them how to code.  Register at the link below.

http://www.chicagocodecamp.com/

Posted On Monday, March 17, 2014 4:28 PM | Comments (0)
Wednesday, February 26, 2014
How Software Architecture Is Like Photography

Camera20140226 (11)_1

I have found over the years that many of the IT people that I work with have photography as a hobby.  Recently I stopped and realized how similar the skill of a good architect are similar to those used in photography.  Below I explore what I see as common traits.

First and most important to both endeavours is the ability to see both the big picture and the details.  Photographers observer both the individual subject such as a bird and the surroundings that it is interacting with.  A beautiful bird alone can make an impressive picture, but if you capture it in an unusual place or interacting with other animals the interest increases exponentially.  Likewise you may look at one business problem to be addressed by a software system and solve that problem, but if you can put it in the context of the overall business process you can greatly improve the way a business operates.

You need to look at things from different angles.  In photography you may look at a subject from above, below or even behind in order to find a more interesting view.  With business problems we will look at it from different users’ perspective in order to make sure that we are taking the most important use cases into account.  Likewise we will look at different technology solutions to address the business needs in order to handle usage scenarios and volumes.  In order to more easily see these different angles you need to explore different techniques.  Spend time when you are not on a project experimenting with proof of concepts, new technologies.

Tools aren’t everything, but they do make a difference.  If you have a camera phone (who doesn’t?) then you can capture a wide variety of images, but if you want to optically magnify an image or change the how much of the subject is in focus then a camera phone just won’t do the job.  Likewise languages like Javascript are very good a general functionality, but if you need high performance or need to talk directly to the hardware you need a more appropriate language and associated tools.

This is just a generalization of the skills you must acquire to be a good architect.  Add these to your toolkit and continue to find ways to improve your projects for your clients.

Posted On Wednesday, February 26, 2014 7:03 PM | Comments (0)
Sunday, January 19, 2014
Project Spark Beta Impressions

image

Many kids are addicted to Minecraft.  It is a game that allows you to build the environment you play in and even create new content if you are willing to learn how to make mods.  Project Spark is an offering from Microsoft which allows you to create and play top quality games.  For the last couple of weeks I have been addicted to the beta of Project Spark and working with my boys to make some games.  Even though it is still in beta there are some great features.  It would take a tome to cover them all, but here are some highlights.

Modifying your terrain is probably the first thing that you want to do.  They have created a number of tools that allow you to create very realistic and varied worlds.  They fall into two categories: adding terrain and subtracting terrain.  The Add/Subtract tool allows you to quickly add large amounts of terrain or carve trenches.  The Expand/Erode tool on the other hand builds or removes terrain is a more even fashion.

Props can be everything from characters, houses and weapons to props that you have built and saved as assemblies.  This means that you are not limited to what the Dakota team has created.

You world will need some color.  Biomes and painting give you the ability to make your game feel like it is happening in a real world.  Painting is about adding simpler textures where as biomes handle adding textures, plants and other objects based on the type of terrain and height.

No game is complete until you add rules and logic to it.  Kode is the name of the programming language that Project Spark uses.  It is a full featured language that allows you to control practically any aspect of your game.  The image below shows a small example.

image

Given that Project Spark is a beta I have run into a number of bugs.  Despite this I think it is really worth your time to sign up and get a beta key.  What you can build is almost unlimited and will be even better in future releases.  In the near future that key will also get you access to the XBox One and XBox 360 beta.  You too could have a new addiction.

Posted On Sunday, January 19, 2014 12:40 PM | Comments (0)
Thursday, November 14, 2013
Visual Studio 2013 Launch Thoughts

Visual_Studio_2013_logo_big

Every new version of Visual Studio adds new features that make it easier to build apps in a maintainable way with best practices.  Yesterday we got to see the latest enhancements in Visual Studio 2013 during the virtual launch event.  I appreciated that yesterday’s event was live streamed, but even more that they didn’t stop the streaming when they left the keynote session.  This made it much easier to go back and catch tid-bits that I missed the first time through.

One of my favourite announcements was for Visual Studio Online which takes VS to the cloud.  The web site says that this product was formerly known as Team Foundation Service (TFS).  It includes end-to-end services: build, deploy, monitor and more.  It is free for teams of up to 5 people and for MSDN subscribers with pricing for other team sizes.  I need to look into it more, but they stated that it allows you to build non-MS based solutions as well.

They announced “Monaco” which is the code name of the web based IDE that is being released as part of Visual Studio Online.  The first release is specifically for building Azure solutions.  I can see this growing into a string of VS Express like offerings for each platform.  The possibilities are exciting.

A lot of what I saw was more about Azure and platform related rather than Visual Studio itself.  There was also a lot of the event was spent highlighting third party tools such as Xamarin.

Of course Scott Hanselman was his usual magnificent showman.  I loved it when he was showing the Browser Link feature in VS2013 for ASP.NET development.  When he told the crowd not to applaud because what he was showing wasn’t cool enough was great.  Any event that has Hanselman and Guthrie is bound to be entertaining and informative.

There are far too many things that were shown during the event to cover in one post.  In the end I think Visual Studio 2013 is making great strides toward the goal of “Any App, Any Team”.  I would add “Anywhere”.  With all the new features and offerings I see development for the Microsoft ecosystem getting easier and easier.  I can’t wait to update my machine and start coding.

Posted On Thursday, November 14, 2013 9:23 AM | Comments (0)
Monday, October 28, 2013
Getting Requirements Right

I had a meeting with a stakeholder who stated “I bet you wish I wasn’t in these meetings”.  She said this because she kept changing what we thought the end product should look like.  My reply was that it would be much worse if she came in at the end of the project and told us we had just built the wrong solution.

You have to take the time to get the requirements right.  Be honest with all involved parties as to the amount of time it is taking to refine the requirements.  The only thing worse than wrong requirements is a surprise in budget overages.  If you give open visibility to your progress then management has the ability to shift priorities if needed.

In order to capture the best requirements use different approaches to help your stakeholders to articulate their needs.  Use mock ups and matrix spread sheets to allow them to visualize and confirm that everyone has the same understanding.  The goals isn’t to record every last detail, but to have the major landmarks identified so there are fewer surprises along the way.

Help the team members to understand that you all have the same goal.  You want to create the best possible solution for the given business problem.  If you do this everyone involved will do there best to outline a picture of what is to be built and you will be able to design an appropriate solution to fill those needs more easily.

Posted On Monday, October 28, 2013 5:10 PM | Comments (1)
Friday, October 25, 2013
What Is A Software Architect’s Job Today?

WP_20131025_09_58_56_1

It was 2001 when a project manager first put my job title as architect on a statement of work.  A lot has changed over the last twelve years.  The concepts around what an architect is has evolved.  In the early days I would have said that they just rebranded the role of the system analyst.  Now we have a multitude of architect titles: application, solution, IT, data, enterprise.  Whatever the title the goals are the same.  An architect takes the business needs and maps them to the solutions that are needed and at the same time works to ensure the quality of the solution and its maintainability.

One of the problems I see these days is that we are expecting every developer to have architect skills.  That in itself is not a problem.  This reduces the need for dedicated architects.  Not every developer though is going to be able to step up to this level.  Some are just good at solving small problems instead of thinking in the larger abstract.

Another problem is the accelerating speed and breadth of new technologies and products.  For an architect to be good at his job he needs to spend large amounts of personal time studying just to stay relevant.

In the end I don’t think the main objectives of an architect has changed, just the level of commitment needed to stay of value to your company.  Renew your commitment to your profession and keep delivering great solutions.

Posted On Friday, October 25, 2013 2:48 PM | Comments (0)
Thursday, October 10, 2013
Carriers Holding Your OS Updates Hostage

WinPhone8Logo

Just a small rant here.  Today the Windows Phone 8 GDR2 update finally became available for Nokia handset users.  Now I’m not sure that it is AT&T fault entirely that Samsung and HTC users got their updates two months ago and we are just finally seeing it.  It may have something to do with the Nokia Amber update.  But every Windows Phone update on AT&T from 7.1 on seems to have been delayed.  How is it that the premiere Windows Phone carrier is always the last one to release updates?

Smart phone ecosystems are a partnership between the OS provider, the hardware manufacturer and the carriers.  If any one of those partners does not hold up its responsibilities then everyone gets a black eye.  The goal for all involved should be to release updates as early as possible with reasonable assurance of stability.  This ensures the satisfaction of consumers and increases the likelihood of future sales.

From what I have seen so far AT&T has been the one breaking the consumer’s trust in the Windows Phone ecosystem.  Aside from voicing our dissatisfaction we may need to start voting with our feet until they realize that they being a poor citizen has consequences.

Posted On Thursday, October 10, 2013 1:39 PM | Comments (0)
Thursday, September 5, 2013
Windows Phone App Studio: The Social Developer Tool

image

Creating mobile applications is challenging, but Microsoft just made it easy for most people to create their own Windows Phone apps.  People talk about Indie gaming.  The Windows Phone App Studio allows people to create apps to share with their family and friends (as long as they have an App Studio account) using a WYSWYG style web site.  Whether you want an app for your kid’s team, an app that introduces your company or an app for an upcoming event the App Studio can allow you to build them on your own with only modest effort and understanding of concepts.

So what are the attractive features of the site.  The first thing is that you get a preview of what you are working on in most situations.  Depending on how much detail you want to put into an app you can have one up and running in ten minutes and be sharing it with your friends.  The main features of these apps are that they can display text and media and give users the ability to drill down to the details.

Beyond the ability to easily add new pages and data sources, you can also publish the resulting apps to the store and monetize your new creation.  This can be done by either downloading the XAP file or the code for you application which then allows you to make further changes via Visual Studio.

There are a few things on the “needs improvements” side.  The help screens need to be expanded with better explanations of features.  For example you can set your data source to either static or dynamic.  The help seems to imply that if you set it to static that Microsoft will store your data and download it to your users when it is changed, but that is not said explicitly (my testing proved out this is the case).

The data manipulation could also use some efficiency improvements.  There should be was to reset the section or page you are in after you start editing.  You seem to be able to get into situation where you have no option but to start over.

Lastly, I would like to see improved include the ability to use secured RSS feeds and a way to export and import data from the data sources.

This development option looks very promising.  Even while I was writing this post they have added additional templates for apps.  The fact that anyone can create one of these applications and share them with anyone else who has an App Studio account makes app development more social.  This could make Windows Phone more attractive and accelerate it’s recent growth.  Take some time to see for yourself at the App Studio site.

Posted On Thursday, September 5, 2013 7:11 AM | Comments (0)
Wednesday, August 14, 2013
Why Is Windows Phone The Best Camera Phone

WP_20130731_002

I recently went on vacation and over the week was switching back and forth between taking pictures with my Lumia 920 and my wife’s iPhone 5.  It really got me to thinking how much better the Windows Phone is as a camera.  The images in this post were taken using my Lumia 920.

WP_20130516_005

The main issue that got my attention was the faster shutter, or at least the perception of a faster shutter.  I think it is the fact that Windows Phone has a dedicated camera that I can prefocus in order capture action images where the iPhone focuses after you tap the shutter button on the screen.  This caused me to miss shot after shot with the iPhone 5.

Another advantage of the Windows Phone is the multitude of what Microsoft calls filters.  From panoramas, to selectable sequence images, to gif creation to just about anything else a developer can imagine allow you to have infinite flexibility and creativity without leaving the camera app.

The last major feature that I want to point to is the visibility of the screen.  I found it nearly impossible to see the image on the iPhone 5 under bright sunlight compared to my Lumia 920.  Since this is your viewfinder it is critical.  If you can’t tell what you have on the screen you are rolling the dice with you shots.

Ultimately everyone is going to have their opinions.  As a photography enthusiast there is no way that I would own an iPhone.  As always, your mileage may vary.

Posted On Wednesday, August 14, 2013 3:14 PM | Comments (0)

Tim Murphy

Tim is a Solutions Architect for PSC Group, LLC. He has been an IT consultant since 1999 specializing in Microsoft technologies. Along with running the Chicago Information Technology Architects Group and speaking on Microsoft and architecture topics he was also contributing author on "The Definitive Guide to the Microsoft Enterprise Library".



I review for the O'Reilly Blogger Review Program



Technorati Profile

www.flickr.com
Tag Cloud