The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

tpeierls (7) [Avatar] Offline
#1
Methods should be lowercase-initial. The following line on p.8 tripped me up:

Emailer emailer = new EmailerFactory().NewJapaneseEmailer();

--tim
dhanji.prasanna (37) [Avatar] Offline
#2
Re: Code style issue
Hi Tim

Some examples are in C#, where methods begin in uppercase. We're still having the discussion about how the balance is working. Perhaps the language could be made more clear with a watermark or something.

Any suggestions?

Dhanji.
tpeierls (7) [Avatar] Offline
#3
Re: Code style issue
Ah, I missed the parenthetical "(in C#)" -- but in that case isn't the subsequent "new EmailerFactory().newEnglishEmailer()" in Listing 1.6 wrong?

Brian Goetz and I faced a similar problem in Java Concurrency in Practice where we wanted to distinguish between at least three types of listing: good, bad, and could be better. We ended up using stylized face icons for the latter two. I think it worked well enough, but it was a pain positioning those icons.

We tried different background shadings, but it was too subtle. Watermarks would have been distracting, we felt, and we weren't sure how to deal with very short listings.

It wasn't appropriate for us, but you could use different font families and slightly different font sizes for each language, together with a comment in the listing saying what language it is (for the first of a sequence in that language).

--tim
gtimbo (1) [Avatar] Offline
#4
Re: Code style issue
This is a bit late, but having just read through the sample chapter, the parenthetical "in Java" etc is pretty clunky to read. Perhaps a simple right-aligned "Java" or "C#" in the 'Listing x' paragraph style would help to make it stand out? Of course, this doesn't really solve the problem when you have code appearing outside of a 'listing' section.

Also, Listing 1.1 seems to have different punctuation than the others (a semi-colon and a full stop).

As for the mixing of Java and C#, I think you should only change languages when you change sections or major examples. The syntax, especially in the first chapter, is so similar that it's hardly worth switching languages, especially as it's jarring to see what looks like Java, but with seemingly wrong capitalisation.

Finally (just because I can't be bothered creating a new topic), I assume the first chapter hasn't been through a full editing cycle? I noticed quite a few problems in terms of punctuation (use of semi-colons in particular) and sentence structure etc. I started to write them up, but quickly discovered a few too many.

Overall, looking good though!

Tim (not related to the other Tim)
dhanji.prasanna (37) [Avatar] Offline
#5
Re: Code style issue
Hi Tim!

Thanks for your message. Yes, you're correct -- it's a very raw draft and hasn't been through copy editing yet.

I think I will do away with all the frivolous C# examples, as you advise.

Dhanji.