I am quite tempered, so if I were to name all the things that annoy me, the litany could be quite long ;) It applies to both personal & professional topics of course. Speaking about the latter - one of the behaviors that immediately raise my temperature at least by 3 degrees is a developer that goes "Now it's personal" mode.

What mode?

Codework is not that straightforward as they write in books / show in video tutorials - you get stuck once in a while, THINGS happen - things that at the first glance seem to be illogical. Then it starts - the real job - debugging, tracing, profiling, isolating the problem, etc. It's unavoidable & this is the part of the job that separates PROs from wimps:

  • the first group just bites the bullet & rolls up their sleeves
  • the seconds group does everything they can to avoid getting soiled

But sometimes the individual from the 1st group falls within his ambition's trapdoor - he's struggling, sweating, fighting, but he doesn't get there. And he won't ask anyone for help, he won't make a step back to pick a different solution - because now it's personal! He may be honestly trying, he may still have more ideas to test & of course there's some benefit in that (every new experience will quite likely increase his knowledge), but:

He's wasting time, because of just being stubborn.

In general:

  • it's great that this person feels responsible for his code
  • not giving up easily is rather to be praised of course

but both these make sense up to some point. Devs don't live on desert islands, they are supposed to collaborate, share their experience and co-operate. That's why the responsibility is always supposed to be on the team-level, not individual-level.

And if the problem can't be solved (or it just takes too much time) on team level - share it with the wider audience!

Finally, we're getting to the point

How to share your code-related problem efficiently? By sharing the code itself of course! What is more - executable code. People are not compilers - the likelihood of getting actual help vastly increses when you provide a clean, isolated problem that can be replicated within seconds.

That's why smart people have created tools like jsFiddle. Using this site, you can develop & run small samples of web code directly in your browser & what is more important - you can very easily share it with anyone you'd like.

It's done in a very smart way - you just pick the libraries you use (from the usual suspects list), languages you use, you just slap your code & observe the results. This way, you can be completely sure that:

The result you're getting is exactly the same result other people will get (there will be no differences due to local dev environment, different library versions, etc.).

What is more - each fiddle (code sample):

  • can be easily shared via link, so you can publish the link on SO or anywhere you want
  • can be easily forked by people who'd like to play with it without breaking your original code
  • can be easily collaborated on on-line

There's just one drawback - jsFiddle is all about web development. No worries thought:

.NET Fiddle to the rescue!

I've seen it already some time ago, but I didn't use it until quite recently - .NET Fiddle is on-line & rumbling as well :) It works ... in a pretty much the same way as JSFiddle:

  1. You pick the framework version, ...
  2. ... language & project type, ...
  3. ... NuGet packages from the official feed (!)
  4. The you slap your code in a window and bummm, it runs somewhere there in the cloud & returns the output in the browser

Here's the example of running Reactive Extensions sample:
https://dotnetfiddle.net/Nk6eJw

Making a fiddle has one another huge pro - it forces you to actually isolate the problem. And it's a great test for low-level code architecture. Do you follow the Single Responsibility Principle? Does your code have only truly necessery dependencies?

Any complains? I would gladly welcome Unit Test as a project type. Otherwise than that, it's pretty much what I need. And it's VERY useful. How come?

For instance: as you may already know, .NET world is missing a reasonable actor-model implementation. There have been some efforts to port Akka to .NET, but project was lacking a lot. Fortunately things are getting their speed. You can now check the current state of this project using .NET Fiddle without any specific setup on your machine:

https://dotnetfiddle.net/4QLbhL

Let me quote the classic one-liner:

How cool is that?

Share this post