# Thursday, July 24, 2008

I was searching for a colleague's blog in a "legacy search engine" ;-)... and found a page in Kay Giza's blog which linked "Niel Gräf" to somewhere. It wasn't his blog, It was a linked "Live Search":

http://search.live.com/results.aspx?mkt=de-de&FORM=TOOLBR&q="Nils+Gräf"&FORM=TOOLBR

Kay please don't take it personal... What we see is a foreign page calling into Live without encoding the URL properly. That is what every non technical publisher will do - because they do not know better!

1) Clicking the link will open Live.com and will also show show results - If you have German language settings:

image

But if you click on "Next Page" to brows the results:

image

2) If you have en-US settings you'll get nothing:
image

So what happens here?

1) Live.con does not encode the user input properly when using it to format links - that's bad!

2) Live.com strips out special characters - not nice.

Hope there will be improvement soon :-)

Thursday, July 24, 2008 10:32:39 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, July 15, 2008

In his last post Jeff Atwood summarized really really nice the discussions I have (and had over the last year) while helping customers on large scaling web sites, service-oriented back-ends or just the plain old data access topic.

Thanks Jeff!

All others: Go read!

Tuesday, July 15, 2008 12:14:12 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, June 10, 2008

I really enjoyed reading Nicks post here.

[...]

  • If you take a group of well-meaning and intelligent engineers,
  • and you give them a process that looks like a normal software development process**, and you train them on it, and they believe that this process works...
  • and you add SOA...
  • you get JaBOWS (Just a Bunch of Web Services).

    [...]

    Many companies out there trying to get on the SOA road fail by believing a tool can lead the way.

    We at devcoach use to say: SOA is not about engineering or architecture. It's a mind setting.

    Therefore a tool can at maximum support you on the long road towards service orientation.

  • Tuesday, June 10, 2008 8:54:40 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
    # Friday, October 19, 2007

    A few days ago a developer at a customer asked me how he could simplify the following code as he identified a pattern: X tries and the error handling.

    public PlanungsGruppenLesenA PlanungsGruppenLesen(
        PlanungsGruppenLesenF param)

    {

        PlanungsGruppenLesenA ret = new PlanungsGruppenLesenA();

     

        if (ret.PlanungsGruppen == null)

        {

            throw new ArgumentNullException("param.PlanungsGruppen");

        }

        int nRetry = 0;

        while (nRetry < DBWerkzeug.MaxWiederholungen)

        {

            try

            {

                using (XXX_POC.POC db =

                    new XXX_POC.POC(
                        DBWerkzeug.GetConnectionString()))

                {

                    var q =

                        from p in db.Stammdaten_Planungsgruppe

                        orderby p.Name.ToLower()

                        select new PlanungsGruppeDM

                        {

                            ID = p.Rowid,

                            Name = p.Name

                        };

                    ret.PlanungsGruppen = q.ToList<PlanungsGruppeDM>();

                }

            }

            catch (ChangeConflictException e)

            {

                nRetry++;

                if (nRetry >= DBWerkzeug.MaxWiederholungen)

                {

                    ret.FehlerText = e.Message;

                    ret.HatFehler = true;

                    throw;

                }

            }

            catch (Exception e)

            {

                ret.FehlerText = e.Message;

                ret.HatFehler = true;

                throw;

            }

        }

        return ret;

    }

    I ended up with this:

    public PlanungsGruppenLesenA PlanungsGruppenLesen(
        PlanungsGruppenLesenF param)

    {

        PlanungsGruppenLesenA ret = new PlanungsGruppenLesenA();

     

        if (ret.PlanungsGruppen == null)

        {

            throw new ArgumentNullException("param.PlanungsGruppen");

        }

        ret.PlanungsGruppen = CatchExceptions<PlanungsGruppeDM>(

            delegate

            {

                using (XXX_POC.POC db =

                    new XXX_POC.POC(
                        DBWerkzeug.GetConnectionString()))

                {

                    var q =

                        from p in db.Stammdaten_Planungsgruppe

                        orderby p.Name.ToLower()

                        select new PlanungsGruppeDM

                        {

                            ID = p.Rowid,

                            Name = p.Name

                        };

                    return q.ToList<PlanungsGruppeDM>();

                }

            },

            ret);           

        return ret;

    }

    What calls the encapsulated X tries and the error handling:

    public delegate List<T> MachMal<T>();

     

    public static List<T> CatchExceptions<T>(MachMal<T> machMichFertig, BasisA ret)

    {

        int nRetry = 0;

        while (nRetry < DBWerkzeug.MaxWiederholungen)

        {

            try

            {

                return machMichFertig();

            }

            catch (ChangeConflictException e)

            {

                nRetry++;

                if (nRetry >= DBWerkzeug.MaxWiederholungen)

                {

                    ret.FehlerText = e.Message;

                    ret.HatFehler = true;

                    throw;

                }

            }

            catch (Exception e)

            {

                ret.FehlerText = e.Message;

                ret.HatFehler = true;

                throw;

            }

        }

        return null;

    }

    But I'm not quite sure If this made stuff really easier ;-)

    C# | Projects
    Friday, October 19, 2007 3:20:12 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
    # Saturday, October 06, 2007

    Pretty helpful while working on WCF services with JSON serialization and AJAX:

    REGEDIT4

    [HKEY_CURRENT_USER\Software\Classes\Mime\Database\Content Type\application/json]
    "CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
    "Extension"=".json"

    Saturday, October 06, 2007 10:59:18 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |