Skip to content


Need to move blog to something else

WordPress has worked up to this point, but I think I need a change. I’m going to move over to BlogEngine.net, which will take some work to migrate everything.

So hopefully next time you will see a cleaner, faster, and more awesomer chrisroland.info.

Posted in Uncategorized.


.NET Micro Framework and Visual Studio 2010

I don’t know why I had a hard time finding this, so I figured I would post it in case someone else has the same problem.

To run the .NET Micro Framework in VS 2010, you need .NET MF 4.1 which is located at:
http://www.microsoft.com/downloads/en/details.aspx?familyid=CFF5A7B7-C21C-4127-AC65-5516384DA3A0&displaylang=en

Posted in .NET MF.


devLINK 2010 (a week later)

devLINK (http://devlink.net) is one of the best conferences around. This was my second time around and from my perspective, it was better than last year. Here are the sessions I attended and what I remember one week later.

Opening Keynote: The Future of Software Applications
Tim Huckaby did a great job creating a vision of the near future and made me wonder how I can apply natural interfaces in my solutions. There were times during the keynote I was lost because he was clicking around looking for the next video to show, but overall it was a great message. The one thing I kept thinking about was, how do natural interfaces apply to me and internal business applications. So I posted an open space, which I will go over later down.

Kanban to Cash: Stolen Ideas for a Beautiful Process
Even though I was in the wrong room, thinking it was a different session, I stayed anyway. I’m glad I did, because Lee Brandt did an awesome job with this talk. He went over how he does Kanban, TDD and BDD. I was cool to see how features were broken down into stories and then translated to specs in NSpec. It just re-enforces the fact I need to spend more time doing outside-in development.

A Dynamic World Demands Dynamic SQL
This was a good talk and Jeremiah Peschka knows his $%^&. One of the issues I have is, I spend most of my time with NHibernate between me and SQL Server. So, the talk left me wanting to know more about how to bring the ORM world and SQL world together in harmony. I ran into Jeremiah later on during the conference and we had an awesome conversation about DBAs and developers. Specifically how they interact and what can be done to bring them together. The #1 thing you can do is, communicate more . We also went over ways to use an ORM and still keep SQL happy. I’m hoping either Jeremiah or someone else does a talk on bridging the gap between DBAs and developers, SQL and ORMs.

Better Contracts, Better Code
If there is one session I took back and applied immediately, it was this one. I wish I knew about Microsoft Code Contracts a lot sooner and it’s odd I don’t hear about them in the community. Code Contracts are like unit testing, you can’t imagine how you lived without them. I’m still scratching the surface right now as I use them, I’m looking forward to digging deeper into how they can be applied. This can easily be seen as the “hammer and nail” mindset, but I think of it’s more like, “why wasn’t I using them before”. Oh yeah, Kevin Hazzard did a super awesome with this session (Yeah I used super). I was engaged the entire time and the demos were clear and effective.

What the Math Geeks Don’t Want You to Know about F#
Another awesome Kevin Hazzard session. If you have the chance to see him talk, do it. I’ve been digging into F# for the last year off and on. This session went over a lot of topics I’ve gone over, but it was great to hear his view. He is the first person I’ve heard explain currying, were I got it immediately. I’ve read about currying and I always have to re-read it to refresh my memory. After this session, I think it finally sunk in. The one take away from this session is, functional programming is the future of programming. Well, at least until the next thing that comes along.

EF 4.0, Restoring the Confidence
Based on the session description, I thought this was going to be a different kind of talk and I was looking forward to getting insight into how Entity Framework made a come back and what features made that happen. What the session turned into for me was, an overview of Entity Framework and the basics on how to use it. It was a good session by Jim Wooley, I just thought it was going to be a different talk. The good thing is, I needed to see an intro session on EF and this definitely helped.

Advanced NHibernate Tips and Tricks
The one take away, Phil Japikse hates bugs. Seriously, this was an awesome session and Phil knows his stuff. I learned a ton of things I’m looking forward to implementing. If you use NHibernate, definitely see this session if you have the chance. Phil had a real world example that helped me understand how I can apply what he was talking about, today. What’s interesting, he was the second speaker to mention NSpec during their talk, I need to check it out.

Open Spaces: Natural interfaces and business applications
So, this was the open space session I posted. What I thought was going to be a talk between one other person and me, if I was lucky, turned into a really great session with a handful of people. When I arrived there were two guys chillin from the previous session and while waiting for people to show up, we started talking about natural interfaces. Before I knew it, more people showed up and even one guy who was behind a plant thing who was listening in on the conversation, joined in. This conversation really helped me see immediately that natural interfaces can be used to solve business problems, beyond a 3D image of an organ. I will do a post very soon with the notes from the session.

Real World Entity Framework
If there is anyone you want to talk about Entity Framework with, it’s Dane Morgridge. This session was a deeper dive into EF than the previous session and it was great to see more of a real world example into using it. Since Dane has used EF since the beginning of time, everyone had questions on how they would apply it to their scenario. This helped convince me, it’s time to start looking at EF as a possible replacement to NHibernate.

Leveraging Client Capabilities with jQuery in Visual Studio and ASP.NET
To be honest, I ended up in this session because the closing keynote was in the same room right after this one. It turned out to be a good session by Robert Boedigheimer. He went over were jQuery would be used and in what cases should the Microsoft AJAX library be used.

Closing Keynote: Iconoclasm
After reading the description of the keynote, I thought this can either be really good or bomb real bad. I came out of the keynote mixed. I think the overall message of the keynote was awesome and mirrors a similar message I’ve heard lately about the creative generation. I think this an important message and it ties in great with the opening keynote by Tim Huckaby.

The way the message was driven home, bugged me. Using outsourcing, Indians, Chinese or whatever as examples of why you should become an Iconoclast, was dated, not cool and ineffective for me. I also think using those examples detracted from the overall message Ted Neward was trying to convey. The other nagging thought in my head was, “great the next ‘thing’”. There is going to be a hoard of individuals in and around the community who are going to be self proclaimed Iconoclasts, yay.

On the other side, it was cool to see examples of group think and how people are influenced. It’s funny to see the examples Ted gave and the real world examples all around. In the end, I came out of the keynote with an interesting perspective on things and I’m really glad I attended.

In conclusion, devLINK 2010 was awesome and if you have a chance to go next year, GO! Seriously, the ROI is insane.

Posted in ASP.NET, Community, Events, F#, SQL Server, Visual Studio, Windows.


Best database engine or access for F#?

After going through a couple blog articles on F# access to different database engines, I wondered what’s the best database engine/access for F#?

I use NHibernate and SQL Server on a daily basis from C#, so I naturally want to use NHibernate from F#. After some quick googl…research, I found this great article on how to setup F# to use NHibernate:
http://strangelights.com/blog/archive/2009/12/20/1650.aspx

I also came across an article on how to access MongoDB from F#:
http://codebetter.com/blogs/matthew.podwysocki/archive/2010/02/09/exploring-mongodb-with-f.aspx

After going through both and doing a couple quick spikes, MongoDB seems like a natural fit for F# and the functional way of life. Keep in mind, I’m new to functional programming and F#, so take this with a grain of salt and do your own research.

With F#’s parallel features, NoSQL database engines (MongoDB, CouchDB, etc) seem like a perfect fit. Large distributed data stores, asynchronous parallel processing, data stored as key/value pairs/objects, you get the picture.

It would be great to hear from anyone who’s used either with F# and your experiences. For now, I’m going to do some prototyping down both paths to see where what comes out the other side.

Posted in Data, F#.


F# = what?

I was reading through my most recent book addiction purchase (Programming F#) and I came across something I thought was interesting.

The (=) operator, basically in any other language assigns something to another thing, but in F# it’s actually a comparison operator. In C# (==) is used for comparison and (=) is used for assignment. If you forget the second (=), you can create a fun bug, for example:

bool canDoSomething = false;
if (canDoSomething = true)
{
DoSomething();
}

In this example the if statement is assigning true to the canDoSomething variable, which evaluates to true if the assignment is successful.

The if statement should really be:

if (canDoSomething == true)

In F# you “assign” using the let statement:

let canDoSomething = true

Moral of the story is, if you program in F#, it’s easier to avoid this bug. However, watch your step when going from F# to another language.

For a little bit more information, check out this list of F# arithmetic operators:
http://msdn.microsoft.com/en-us/library/dd469493%28VS.100%29.aspx

Posted in F#.


Calculating CAPM with F#

The Capital Asset Pricing Model (CAPM) is a way to determine the rate of return for an asset, a single stock or the entire portfolio.

I wanted to see how this would be calculated in F#, so here you go, enjoy:


let capm (beta:float) (y:float) (z:float) = y + (beta * (z - y));;

Posted in F#, Finance.


2010 Goals

I’m really excited about 2010. Things are changing and I’ve never felt more sure about the direction of my career and personal life than I do now. So to kick things off, I’m posting a list of my 2010 goals and I’ll track them through out the year with the 2010Goals category.

The goal criteria is, it needs to be measurable and attainable within 2010.

  1. List and read every book I’ve purchased that I still own

    This is a challenging goal because I have a ton of books I still need to finish or read. I love books and when I find a good one, I buy it. The problem is I pushed off reading a bunch of them, telling myself I would read them later. This goal will insure I finally get to them.

  2. Build a hobby robot with my son

    I’m into hobby robotics and my son loves robots as well. He seems to be into building things and this would be a perfect project for both of us. Maybe it will help pick up toys :)

  3. Teach my kids the abacus

    The abacus is amazing and it’s proven to improve mental capabilities, plus it’s easy and fun. If you want to know more, just do a search for abacus on YouTube.

  4. Give at least 5 presentations for any .NET based event or user group

    I enjoy speaking about technology I’m passionate about. The challenge is I don’t speak enough and I should. So even though I set this goal at 5 presentations, I hope to do more based on time, availability, etc.

  5. Take an active role in the .NET community

    I need to become more active in the community, so this goal translates to, obtain a position within a .NET user group. I will contribute to the community in many other ways, however this will insure I consistently provide support to the community through out the year.

  6. Read at least 2 books on mortgages or home loans

    I recently became employed by Quicken Loans and this goal is to help me understand that domain and industry.

  7. Become a MCPD (Microsoft Certified Professional Developer)

    I find they are a great way to define and drive the direction of my career. The technology landscape is continually changing and I need to insure I do as well.

  8. Take at least 2 general education courses for college

    I need to get this party started. I’m looking forward to taking a ton of math, finance and business classes, however I need to start with my gen eds.

  9. Get more F# in my life

    Almost forgot this one, but this year I’m going to get more F# in my life. I’ve had a small taste of functional programming and I want more. Also, F# seems to be the coming up language of choice for developing finance solutions.

Posted in 2010Goals.


LINQ to SQL data mapping

I’m currently working on an ASP.NET MVC project and I’m using LINQ to SQL to manage my data. One of the fields I’m working with is stored as a MONEY data type in SQL Server. I wanted to find the best CLR data type to use when I mapped the field in my LINQ Data Context. After some researching I came across a great MSDN article showing what types to use when mapping back to the database with LINQ. There is even an awesome grid showing the best types to use and the expected data loss.

Here is the link:
http://msdn.microsoft.com/en-us/library/bb386947.aspx

Posted in Data, LINQ, SQL Server.


Remove empty array elements in PHP

Here is a quick tip on how to remove elements with empty values. All you have to use is the array_filter($myarray) function. Here is an example.


$myarray = array();
$myarray[] = 1;
$myarray[] = '';
$myarray[] = 'a';

print_r($myarray);

Array
(
[0] => 1
[1] =>
[2] => a
)

When you use array_filter() this is what you get:

$myarray = array_filter($myarray);
print_r($myarray);

Array
(
[0] => 1
[1] => a
)

Of course you can use array_filter with a callback function to intelligently remove elements, but if you just want to remove empty values, this is the best way.

Posted in PHP.


Going to give Oxite another try

After going through the Oxite hosting issue on Godaddy, I decided to look into the hosting issue further. Basically with Godaddy, unless I had a VPS with them, hosting Oxite is a bunch of hoops I don’t want to jump through just to get a blog going. So, to give Oxite a fair chance I’m going to get a hosting account with Discount ASP.NET, who I hear has great support for ASP.NET.

Posted in ASP.NET, Oxite, Web.