On page 28 from “97 Things Every Programmer Should Know” Mattias Karlsson talks about Code Reviews and the benefits of them.
He stated that “Instead of simply correcting mistakes in code, the purpose of code reviews should be to share knowledge and establish common coding guidelines”. I thought “This is very insightful indeed and I must implement it in my team. But with caution”.
Let me first enumerate the benefits which I got as a result. Then I will explain how to introduce your team to code reviews.
Continue reading “The benefits of Code Reviews”
The professional blog is a good way to :
- share valuable content to others from your field of expertise
- connect with other professionals who work on similar problems
- share ideas and expertise.
Continue reading “Reasonable points to consider when you are going to create your professional blog”
While trying to figure out how to make a full featured implementation of ContextMock builder based solely on Moq in order to make unit tests for an implementation of IActionFilter I stumbled upon a problem :
System.NotSupportedException Invalid setup on a non-virtual (overridable in VB) member: x => x.Values
Continue reading “Mocking HttpContext when testing IActionFilters in MVC”
My context for the script in this case.
- A bug from the client is reported. A bug that does not cause exception at the back-end nor at the front-end – The font-end simply stops. It does not even freeze. So you do not have any log for this case. Now you are in check ( chess check ).
- You need to dump the database from the staging environment ( NO! Not the production! )
The possible solutions :
- Go to azure portal and export all the databases needed by hand – click-click-click….a lot.
- Make a powershell script and do it really quick. This helps a lot when you do it more then once.
The script :
Continue reading “A script to export sql azure databases.”
We have home grown web ERP system which is operating since 2004. It is built upon the LAMP stack. The ERP started for internal use but after many years of usage and polishing we decided to offer it for free to several other companies outside our organization. It was a success. We decided to rebuild it from the ground up as a SaaS product on .NET/IIS/MVC/SqlAzure/Blobs/Tables/ServiceBus/etc – MS stack. In the new version we have corrected all the design flaws we knew of, made it modular, implemented all the desired features, etc. One of the problems we have to solve is to migrate all the companies from the old system to the new one which means all the data – operational data, users with passwords etc. One of the problems that appear is with the data mismatch – the new core domain entity hierarchy is changed a bit and the other entities are changed too. To say it another way – domain model/entities impedance mismatch. Transfer of files is another story left for another post.
Continue reading “Migrating legacy MySQL database to SQL Azure with model mismatch”
I wrote about Semantic Logging (SL) in MVC and after watching Rowan Miller`s video from Tech Ed 2014 I decided to implement logging Entity Framework 6 queries to Azure Tables with EventSource (aka Semantic Logging / Structured Logging).
Motivation for logging Entity Framework 6 queries to Azure Tables
By MHO the motivation behind every logging system must include :
- Finding and removing bugs which improves QoS and reduces Dev/Ops time to resolve an issue.
- Good structured log which enables a less proficient programmers to solve the problem. Better support devs => higher ops. costs.
- Proactive response – get into action long before the client gets to you. Or even better – you call the client first.
- Measuring and optimizing performance of your app. As Mark Simms and Chris Clayton say that “premature optimization is the root of all evil.” is not so relevant when designing clod apps.
Continue reading “Logging Entity Framework 6 queries to Azure Tables”
When you get to the point of understanding that you do not have a lifetime to spend on F5 debugging/testing and you want to be a better developer ( I beg you to get it now! ), you should ask : How to learn Test Driven Development or Behavior Driven Development? Where are the best resources?
Note : Do I declare that I have the deepest, most structured and refine knowledge about the topic? Nope. I say this in the begging in order to avoid irrelevant and inconsiderate comments.
Continue reading “How to start learning Test Driven Development or Behavior Driven Development?”
To give you the context – we have SPA ERP to build and we have a very good set of jQuery/HTML5 controls for the UI – Infragistics Ignite UI. After installing the IG Ignite UI I started to experiment with the upload control and read its documentation here, here and here (A better organized documentation seated in one place is needed 🙂 ) and experimenting with the examples we got stuck because :
Continue reading “Infragistics Ignite UI upload control and MVC – Where is the HttpContext.User and how to get and set it?”