31/07/2018

I will give a talk at .NET Developer Days 2018!

Home



.NET Developer Days is one of the biggest conference in Eastern and Central Europe. I took part in the first and in the second edition and when the third edition was coming I decided to try to send my proposal in the response to the Call of Paper. And you know what? My proposal was accepted! My first thought after receiving this information was "Oh my gosh, now I have to prepare the presentation and give a talk in a front of XXX people!" ;) Fortunately, the second was "Michał, If you take the first step, you have to take the second".

My presentation will be about future of us - developers. I'll try to answer the question "Will AI replace developers?". Not so far ago I would say that it is impossible. However, technology is moving forward very fast and almost every day I find some new publications about attempts to automate software development. During my presentation I'll talk about a few extremely interesting solutions but not only. I'll also try to show some of them.

So if you work in IT and you are curious if human being will be replaced by AIs in near future or simply you are interested in contemporary AIs, then my presentation is for you.

I really hope that we will meet during the conference. The location is, as usual, the building of Expo XXI. For now, there are 30 speakers in agenda so I'm sure that you will find something interesting for yourself. The sooner you register the less you pay so do not wait too long.

14/05/2018

How to use Roslyn with .NET Core?

Home

Title: Baths of Caracalla in Rome, Source: own resources, Authors: Agnieszka and Michał Komorowscy

When we started PlatformX project, we were using full .NET Framework and it was natural to use Roslyn in order to read and analyse C# code. I have to admit that Roslyn, despite some initial problems (see other posts about Roslyn), managed to do the job. However, later on we decided to migrate PlatformX to .NET Core. There were a few reasons behind this decision:
  • We anticipated that in future we may want move to Linux server for example to reduce costs.
  • .NET Core is faster. To give you an example. After migration builds turned out to be 1.7 times faster and tests 2.6 times faster!
  • Before migration we had to support 2 versions of our infrastructure libraries (.NET Framework + .NET Core) what was a little bit cumbersome. Now we support only one.
  • If we had waited, we would have spent more time on the migration later.
Despite all these advantages the migration to .NET Core meant a problem with using Roslyn. This problem is called MsBuildWorkspace. It is the class that allows you to point a solution or a project, read it and then analyse it a file after a file. Unfortunately MsBuildWorkspace is not supported in .NET Core. I think that the main issue is that under the hood it uses MS Build which is not cross-platform.

Because nowadays .NET Core projects can actually reference full .NET Framework libraries (of course it kills portability), firstly we simply tried to do so. But without much success. MsBuildWorkspace simply cannot handle .NET Core projects. The actual effect was that according to MsBuildWorkspace there were no files in a project being analysed.

Fortunately, the rescue came from Buildalyzer project which does exactly what MsBuildWorkspace should do and it works like a charm. Here is how we use Buildalyzer:
var sb = new StringBuilder();
var writer = new StringWriter(sb);

var manager = new AnalyzerManager(solutionPath,
   new AnalyzerManagerOptions
   {
      LogWriter = writer
   });

foreach (var prj in manager.Projects.Values)
{
   // GetWorkspace returns Microsoft.CodeAnalysis.AdhocWorkspace which can be used with Roslyn
   var workspace = prj.GetWorkspace();

   // Starting from here the code does not depend on Buildalyzer
   var sln = workspace.CurrentSolution;

   await AnalyzeProject(sln.Projects.First());
}

writer.Close();

_logger.Write(sb.ToString());
As to AnalyzeProject method, it is responsible for analyzing all files in the project. What is important it DOES NOT depend on Buildalyzer at all. I really didn't have to change a line after switching from MsBuildWorkspace to Buildalyzer and it is amazing. Just a few lines of extra code and you can take all advantages of Roslyn in .NET Core projects in order to analyse other .NET Core projects.

*The picture at the beginning of the post comes from own resources and shows Baths of Caracalla in Rome.

20/04/2018

CareerCon 2018 - The best mix in history - DDD, CQRS, Event Sourcing and others

Home



For years I was designing and developing "classical" applications. Then I entered the new world of DDD, CQRS, Event Sourcing... and it was an extremely refreshing experience. It wasn't easy all the time but I do not regret and I decided to share my experiences.

On 24th March I gave a presentation under the title "The best mix in the history - DDD, CQRS, Event Sourcing and others?" at CareerCon 2018 conference. I tried to show benefits but also drawbacks of using DDD, CQRS and Event Sourcing.

I'm glad with this presentation. It took as much time as I assumed and there were really many questions at the end. Majority of them were about Event Sourcing. It looks like a very hot topic nowadays.

The results of the surveys also confirm that the presentation was well received :) Thanks, it really motivates me.


If you are interested in DDD, CQRS and Event Sourcing and you would like to hear about that at another conference or in your company, do not hesitate to ask me.

And here you can find the presenation:



*The picture at the beginning of the post comes was provided by organizers of the conference.

19/11/2017

Will Artificial Intelligence replace developers (part 2)?

Home

Anatomy-1751201 1280


This is a part 2 of the overview of different AI solutions automating the programming process. The part 1 can be found here. Today I will describe another 5 "virtual developers".

13/11/2017

Will Artificial Intelligence replace developers (part 1)?

Home

Anatomy-1751201 1280


