Kamranicus

Kamran Ayub is a developer and designer in Minneapolis, Minnesota. He specializes in .NET development with a dash of client-side and is passionate about UX.

Ludum Dare 29 Game Jam Success!

| Comments

This last weekend I spent 72 hours working on a game for the Ludum Dare 29 game jam. LD is a competition where you get a prompt for a game and then have to spend 48 hours (solo) or 72 hours (jam) and bang out a game. The solo competition has strict rules but the game jam has looser rules and allows for team development. It was a caffeine-filled rush and I hope to write a blog post shortly about how it all went down. It was a ton of fun! I worked with my friends Erik Onarheim and Josh Edeen, both primary contributors to the Excalibur.js game engine. I am also a contributor but I haven’t done a ton with the engine core, moreso the usability of the API, opening GH issues, and the website.

Kraken Unchained

In the meantime, be sure to check out the fruits of our labor! It’s a game where you play as the Kraken and you destroy ships. We originally had a ton of ideas, as you can see in our GitHub repository, but with only 72 hours your scope is pretty narrow. Still, we’re very happy with what came out and we’re glad that Excalibur.js pulled through!

Play Kraken Unchained. Vote for it on the LD site. You can also take a peek at the post-LD version which is in on-going development. It does support touch and fixes some issues in IE10/11.

You can also view the entirety of the source code on GitHub!

Getting WebSockets to Work on Windows Azure

| Comments

I was banging my head against the wall for the past hour or so wondering why I was falling back to XHR polling when I deployed my Node.js application to Azure. I’m using socket.io and everything looks like it’s in order, works locally, etc. It was failing with a WebSocket handshake error.

What I saw in the Chrome developer console was something like:

Error during WebSocket handshake: Unexpected response code: 502

In my Azure Node.js console (azure site log tail SITENAME), I was seeing EPIPE errors.

It turns out, this little tidbit from the original Windows Azure blog post on Web Sockets did the trick.

Modify your web.config and add:

<webSocket enabled="false" />

To your system.webServer configuration. Also, another good point in that blog post is to use SSL, since you get SSL for free with a *.azurewebsites.net site.

Hope this helps someone else out there. This should be added to the official Azure tutorial on using web sockets with Node.js.

5 Tips to Improve Your ASP.NET MVC Codebase

| Comments

I have an urge to write a quick list of tips for improving an ASP.NET MVC application because I just got done reviewing some code for a support ticket at work. It’s still fresh in my mind and I wanted to get some of my thoughts down to share with others. If you have been doing MVC for a while, I don’t think much of this is news. It’s more for those of you that don’t do MVC often or are new to MVC.

Just Released: Have I Been Pwned?

| Comments

I just released Have I Been Pwned? to the Windows Phone store. It’s a tiny, tiny app that only took me a couple hours to build. You can find the source code on GitHub.

HaveIBeenPwned.com is a website created by Troy Hunt, a security MVP, that checks to see if your email address appears in a database of all the breached email addresses in prominent hacks like Gawker, Sony, and Adobe. I’ve definitely been pwned, so it’s a good service to use to quickly see if you need to change your passwords.

I plan to add the background task soon but I wanted the initial release out there so that I can just submit updates to it. If you want to contribute, send me a pull request!

Just Released: Bowling Calculator App

| Comments

Screenshot

I just released my second Windows Phone app, Bowling Calculator. It’s an open source app that I created when I gave my talk at TCCC15. If you’re a fellow developer, feel free to send me a pull request with any bug fixes or enhancements. I want to keep it focused on the simple use case of scoring a bowling game; I don’t need it to track multiple games or keep track of history. It’s purpose is to serve as a production-ready sample app and to also be good at what it aims to do.

MiniProfiler RavenDB Pull Request Accepted

| Comments

I just got a notification that my pull request for adding RavenDB support to MiniProfiler went through! It’s always really cool to see your contributions get pulled in. The MiniProfiler guys were really easy-going, @yellis was even kind enough to take on the testing. That kind of acceptance for pull requests is great to see because it makes me feel good about contributing and is a bit less intimidating.

Kamranicus: Now With 100% More Octopress

| Comments

I’ve just pushed a new version of Kamranicus that is built using the static site generator, Octopress. Octopress uses Jekyll to generate static sites.

I decided to switch because I can leverage GitHub Pages which are free and I can use a custom domain. It’s a perfect fit because I can just piggyback on GitHub’s cloud hosting for free and not worry about incurring any downtime due to database issues (something that happened more than a few times with the last ASP.NET MVC and SQL-based site).

I really enjoyed setting up Octopress, it was easy to migrate my posts. I highly recommend it! It would be even better to have a .NET/C#-based static site generator that supported all of Jekyll’s configuration options, except with Razor-based layouts and templating. Mmmm, that sounds pretty good. Someone get on that.

Just Pushed: Blackjack Sample Game

| Comments

It’s finally done! I sat down today and dug through my backups to find my original WPF BlackJack game I wrote way back when WPF was really cool. I converted it to VS 2013, made sure it still ran, organized the solution, and hit deploy. It’s now up on GitHub for your learning pleasure. There are no Nuget packages here! This was before Nuget where I had to find code to learn from and, ahem, copy. The deck is also something I found online. If I find the source, I’ll be sure to attribute it properly.

Code: https://github.com/kamranayub/blackjack/

This was a sample game I wrote to learn OO design and WPF. There’s some cool animations, sound effects, and a pretty fun Blackjack implementation. It’s very “simple” and should be easy to digest. I never got around to implementing all the cool AI but now that it’s on GitHub for all to see, maybe someone will pick it up.

I also think it’d be fun to port it to Windows 8 C# and XAML. It could be an app I release on the store, free and open source.

TCCC15: See You Again in April!

| Comments

Well, that was a blast. Yesterday was TCCC15 and it was great. Many awesome sessions, including several by my fellow co-workers Erik Onarheim and Stephen Erstad.

Thanks to all who attended my talk! I got +10 votes on the code camp speaker site and 9 llamas, which made me feel pretty good!

Please send me feedback at my email or leave a comment here with your thoughts. The code will be available (soon) at http://github.com/kamranayub/wp-bowling. It’ll be released under an open license but is meant to be educational. The app will also be available soon in the Windows Phone store.

If you missed my talk, you can still get all the bits once I release the app on GitHub. Sure, there won’t be droning voice over the code, but you can still see all the steps I took to enhance it.

There was only one big hiccup where Nuget would not install a package, even when I had it in my local repository (it installed the other ones). I remembered some time ago Scott Hanselman mentioning that Nuget packages were just zip files. I quickly changed my Nuget package extension (because I didn’t have Nuget Package Explorer installed), got the DLL, and added it as a project reference to quickly save my skin. Thanks Scott!