AOP with Roslyn

What I am interested in is to make a tool that logs in when the program comes in and out of a method.

It’s good for identifying problems in code and for logging.

What already exists on the market:

PostSharp – one of the best – see https://www.postsharp.net/alternatives
Cecil http://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/
Fody https://github.com/Fody
NConcern: https://github.com/Virtuoze/NConcern
What I do not like is that they are hard to configure. So, instead of writing a configurator, I’m going to write a Roslyn AOP so it’s easy to use POST build event in a CI scenario

I’ve inspired at https://github.com/KeenSoftwareHouse/SpaceEngineers – See https://github.com/KeenSoftwareHouse/SpaceEngineers/tree/master/Sources/VRage.Scripting. Do not compile in VS2017, but you can analyze the code …

The second source of inspiration was http://cezarywalenciuk.pl/blog/programing/post/roslyn-kompilator-net-rewrite-z-csharpsyntaxrewriter – in Polish, but you can see the code … (it gets complicated at the end)

My code will be on https://github.com/ignatandrei/AOP_With_Roslyn

Crossover tournament

This Saturday I have taken “Java, .NET, Ruby on Rails Chief Software Architects Hiring Tournament(https://www.eventbrite.com/e/bucharest-java-net-ruby-on-rails-chief-software-architects-hiring-tournament-tickets-38534409456 )”


It was an occasion for me to see how sharp are my (old ) programming skills and ( rather new , compare with programming) architecture skills.


For the record , I have finished the 4th from > 30 participants– that ‘s awesome for me.



Here are the results:

  1. Twin Strings 30 /30
  2. Technical Aptitude 46 /60
  3. Ascending Binary Sort 30 /30
  4. Architect Aptitude 30.86 /60
  5. Code Review 34.76 /60

Total Score: 171.62

 

Some considerations:


  • Technical aptitude was with ASP.NET WebForms questions – a no-no  for me
  • I solved the practical problems( 1 and 3 ) with a mix of .NET Generic Collection and a lot of Linq. I have also seen a Ruby solution similar with .NET Linq. Functional programming is awesome!
  • I do not agree with many question within Architect track – many were technology specific ( Amazon, Casandra, Qlik, oterhs)
  • Code review – here I have had a personal problem. I did not want to think deeply to all questions –   time is always a precious resource and I have had other things to do also.

All in all, a beautiful day and I am glad to have participated.