I often work on applications whose sole task is to execute a script at certain time or day. You may approach it in several ways, eg.: Task Scheduler (Windows), SQL Job (if it is a SQL task) or CRON in Linux. You may also write application, which would run in background and execute a script at certain time. The only question is – do you really want do it?
In this post, I would like to introduce other solution to tasks like this. The combination of two frameworks: Topshelf (Windows host) and Quartz.NET (free-for-business company Task Scheduler).
Continue reading Scheduled jobs made easy – Topshelf and Quartz.NET
Often developers as a log store use text files, system events, output console or database. In some cases they use distributed systems such Splunk or Elasticsearch. In this article I would like to present how to store logs in the form of objects, rather than plain text, which also offers all sorts of graphs and charts called dashboards. To achieve it, I’ll use Serilog, Elasticsearch and Kibana.
To test this solution, you’ll need Visual Studio (obvious), an Elasticsearch instance and the Kibana extension on your PC. You may as well use Amazon Web Services which offer these services even for free. I prefer the second option because it is much easier and quicker to set up.
Continue reading Log data using Serilog, Elasticsearch and Kibana
Every programmer when working with databases will use a framework, which facilitates and speeds up development time. It is no different with me. I never liked ADO.NET. Taking out the data and storing it in a DataSet or DataTable that were not strongly typed is not a best idea. Especially when someone else on the later stage had to work with this code and no one actually knows what the author had in the mind writing it. For many years, I enjoyed the heavier Object-Relational Mapping frameworks, i.e. Entity Framework (version 4.0), LinqToSQL (the beginnings of my work as a programmer) or NHibernate.
Continue reading Dapper – micro-ORM I like
Every experienced developer knows how important is to cover your code with tests (or at least business logic). However, not everyone likes to do that once code is already written, because, why should we do that? The work is done, it was tested and it functions correctly, right?
I never liked to cover the code with tests once it’s already there. That’s why in this article I’ll present Test Driven Development and describe how I use it day to day.
Continue reading What TDD is? How I’m using it?
Design patterns which I would like to present in this post are well described in the book Design Patterns. Elements of Reusable Object-Oriented Software written by The Gang of Four (Gramma, Helm, Johnson, Vlissides). In my opinion this book is must read for every developer, regardless what programming language you are using. Besides the fact that this book was written more than 20 years ago, it still contains a lot of useful details for developers of all levels. I often revisit this book to keep in touch with design patterns that are detailed within. Continue reading Design Patterns – introduction