Thursday, May 27, 2010

Weird TextBox.AutoCompleteCustomSource problem

It's been a while since I posted anything here, but please forgive me - I'm in the middle of finishing every project I'm currently working on before I'm gone for my internship (hooray!). Since there's a lot to be done, this time I'll leave just a short note on some weird problem I've just encountered.

So, not to prolong too much, here's the thing:

If you have encountered a "The specified cast is not valid" when running tests (I'm using NUnit) that have anything to do with TextBox AutoCompleteCustomSource (namely, when you add something to the autocomplete source via .Add(string) method), mark your test with annotation RequiresSTAAttribute. No one explained what is wrong, but the solution works. Maybe I'll investigate what's going on when I'm over and done with all of my current engagements (read it as: never ;-)).

By the way, I'm using .NET 2.0, but it may still be a problem in higher versions.

Thursday, May 6, 2010

Possible refactorings reference list

I've recently encountered a catalog of possible refactorings created (mostly) by Martin Fowler. Although the author is a great authority known for some complex (yet brilliant!) solutions, this list is mostly consisting of the obvious refactorings you do (or even unconsciously implement along the way) on a daily basis. Although mostly simple, I encourage to get familiar with them  in your spare time as there may be some things you may have missed in your (self-)development.

I would consider this catalogue a checklist of "things one should know about refactoring".

By the way, I encourage you not to follow these suggestions blindly, as there are situations in which the result of refactoring is not the desired situation (note the dual refactorings!).

Enjoy.

Innowacyjny produkt nie musi kosztować milionów

Moja ostatnia delegacja zaowocowała publikacją na nierobcietegosami.pl. Zapraszam!

Tuesday, May 4, 2010

Template metaprogramming being useful part I - Self-inlining anonymous functions in C++.

Recently - thanks to the course conducted on my University - I've become interested in template metaprogramming. During some of the discussions on that topic, I've been told that metaprogramming (and even templates!) are too complex for business use. With my previous proffesional experience in C++ (which is currently none) I couldn't obviously argue with that statement; nevertheless, I've found an interesting article accounting for usefulness of template metaprogramming - Self-inlining anonymous functions in C++, which I believe makes it worthwile to learn how to use this functional language hidden in C++ templates.

edit: thanks to Rafał, another interesting source can be found here.

Monday, May 3, 2010

lifedev.net - o kreatywności, innowacji i programowaniu

Świetny blog z przemyśleniami o tym, jak tworzyć, jak nie stracić zapału i wszystkim, co związane z efektywną kreatywnością.

lifedev.net.

Polecam uważać, bo wciąga niesamowicie.

W szczególności programistom przyda się uzupełnienie do wykładu Marcina Brodziaka w Instytucie Informatyki z 31 marca 2010.