Showing posts from 2012

The Urgent versus the Wise… the next crisis?

I caught this blog post, The Tyranny of the Urgent , via IEEE. It happen to resonate with some recent reflections on the plus and minus of Continuous Deployment or Continuous Integration . Jim cites “Agile development easily devolves into management by crisis.”   I have observed that being agile and delivering quickly tend to deliver superficial products. Products that are then reworked, and reworked, and reworked. At one extreme, you have waterfall development which results in absolutely detailed plans that are difficult to adjust. At the other extreme, agile has been been taken by some into a gospel of immediate execution.  All of the troops get up and charge across the open field. Yes, the objective may be taken but there is often a high body count, a wasteful body count.   Recently I talked to a neuropsychologist who have treated many many battle causalities from Microsoft, Amazon, Google and many start-ups. Unlike the US Marines, with “no man left behind”, causalities are

Installing Motorola Droid as an Android Debug Bridge device

In my last post I successfully installed the Kindle driver as an Android Debug Bridge (adb) device. My Motorola Droid was not recognized as an adb device – and for one application that I am planning to do, I need GPS. So once more into the world of partially correct forum posts. First item to check was to insure that adb was enabled on the device!  It turned out that I had not enabled it (I had enabled Unknown Sources). When I connected the USB after changing the adb setting, I received a driver error. The phone now shows as a Drive (G:\) only instead of MTP USB Device .  One step forward, half a step back. I decided to just double check that the adb is not working… so at the command line, What! It’s there. The device ID is different from the Kindle. This was a mercifully short post.  If I had not double checked, I could easily gone down a rabbit hole trying to get something looking like a phone showing up in the device manager. A rabbit hole that could hav

Titanium Studio “Appcelerator” and Kindle HD development on Windows-64

,I’ve started to play with Appcelerator because it is effectively a cross-platform development platform for Droid, HTML5 and iOS. About two years ago I had done some Droid development just using the SDK. I have encountered a few frustrations and have not been pleased with the load time for the Droid Emulator on a Windows-7 x64 box with quad cores and 10 gigs of memory. For some simple applications, I have drunk a cup of coffee in the time that it took to build and launch in the emulator.   My traditional “magical chant” to get rid of technical frustrations is to start documenting. Often the process of documentation result in discovering skipped tests or alternative paths that could be needed.   Steps Download Titanium from . Large download. I ended up having to re-install it to C:\Titanium , it appears that having a space in various paths results in problems according to forums. Doing this resolved some build issues and set a pattern that I kep

How to convert SVG data to a Png Image file Using InkScape

Introduction The project required the need to put the visual pie chart on a web page on the client and in a Pdf file created on the server. I eventually choose to use a Telerik Kendo DataViz Chart control on the client, and use a PNG file on the server for the Pdf file. This blog post will explain the process and code to convert the client-side pie chart Svg data to a Png file, and provide a download to the working code. Prerequisites You need to have a trial version of the Telerik Kendo library installed in order to make the sample code work. You also need InkScape installed. InkScape is the application that does the actual conversion. You will need to change the Web.config appSetting of “ExeDirectoryForInkscape” to represent your own installation location. Any SVG Data Will Work The pie chart was created using the Telerik Kendo DataViz chart control. While I name a specific control, as long as you have access to the SVG data, the same conversion process on the server will

Restyling an Html <SELECT> Element from a Telerik Kendo Panel Bar

Introduction Recently, I needed to restyle an HTML <SELECT> box so that the selected element had a different background color. In all other ways, the element could be exactly like an HTML <SELECT>. Below are both the original element, and the restyled element.     This type of style change allows the novice user to immediately identify the control’s implied usage while allowing for some coordination with the site and page’s overall style.   Technology Platform The project is an MVC site with jQuery, and Knockout.js on the front-end requesting json content on the backend. For the purposes of this blog post, I’ve stripped down the functionality so that just the required elements are visible. The project was already using Telerik Kendo controls so morphing the Kendo Panel Bar into a <SELECT> element was suggested. The main work is in the css file but the entire working sample project is available for download.   Telerik Kendo Trial Version

Migrating your Sql Azure Database Using Data-tier Application Technology

This blog post by Wayne Berry shows how to migrating your Windows Azure SQL Database Using Data-Tier Application Framework (DacFX) Technology to an on-premise SQL Server. With the Window Azure Portal, you can easily create a Data-Tier Application logical backup package (BACPAC), store it to your Windows Azure Blog Storage; and then, using SQL Server Management Studio 2012, you can import that package to your local database server. Read: Migrating your Windows Azure SQL Database Using Data-Tier Application Framework (DacFX) Technology {6230289B-5BEE-409e-932A-2F01FA407A92}

Using XMLHttpRequest.getResponseHeader to get Json Response Headers in jQuery

