Chris Gomez

Development topics for the indie programmer

Philly Code Camp – Web developers are already game developers

Thanks to everyone who attended my session: Web developer by day, Game developer by night at Philly.NET Code Camp 2015.  I’m so grateful that so many people would take the time out from important topics in the .NET world and beyond to come have a little fun learning about hobbyist game development.  The key message that I hope was well-received is ASP.NET developers are well-suited to put their skills to work building high performance games.

Game development seems like a black art.  If you were a career developer (on any platform) you often found the style of program flow to be foreign if you were switching from event driven programming to game programming.

Modern web development frameworks and events are working pretty hard to minimize the boilerplate code you have to write in your game loop.  In some cases, it even begins to feel somewhat event driven again.  I don’t want to oversell that.  Even in the code we wrote during the Code Camp session, we were still thinking about “what do we have to update every frame”. 

We looked at Phaser, a JavaScript framework that helps you build fast action video games.  Phaser offers plenty of great tools to help you “set-and-forget” attributes of your game components and then let the engine take care of it. More...

A DevOps “Jump Start” Using Azure Web Sites and GitHub

Previously, I discussed that I started a side project to discover better ways to build “web apis”.  In this case, I am using ASP.NET Web API but I think the lessons I am after could be applied to many technologies and clouds.

One of the things I was looking for was some light continuous deployment after code is committed.  At the same time, I wanted to see what the process was to get different kinds of web sites, using different frameworks and technologies, running on Azure Web Sites

After all, the marketing says it supports .NET, Java, PHP, Node.js, and Python.  It also claims continuous deployment.  So is it faster, easier to use, and more fun?

What To Deploy?

I created a repository on GitHub called WebJumpStart for the purpose of testing out a few tricks Azure Web Sites has up its sleeve. 

In it, you will find three web sites. 

  • AspNetMvc is an ASP.NET 5 MVC site right out of the gate after File > New Project. 
  • HelloWorld is just static content files (simple html/js/css files). 
  • NodeExpress is the Node Express starter site, also unmodified (it is a bit out-of-date at this point, but the magic of npm ensures the versions I’ve picked in package.json are there for me to use).

Note that only one of these projects is based in ASP.NET.  HelloWorld and NodeExpress could have been built with notepad, Sublime Text, Brackets whatever…


A path to happiness with ASP.NET Web API

I recently started a side project to learn how to better compose a “web api” project.  I am using ASP.NET and ASP.NET Web API, but there were a lot of things I really wanted to drill down on.

First of all, I have seen many a project at various places I’ve worked begin with the ASP.NET templates.  Obviously, this is nothing new.  Many a team has gotten the chance to work on a brand spankin’ new ASP.NET project and hits File > New Project in Visual Studio and starts coding away in what the project template spits out.

But I really believe the project templates are meant more for exploration of what is possible.  You look at them to see how the framework operates and some ideas of what you can do with it.  When you start wanting to go down the road of laying out the project so it’s actually easier to code, deploy, and maintain… well that’s an entirely different story.  And since I may find myself in the situation of being asked to hit File > New Project someday, I’d like to have practiced with starting on a truly EMPTY project and composing the building blocks that will make it deliver real business value quickly and EASILY.

So I wanted to come up with a non-trivial project that I might actually have a use for.  And I came up with the following.

The Project

I’d like to have a small website that allows me to enter dues payments for residents who live in a homeowner’s association.  Each quarter, the residents have dues to pay, and it’s nice to be able to record some information about the dues payments.  I’ve found it’s nice to keep track of when the payment was received, deposited in the HOA account, what the check number was, and how much they paid (because it’s not always the balance due!).  I’d like to be able to build in the logic to automatically assess fines for being late and eventually generate the billing statements (perhaps either for display in the site or by email).


Intro to Git in Visual Studio

More and more, my topics are going to involve you downloading and looking at code.  And that will mean you can get the code from GitHub.  The idea of “social coding” has gone beyond the hot new fad to being the standard for open source projects.

Even for Microsoft developers who are used to waiting for CTP’s and Preview SDKs, this is changing rapidly.  The ASP.NET team has embraced open source, and are developing the next generation of ASP.NET in the open, and it’s all available to view and contribute to on GitHub.  Even TFS supports Git repositories now and so do the other sites in the “social coding” space.

If your daily home is Windows and Visual Studio, here’s a short primer on how you can get started.

Okay, I have Visual Studio, what else do I need to install?

Right now, nothing.  Let’s start with Visual Studio’s capabilities and move on from there.

At the Philly.Net Hands-On Lab last September, I demonstrated a few tools by using a GitHub repository.  We’ll practice cloning this repository first.

The purpose of this post, and this lab, is just to show you how to use the Git tools built into Visual Studio.  As you get more advanced, there are a lot of other great things you can do with Git, and I’ll have some tips for you on that as well.

Get the URL for the repository

If you head to, you’ll find the repository.  First off, you could just use the Download ZIP button in the lower right to get the code.  But instead, copy the clone url.  We can use that inside Visual Studio.

The url is:

Open Team Explorer in Visual Studio 2013

You can use any Visual Studio edition to do this.  Whether you have Ultimate, Professional, Community or an Express Edition, this works.  Since this project is an ASP.NET Web API project, you COULD use Visual Studio 2013 Express for Web.

