Identity Interface I should know better


19
Nov/09
0

Microsoft XAML Toolkit and XamlDom released

Today the XAML team announced the availability of the Microsoft XAML Toolkit
http://code.msdn.microsoft.com/XAML

It has been taken down due to signing issues, but will be back soon.

This will allow many things

    A Dom representation of the Xaml control tree.
    Use Linq against the XamlDom, similar to XLinq for XDocument
    It is going to be very useful for tools like XAML Designers or Static Analysis.
    We can also do some XamlDom functional construction.
Filed under: code
19
Nov/09
0

PLinq Performance Tip

When using PLinq
Memory Allocations can be the bottleneck.

Anonomous types/reference types are allocated on the heap and will have to be garbage collected.
The garbage collector was designed with low latency/fast UI thread design considerations.
Try to use value types.
Or in the app.config add

<gcserver enabled="true"/>

This enables server mode garbage collection.
Typically workstation mode gc is the fastest, but when we deal with parellism and garbage collection across multiple processors server garbage collection can reap significant performance improvements.

Filed under: code
18
Nov/09
0

Microsoft Codename Dallas

Yesterday at the PDC Microsoft continued with their one screen one OS initiative and introduced Windows App Fabric, and Codename Dallas.

Dallas is something of an information repository that you can go to, to find the data you would like to use.
Once you found the data, you can browse the data.
Connect to it using Excel.
Slice and dice it with Excel.
or Generate your own proxy class to process the data in code.

Stay tuned, I plan on getting in on the CTP and developing something cool with the technology.

Filed under: code
26
Oct/09
0

Visual Studio 2010 Training Kit – Increase your learning velocity

Visual Studio 2010 and .NET Framework 4 Training Kit

Jam Packed with goodness.

There are a lot of great powerpoints that summarize what's new.

    Whats New In the .NET Framework 4
    Whats New In Visual Studio 2010
    What's New In C# 4 and Visual Basic 10
    Whats New In ASP.NET AJAX 4
    Whats New In ASP.NET Web Forms 4
    etc.

I think the labs are a little on the weak side.
There is a lab in there for Project Velocity.
This was the first time I had heard of this, so I was pretty intrigued.

It looks like it is a distributed cache for asp.net applications.
Seems like they are taking some of Scale-out's business.

I was hoping for more stuff on the new language features, like the new dynamic type.

26
Oct/09
0

Animal Nutrition

Since I am off to the PDC in a few weeks I thought I would dust off my blog.

What have I been up to you ask?
Well for the last year and a half I have been at Cargill Animal Nutrition.
Working on the Max System.

Cargill launches enhanced MAX feed nutrition analysis system

Max Program

The longer I am in technology, the more I realize that the technology is not the hard part, it is much harder learning what the business needs and figuring the right places to put technology.

Filed under: business
4
Dec/08
1

97 Things Every Architect should know

As spoken by Richard Monson-Haefel at the Java User Group Meeting put on by TekSystems.

We covered ten general themes in the short amount of time we had.

  • The user interface is critical
  • Nothing Lasts
    • Cobol, Smalltalk, Waterfall, nothing in software lasts. Chances are if you think it will last you just need to wait longer.
  • Data is forever
  • Flexibility breeds complexity
    • Something that is flexible is almost always complicated, but if something is designed to be simple it can be flexible.
  • Manage your expectations
  • Know thy business
    • The business is key to making great decisions in architecture. You have a responsibility to know all of aspects of the business side and technical side. Similar to a CIO but you get paid a lot less.
    • Understanding the business domain
  • Maintain the vision
  • Software architects should also be coders
    • Take some time every week to sit down with the coders. You will figure out what their pain points are and it will help you make better architectural decisions.
    • Share your knowledge and experience
  • There is no substitute for experience
    • Creating software is a trade. It is learned over time, and best learned by working with great people. It is similar to being a plumber or an electrician. You go to class for a little bit, and then you work as an apprentice. Architecture is no different.
  • The list in its entirety can be found at

    97 things every software architect should know the book


20
Oct/08
0

Sql Server Compact – Access to the database file is not allowed.

Lately I have been playing with some small client apps, just kicking the tires on a few of the new microsoft technologies.

For the underlying database I chose Sql Server Compact Edition. Since I am using Linq to Entities, stored procedure support is not necessary.

I wrote a few tests against the database and found that the database was not being deployed along with the tests.  Here is app config entry |DataDirectory|\DataLayer\PhotoStore.sdf. 

I copied that from the Common Library, when the test was ran the entry parsed into  TestResults\Jon_JON-PC 2008-10-20 18_57_13\Out\DataLayer\PhotoStore.sdf