Introduction While developing a web page with a summary graph and a detail grid below, I needed to pass a small amount of data outside of the existing Json call data sets. I also wanted to do this without another asynchronous call back to the server. I wound up stuffing the data in a custom http response header while already on the server. This article explains how I retrieved the data on the client. Existing Client Libraries Both the graph and the grid were independent jQuery libraries with very specific Json response requirements. Stuffing the small amount of data in one of those response data sets could have been done with enough tinkering but I wasn’t sure how this would affect those libraries now or in future versions. While the data was related, it was also separate and I wanted the code design to reflect that. Server Http Response Stuffing This project uses Asp.Net MVC 4. The code to add the small amount of data should be the same across the .Net platform: HttpCon

Background tasks (continuous code) in the Cloud: Cloud Foundry beats AWS and Azure

Introduction I have a background task collection I need run, continuously, but with different timer intervals for each task. It is a critical part of my web services and provides the data gathering and transformations the make the web service valuable. How should I package the code and where should I deploy it? Only in the cloud.   As the cloud space is moving faster than I can write this, any of this could be outdated by the time you reader it. Consider Time, Money, and Ease of Deployment In struggling with where to deploy the code, I considered the cloud cost, the time to learn and build the solution as well as any cloud gothchas. I’m now on my sixth cloud provider trying to determine if they are the best at background tasks. Why? Because background tasks are where the heavy lifting happens. I want to spend my time getting that heavy lifting correct and not fighting with the cloud environment. Background Task Defined Just to be clear, I consider a background task any co

Steps for Consuming XML data in .Net

Introduction While consuming third-party RSS feeds, I found I had to relearn how to deal with XML data. This post is meant to prepare any developer who needs to consume XML which they do not control. While I used RSS feeds, any XML will apply. I wanted to change the meta data and data of the XML file into a model of data that I could control with .Net classes and conventional data storage.   This post is organized to take you from an xml file to .Net classes able to consume, serialize, and test the xml. Generating an XSD file from an XML file using Xsd.exe The first step is to make sure you have the XML Schema Definition tool, xsd.exe , installed. It is part of the .Net Framework tools . Make sure the executable location is part of the system path , user path, or command prompt path. On my computer the path is “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin” and I added it to the system path so it is available at any command prompt, regardless of the user.   Separate ou

Post-Ruby High with BDD in .Net

I mentioned in my last post how much I enjoyed Ruby and wanted to continue to use it in my project. That is easier said than done.   In order to leverage all the great Ruby ( RoR ) tools and methodologies I learned, I’m attempting to find .Net equivalents. This started with finding a Behavior Driven Development ( BDD ) tool. There are several that come up but they are a hybrid to a BDD (I picked SpecFlow ) tool siting on top of a TDD tool ( NUnit or MSTest).  I also needed a web driver to make calls to a browser and verify results. I looked at WatiN but went with Selenium .   The next two tools I need to add are a mocking tool ( Moq ) and an injection tool (probably NInject ).   Since the class used GitHub and Heroku , I’ll also stick with that. My GitHub account is DFBerry .  All my example code is posted up their in public repositories.

Results of .Net Developer’s 5 weeks with Ruby (RoR) and SaaS

Introduction Several things happened in a short period of time to influence my decision to take a Ruby/SaaS class. I’m a lifer on .Net or more specifically Asp.Net and it’s precursor, Asp. First, the MVC .Net book I was reading at the time said programmers either use .Net or Ruby for MVC development but not both. Second, an online UC Berkeley class was free and gave me both a new language ( Ruby ) and backfilled any software-as-a-service (SaaS) holes in my knowledge. Third, the class used the Agile methodology which I had bits and pieces of. I wanted to see someone else’s interpretation put into practice.   Ruby on Rails (RoR)/MVC I knew MVC , web protocols, and web development so the learning curve was all Ruby. The class had a quick pace where I knew how to do it in .Net but not Ruby. Ruby, fortunately, is a very easy language to pick up. It feels very much like a script kiddie toy but  more powerful.   Interpreted versus Compiled Ruby is interpreted while .Net is c

Combining Multiple Azure Worker Roles into an Azure Web Role

Introduction While working on ’s web service, it appeared from the Windows Azure project templates that I might need several worker roles because they cycle at different times. One worker needed to cycle every day. The other needed to cycle every five minutes. Since the work and the cycle rate were very different, it felt “right” to isolate each role. In this post, I’ll show you how I combined multiple worker roles into a single, underutilized Azure web role thereby keeping the concept and design of worker roles while not having to pay extra for them. In order to verify the solution, the project uses Azure Diagnostics Trace statements. The solution file is available for download . Combining Multiple Azure Worker Roles into an Azure Web Role Currently, I use a small Azure instance and there isn’t enough traffic to justify a separate worker role. I implemented Wayne ’s process for combining one worker role with a web role a while back. Now I needed to add anot