But don’t do that.  If you need a free version of Visual Studio, get Visual Studio Community.  It is equivalent to the Professional version, but it is absolutely free for you to use to get started learning to code.  Get it here.  Do not bother with the Express editions anymore.  It is high time they were unified again and kudos to Microsoft for doing it.


3D Game Development: Sculpting Worlds with Unity

Last night at Philly GameWorks in Malvern, we learned the basics of using the Unity game engine to create an outdoor world you can then explore using standard first person gaming controls.

We’ll be working more with Unity and other game engines at the meetup, and we want to see you there.  There should be no worries that you haven’t been keeping up as we strive to have meetups that cater to the beginner and the Philly GameWorks enthusiast.

(You can download this ZIP file stored on Dropbox and run the Windows executable if you want to see the product. Hopefully that works for you if you are interested:

We hadn’t written a single line of script code and we had built a world that we could explore in a first person viewpoint complete with a beautiful sky, mountains, hills, trees, grass and environmental sounds.


We used the standard installed Character Controller package to insert a First Person Controller that you could use to walk around your creation when playing the game right inside Unity.


Start your journey in code

It is cliche to say a journey of a thousand miles begins with a single step.  Nevertheless, starting a journey to become a software developer is going to take awhile.  Therefore, my advice is you start today.

When I related how my journey began when I was ten years old, it isn’t to scare you into believing that you only have a few decades to go.  Not every moment of every day of that time was spent improving as a developer.  I gave up on the whole thing for a few stints of years at a time.  Then I became reinvigorated and got a few jobs.  Next thing you know, it’s a career.

What I believe you must do is begin immersing yourself in the discipline.  This doesn’t mean immersion as in fanatic devotion.  It means that you should do what you can to start listening to voices in the development community.  It means you should try to build some meaningful application.  It means you should code. More...

Functional Programming Starters

Here are some links I want to save regarding getting more proficient with functional programming.

Try F# right in your browser -

Try Haskell right in your browser -

F Sharp for fun and Profit – Scott Wlaschin –

A Functional Architecture in F# – Mark Seemann builds an ASP.NET Web API in F#, JUST F#, but along the way he gives a great practical overview of why functional programming will improve your applications.
(Requires Pluralsight subscription)

Functional programming design patterns by Scott Wlaschin -

Underscore -
A library with functional helpers that will help ease your transition to thinking functionally and using collections effectively.

How did I get started coding?

In the 80’s, it became common for personal computers to be sitting out on store shelves with some kind of green scrawling of characters sitting naked in an ocean-like black display.  These new personal computers would be turned on and available for you to type on.  The Commodore 64, VIC-20, TRS-80, and Atari PC models would be beckoning you at local department stores.

I am kicking myself right now trying to remember what the Atari PC screens would display after booting.  My faint memory was that it said “READY” when they were booted.  Almost every time I walked by, someone would have typed their name in only to be greeted by a response of “SYNTAX ERROR”.  What were you supposed to do with these things?

One day, I saw someone actually using the thing. More...

Teaching Others to Code

In 2006, I moved to southeastern Pennsylvania.  Just a year later I discovered Philly.NET, the leading Microsoft developer user group in the Philadelphia area.  I was inspired by the brilliant presentations given by the local leaders, Microsoft MVPs, and Microsoft evangelists. 

It took me about another year to decide I wanted to join the ranks of dedicated speakers at their Code Camps and I started off by presenting how you could write games for the new Windows Phone 7 operating system.  I stuck with the game talks for awhile, but I’ve also been hard at work talking about ASP.NET features.  I use ASP.NET on the job and I enjoy game development as a hobby, so I’ve been on these parallel tracks.

Teaching other developers

What this means, essentially, is that I’ve been teaching development techniques or tools to other developers.More...

Code Camp NYC - The Real Time Web with SignalR

Thanks to everyone for attending my session on SignalR.  I talked about quite a few things in the session that I linked to below.

If you’re looking for links to materials for SignalR, here they are!

PowerPoint Slides (Looks like DropBox will open these for you now right in your browser)

These days I’ve really latched onto using GitHub as the place to update these demos with new techniques and ideas.  Combine that with continuous deployment and I hope to soon be able to provide people with working code and running samples.

Chatter Demo

[View on GitHub] - Clone Url:
Demonstrates SignalR basics.
Also includes Windows 8 Store version to demonstrate cross-platform capabilities of SignalR as your backend.

Stock Ticker Demo

[View on GitHub]  Clone Url:
Demonstrates IHubContext so you can make calls to clients from outside a SignalR Hub.
Demonstrates how you can avoid putting your business or simulation logic in SignalR Hubs.

Game Board Demo

[View on GitHub]  Clone Url:
Demonstrates self-hosting SignalR in a Console app.
Demonstrates cross-origin request support with the client web pages originating from a separate MVC project.

Videos to watch

Building Real-time Web Apps with ASP.NET SignalR (Build 2012)

Scaling the Real-time Web with ASP.NET SignalR (Build 2013)

Under the covers with ASP.NET SignalR (NDC 2013)

dotNetConf 2014 SignalR – Introduction to SignalR as part of the online dotNetConf

Understanding SignalR Performance (NDC 2014) – Talks about how to think about wringing the best performance and how to measure