Mathias Brandewinder on .NET, F#, VSTO and Excel development, and quantitative analysis / machine learning.
by Mathias 27. June 2008 08:09
Just added the social bookmarking extension written by Danny Douglas. Pretty smooth installation, and the icons do look nice, I like it so far. On the downside, I was hoping to find a "real" ShareThis (or equivalent) BlogEngine.Net extension. With the proliferation of various social bookmarking sites, blogs tend to get the Nascar look, with gazillions of buttons, widgets and whatnot - and ShareThis resolves that problem neatly, by replacing all these in one single button, which doesn't clutter your blog. Ah well, I guess if I want it hard enough, I should just go and write it!
by Mathias 24. June 2008 16:32

A few days back, I came across an article by Bill Wagner, on the topic of validating the state of your objects. His approach, in essence, is to override the bool operator on your class, and use it to return a boolean indicating whether the instance is in a valid state. Simplified to the extreme, the code would look something like this:

public class Person
    public string Name
    { get; set; }
    public static implicit operator bool( Person person )
        return ( person.Name.Length > 0 );

Regardless of what I think of the approach, I was initially puzzled by the line:

public static implicit operator bool( Person person )

I had never encountered the keyword "implicit" before in C#, and was therefore not too sure of what was happening there.


by Mathias 21. June 2008 14:27

Captured today while I was posting something on Blogger; no surprise, this was followed by a message saying that posting was taking more time than expected...

by Mathias 21. June 2008 11:13
Via ethics {for the real world}, I came across this post where William Baker looks back at his experience writing on business ethics for 18 months, and summarizes what he learnt in a list of 11 straightforward words of wisdom, which I reproduce as-is.
•    Profit never outweighs wrong.
•    The solution to a tricky ethical dilemma is often to just say “no.”
•    The best way to deal with a bad idea it to come up with a better one.
•    If your gut tells you something is wrong, it probably is. Listen to your instincts.
•    There are some work environments that you can’t fix, so dust off your resume.
•    You can’t blame anyone else if you get caught up in ethically questionable behavior. There are no victims when “no” is available.
•    Tolerating poor ethical behavior is just as bad as doing it yourself.
•    The ethical character of an organization is dictated from the top down. Establish an environment where employees know that cutting corners will not be tolerated, and they won’t.
•    Your own ethical character is tied in with the companies you do business with. Not all clients are good clients.
•    You are a citizen of humanity. Selfish goals cannot outweigh the greater good.
•    Writing down a code of conduct is a good thing. Establishing it by example is even better.
The second one sounds very true to me. What makes decision making difficult is usually not figuring out the right decision path, but rather getting ready to face the consequences.
by Mathias 8. June 2008 06:47

One of my clients recently asked me to modify an Excel model, so that the adoption of products entering the market would follow a S-curve. After some digging and googling, I came across this excellent post by Juan C. Mendez, where he proposes a clean and very practical way to use the logistic function, and calibrate it through 3 input parameters: the peak value, and the time at which the curve reaches 10% and 90% of its peak value.

The beauty of his approach is that his function is compact so it can be typed in easily in a worksheet cell, and the input very understandable. However, I found it a bit restrictive: transforming it for values other than 10% and 90% requires some recalibration, and more importantly, it cannot accomodate values that are not "symmetrical" around 50%.

So I set to work through a generalized solution to the following problem: find a S-Curve that fits any arbitrary value, rather than just 10% and 90%.



Comment RSS