Moved to Sitefinity CMS
Posted by Scott Seely in Uncategorized on January 8, 2009
You may have noticed a big change to the site. It almost looks nice, right? I started using Sitefinity for the Lake County .NET Users’ Group late last month. I really like the product, so I figured I would go with the community edition for my personal site. From what I’ve seen so far, the code is laid out quite well and is very easy to understand. I’ve made a few minor modifications to the master pages– everything was very intuitive. And, the admin features are first rate. If this site ever starts making money, I’ll be buying a full version– the product is completely worth the price.
What does #light mean?
Posted by Scott Seely in Uncategorized on January 7, 2009
If you see any F# code listing, you will see that almost all of them start with the command #light. Right now, this is a requirement. The first line in any F# file must have #light. After reading about the language, I grokked that it allowed for a shorter syntax than the alternative, #light “off”. Here’s what I’ve been able to figure out so far. From Development in a Blink, I see this:
The #light declaration makes whitespace significant. Allowing the developer to omit certain keywords such as in, ;, begin, and end.
For those of you that have used Python, this makes sense. Indentation gets to have meaning when #light is on. Blocks of code are physically aligned, so indicating where something starts and stops is redundant and, potentially, useless. So, what happens when we turn #light off? Let’s take the Name type developed in a recent post. With #light, the class looks like this:
#light
namespace SomeNamespace
type Name(fname : string) =
let mutable fName = fname
member this.FName with get() = fName
and set(x) = fName <- x
So, what did #light buy us? Well, it meant that we couldn’t write the following, equivalent code:
#light “off”
namespace SomeNamespace
type Name(fname : string) =
class
let mutable fName = fname
member this.FName with get() = fName
and set(x) = fName <- x
end
The difference, in case you missed it, is that class and end HAD to be declared. Furthermore, the indentation/whitespace was no longer significant. This let’s me write code that is harder to visually parse. And yes, I could have indented the code to make it more readable:
#light “off”
namespace SomeNamespace
type Name(fname : string) =
class
let mutable fName = fname
member this.FName with get() = fName
and set(x) = fName <- x
end
I think I’ll be using #light since most examples on the web stick with this syntax. Being the odd man out won’t help me or anyone else who eventually needs to use my code. Good habits start now. #light also let’s me write less code. I have a fairly consistent ratio of lines of code/defects. If I can avoid some little details and lines of code, I will have fewer mistakes.
Predicting the name of an F# type
Posted by Scott Seely in Uncategorized on January 5, 2009
One of the first questions I came up with yesterday when digging into F# was this: what does an F# type look like to C#? As a noob, that’s an interesting question to me. Of course, being a noob, I had no clue about how to create a custom type. So, I asked Google what an F# type definition looked like, then massaged that until I had something that I might not completely understand, but that does show the problem at hand. I created a lame Name class that only supports a first name. Boo-yah!
First, I went to an existing file in an F# library called stuff.fs. There, I added the following class:
type Name(fname : string) =
let mutable fName = fname
member this.FName with get() = fName
and set(x) = fName <- x
For you C# heads out there, let’s look at what the code above really is saying.
- Create a new type, Name.
- Name has a single constructor that takes a string.
- Name has a member variable, fName, whose value can change at runtime.
- Name has a public property, FName, that has a getter and a setter.
OK, so now what does this look like in C#? I add the F# library to a C# project, instantiate a copy of Stuff.Name (I’ll get to the Stuff item in a moment), and then I right click on Stuff.Name and pick Go to Definition. Since we are in C# land, VS 2008 will pull up the C# vision. This looks exactly like the following:
using System;
public static class Stuff
{
[Serializable]
public class Name
{
public Name(string fname);
public string FName { get; set; }
}
}
That’s kind of weird. I didn’t expect to see Name declared as a inner class from a static class whose name comes from the name of the F# file. Still, that’s what we have. Does this mean that F# code doesn’t allow one to create CLR namespaces? No– of course not! So, how do you get the Name class into a CLR namespace called SomeNamespace? I did a little digging and found out how:
namespace SomeNamespace
type Name(fname : string) =
let mutable fName = fname
member this.FName with get() = fName
and set(x) = fName <- x
Yeah– there’s a keyword called namespace that allows you to add objects to a CLR namespace. The odd bit here is that one doesn’t say namespace blah =. Instead, you omit the ‘=’. The ‘=’ will work, but you will get a message saying that the syntax has been deprecated. With this small change in place, things look more correct to my C# eyes. The static class disappears, and that’s good!
using System;
namespace SomeNamespace
{
[Serializable]
public class Name
{
public Name(string fname);
public string FName { get; set; }
}
}
Right now, I think my focus will be on writing F# code that plays well/looks natural to C# developers. I’ll keep that point of view until I see a reason to change.
What am I doing now?
Posted by Scott Seely in Uncategorized on January 4, 2009
A long while back, I mentioned that my wife, Jean, and I were looking at starting up a company. Well, we’ve done a lot of thinking about what the product should do and how this should be done. Because of other recent activities, I haven’t had a lot of time to execute on the idea. The fact of the matter is that we still like the underlying concept, but the implementation concept has morphed several times since we had the idea. The biggest changes are these:
F# is a functional .NET language. I’ve always been a fan of functional programming as it typically allows me to write my applications using fewer lines than what I would do in pure imperative mode. For better or worse, imperative languages are still center stage (and have been for decades). In order to pay the bills, it is easier to find work using C++/C#/Java than using LISP/Prolog/Scala. However, with F# (an OCaml based language), we have a chance of seeing functional programming go mainstream. I have a project in mind that needs a .NET language, so why not use the project as a means to really get into F#.
The second thing that happened is the beta release of Azure at the 2008 PDC. A big concern of mine has been hosting the set of servers that will eventually be needed if the web site idea takes off. Yes, I’m familiar with how to make sites scalable, how to buy a server, etc. I’m also familiar with the fact that more servers means more people I’d have to hire who may or may not have the chops to manage a large-ish web site. The cloud stuff is very appealing to me as it allows someone who worries only about managing servers do whatever that is. I can then focus on conserving space, writing better algorithms, and paying a smaller price to keep that service up and running (yeah, I’m assuming that, like other managed services, the cost of going to the cloud is less that the cost of personnel + equipment + power + licensing).
So, until I either lose interest or get so swamped with work/life/whatever, expect to see the blog focus on F# and Azure stuff. Right now, I’m a noob.
A LINQ Book you need
Posted by Scott Seely in Uncategorized on September 26, 2008
If you do any work with LINQ, you have to go out and buy the LINQ Pocket Reference by Joseph and Ben Albahari, ISBN 978-0-596-51924-7, O’Reilly. It’s a tiny, 160 page book that will literally fit into the back pocket of your jeans. I love it, use it whenever I’m doing LINQ stuff. It’s a permanent fixture on my desk and in my laptop bag. Just go buy it, now! It’s $10.19 at Amazon. If you program for .NET, there is no excuse to NOT own this book. Skip lunch today if you need to budget for the money.
Visual Studio 2008 SP1 causes IIS/WAS to Fail to Start
Posted by Scott Seely in Uncategorized on August 18, 2008
I found this in the forums, but it wasn’t super easy to dig out. Hopefully, this post will help someone find things a bit easier.
Symptoms: You can’t access a site on local IIS after installing Visual Studio 2008 IIS on Vista or later.
Event log at Windows LogsSystem will have an entry that reads as follows:
Log Name: System
Source: Microsoft-Windows-WAS
Date: 8/18/2008 2:24:10 PM
Event ID: 5189
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: xxxx
Description:
The Windows Process Activation Service failed to generate an application pool config file for application pool ‘*’. The error type is ‘0’. To resolve this issue, please ensure that the applicationhost.config file is correct and recommit the last configuration changes made. The data field contains the error number.
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”>
<System>
<Provider Name=”Microsoft-Windows-WAS” Guid=”{524B5D04-133C-4A62-8362-64E8EDB9CE40}” EventSourceName=”WAS” />
<EventID Qualifiers=”49152″>5189</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2008-08-18T19:24:10.000Z” />
<EventRecordID>79948</EventRecordID>
<Correlation />
<Execution ProcessID=”0″ ThreadID=”0″ />
<Channel>System</Channel>
<Computer>xxxx</Computer>
<Security />
</System>
<EventData>
<Data Name=”AppPoolID”>*</Data>
<Data Name=”ErrorType”>0</Data>
<Binary>90040780</Binary>
</EventData>
</Event>
This is caused by SP1 incorrectly updating applicationHost.config. To fix, do the following:
- Open an administrative command prompt.
- Type in: notepad %windir%system32inetsrvconfigapplicationHost.config
-
Add this text at /configuration/configSections/sectionGroup[@name=system.applicationHost]/
<section name=”configHistory” overrideModeDefault=”Deny” />
- Save applicationHost.config
- Close Notepad
- In the administrative command prompt, type in: iisreset /start
For reference, the sectionGroup in applicationHost.config should look like this:
<sectionGroup name=”system.applicationHost”>
<section name=”applicationPools” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”customMetadata” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”listenerAdapters” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”log” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”sites” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”webLimits” allowDefinition=”AppHostOnly” overrideModeDefault=”Deny” />
<section name=”configHistory” overrideModeDefault=”Deny” />
</sectionGroup>
The original source of some of this information is: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2859933&SiteID=17.
Chicago Area .NET User Groups Call for Speakers
Posted by Scott Seely in Uncategorized on June 25, 2008
CNUG.org sent this to me, and I’m passing it on as a member of LCNUG.org. This will be a lot of fun for Chicago area developers!
What: Chicago Day of Dot Net/Chicago Tech Fest (Name to be decided)
When: September 6th 2008 – 8:30 am – 5:00 pm
Where: Wheaton IIT
Overview
The Chicago area .Net based users groups are looking for speakers for our forth coming conference on September 6th.
This is a one day event that will be hosted by located at The Illinois Institute of Technology (IIT) Wheaton Campus and is a free, community based event. This means we are looking for both seasoned speakers as well as ones trying to get their feet wet. Our sessions will last between 1 – 1.5 hours and are meant to teach and enlighten the audience.
We are in process of planning a great day of learning and we need your help. We are looking for energetic, charismatic, passionate and engaging speakers. If this is you, we want you to help us out. We need your passion towards software development to fill our session slots. We are planning on having 5-6 tracks with 5 sessions per track (25-30 total sessions).
Possible areas of interested are
.Net based technologies (Linq, .Net 3.5, Asp.Net, Smart Client, MVC)
Agile techniques (TDD, BDD, DDD, CI)
MOSS/Sharepoint
User Experience
Biztalk
XNA
TFS
If you are someone who would like to present, please send the following information to Keith Franklin (KeithF@Magenic.com).
Your Name
Company
Phone:
Session Name
Session Abstraction
New venture starting up
Posted by Scott Seely in Uncategorized on June 20, 2008
My wife and I have had ideas for different ventures over the years. Because we always had a youngster in the house and not in school, we focused a lot on making the years before school started as happy years. This Fall, our youngest enters full day Kindergarten in Lake Villa, IL. This means that Mom and I will finally be able to get one or two of these ideas off the ground. We like the idea of an arrangement where I act as Architect on most projects and as a developer as needed. To this end, we are launching Friseton.com. Jean and I got to name the titles we wanted. She’s the president of the company. She’s been in charge of running the household for the last 13 years, so this title just seems right. I always liked the idea of a Chief Software Architect. Bill Gates gave himself that title when he stepped down as Microsoft’s CEO.
This doesn’t mean I get to quit my day job. We don’t have the resources to do this and, quite frankly, I don’t know that any of our ideas will ever generate that kind of income. We are hoping for something that will generate enough revenue to pay expenses and allow us to save for a more comfortable retirement. The current crop of ideas centers around things we would like to make available to charities so that they can run more efficiently. We are on the committees for a few different charities and know what we wish we had access to for coordination and collaboration. Our goal is to make something that helps all the issues one runs into and charge enough to make the services generate a positive cash flow within 18 months of our initial deployment. If annual net revenue ever got to $50,000 US, we’d be thrilled.
I’ll post news and update as we progress. Right now, Jean and I are learning SilverLight 2.0. She’s quite a bit ahead of me on this one, so it’s likely she’ll handle the UI portion of the site. You can check out where we are at by keeping tabs on www.friseton.com. If you subscribe to this blog, I promise that I’ll post updates as we make progress. At this point, the site represents a total of 60 minutes time in Powerpoint (to generate the banner) and VS 2008.
The site is hosted over at www.crystaltech.com. We have a developer account setup now. I have to say that I really like the admin tools they have. This is far better than others I have used. That said, I’ve only hosted through Verio and GoDaddy. Verio and GoDaddy were ok. CrystalTech has developed a web interface that is extremely easy to navigate. I’ve read almost no documentation and figured out how to setup e-mail accounts, FTP, etc. I like the fact that I don’t have to think too hard in order to get stuff working.
SqlTrackingService Doesn't Work on Windows Vista
Posted by Scott Seely in Uncategorized on June 15, 2008
Tonight, I ran into a scenario where adding the SqlTrackingService to my WorkflowRuntime set of services caused the completion of a simple workflow to hang. To diagnose, I instructed Visual Studio to break when exceptions were thrown. With this, I was treated to a break in System.Data.Sql.SqlConnection.OnError. The SqlException being thrown stated “MSDTC on server ‘[machine name]‘ is unavailable.” If you look, you’ll see that MSDTC is a manual start service on Vista. To fix this issue, just start MSDTC in the Services Control Panel applet and run your workflow code again. You’ll be treated to full tracing at this point.
Languages that I have used
Posted by Scott Seely in Uncategorized on June 13, 2008
Some friends recently saw my resume and asked about the 40+ languages that I claim to have written code in. Essentially, they asked why I have that claim and questioned if it was even factual. I have that claim because many employers want someone who knows ‘Special Language X’ in addition to all the other qualifications. In any interview, I usually explain this as follows: “I want to make it clear that no matter what odd wrinkle you have in your system, I know enough about languages and programming in general to tackle your special case.”
Still, 40 sounds like a big number. How, exactly, did I arrive at that figure? First off, understand that many of the languages I have programmed in have had little more than two weeks of the following:
- Learn the language. This involves finding a good tutorial and burning a day getting conversant. The language choice was frequently driven by either class work, larger system requirements, or “this looks like fun”.
- Write the application. Again, this might be “deliver a PHP web page,” an assignment, or an interesting experiment.
- Deliver the application.
I have used enough of these to know that learning a new language is something that one can do in a day or two. Mastering a new language and its toolset still takes some serious time-I would guess about 3000 hours of full time use prototyping, developing and debugging in that language. Many folks tend to learn a language by learning just enough to get by. In mastery, I would say that the person also actively tries to understand the language grammar, libraries, and how the language interacts with the systems it runs on. 3000 hours just getting stuff done will not allow for mastery.
With that in mind, I’ve probably only mastered a handful of languages:
- C
- C++
- C#
- Visual Basic (3.0à6.0)
For another set of languages, I’m just at the intermediate level. I define the intermediate level as this: the user can write moderately complex systems with minimal access to reference material. Code can be debugged, augmented, and generally ‘read’ with little to no difficulty. This encompasses a larger set of languages-some of which are cheating but included since I see so many places where things like each XML technology counts as a separate ‘language’:
- Ada
- ASP
- ASP.NET
- Basic (think QBasic and its relatives)
- COBOL
- DOS Batch programming
- EcmaScript/JavaScript
- FORTRAN
- HTML
- Java
- Ladder Logic (programming Programmable Logic Controllers/PLCs)
- SQL
- Visual Basic.NET
- WSDL
- x86 Assembler
- XML
- XPath
- XQuery
- XSD
Finally, there are the languages I’m a beginner in. Let’s define beginner as a language one can read and write with the assistance of the Internet and a good reference book. At some point, I have written at least a small application (~2 weeks of effort) in these languages:
- LISP
- MSIL
- Bash shell
- Eiffel
- F#
- Forth
- FoxPro
- Haskell
- HyperTalk
- JCL
- Logo
- Mathematica
- Motorola Assembly
- Objective C
- OCaml
- Pascal
- Perl
- PHP
- PL/1
- PowerShell
- Prolog
- Python
- Ruby
- Simula
- SmallTalk
Is this a long list? Sure. But I also know of many folks who know far more than this. Consider any language designer or language geek. Many of these folks have actually mastered more languages than I’ve gotten to beginner on.
Finally, I want to take note of one recent observation. In the past 5 years, I have slowed down the pace at which I learn new languages. This is happening largely because C# and .NET are providing many of the facilities I would normally need to be more productive. C# 3.0 has added functional language features in the form of LINQ. Its libraries are surprisingly rich. .NET provides so many other features that I’m finding that its pace of innovation is keeping me busy enough without needing to look elsewhere to get the productivity gains I used to look for in other languages. .NET adds wonderful libraries, language features, and more at such a pace that I don’t have time for learning language X when technologies like WPF and WF are beckoning to me.
You must be logged in to post a comment.