воскресенье, 5 июня 2011 г.

Django newby frustrations.

As you might already guessed, I am currently in a process of discovering two technologies I had no experience with before.

This time I met a strange error running a Django tutorial web application: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0...

Good luck!

RoR newby frustrations

As usual, trying to adopt something new is really is a frustration. And though Rails is about to be "a breakthrough in lowering the barriers of entry to programming" you will defenitely meet some errors that might stop you on your way.

First thing I met was: "[rake --tasks] rake aborted! no such file to load -- sqlite3/sqlite3_native".
The solution is really simple. Rake is telling you that it can't find a native library for sqlite. Well, just do what you've been told. Give it a sqlite.dll/.so (depends on OS you are). Put it in $ruby_home\bin.
Next thing to immedeately pop up, after I gave it what it wanted was: "[rake --tasks] WARNING: Global access to Rake DSL methods is deprecated." This one is not as obvious as former. Solution to this one is desribed here: http://benwoodall.com/2011/06/rails-global-access-to-rake-dsl-methods-is-deprecated/

That's it for now.

Good luck!

среда, 1 июня 2011 г.

Installing rails on windows

If you tried to install rails with gems and failed with message "...No such file or directory" - dont woly be hapy. Just folllow these instructions: http://stackoverflow.com/questions/849660/how-to-stop-the-gem-utility-from-accessing-my-home-directory


Good luck!

вторник, 24 мая 2011 г.

JetBrains dotPeek to rescue.

I don't know how you faced the fact that Reflector is no longer free, but I for one was very-very dissapointed. Now, our favorite JetBrains team comes to rescue with their brand new tool called dotPeek.

Go and get it here.

PS. Five minutes later I found another tool that will compete to take Reflector's place - JustDecompile from Telerik. It is here.

PPS. Also, there is a work being done for Silverlight by Denis Vuyka and there is another OSS tool to compete for our souls - ILSpy.

PPPS. Life is good again.

Good luck.

понедельник, 16 мая 2011 г.

NServiceBus Saga Idempotency

Should your business entities had a natural identifier (I think even a surrogate one would do in this case), it would be trivial to ensure idempotency of sagas, that drive their processing.


Just store that Id in a temporal saga storage and enqueue a handler that will guard your sagas as the first handler in NServiceBus endpoint pipe. Something like this one:
And don't forget to specify message handling order:

Good luck!

понедельник, 11 октября 2010 г.

Applying monadic combinators to build simple parser

After reading this article, it dawned on me, how easy it might be to write parsers using internal dsl syntax. Looks a bit clumsy in C#, yet rather expressive.

I've used wonderful Magnum library built by Dru Sellers and Chris (creators of open source service bus MassTransit project) as a foundation, since it already contains a base for monadic parsers.

As an example, look how easy it is to write a parser for following simple grammar, describing file version structure:

<version> ::= <part>{<delim><part>|<part>}
<part> ::= <positive integer>+ | <letter>+
<delim> ::= “.” | “,” | “(” | “)” | “ “

And parser in mere 10 lines of code:



Good luck!

среда, 29 сентября 2010 г.

Dependency injection Presentation

На слайдах ниже вы найдете презентацию, которую недавно я провел для своих коллег. Цель ее - завлечь в свою религию, шутка, продемонстрировать наглядно преимущества применения DI вживую. Для оживления презентации, используйте код, выложенный здесь.

Dependency injection

P.S. В английской версии блога, я немного порассуждал на тему того, какие "умницы" и как я рад видеть их новые инструменты, но повторяться мне лень . =)

Удачи!