XTab (10) [Avatar] Offline
#1
Hi Fabrice, I've enjoyed reading the first chapter (well, most of it - which is why I'm posting here!) and plan to sign up to buy the eBook and Printed versions later today.

Q. So, what part of Chapter 1 did I not enjoy, you ask? Or I hope you do.

A. The parts where I'm forced to translate from C# to VB.NET in my head while also trying to learn LINQ.

VB developers quickly get frustrated with books that promise to include samples in dual languages but then fail to deliver. I did notice your caveat right at the start where you said something along the lines of VB samples will be included where appropriate. The simple truth is that they are always appropriate to a VBer!

I know it must be terribly tempting for you as a C# developer to think that a simple code snippet in C# is, well, simple. And oftentimes it is. But when a VBer's attempt to convert from C# to VB doesn't work - especially while they're trying to learn a third paradigm, LINQ - it makes for huge frustration.

(Add to this that the missing code that caught my attention is in the midst of yet another sometimes difficult topic - XML - and I predict that if not sorted out you will lose a lot of your VB readers quite early in the game)

The argument runs that it's easy for the reader to translate short snippets from C# to VB. There are two counter-arguments to this.
1. Things aren't always as simple as they seem.
2. Maybe they could translate the code on the fly, but why should they? If an author promises a book in two languages; that should unequivocally be what is delivered.

I know that your co-author Jim Wooley is an expert in VB, so I'm sincerely hoping that this potential problem can be addressed relatively easily.

I don't mean to rant or criticise, because I think what you have written so far is in a clear, understandable style and I have high hopes that LINQ In Action will become a very successful primer for you. However I thought that if I waved this large yellow flag marked "Foul" at you right now at this relatively early stage then you may be able to ensure that the final version will be the book you (and we) all want it to be - one that is written for both C# and VB.NET developers on an equal footing.
steve.eichert (22) [Avatar] Offline
#2
Re: VB.NET Feedback On The Story So Far
Hello XTab,

We greatly appreciate your feedback and will look into ways that we can address your concerns. It's difficult to provide both C# and VB.NET examples for every sample since it would result in a lot of duplicated information. We're trying to find the right balance to ensure both C# and VB.NET developers will find the book valuable.

Do you think every sample should be provided in both C# and VB.NET? Would having all the code samples in the book available as a separate download for both C# and VB.NET help address your concerns?

Best Regards,
Steve
XTab (10) [Avatar] Offline
#3
Re: VB.NET Feedback On The Story So Far
Hi Steve,

Thanks for following this up.

I think a downloadable (but absolutely fully tested and working) set of samples in VB would be quite acceptable. This doesn't need to be in a set of VS Solutions and Projects; it can simply be a Word Doc or a PDF or similar, so long as there is a clear correlation between, e.g. Listing 1.nn in the book and Listing 1.nn in the document.

But it's important that the authors and publishers are totally upfront about this. I have bought books that promised code in both languages which have turned out to be C# only. It can be quite annoying when that happens. To give an extreme example, a WPF book out this month has a half page description on amazon and on the publishers' own web site, but totally avoids saying which language is used for the code behind parts of the examples. I had to email the author personally to find the answer to that question!

With regard to LINQ in particular, as you will know, several key syntax points are quite differently handled in the two language versons. So if your reader doesn't know that you need Dim in VB, not var, or doesn't know that the syntax for a Table atttribute when using LINQ To SQL is quite different between C# and VB.NET then they are going to quite rightly feel frustrated and that they have been let down.

At one stage I was going to post up the VB versions that are missing from the end of Chapter 1 in this forum as it took me a while to discover some of those answers, but then decided that it wasn't really my job :-} .


I actually disagree with your phrase: "since it would result in a lot of duplicated information" as - no offence intended - it rather misses the point. It may be the same information but it is aimed at two entirely separate audiences, both of whom require the information in a different format.

The bottom line remains: By all means write a book for C# devs only if that is your area of interest, but if you are going to claim that it is equally useful for VB developers too then it is vitally important that you include all the relevant snippets/changes from the C# versions.

Hope this helps clarify my VB perspective for you. I'm quite happy to discuss this further, either here or via email if you want to contact me off forum. I have put my contact email address in my Profile.
steve.eichert (22) [Avatar] Offline
#4
Re: VB.NET Feedback On The Story So Far
I completely understand where you are coming from any appreciate you taking us to task on it. If we're going to promote the book to both C# and VB.NET developers we need to ensure that both C# and VB.NET developers get all the information they need out of the book.

I agree that my response misses the point, and understand that the information has to be presented in different formats to be of any use to a given audience. My only concern is that including both C# and VB.NET versions of every sample within the book would end up annoying both the C# and VB.NET developers. I'm wondering if it would be better to use either C# or VB.NET as the primary language for samples in the book and then have the non-primary language be available as an "absolutely fully tested and working" set of samples.

Best Regards,
Steve
gooptek (1) [Avatar] Offline
#5
Re: VB.NET Feedback On The Story So Far
Hi Steve,

I will have to disagree this your concern that providing code sample in C# and VB.NET will annoy readers. Many developers has to write code in both languages (contractors) and having samples in both will be helpful at least. I can list many reason why you should have C# & VB.NET samples such as: you promise you should deliver smilie, no 'discrimination', both groups of developers get what they expected, some developers will find it to better the skill sets in language they don't feel is their primary one, etc, etc. Bottom line is it will work for me. Some times ago I purchased a book from Microsoft Press 'ADO.NET 2.0 Core Reference' written by David Sceppa. The best book I read in last 10 years and each line of code is shown in C# and VB.NET. I never felt annoyed reading this book smilie)
fabrice.marguerie (224) [Avatar] Offline
#6
Re: VB.NET Feedback On The Story So Far
I would like to confirm that the source code download that will accompany the book will contain all the samples in both VB and C#.
However, in the book, only selected samples where there are important differences between languages will appear both in VB and in C#. The rest of the time, the samples will be in one language or the other, depending on the features being demonstrated.
I'd like to add that in the first chapters, we make sure we demonstrate the language features in both languages.

We try to provide a lot of code samples in the book, so having them in both languages in the text would result in a much bigger book.

Fabrice
zhan (1) [Avatar] Offline
#7
Re: VB.NET Feedback On The Story So Far
In the spirit of the subject, why not have two

ebooks, one for C# and one for VB. Then

you will not be annoying either community!
BenHayat (24) [Avatar] Offline
#8
Re: VB.NET Feedback On The Story So Far
> In the spirit of the subject, why not have two
>
> ebooks, one for C# and one for VB. Then
>
> you will not be annoying either community!

I just bought the book and eBook and did notice that my eBook was created with my name, which tells me it was created on the fly. And based on above suggestion, perhaps the eBook can be made either with vb or C# codes. Personally, I'd rather to see just C# code while reading, rather than trying to bypass bv code.
steve.eichert (22) [Avatar] Offline
#9
Re: VB.NET Feedback On The Story So Far
I don't believe the current process can support creating different versions of the book (C# vs. VB.NET), but it is an interesting idea. We'll look into it.

Thanks,
Steve
fabrice.marguerie (224) [Avatar] Offline
#10
Re: VB.NET Feedback On The Story So Far
The complete source code in both VB and C# is now available for download. See http://linqinaction.net/blogs/main/archive/2007/12/12/linq-in-action-samples-source-code.aspx