Thursday, October 22, 2015

Different encoding systems for "Hello" example:


ANSI
48 65 6C 6C 6F

Unicode (little-endian) encoding with no BOM.
48 00 65 00 6C 00 6C 00 6F 00

Unicode (little-endian) encoding with BOM
FF FE 48 00 65 00 6C 00 6C 00 6F 00

Unicode (big-endian) encoding with no BOM
00 48 00 65 00 6C 00 6C 00 6F

Unicode (big-endian) encoding with BOM
FE FF 00 48 00 65 00 6C 00 6C 00 6F

UTF-8 encoding
EF BB BF 48 65 6C 6C 6F

UTF-7 encoding
2B 2F 76 38 2D 48 65 6C 6C 6F



Reference:
http://blogs.msdn.com/b/oldnewthing/archive/2004/03/24/95235.aspx

Friday, October 16, 2015

How to fix issue "The target GatherAllFilesToPublish does not exist"?

#1 Option:
Add following tag into project file:
  <Target Name="GatherAllFilesToPublish">
  </Target>
But will output all of source files into web site.

#2 Option:
Replace
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="false"/>
To
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />

Reference:
http://forums.asp.net/t/1838524.aspx?The+target+GatherAllFilesToPublish+does+not+exist

Wednesday, October 7, 2015

INTENTION REVEALING INTERFACES from DDD

Excerpt from DDD book:


"The beauty of objects is their ability to encapsulate all that so that client code is simple and can be interpreted in terms of higher-level concepts.
But if the interface doesn’t tell the client developer what he needs to know in order to use the object effectively, he will have to dig into the internals and understand the details. A reader of the client code will have to do that same. Then most of the value of the encapsulation is lost. We are always fighting cognitive overload. If the client developer’s mind is flooded with detail about how a component does its job, his mind isn’t clear to work out the intricacies of the client design. This is true even when the same person is playing both roles, developing and using his own code, because even if he doesn’t have to learn those details, there is a limit to how many factors he can consider at once."


It is so true if working on a larger dev team.

Thursday, September 24, 2015

Another way to talk about CQRS/Event Sourcing

"A more promising model, used in some systems, is to think of a database as an always-growing collection of immutable facts. You can query it at some point in time — but that’s still old, imperative style thinking. A more fruitful approach is to take the streams of facts as they come in, and functionally process them in real-time."

Turning the database inside-out with Apache Samz
https://martin.kleppmann.com/2015/03/04/turning-the-database-inside-out.html