Friday, August 15, 2014

Use a custom domain name with an Azure Website

Thursday, July 3, 2014

"Undo" in a document database...

Doing an "undo" when modifications have been made to a monolithic structure can be a tricky beast, however, doing so in a document database is literally just a couple lines of code.

1. Anytime modifications are made to the current state you save the previous version with a simple new key.
2. When the user requests to go back in time you load that document, then save it again with the key that points to the document with the current state.
3. Done

Cheap, easy, no gold plates.

Wednesday, June 25, 2014

Be simple and choose wisely...


I have spent the majority of my career working for a single company. I have also done a large amount of side work, both large and small, coding, etc. You will find, as you follow my blog, that I am not scared of jumping to new technology and I have as much experience as anyone in my region at doing what it is that I do. I say this, because I feel that the next few paragraphs are quite important for anyone going into my field.

Be simple and choose wisely...

For the first several years of my career I put a heavy emphasis on following only the few key technologies that paid the bills. I followed them as far as possible. I would jump quickly to their new tech without regard for much of anything aside from my own personal satisfaction. I had to do this,  I needed it, because my passion is technology and NOT business. I like to learn and I like to tinker with the latest and greatest as soon as it hits the street. This is great to do on the side, but not really good when it affects an entire team of people or an entire business process. Being simple and choosing wisely was not what I was doing at all. I was choosing technology for my own interests and not that of the company or others on my team. I could argue otherwise and I won several small debates on this subject but in reality it was smoke and mirrors and I was wrong.

I have spent the last few years trying to undo that old style of thinking in an effort to keep things simple and to make sure that my decisions minimally impact people I work with and customers who use my products. In some ways, I have made great strides. I choose completely portable, free tooling over proprietary tooling because I believe the open source movement will pave the way going into the future. I believe it will result in better tooling, easier to share code, and an easier career path for techies like myself. I also have starting building my projects based on standards rather than anything specific to one proprietary entity or any one "grand idea". I have also taken a few steps backwards. I have supported or allowed things to happen that were against my better judgment. I have drifted away from simple technologies like SQL in favor of some that have not had time to stretch their legs yet or simply are not proven. I have paid the price for these decision and so have others on my team.

I am quite confident that if you adhere to the following key points you will make good and bad decisions, just as I have. You will, however, make far fewer bad ones. :)

How to be simple and choose wisely...

  • the initial requirements are ALWAYS wrong and they will change and twist over time 
  • release your project in extremely small chunks and gain acceptance from all involved before moving on...I said ALL involved
  • the smallest amount of code complexity will become a mess or a hurdle at some point
  • other people have already conquered technical hurdles that you may run into, find their solutions
  • DO NOT use "cutting edge" technologies or architectural ideas, unless you happen to be lead architect at Google, then you probably know better than me :)
  • do not be afraid to stick with a certain amount of legacy code or to choose a simple idea over some grand scheme you think will solve all your problems
  • follow the industry as a whole, not a single company, and not a single technology suite
  • do not move fast, even if business pressures you to do so, you will pay for it in pain that is worse than losing your job
  • if technology is your passion find a way to do it as a hobby or in an academic setting
  • if business is your passion and you are also good at tech, may God be with you

Monday, June 9, 2014

Restoring a database using Transact SQL

This is mainly here for my own benefit so that in a few months when I need this again (and I have forgotten it) I will be able to find it easily. :)

-- List the files in the backup
RESTORE FILELISTONLY -- FILELISTONLY contains a list of the data and log files
FROM DISK = N'C:\.bak'

-- Restore the database
FROM DISK = 'C:\.bak'
MOVE N'' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\.mdf',
MOVE N'' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\.ldf'

Friday, June 6, 2014

"Heisenberg Developers" by Mike Hadlow

This was an excellent post!

Thursday, May 15, 2014

Interesting article...

This kind of stuff has been on my mind frequently as of late. I am not a project manager but I am a lead developer and I could see myself possibly going into project management someday if I can keep much interest in IT as a career path to continue. These look like very good things to keep in mind should I choose to go this route.

Thursday, May 8, 2014

Windows Azure SDK 2.3 Emulator + IIS + IIS Express + VS2013 Install + Windows 8.1 + Compute Instance Unhealthy + Nuget

Okay, that was not fun and I'm glad it's over! I've been setting up a new development environment over the course of the last day. Everything went smoothly until I started trying to open a project of ours in VS2013 that was previously built in VS2012. The Azure emulator refused to start the web role, reported a "unhealthy" status, and did not supply any logging that would tell me what was going on. After some time we batted around the idea of trying IIS Express instead of full blown IIS. This was somewhat successful, but it led us to the fact that Nuget was not updating several libraries for me despite them being in the configuration. Those libraries were System.Spatial.dll, Microsoft.Data.Edm.dll, Microsoft.Data.OData.dll, and Microsoft.Data.Services.Client.dll (all version 5.6.1). To get around this one we removed version 5.6.0 of these libraries from our project and manually pointed at the Nuget packages folder to the version 5.6.1 libraries. I am certain there is some logging that would tell me why full blown IIS and the emulator would not jive. I am going to dig further for this. I will report back if I find anything. I will also report back on the Nuget issue. This is what the emulator reported...