xsharp.eu • why 'no code' to copy and test in many Pearls posts ...........
Page 1 of 1

why 'no code' to copy and test in many Pearls posts ...........

Posted: Thu Jan 26, 2017 1:33 pm
by Phil Hepburn
Hi guys,

Karl has been asking about code which he can copy, paste, and then run, for samples being discussed in posted articles etc..

Well, the problem is quite often that although the code samples shown in an image are short, to provide code to make them work needs a lot more work as well as code. Too much I feel.

Recently the samples I posted related to LINQ, and Entity Framework, and they rely on some back-end data in a SQL database, as well as connections to a SQL server. Even if the reader/user had SQL installed its a bit of a problem.

Even if I 'hard coded' the data, and supplied the object class (like Product) it is still a lot more code, and also more places for me to make errors during posting. And it screws up my working sample to boot!

For these reasons I prefer to show images - where at least the runtime results can be placed alongside the code which caused those results, or indeed sometimes a video clip.

When we are dealing with application 'patterns' of design, like MVVM, this also is difficult to provide coded working examples, of a copy and paste variety. Data binding is equally difficult.

However, in my eNotes I often try to provide the whole of sample code sections, as we have more room / space. But back-end data sources still are an issue.

Any comments, points of discuss, or even brilliant ideas ?
Regards,
Phil.