After 10 years of working for smaller and bigger companies I decided to join as Chief Scientific Officer a start-up called PlatformX. I'll not exaggerate saying that it's the most interesting and challenging project I've ever worked in. Our goal is to automate the process of developing software. In other words we want to create an artifical intelligence a.k.a. "virtual developer" that will be able to communicate with a human being in order to collect requirements and then will write, test and deploy a program according to these requirements. Nice, isn't it?

30/10/2017

Never ever update an event. But why?

Home



I heard and read a lot about Event Sourcing (ES) but earlier I hadn't had occasion to use it in the real-life system. This year I got this opportunity :) For many years I was working with traditional architectures so ES + CQRS + DDD is like a new world to me. Very refreshing experience! I've already learned a lot but I'm still learning and discovering new things. For example, not so long ago the versioning of events was "mysterious" for me.

27/10/2017

.NET Developer Days 2017 - Grand finale

Home



It's time to make the summary of .NET Developer Days 2017. Let's start with the organisation aspects. Here I'll shortly say it was simply good and I cannot complain. The good example showing that organisers really try to make everything ok is a fact that a friend of mine was able to register for the conference just one day before the event (what theoretically was not possible). Now let's move to the presentations. Here I have much more to write.

18/10/2017

How did my presentation go?

Home



Two weeks ago I gave the presentation about artificial intelligences that write programs. Now, I got results of the survey conducted after the presentation and I decided to share some data with you. Below you can see the summary. The participants could judge me in 4 categories and 14 of them decided to do that. (Thank you!). I think that there were around 30+ people in total in the room.

29/09/2017

NDepend - my point of view

Home

Sometime ago I was contacted by Patrick Smacchia, who is CEO and a lead developer in NDepend. In one sentence, NDepend is a tool that analyses your code and tells what is wrong and can be improved to avoid technical debt. Patrick offered my a free pro license for NDepend. A few years ago I was using it so it was an interesting proposition. We agreed that if I find NDepend useful, I will write a post about it and share my experience. As for me it's a win-win situation.

26/09/2017

CareerCon Warsaw 2017 - AI that can program

Home

Terminator


On next Saturday (30-09), I'll give a presentation under the title "Can artificial intelligence program?" at CareerCon conference. I'll tell about existing solution, their abilities and limitations. At the end I'll try to answer the question if developers needs to worry and predict what we can expect in the future. If you have time I'll be glad to see you! The presentation will be in Polish. Here are the links:

*The picture at the beginning of the post was created by Stephen Bowler from wakefield, United Kingdom (terminator) [CC BY 2.0], via Wikimedia Commons.

22/09/2017

SpecFlow + .NET Core = problems

Home



Since I started using SpecFlow acceptance tests, I think that they are simply great. If I had to select whether to write only unit tests or only acceptance tests, I would select the latter. Nonetheless, there is one important problem with SpecFlow.

25/08/2017

.NET Developer Days 2017 - fresh information

Home

*Disclaimer: This is a sponsored text.


Not so far ago I wrote that this year’s edition of .NET DeveloperDays is coming. Now, we finally know the full agenda and there are really many things to choose from.

18/08/2017

Json.net also tricked me

Home



Recently, I was tricked by Roslyn, today by Json.NET. My bloody luck ;) Let's look at the following two very simple classes. Class A has one readonly property and I had to define a special constructor to allow Json.NET to set this property. B is also simple. It has one property, this time of type A with some default value.

14/08/2017

Roslyn tricked me again

Home



A while ago 2 of my SpecFlow tests started failing on the build server. At the same time, on a few local machines no problems were observed. I also didn't find any exceptions in the log, so I decided to log into the server and debug a problem there.

Quite soon I figured out that the problem is in the algorithm that uses Roslyn to analyse and understand the code. Here is a simplified code that finds all local variables within a method body and tries to determine their exact types.

18/05/2017

Report from the battlefield #11 - premature optimization is the root of all evil?

Home



Have you ever heard that "premature optimization is the root of all evil"? Probably yes. It's quite well known Donald Knuth's phrase. However, the whole cite is much less known:

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."

Why Am I writing about that? Because recently I had on occasion to fix an application which was written according to the fist part of this cite. Or even worse it was written according to the rule "any optimization is the root of all evil". Here are some examples what not to do and some tips what to do.

10/05/2017

.NET Developer Days 2017

Home

In the post .NET Developer Days 2016 - Grand finale I wrote that it hadn't been my last my last .NET Developer Days conference. Recently, I've been asked again to become a media partner of this year's edition so I agreed without much hesitation. Disclaimer: It also means that it is a sponsored text.

The well known aphorism says that perfect is the enemy of good. The organizers of the conference must have heard that because the form of the current edition will be similar to the previous one i.e.:
  • What: 3 tracks with session about different topics and of different difficulties.
  • Where: EXPO XXI Exhibition Center – Warsaw, Prądzyńskiego 12/14
  • When: 18th-20th October 2017. 18th October is reserved for full-day training sessions (so called pre-conf) and the actual conference will start on 19th October.
  • Language: 100% English
The agenda has not been published yet and we have to wait until June. However, the last time the range of topics was wide and I didn't have any problem to find something interesting from my perspective. I keep my fingers crossed this year will not be worse. What is very important the earlier you buy tickets the less you will pay. If you are interested do not think too much. The current price for the conference without pre-conf is 275€. In June 325€ it will be and in August 375€.