SmartThings Pool Temperature Sensor on the Cheap

When your biggest burden is having to go outside to check the pool temperature, you know you need better problems. Previously, my biggest problem was wondering if I left the garage door open. That was easily solved by installing a Z-Wave Garage Door Opener. After some searching, I wasn’t satisfied with any of the solutions I came across for my pool conundrum. They either seemed cost prohibitive or unnecessarily complicated, so I decided to roll my own.

Continue reading

Use Rooted Paths in T4 Templates for .dlls also in the GAC

rootsI just spent about 2 hours troubleshooting why my T4 Generator wasn’t using the correct version of the DLL. It turns out the latest version of Visual Studio insalled a newer version of ‘Microsoft.SqlServer.Smo’.

My template was originally using the following code:

<#@ assembly name="Microsoft.SqlServer.Smo" #>

I then tried using the full path to ensure it was not pulling from the Global Assembly Cache this seems to have resolved the issue. I now can say with confidence the T4 template will now be shielded from any changes to the GAC made by Visual Studio or SSMS.

<#@ assembly name="$(SolutionDir)CodeGeneration\bin\Debug\Microsoft.SqlServer.Smo.dll" #>

Hopefully, somebody will find this post and save some time. Did I mention I hate the GAC?

Ubuntu and Node.js for the Uninitiated .NET Dev

It’s been a about 12 years since I’ve used Linux as a desktop. My last foray was spending a marathon two hours with a friend, who ironically now works for Microsoft, getting 3D Acceleration to work. Double Ironically, Microsoft is now introducing full bash support for Windows 10. The fruits of our labor ended with me playing Tux Racer for about 30 minutes, losing intrest, and moving back to good old Windows 2000.

Continue reading

Choosing a .NET installer

Installer

You know you want it

These days most of us are avoiding deployment hassles by writing web apps and/or mobile apps. However, there are still those wacky edge cases where you need to distribute a good old-fashioned Windows application. I currently have requirements for a project that may not always have internet access ~GASP~ and thus needs to store data locally, throwing a wrench into my make-everything-a-website manifesto.

Continue reading

Windows Azure Cost for the Casual Dev

Codemonkey can has Azure

Whats it cost a guy to monkey around with Azure?

I was very excited when I found out Microsoft was doing a free Azure trial. One of the big deterrents for me to use Amazon ETC or Windows Azure is the cost. Despite being gainfully employed, I have the (bad?) habit of funding my ‘hobby’ development like I’m still a sixteen-year-old flipping burgers. Sixty dollar bar tab, no problem. Sixty dollar Azure bill for the month – that’s outrageous! To be fair, I do have a Dreamhost VPS that only costs me about twenty dollars a month (300 MB of ram on Linux).

Continue reading

Dotnet Rocks Road Show Recap

Front Row Hakintosh

Dude, I hope you get your hackintosh working. Next time, maybe don’t sit in the front row.

The .Net Rocks road trip hit Orlando on Thursday and I had the pleasure of attending. For those of you who don’t know, .Net Rocks does a podcast for people who are interested in developing software with Microsoft .net. The focus of the one-day event was “Developing Modern Mobile Apps”, which is a cleverly disguised way to say “Developing Modern Mobile Apps using Xamarin”.

Continue reading

Using NLog with Windows Azure Cloud Services

NLog is an easy to use logging package that can be plugged into virtually any .net application. In my recent experimentation with the Azure platform, I ran into a few hurdles with NLog integration. Azure is intended to allow for horizontal scaling, so you can’t design for a single ‘box’ running your application. While the benefits are many, the drawback to the architecture is that you can just write a file out to a logs directory on your server. But fear not, friends; there is a fairly easy way to get NLog working with Azure using a few simple config settings.
Continue reading

Azure: One week later

After my weekend blitz to get an Azure project in the cloud last week, I’ve learned a few things about the platform that I missed in my previous haste.

SQL Server Management Studio (SSMS) doesn’t do GUI for Azure

I misspoke in my previous article. You can connect without issue to an Azure database but, according to this stack overflow post, you’re basically limited to scripting out your create table statements.  For SQL gurus this might not be a problem, or even preferred. However, for us mortals who still have to look up the syntax to create a cascading delete constraint (included below), it’s not optimal.


ALTER TABLE [dbo].[Childtable] WITH CHECK ADD CONSTRAINT [FK_Childtable_ParentTable] FOREIGN KEY([ParentId])
REFERENCES [dbo].[ParentTable] ([Id])
ON UPDATE CASCADE
ON DELETE CASCADE

SQL Server Data Tools (SSDT) are solid

VisualStudioDataTools

Visual Studio Data Tools in Action

I always hated the built-in data connection functionality of past Microsoft products (VB6 comes to mind…yes, I’m that old). Visual Studio data tools gives you everything you need to build a database properly including scripting out commands and data created using the GUI. I was able to easily setup a database with a full set of constraints without any pain.

There are three main ways to run your application on Azure

  • Websites
  • Cloud Services
  • Virtual Machines

This guide by Microsoft goes in depth and explains it better than I can. I’ve been using websites which are extremely easy to deploy to and should automatically scale up based on load. If I need more control, switching to one of the other methods is not a gargantuan task. Since websites are stateless on Azure, I will be experimenting with writing error logs since you don’t have persistent file storage. Stay tuned…

Windows Azure – I can’t say no to a free trial

I’m sad to admit that I’ve yet to create an Azure project despite the massive hype train promoting it the last few years. While researching cost effectiveness vs. Amazon E2C, I saw that Microsoft was offering a free trial. Few words motivate me like the word ‘free’ so I set out to get a site up and running. I had a small project I wanted to do and figured this was a perfect test case.

Continue reading