(This post is edited after machine translated from Japanese.)
It’s been a while since I’ve posted anything.
I’ve been awarded the Microsoft Most Valuable Professional, or MSMVP for short, since 2015, but I’ve decided to decline it after 2021 term.
I would like to thank the MSMVP office and all the people who have helped me through this program. There will be no change in the community activities for the time being. In the near future, I will probably mainly write OSS because I like to write code. I have some projects on GitHub, so it would be nice if you could take a look.
I’ve been asked by someone who told me privately “if the `Center CLR` (My held community group) is going away?”, but it’s not :) We’re still active in the slack group. If you’re interested, feel free to check out the connpass page for directions (In Japanese)..
Here I would like to mention two good things about the MSMVP award, although they are short and almost a mere diary.
A shining thing
I’m a sucker for “hikarimono (shining thing)”, like jewels or jewelry, and I like the MSMVP trophy because it’s very well made.
This one is made of glass, and the blue-colored triangular pillar at the base and the flat monolithic stone monument-like part are perfectly fused together, making it shine and shine very brightly. This plaque can be fitted with a `Year ring` that you get every time you renew your award (just insert it from the side), and this will grow as the award year continues. I think the person who came up with this sculpture has very good taste.
I’m afraid that if I decline the MSMVP, this won’t grow anymore, which is a shame… I wonder if I can just get a Year ring every year :)
MVP Global Summit
The Global Summit is an event for MVPs held at MS headquarters in North America.
One of the perks of being an award winner is that you get to learn about new (unannounced) products and projects that are planned for the near future and discuss them with direct engineering team members, which is said to be a great benefit (another benefit is the MSDN subscription, but in my case I already had one, so…)
You have to pay for your own transportation, but they will pay for your accommodation (in a pre-arranged hotel).
So, for myself, I didn’t really feel that the advantages I mentioned above were that much of an advantage. The reason lies in the award categories.
My award category is Developer Technologies, which is about language processing systems and development environments, such as Visual Studio and C#/F#. Excepted Visual Studio, processing systems such as compilers and .NET runtime information now have public repositories on GitHub, where discussions are held daily. So the information available at Global Summit (in other words, NDA) was almost non-existent when I attended. So there was hardly anything that made me go to the Global Summit and mumble “Meow” (footnote). (Even if I had heard such information, mostly it would have been released a week later, so there was little benefit in hearing it now. And I was able to predict the general flow of events.)
As for why I’m introducing it here, I’ll never forget the memories of getting to know the MVPs who gathered at the Global Summit, and especially the F# area where they treated me well.
At the F# meetup held in the evening, I jumped into a place where I was the only Japanese person and forced myself to speak for about 10 minutes (I couldn’t speak). How is F# in Japan? I was really happy and enjoyed talking to them.
I was prepared to move to the hotel by myself on my way home at night, so I was trembling with fear that I might be kidnapped by the Uber driver to an unknown place and go back to Japan as a corpse (or maybe not anymore)… But he said, “Oh, I’m that way too, so you can take an Uber back with me!”
(To add, I had heard that the area around Seattle in North America was relatively safe, but even so, I knew there was a certain amount of risk involved in traveling alone at night.)
If it hadn’t been for that experience, I wouldn’t have ever thought of attending another overseas meetup, or even jumping into another overseas meetup. I’m not sure I would have thought of that.
Since I went to the Global Summit last term, I haven’t been able to contribute much to F#, and I still have my own regrets in that regard. I hope to be able to do something someday, so I follow up when I can, and in the OSS project I’m working on now, I always support F# with an awareness of it, unless it makes no sense.
Now that I’ve declined MVP (and even if COVID dies down), the thought that I won’t be able to participate in Global Summit anymore makes me shed tears, but when I get the chance (and if I have the budget), I’d like to go abroad on my own this time to meet the people I met, or go to other meetups.
Footnote: “Meow” is a word that MVP winners have no choice but to drop on Twitter and other social networking sites when they see or hear something exciting but cannot be disclosed under NDA. But this is frowned upon because it sounds like a kind of bragging to those who can’t participate. I did it once myself, and I’m sorry…
ビデオの内容を読み込み、字幕がアレだったことから日本語字幕化する事を考え始めた。でも、SRTファイルをそのままGoogle Translatorにかけるとフォーマットが壊れてしまうのと、センテンスがつながっていないのが原因でダメな翻訳になってしまうこともあって考えあぐねていた(Azure Video Indexerで日本語訳出せばいいじゃん、と思うかもしれません。機能的にはありますが、まあ、察してください…)
スクラムの共有知として、パタン(パターン / Pattern Language of Programs / PLoP)を適用しよう、それを今整理中ですという話です。パタンとは何か?という話から、何故スクラムの取り組みをパタン化する必要があったのかという経緯を分かりやすく解説していました。スクラムパタンはWikiで編集中で、パタンについてのアイデアがある方は、是非参加して欲しいとの事。最低レギュレーションは「そのパタンを3回適用して成功した」だそうです。
// (あくまで概念コードです。これは正式なCOMのコードではありません)
public interface IUnknown
{
T QueryInterface<T>() where T : IUnknown;
int AddRef();
int Release();
}
public interface ICalc : IUnknown
{
int Add(int a, int b);
}
// クラスは直接公開されない
internal sealed class CalcImpl : IUnknown, ICalc
{
private int count_ = 1;
public int AddRef()
{
return Interlocked.Increment(ref count_);
}
public int Release()
{
var current = Interlocked.Decrement(ref count_);
if (count == 0)
{
// インスタンスの破棄処理
// Disposeに近いが、メモリストレージも削除される。
// 破棄処理を隠蔽することで、処理系依存を排除。
}
}
public T QueryInterface<T>() where T : IUnknown
{
// CやC++にはリフレクションは無いので、本当はインターフェイスID(GUID)で判定する。
// キャスト処理を隠蔽することで、処理系依存を排除。
if (typeof(T) == typeof(ICalc))
{
Interlocked.Increment(ref count_);
return (T)(object)this;
}
if (typeof(T) == typeof(IUnknown))
{
Interlocked.Increment(ref count_);
return (T)(object)this;
}
throw new NotImplementedException();
}
public int Add(int a, int b)
{
return a + b;
}
}
public interface IClassFactory
{
T CreateInstance<T>(Guid clsid) where T : IUnknown;
}
// クラスファクトリクラスも公開されない
internal sealed class CalcClassFactory : IClassFactory
{
public T CreateInstance<T>(Guid clsid) where T : IUnknown
{
if (clsid == CLSID_Calc)
{
// newの実装を隠蔽することで、処理系依存を排除。
return new CalcImpl();
}
throw new NotImplementedException();
}
}
// CalcImplを外部から特定するためのGuid
public static readonly Guid CLSID_Calc = new Guid("BD4D1DDD-9C28-4432-A8DD-9CFA77E6433F");
// DLL外からはこのエントリポイントだけが見える
public static IClassFactory DllGetClassObject()
{
return new CalcClassFactory();
}
ということで、一からIUnknownをCで実装するというハードは方法は時間もないのでパスし、ATL(Active Template Library)での実装方法をライブデモしました。ライブデモは私がやったのですが、ATLでバリバリ書いていたのはVisual Studio 2005の時だったので、2005を使ってデモ(こんなこともあろうかと、2005はインスコしてあるのだよ)。ATLは途中から、C#のような属性ベースの指定で楽に書けるようになったはずなのですが、結局私的には移行しなかったので分からず…
using ATLSampleLib;
class Program
{
static void Main(string[] args)
{
var testClass = new TestClass();
testClass.TestProp = "ABCX";
Console.WriteLine(testClass.TestProp);
}
}
using ATLSampleLib;
class Program
{
static void Main(string[] args)
{
var testClass = new TestClass();
testClass.TestProp = "ABCX";
Console.WriteLine(testClass.TestProp);
Marshal.FinalReleaseComObject(testClass);
}
}
今回、主題として「All about COM」と銘打ったのですが、実は「隠された副題」がありました。それは、「COM requiem」です。COMの全盛期は2000年頃(つまりもう15年も前)と思っているのですが、まだまだいたるところで使われており、すぐにomitすることは当面出来そうにありません。しかし、プログラミング環境は完全に.NETが主体となり、C++でコードを書く際も、ライブラリのインフラとしてCOMを選択すると言う事は殆ど無くなりました。