Standing on the shoulders of giants. RSS 2.0
# Monday, September 29, 2008

As Dare Obasanjo writes, there are a number of things you have to give thought when implementing OpenID on your website.

The real question you’ll have to answer is: how easy do I make it for users to participate on my website and how hard do I make it for spammers to flood my website.

But by delegating authentication to an OpenID provider, your implicitly trusting that provider to do the right thing when authenticating a user. Since, as Tim Bray speculated, there is nothing stopping a provider from “succesfully authenticating” any user URL, you can’t blindly trust any OpenID provider. So depending on the requirements you have for the authentication of your users, you can white-list providers you trust (like HealthVault), or if you’re only worried about bots, you can ask them to solve a Captcha. So the consequence is: since you can’t really trust all OpenID providers, so you force your user to register for a specific one (making their OpenID no longer their single online id) or make them to jump through hoops (by proving they are human).

Does OpenID really make it easier for a user to use your site? Or does it make it easier for you (the developer), since you can drop in a control and think you don’t have worry about authentication.

See also: OpenID is too hard & The problem(s) with OpenID

 

 

Monday, September 29, 2008 4:14:58 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Development | Security

Sample Diagram

Generate your own on the websequencediagrams site.

Monday, September 29, 2008 3:16:18 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Development
# Tuesday, September 16, 2008

A nice method I discovered today:

System.Globalization.TextInfo.ToTitleCase(string)

This capitalizes the first letter of each word in the string, e.g. "hello world" becomes "Hello World".

Tuesday, September 16, 2008 4:30:19 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [1] - Trackback
Codesnippet
# Monday, September 15, 2008
public class Foo : IComparable<Foo>
{
    public Foo() { }

    public int Value { get; set; }

    public int CompareTo(Foo other)
    {
        if (other == null) { return 1; }

        return this.Value.CompareTo(other.Value);
    }
}

The trick is the line, which checks for the null comparison. Since null is always less than this, the method must return a value greater than zero (0).

Also see the remarks in the documentation:

Greater than zero: This object is greater than other.
...
By definition, any object compares greater than null (Nothing in Visual Basic), and two null references compare equal to each other.

Monday, September 15, 2008 5:55:47 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Codesnippet
# Monday, September 08, 2008

55 more sessions have been added to an all ready full schedule making the current total 139 sessions and still more "secret" session will be announced at the PDC.

Highlights of the (new) sessions:

  • Parallel Symposium:
    • Addressing the Hard Problems with Concurrency
    • Application Opportunities and Architectures
    • Future of Parallel Computing
  • Services Symposium:
    • Enterprise Grade Cloud Applications
    • Expanding Applications to the Cloud
    • Projecting On Premises Applications to The Cloud
  • Service Bus Building Blocks: Connectivity, Messaging, Events, and Discovery
  • "Zermatt"
    • Deep Dive
    • Enabling Next Generation Identity
  • Windows CardSpace "2": Under the Hood

With the focus on "The Cloud", Parallel Computing and "Oslo" this looks like it will be a very interesting PDC. For more information about what "Oslo" is see both Don's and Doug's definitions.

[Current PDC08 Session List]

Monday, September 08, 2008 5:49:05 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Conference | PDC2008
# Sunday, September 07, 2008

In the Managed Extensibility Framework source code on CodePlex is this 'preview' of the new Tuple class in the .NET Framework 4.0

// NOTE : this is a TEMPORARY and a very minimalistic implementation of Tuple'2,
// as defined in http://devdiv/sites/docs/NetFX4/CLR/Specs/Base Class Libraries/Tuple Spec.docx
// We will remove this after we move to v4 and Tuple is actually in there

[Via: Don Box's Spoutlet]

Sunday, September 07, 2008 7:55:08 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
BCL
# Saturday, September 06, 2008

A simple example to show how to use the SyndicationFeed class to load a feed and how to handle the items.

using System;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Xml;

class Program
{
    static void Main(string[] args)
    {
        string feedUrl = "http://feeds.delicious.com/v2/rss/tags/paul.van.brenk";

        SyndicationFeed feed;

        using (XmlTextReader xReader = new XmlTextReader(feedUrl))
        {
            feed = SyndicationFeed.Load(xReader);
        }

        // max is more appropriate
        //var sum = feed.Items.Aggregate(0m, (x, y) => x += Decimal.Parse(y.Summary.Text));

        var max = feed.Items.Max(x => Decimal.Parse(x.Summary.Text));

        // select item title and relative weight for items with a relative weight > 0.1 
        var normItems = from i in feed.Items
                        where (Decimal.Parse(i.Summary.Text) / max) > 0.1m
                        select new { Title = i.Title.Text, Weight = Decimal.Parse(i.Summary.Text) / max };

        foreach (var item in normItems)
        {
            // 15 = highest possible value for consolecoler (Magic Number)
            Console.ForegroundColor = (ConsoleColor)(15 * item.Weight);
            Console.Write("{0} ", item.Title);
        }

        Console.ReadLine();
    }
}

Download code: ConsoleTagCloud.txt (1.22 KB)

Saturday, September 06, 2008 1:15:16 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Codesnippet | Services
# Saturday, August 30, 2008

Joe Duffy is building a custom threadpool on his blog, exploring the different trade-offs:

The first threadpool he designs in part 1 is a very simple one, using a naive algorithme. The second one in part 2 is more interesting, since this allows threads to 'steal' work from each other and tries to take advantage of work still being in the memory cache by using a LIFO (Last In First Out) algorithm.

Update:

Part 3 was posted some time ago, which integrates the queue from part 2 in the pool from part 1.

Saturday, August 30, 2008 9:34:45 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
C#
Ads
About
© Copyright 2010
Paul van Brenk
Sign In
newtelligence dasBlog 2.3.9074.18820
All Content © 2010, Paul van Brenk
DasBlog theme 'Business' created by Christoph De Baene (delarou)