Archive for April, 2009
Cloud Computing User Group and Chicago Code Camp
Posted by Scott Seely in Uncategorized on April 10, 2009
To everyone who came out to the Midwest Cloud Computing User Group (Chicago/Downers Grove), I want to thank you for coming and listening how the various cloud platforms work. For those that missed the talk, I’m busy turning the comparisons into more detailed blog postings. I’ve probably got 2-3 months worth of posts that will present more details. Those posts should start showing up next week Monday (4-13-2009).
I also mentioned that I am helping organize a Code Camp on Saturday, May 30, 2009 at the College of Lake County, Grayslake Campus. This Code Camp will have talks on .NET/Microsoft topics, Test Driven Development, Python, Google App Engine, Ruby, and more. Please visit www.ChicagoCodeCamp.com for details, to submit proposals, and to figure out how to register.
AWS Management Console is nice
Posted by Scott Seely in Uncategorized on April 10, 2009
The Amazon Web Services Management Console is SIGNIFICANTLY easier to use than the command line applications one must use to manage an EC2 instance. I had puzzled out all the commands and got things working. Tonight, I stumbled across the AWS Management Console: https://console.aws.amazon.com/ec2/. It’s a nice, point and click interface to setup an Amazon Machine Instance (AMI), bundle that instance into a bucket, figure out connection credentials, setup common security groups, etc. The interface has the advantage of telling me exactly how far along the system has gone with each step. This was particularly nice when bundling my AMI. Without the feedback, I wouldn’t have known what was going on for the 20 or so minutes where the instance was paused and packaged. The service even handles storing the image in your S3 account.
I also had to install IIS tonight. The console made it easy to create a volume based on the Windows CD from the list of already stored volumes and attach that volume to my running instance. For something that looked tough, the tool made things easy (ok easier).
For what it’s worth, if you are building Web Applications, AWS EC2 has the hands down WORST initial deployment experience (things get a lot better once the VM is up and running). Azure takes about 15 minutes from build to first deployment. App Engine takes about 2 minutes.
Filtering in a sequence
Posted by Scott Seely in Uncategorized on April 8, 2009
It turns out that when many mechanisms exist to do a task, many things will work. Here is another way to handle the Seq.fold task from yesterday in a much cleaner way. It’s still neat to see all these workable options! Seq has another method, filter, which only returns those elements that return true for the supplied function.
#light
open System.Collections.Generic
type MyType(propA:string, propB:int) =
member this.PropA = propA
member this.PropB = propB
override this.ToString() = System.String.Format("{0} {1}", this.PropA, this.PropB)
let typeSeq =
[| new MyType("red", 4);
new MyType("red", 3);
new MyType("blue", 3);
new MyType("blue", 4);
new MyType("blue", 5);
|]
let filterVals theSeq propAValue =
theSeq |> Seq.filter(fun (a:MyType) -> a.PropA = propAValue)
printfn("%A") (filterVals typeSeq "red")
printfn("%A") (filterVals typeSeq "blue")
I’m Presenting at Chicago Cloud Computing User Group
Posted by Scott Seely in Uncategorized on April 8, 2009
I received some great feedback on my survey of cloud computing platforms at the February Cloud Computing User Group in Downers Grove, so I’ve been asked to bring the show to the downtown Chicago meeting for the April meeting on Thursday, April 9 at 5:30 at Microsoft’s downtown location. If you saw the talk last month, I’ve been asked to beef it up with real world code running on all three major platforms: Google App Engine, Amazon Web Services, and Azure. It’s a simple photo sharing application based on the same code I showed in February for App Engine. Please sign up at https://www.clicktoattend.com/invitation.aspx?code=136727.
The full meeting description:
Join us for the fourth local meeting of the Cloud Computing User Group – this months being held at the Microsoft offices in Downtown Chicago. Note : this meeting will be a revisit and slight revamp of last month’s content. As before, we will be learning about how Live ID integration works in the Azure cloud computing platform. We’ll demo and dig into the code of an application built in the cloud that integrates directly with the Live ID service and stores information specific to the individual associated with that ID.
Also, as before, Scott Seely, Architect at MySpace, will kick off the meeting with a 1-hour overview of the top three cloud computing offerings available today: Google App Engine, Amazon EC3 and Azure Services. What Scott will also demo during this meeting is how to actually implement code one each of the three platforms, showcasing application hosting, storage and data retrieval.
Again-you can register at https://www.clicktoattend.com/invitation.aspx?code=136727. I hope to see you there!
Another use of Seq.fold: filtering
Posted by Scott Seely in Uncategorized on April 7, 2009
Last night, I had to filter a bunch of entries in a sequence down to only those items that had a particular characteristic. My thought process went like this: “I have a list of objects. When I’m done, I want a list of objects that have property X, discarding everything else. Ah-ha, I want to fold the sequence into a List.” I had some other constraints, such as the other library I was using was written in C# and used List<T> instead of F# types. I don’t know that this is the best way to do things, but I’ll show it anyhow as an illustration of nifty stuff I’ve done lately.
The code takes an array of some well-defined type and then filters on that type. In this case, the type has a formalized string * int tuple with names to make it useful from C#. You can place any well defined C# data type in place to get equivalent effects. For example, imagine sorting some Person or Order business object in your F# code looking for People named Fred or Orders over $100. In our case, we have the type MyType as a stand-in. The code filters on the quality of the object and returns only those instances with that quality.
#light
open System.Collections.Generic
type MyType(propA:string, propB:int) =
member this.PropA = propA
member this.PropB = propB
override this.ToString() = System.String.Format("{0} {1}", this.PropA, this.PropB)
let typeSeq =
[| new MyType("red", 4);
new MyType("red", 3);
new MyType("blue", 3);
new MyType("blue", 4);
new MyType("blue", 5);
|]
let filterVals theSeq propAValue =
theSeq |> Seq.fold(fun (acc:List<MyType>) (a:MyType) ->
if (a.PropA = propAValue) then
acc.Add(a)
acc) (new List<MyType>())
printfn("%A") (filterVals typeSeq "red")
printfn("%A") (filterVals typeSeq "blue")
This code generates the following output in the interactive window:
seq [red 4; red 3]
seq [blue 3; blue 4; blue 5]
I like this syntax bit better than the LINQ syntax as I can achieve a typed collection in a trivial manner. I’m also enjoying the notion of moving away from explicit looping constructs and towards simple functions that just do the right thing for me.
Full transition off of Comcast
Posted by Scott Seely in Uncategorized on April 3, 2009
I had a lot of issues with Comcast and their customer service. The last straw came 3 weeks ago when I got a bill indicating that they wanted money for a service I had cancelled on January 5, 2009. I had spent a total of 22 hours on the phone or going to their offices in person to explain that I only wanted Comcast Internet service-no phone, no TV. Their billing system was beyond repair and I just don’t have the time to fix my bill every month that they f*ck it up. I’m using AT&T Internet only (no land line) DSL service. Hook up was painless. Speed is well in the land of good enough-I can watch TV shows on Hulu and listen to online radio stations just like before. Real big downloads (think downloading an MSDN copy of Visual Studio 2008) only moves at 275-300KB/second. Comcast used to give me 1500KB/second.
Oh yeah, AT&T is also 33% cheaper (or Comcast is 50% more expensive). Since the start of the year, my monthly home communication bill has gone for $390/month to $238 month as of this last switch. Please note that I could be doing better if I didn’t feel the need to be a mobile computer geek:
- 4 Cell phones on a 1400 minute/month plan. (1 phone is also the house phone, hooked up to the internal wiring.): $89.99 + 2 * $9.99 = $109.97 * 0.8 (standard deal offered if you belong to an organization that has a discount setup with AT&T Wireless).
- Unlimited texting on all phones. $30.
- Tethering/data plan on one phone for mobility (3 Mbps 3G connection for when I’m not at home but still need to work). $65
- Pro DSL Plan from AT&T: $40
- 11.3% Tax on everything but DSL:$15.26
This represents a 40% reduction in communication costs. I purchased a fair amount of equipment to drop cable and move to cheaper alternatives:
- $100 for a bluetooth cell phone->home line connector.
- $129 for a new dual digital tuner for my HTPC.
- $100 for a new HDTV roof antenna and two signal boosters.
- $100 for a 1 TB Hard Drive to hold the larger HD content.
Total cost for the update was $429. I’m saving $152/month, putting payback at 3 months. The HD spectrum in my area has enough good TV to keep us happy, so we have lost nothing of importance in this switch.
The point: I won’t miss Comcast and I’m saving a bunch of cash by eliminating things I didn’t need. Also, my home phone number is now full portable.