Did you know that you can have zero downtime deployments with your ASP.NET application?
You don't even need to be using AWS or Azure, or have a fancy load balancer or anything else clever and expensive! So how does this thing work?
The basic idea is that you have two instances of your app running in production. At any point in time your users are using only one of these instances, and when you do a deploy you update the instance that isn't being used. Then you switch the users over to the new instance. See that blue line? That's a reverse proxy.
Martin Fowler (genius) calls this Blue-green deployments.
Well, before we can proceed, perhaps there should be a few pre-requisites listed:...
Does your build save you time and effort? Or does everyone emit a collective groan whenever you hear the dreaded "Someone broke the build" ? A great build setup you will love, a bad setup you will hate. How do you get started and where do you want to end up?
Well, a lot of it depends on your circumstances. If you're a Microsoft shop, you might already have TFS. If you're using Github you've got access to Travis. If you want to set up your own, Jenkins is free and fully featured. If you have a budget you can buy Team City. Or you could check out BuildBot. My recommendation is not to agonise over the decision, just pick one and get stuck in. If you don't have a server and you're not using a hosted source control solution, you could always install Jenkins on your local box in a VM. Remember, you don't need permission to be awesome.
So, what are the basics that your build server should do and in what order should you set them up?
Get this working!...
Like many other software developers I have a bunch of CI jobs that I need to monitor. If any of these jobs are failing I don't want to update my code and break everything. Recently I've been using an app named Catlight. It works great, it's simple, it looks nice:
But the CPU and memory usage?? For just a simple app (all it does is poll a JSON service every minute and displays some basic stats) check out the memory usage:
Yes, that's THREE processes running, and it's using, in total, 94 meg of memory!
Is this a problem? Perhaps not to you. Is it an affront to everything we believe in as software developers? Yes.
It's also worth noting that I'm running a Dell Latitude E6540, which is a great laptop, but it has a notorious fan problem. If you tax the CPU a little bit for longer than a few seconds, the incredibly annoying fan kicks in, whirrs for a second and then stops. Then repeats. It drives you mental.
As a little exercise I wanted to see what would happen if I wrote the equivalent program in a boring Winforms c# app. I came up with this:
and the ...
Read More ->
You learn a lot when writing code.
Programming is hard, but us programmers never like to admit it. Except for the wonderful Scott Hansleman who wrote this fantastic article. And on a similar note. And a good explanation on why we are all so grumpy.
Oh and did you know that programming sucks?
Oh and the code for Toyota 2005 Camry is TERRIBLE.
I write this post to assure fellow devs that you are a REAL programmer. Don't stress about not knowing everything or not knowing enough. There's too much to learn. The time it takes to get good at a language or framework is the time it takes for it to become obsolete! Programming sucks but is great fun. Just don't let it get you down :)
In a couple of months I'll be speaking at NDC Sydney - my topic is "How to change things at your company" - a lightning talk on how to enact change. This is a non technical talk, which is fantastic, because I don't fancy having to answer technical questions from such a tough audience!!
This will be my first "big" conference, and I have to thank Lars Klint for his fantastic support in choosing me to speak at the DDD conference last year, which really gave me the confidence to submit a few talks to NDC. I should also link to a great article by Troy Hunt titled Speaker Style Bingo which is a killer article that helped me a lot in preparing my talks. Thanks guys!
A few weeks back we did a great gig at the Ding Dong lounge. I borrowed my brother's Gibson Les Paul for a couple of songs and it ROCKED. I have to say.. I'm pretty darn proud of my solo in this video!
I thought it would be fun to build a MIDI patch changer, something like this one.
So I bought a simple arduino kit and started knocking it together. Fortunately I've done a bit of electronics beforehand so I found it quite easy. The prototype has been built:The next step will be mounting it in a box. Good fun!