Live data from Hacker News

Making Instant C# Viable - Vizualization

ermau.com

11–20 of 24 posts

Re: Making Instant C# Viable - Vizualization

#12
post #9

Looks very interesting. How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

Side effects is definitely the biggest problem to solve here. For SQL you can start a transaction and roll it back afterwards. Disk access can be done with snapshots. Network traffic... well I guess it depends on what you're doing exactly. There's lots to do but it can work.

Re: Making Instant C# Viable - Vizualization

#14
post #9

Looks very interesting. How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

I see it working hand-in-hand with dependency injection. So resolved mock interface implementations will be used by Instant.

Re: Making Instant C# Viable - Vizualization

#16
post #14
post #9

Looks very interesting. How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

I see it working hand-in-hand with dependency injection. So resolved mock interface implementations will be used by Instant.

Wow, this is a great idea!

Re: Making Instant C# Viable - Vizualization

#17
post #9

Looks very interesting. How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

The trick is that you simply wouldn't use this on code where irreversible side effects take place. I think there's enough methods you write where this would help to make it still useful and worthwhile. Tackling the side effect issue is far, far too big of scope.

Re: Making Instant C# Viable - Vizualization

#18
post #7

I've been using NCrunch for some time now, and really enjoy the instant feedback it gives on failed tests. It constantly chugs away in the background like a faithful dog. I can see things like Instant C# meaning I have to build less: a great productivity enhancer.

There's lots of places we can take this, which is why I categorize it as a research project.

Being able to create unit tests from this, or being able to look at calls from unit tests here has definitely been on my mind. The way you enter the "test code" right now is not ideal in the slightest as I talk about in my post.

Re: Making Instant C# Viable - Vizualization

#19
post #6

I've been planning to do something similar, but at run-time where the last known value of each variable is shown. This would complement my stuff nicely - https://github.com/swax/CodePerspective

Very cool.

Just a quick caution from someone who has been building similar tools (not as fancy though), is that runtime instrumentation can often severely slow down the main app to the extent that people often don't want to run such tooling.

Post reply on HN