The first error was the obvious file not found error.

My first instinct was just to try and copy it to a common directory. I received the exception below.

System.Data.EntityException: The underlying provider failed on Open. --->  System.Data.SqlServerCe.SqlCeException: Access to the database file is not allowed. [ File name = C:\Users\Jon\Documents\PhotoStore.sdf ].

Resolutions

1. Turning off UAC.

2. Point the tests app.config to the database file in the corresponding app directory.

3. Run Visual Studio as administrator.

4. Create a build task to deploy the database in the test directory (TestResults\Jon_JON-PC 2008-10-20 18_57_13\Out)

I think the reason this is happening is because of the LUA model of security. When I copy the data file into  directory like Users/JonShern/Documents by default the test process is running as a least privileged user, so it not able to write to this file.  Admittedely my understanding of the inner working of security are lacking, seems like it just ends up to be the guess and test method of problem solving:(

I think 1,2 and 3 seem a little hackish to me. But man to write a build task for a little app is just overkill.

Here is a code sample that someone is using for deployments.

SecurityIdentifier sid = new SecurityIdentifier( WellKnownSidType.BuiltinUsersSid , null );

FileSecurity dbSec = File.GetAccessControl( dbFile );

dbSec.AddAccessRule( new FileSystemAccessRule( sid , FileSystemRights.Write, AccessControlType.Allow ) );

File.SetAccessControl( dbFile , dbSec );

References

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1892312&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3455426&SiteID=1

Filed under: code
7
Oct/08
0

Letter to Rookie Developers

Dear Rookie Developers

First off let me start by saying I am still a Rookie in a lot of ways. I still make plenty of stupid mistakes and I still forget to submit my hours on time:)

I have been on a few development projects and have learned a lot about how to develop software. Admittedly I still am not sure on what is the best way to develop software, but I have some advice on the pitfalls and things that I think were bright spots on my rise to programming mediocrity.

Get help early and often.

Don't be embarrased to ask a senior developer how he/she would implement a solution. I do it all of the time. None of us really know the best solution, we just know the best solution in relation to the solutions that we have seen.  Push for code reviews they are an invaluable tool into the mind of another developer, try and study the code before hand so you have some context on the problem at hand.

Read code

Scott Hanselman talks about it all of the time.

Code is interesting, how else are you going to get the best practices that are going to keep you on the good side of your developer comrades.

Be proud of your work, but don't be afraid to throw it in garbage.

It is great to be proud, but we need a healthy mix of pride and realism.  A lot of times I will write a method and just delete it and rewrite it. It you are doing TDD then the second time your code will probably be a lot cleaner and more efficient.

Read Code Complete

There is a lot of great advice in Code Complete that every developer should be familiar with.

Start out thinking about testing

When you start coding, think about how easy it will be test this method. The more you do that the easier the jump TDD will become.

Learn new languages

As computer scientists we are abstract thinkers. That is one of the many reasons that math is taught to us.  It gears us up for the abstractions that are on the horizon. By learning new programming languages we learn on how to approach a problem on a whole new level. It can also help us identify improvements that can be made in our process. Just look at what has happened in the Java world, and the .net world. Seems like we have a constant trickle of Java tools being ported over to the .net world.

These are just a couple of things you can do to improve your craft. But keep in mind development is like a trade. When you first start out we are all just apprentices, we learn from others on the best ways to approch problems, and code. We perfect our craft and hopefully one day we will be masters at our trade.

1
Oct/08
0

Database Edition now available from msdn

Just noticed that Database Edition is available to download with my msdn subscription.

Before it was about $3000 to buy, I wonder why there are just giving it away now?

I supect it has to do with the fact that currect dbas are heavily entrenched in their tools and practices, and don't want to change.  By giving it away for free, they can get the developers on board and get them to show the dbas how nice the tool works.

4
Sep/08
0

Conveying Complexity with Simple examples or analogies

Google just released there new browser Google Chrome

It is beatifully simple piece of coding, in which each tab is broken into its own process.

Each process can then spawn child process which correspond to various plugins, such as shockwave flash, etc.

This is a great way to isolate your processes from other errors, essentially it is a mini-os wrapped in a browser.

This can be a difficult concept to wrap your head around and the cartoon that was produced is an excellent way to understand the nuts and bolts.

Some cartoons that convey difficult concepts.

Google Chrome

Why we need architects

What is perpendicular storage

Design Patterns

SOA is something that is often defined using analogies such as Legos,  Transportation, or the post office.

It pays to think of things at their simplest level, it will really be helpful for you when attempting to convince others or your brilliance:)