Continuous Integration with Windows Azure SDK 1.7, Powershell and TFS Build too!

Oct 18 2012No Comments by stanley

Environments change and the solutions to support them have to keep up. I was very entertained with my old deployment solution for a good while. However, we eventually moved to Azure, and I needed to scramble to find something new. Tom Hollander's Automated Build and Deployment with Windows Azure SDK 1.6 filled that void until I upgraded my project type to the 1.7 SDK. At that point, I realized I had to roll up my sleeves and cobble something new together. From an automated deployment …

Azure, HowTo, PowerShell, Team Foundation Server Read more

Continuous Integration with TFS2010, MSDeploy & VSDBCMD

Oct 28 2011No Comments by stanley

After I created an account at Cytanium, I quickly discovered the glory of One-Click Publish. After setting up my source control in TFS. All I could think of, was getting TFS to do the same thing for me, but even I knew that wouldn't be enough. I wanted TFS to deploy my database changes as well. Well, there is that Schema Compare utility in Visual Studio, I know it can figure out and deploy changes to a database. I figured if Visual Studio can do all of these things, I should be able to as well.. …

MS Web Deploy, Team Foundation Server, Visual Studio, VSDBCMD Read more

Synchronously Await an Async Workflow Using Observable.guard

Oct 15 2011No Comments by stanley

The other day, I couldn't figure out how to Synchronously wait for an Async workflow to complete. I was pretty sure I needed to use Observable.guard, I just couldn't wrap my head around how to use it. This morning I was on a mission to figure it out. [fsharp] open System open FSharp.Control let event = new Event<_>() let createObservableByExecutingAsync asyncToExecute = event.Publish |> Observable.guard(fun _ -> let asyncOperation = async { …

Async Workflow, f#, fsharpx Read more

Rate Limiting a Function with Async Workflows

Oct 14 2011No Comments by stanley

So I am trying to deal with an API that says I cannot make more than 4 requests per second. This is a really good use for F# since it has such great support for Asynchronous Workflows. I took a little inspiration from this post by Luca Bolognese. [fsharp] module RateLimiting open System open FSharp.Control type RateLimitedMessage<'a,'b> = {payload: 'a ; response: ('b -> Async<unit>) option} type RateLimitedAgent<'a,'b>( operation: 'a -& …

Async Workflow, f#, fsharpx Read more

YUI's CompressorTask with MSBuild and Visual Studio

Sep 24 2011No Comments by stanley

While trying to integrate YUI Compressor as a build task in my current project... Post Build Event: [plain] $(MSBuildBinPath)msbuild.exe "$(SolutionDir)MinificationSettings.xml" /property:SourceLocation=$(ProjectDir) /p:JavaScriptOutputFile=$(ProjectDir)ContentMinScriptsExample.min.js /p:CssOutputFile=$(ProjectDir)ContentMinCSSSite.min.css [/plain] I got the error: [plain] MSBUILD : error MSB1008: Only one project can be specified. …

MSBuild, Visual Studio, YUICompressor Read more

Project Euler in F# - Problems 4 - 6

Sep 04 2011No Comments by stanley

Problem 4 Find the largest palindrome that results from the multiplication of two numbers under 1000 I feel like I have a strange obsession with the Seq.unfold function. That function does most of the heavy lifting here. Although the wise Euler pointed out to me that I can avoid duplicate multiplication factors, and keep track of the largest palindrome so far to avoid unnecessary `isPalindrome` checks. [fsharp] let problem4 () = let isPalindrome (value: string) = match value. …

f#, project euler Read more

Project Euler in F# - Problems 1 - 3

Sep 02 2011No Comments by stanley

Problem 1 Find the sum of all the multiples of 3 or 5 below 1000. Brute force is the first thing that comes to mind [fsharp] let problem1 () = {1 .. 999} |> Seq.filter (fun x -> (x % 3 = 0) || (x % 5 = 0)) |> Seq.sum [/fsharp] But the wise Euler shows Math to be a better tactic, as his answer is unquestionably faster. [fsharp] let problem1_correct () = let target = 999 let sumDivisibleBy value = let p = target / value value * (p * (p + 1)) / 2 …

f#, project euler Read more

Project Euler in F#

Sep 02 2011No Comments by stanley

While job hunting this time around, a recruiter pointed me to a website called Project Euler, as a great place to practice. Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems. The problems always seem overly complicated, and somehow ask …

f#, project euler Read more

Just an Idea

Nov 28 2007No Comments by stanley

Things always start out with ideas. Webbloging is a new idea to me. As programmers we are all surrounded by ideas. But how do you know an idea is good? How do you know if your idea is good? From what I've learned the only way to find out is to share. So I rounded some friends and decided to start a place to let our ideas be shared. No matter how eccentric. Welcome to the site.

Read more