Content related to programming, coding, and software development. Check out tutorials and examples!

API: Top-Down? Bottom-Up? Somewhere in the Middle?

A Quick Brain-Dump on API Desgin I'll keep this one pretty brief as I haven't totally nailed down my thoughts on this. I still thought it was worth a quick little post: When you're creating a brand new API to expose some functionality of a system, should you design it with a strong focus on how the internals work? Should you ignore how internals work and make it as easy to consume as possible? Or is there an obvious balance? I find myself trying to answer this question without ever explicitly asking it. Any time I'm looking to extend or connect systems, this is likely to come up. Most Recently... Most recently I started trying to look at creating an API over AMQP to connect my game back-end to a Unity 3D front-end. I had been developing the back-end for…

0 Comments

What Makes Good Code? – Patterns and Practices Series

What Makes Good Code? It's been a while since I've had a programming oriented post, and I figured this would be a great topic to write about. It's been a topic I've been thinking about more and more over the last year and I've been experimenting with certain patterns and practices to see if certain things actually make code "better". A lot of the information presented in this series will be completely based on my opinion, but I'll try to back up my opinion with as many concrete examples as I can. If you have a differing opinion, I'd love to hear it in the comments. I'd also like to call out that much of what I'll be discussing is in the context of object oriented programming. To be specific, there may be mostly C# examples used. If this isn't something…

1 Comment

Yeah, We’re an “Agile” Shop

Everybody Has Gone "Agile" If you're a software developer that's done interviews in the past few years, then you already know that every software development shop has gone agile. Gone are the days of waterfall software development! Developers have learned that waterfall software development is the root of all evil, and the only way to be successful is to be agile. You need to be able to adapt quickly and do standups. You need to put story point estimates on your user stories. You need retrospectives... And agility! And... more buzz words! Yes! Synergy! In the cloud! You need it! Okay, so why the sarcasm? Every single software development team is touting that they're following the principles of agile software development, but almost no team truly is. Is it a problem if they aren't actually following agile principles? Absolutely not,…

0 Comments

Should My Method Do This? Should My Class?

Whose Job Is It? I wanted to share my experience that I had working on a recent project. If you've been programming for a while, you've definitely heard of the single responsibility principle. If you're new to programming, maybe this is news. The principle states: That every class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class You could extend this concept to apply to not only classes, but methods as well. Should you have that one method that is entirely responsible for creating a database connection, connecting to a web service, downloading data, updating the database, uploading some data, and then doing some user interface rendering? What would you even call that?! The idea is really this: break down your code into separate pieces of functionality.…

0 Comments

Multiple C# Projects In Your Unity 3D Solution

Problem: Visual Studio and Unity Aren't Playing Nice! UPDATE: This is for older setups with Visual Studio and Unity. You may want to look at Assembly Definitions. I just started poking around in Unity 4.6 and I've been having a blast. I've made it to the point where I want to actually start hammering out some code, but I came across a bit of a problem: I want to start leveraging other projects I've written in my Unity solution while I'm in Visual Studio, and things are blowing up. So, what gives? Okay, so let me start by explaining why I want to do this. I understand that if I'm making a simple game, I should have no problem breaking out my unity scripts into sub folders and organizing them to be nice and pretty. The problem I'm encountering is that I…

11 Comments

C# Dev Connect 1 – Intro To Threading

C# Dev Connect 1: Intro to Threading In my last post, I mentioned we'd be hosting a C# Dev Connect meetup at our Magnet Forensics HQ in Waterloo. I figured I'd post to talk about how the event went so that if you couldn't make it, you'll have an idea for next time (and if you did make it, maybe you can comment on how you thought the event went). Our first Dev Connect was lead by a colleague of mine, Chris Sippel, who wanted to give a talk on threading basics in C#. Threading can quickly become a really complex topic, so Chris wanted to keep it high level and talk about the different approaches you can use to start threading in your C# applications. https://twitter.com/Chris_Sippel/status/557655585492328450 Dev Connect: Before the Talk Before Chris gave his talk on threading, we…

0 Comments

First C# Dev Connect is Coming Up

  C# Dev Connect Meetup! About a year ago I had thrown around the idea of creating a C#-specific group that would meet at a regular interval with some of my colleagues. I saw that there was interest, but between all of the things we had going on in our personal lives and work lives, we just hadn't been able to co-ordinate something. I'm excited to announce that with some more solid planning over the last couple of months, C# Dev Connect will be able to host their first meetup! The company I work for, Magnet Forensics, has graciously offered our new office to host the event which will help tremendously. We'll have a group of people from Magnet Forensics their to help out, but the only thing "Magnet" about the event is really just that it's hosted at the office. What's…

0 Comments

MyoSharp – Update On The Horizon

MyoSharp If you haven't checked it out already, my friend Tayfun and I created an open source C# wrapper for Thalmic's Myo. It's hosted on GitHub over here, so you can browse and pull down code whenever you want. We've had some great feedback from users of our API, so we continue to welcome it (both positive and negative!) in order to improve the usability. Thalmic has plans to release a firmware update to allow more data to be accessible through their API. Right now, MyoSharp is a bit out of date, but once this big firmware update lands we'll take some more time to get it up to date again. Remember, it's open source so you can feel free to contribute! Troubleshooting The most common question I receive is "I keep getting an exception about not being able to connect…

0 Comments

Controlling a Myo Armband with C#

Background Thalmic Labs has started shipping their Myo armband that allows the wearer's arm movements and gestures to control different pieces of integrated technology. How cool is that? My friend and I decided we wanted to give one a whirl and see what we could come up with. We're both C# advocates, so we were a bit taken back when we saw the only C# support in the SDK was made for Unity. We decided to take things into our own hands and open source a Myo C# library. We're excited to introduce the first version of MyoSharp! The underlying Myo components are written in C++, and there's only several functions that are exposed from the library that we can access. In order to do this, we need to leverage platform invocation (PInvokes) from C# to tap into this functionality. Once you…

16 Comments

End of content

No more pages to load