January 2012
21 posts
6 tags
Fundamental functional techniques
It has been awhile since I posted something on F#, but I have been busy reading part 2 of Real-World Functional Programming. This so far has been one of the harder chapters. Not because I couldn’t understand what is going on in the examples it was more of a mind shift I didn’t quite yet grasp fully. Most of the examples were very easy to follow however the sheer functional aspect...
Jan 31st
11 notes
Real-World Functional Programming, Chapter 7...
Here is the complete example in chapter 7 in Real-World Functional Programming. open System.Drawing type TextContent = { Text : string Font : Font } type Rect = { Left: float32 Top: float32 Width: float32 Height:float32 } type ScreenElement = | TextElement of TextContent * Rect //like TextElement(textContent, Rect) ...
Jan 31st
Jan 31st
4 tags
Umbraco and a MVC3 Child Application
In the never ending quest to get child applications to work under umbraco do not forget to update the web.config under \Views \Views\web.config <system.web.webPages.razor> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <pages pageBaseType="System.Web.Mvc.WebViewPage"> ...
Jan 24th
6 notes
Jan 20th
6 tags
Real-World Functional Programming, Part 1 (Chapter...
Chapter 4 was actually quite fun! This chapter goes through a simple application that reads data from a csv file and produces a pie chart. The chapter starts off using the F# interactive console all the way to creating a F# application that creates a simple GUI. Some notes while building the application By the use of pattern matching you can create generic functions. In C# you need to specify...
Jan 20th
9 notes
6 tags
Real-World Functional Programming, Part 1
Well after a few days I finally was able to finish Part 1 of the book Real-World Functional Programming.  So far I am really enjoying this book. Like my other posts about F#, I am going to share a few snip its of things I learned while reading the first section. This will hopefully reinforce the knowledge I picked up. Chapter 1 - Thinking differently Functional programming is the Evaluation of...
Jan 20th
2 notes
4 tags
Forms Authentication, the Event Viewer and Event...
Recently we deployed our application using Forms Authentication and after a few days of use we discovered that our Event Viewer is littered with Informational messages relating to 4005. Event code: 4005  Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. Event time: 1/19/2012 7:16:33 AM Event time (UTC): 1/19/2012 12:16:33 PM...
Jan 19th
1 note
Jan 18th
4 tags
Jan 13th
4 notes
If Signature Tool Hangs During Code Signing
Chances are you have jdk1.7.* installed on your machine.  To fix this issue simply uninstall jdk1.7.* and install a version of jdk1.6.*.  After the uninstall I had to re-install BlackBerry Web Works to get everything working correctly again. *don’t forget that if you do this to alter your JAVA_HOME environment variable to the new path, “C:\Program Files (x86)\Java\jdk1.6.0_30”
Jan 12th
Hosting PhoneGap Blackberry .jad and .cod files in...
The next step in getting your PhoneGap Blackberry application to your users is to host the application.  This will allow for over the air installs to the device.  Here are the steps needed to get you up and running. Run ant blackberry load-device, running this command will build your jad and cod files which are signed with your private key. When the build completes copy the .jad and .code files...
Jan 12th
3 tags
F# and the Object-Oriented World
After learning about F# and the Imperative World, the next stop on our road trip is the Object-Oriented World. Just like F# and Imperative, F# and O-O felt right at home. We finally start to define some objects and behaviors mixed in with some functional syntax. Since F# allows for O-O features you can use F# to create modules that are usable by other languages in the .NET framework. ...
Jan 12th
1 note
5 tags
F# and The Imperative World
The next section in tryfsharp.org is about the imperative world. This section was the one that so far was the easiest to grasp since lots of the concepts were very familiar to me. Mutable variables, reference cells, arrays, loops, records, and collections. Notes Mutable Variables You can declare a variable binding as mutable by using the mutable keyword. This allows you to reassign the...
Jan 12th
8 notes
Taking your PhoneGap for Android and Porting it to...
Today I decided to port our Android/iOS PhoneGap application over to Blackberry PhoneGap.  The first thing I did was work through the getting started guide at http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks Going through this guide turned out to be a bit harder than I thought since it appears some of the content is in reference to an older release of...
Jan 10th
6 tags
The Functional World
Continuing on with my journey in F# tonight I went through the next section in tryfsharp.org called “The Functional World”. Like usual here are some random notes on the section. If you want to define what the return type should be in an F# function use a : and the return type. let sqr (x : float) : float = x * x This is usually a good practice to over...
Jan 10th
4 notes
Jan 6th
6 tags
Random F# Knowledge gained today
Today I started going through the tutorial for F# on www.tryfsharp.org. So far this tutorial is excellent and lets you quickly try F#. The site uses a silverlight plugin which allows you to run F# code in your browser without any IDE. You are up and running within seconds. So far I managed to go through the first section which covers the basics of F#. I will admit some of the constructs so...
Jan 6th
15 notes
6 tags
Language for January F# (1/12)
Today I met with our little group that is joining me on the journey on learning twelve programming languages in twelve months in the year 2012. We collectively decided to learn F# as our head first dive into our challenge. Why F#? Well to be honest the decision was more out of convenience, we all are .net developers running Visual Studio 2010, have all the frameworks installed, and have the...
Jan 5th
12 notes
5 tags
Knockout Js and dates from .net 4 options
If you have a DateTime property in your Model and use the built in return Json(myModel) in your Mvc controller you will quickly realize that your “text: myDate” binding will output a gross json date “\/Date(-62135578800000)\/” Options to Fix this display issue: 1) Create a binding that handles the conversion from the Json date to the format you desire ko.bindingHandlers.date = { ...
Jan 4th
11 notes
12 tags
Start of a new year
Well a new year has started and people make new year’s resolutions and this year I plan on learning 12 new languages/topics this year that are outside of my comfort zone which is primarily C# web development. Why am I doing this? I have been developing with VB/VB.NET and C# for the past 8 ½ years and it is a time for something to change up routine.  I love C# and .Net, but I am overdue to...
Jan 4th
42 notes