Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy code from the text #110

Open
harrykar opened this issue Oct 28, 2018 · 2 comments
Open

Copy code from the text #110

harrykar opened this issue Oct 28, 2018 · 2 comments

Comments

@harrykar
Copy link

harrykar commented Oct 28, 2018

First of all BRAVO for your awesome work(i'm a big fun of Open knowledge) i started study it and find it really very helpful keep it up 馃憤

  1. I notice an annoyance in copying code from book into editor are copied also the line numbers and is annoying every time delete that numbers.
    Is that code somewhere apart(other than in book)? that were a good solution about that annoyance

  2. Was informative,useful for the reader put somewhere in "Front Matter" what have to be the reader's background before start study the book

  3. Regard code maybe is good not make assumptions about reader's background and put the whole code? e.g. in Test framework subsection one see the main() (at signature level before read further) and wonder from where class is taken and in main see new Multiplication and wonder where is that class ... and then understand
    IMHO was better if there was all the scaffolding

public class  Multiplication {

    private int firstNumber, secondNumber;

    public Multiplication(int firstNumber, int secondNumber) {
        this.firstNumber = firstNumber;
        this.secondNumber = secondNumber;
    }

    public int perform() {
        return firstNumber * secondNumber;
    }

    public static void main(String[] args) {

        try {
            int firstNumber = Integer.parseInt(args[0]);
            int secondNumber = Integer.parseInt(args[1]);

            int result =
                new Multiplication(firstNumber, secondNumber).perform();

            System.out.println("Result is: " + result);
        } // try
        catch(Exception e) {
            System.out.println("Multiplication failed because of: " + e);
        } // catch

    } // main()

} // TestFramework

PS: I started translate(intuitively because i don't know C#. So far seems straightforward) your code in Java

Best Wishes & Regards
Harry G. T. Kar

@grzesiek-galezowski
Copy link
Owner

Hi, @harrykar, I am really happy you decided to share your feedback!

To address your points:

  1. The code fragments without the line numbers are here on github. E.g. if you take a look at https://github.com/grzesiek-galezowski/tdd-ebook/blob/master/manuscript/040_Three_Essential_Tools.md you will see there are no line numbers in this version. The version you see under the link I just provided is formatted according to github's markdown engine (which is incompatible in several places with the leanpub's one, that's why you will see some artifacts on this version), but you can also select a raw version (e.g. https://raw.githubusercontent.com/grzesiek-galezowski/tdd-ebook/master/manuscript/040_Three_Essential_Tools.md) and see the raw markdown code with snippets embedded in it. Hope it helps!

  2. I was planning to do that. Part of this (at least the one regarding programming language) is in the code examples chapter, but I am aware that there's more to reader's knowledge than the language itself. If you helped me a bit by writing down some of your experiences or who might have insufficient knowledge to read this book, I could use that as a starting point, what do you think?

  3. I can try to do that for the introductory chapters. For the later ones, I don't think it would improve readability to put the full listings. My feeling is that in the later chapters, I already repeat code fragments more than a typical book, but I may be wrong :-)

By the way, if you have an issue translating the code to Java, please let me know. For the last two years, I had an adventure with Java so I have a pretty good feel of how the Java counterpart would look like and I ported the Any stuff over to Java as well (see https://mvnrepository.com/artifact/com.github.autofixture/autofixturegenerator).

@harrykar
Copy link
Author

harrykar commented Nov 4, 2018

Hi, @harrykar, I am really happy you decided to share your feedback!

Likewise :)

To address your points:

The code fragments without the line numbers are here on github. E.g. if you take a look at https://github.com/grzesiek-galezowski/tdd-ebook/blob/master/manuscript/040_Three_Essential_Tools.md you will see there are no line numbers in this version. The version you see under the link I just provided is formatted according to github's markdown engine (which is incompatible in several places with the leanpub's one, that's why you will see some artifacts on this version), but you can also select a raw version (e.g. https://raw.githubusercontent.com/grzesiek-galezowski/tdd-ebook/master/manuscript/040_Three_Essential_Tools.md) and see the raw markdown code with snippets embedded in it. Hope it helps!

Ok i search to find it, hope well Thank you

I was planning to do that. Part of this (at least the one regarding programming language) is in the code examples chapter, but I am aware that there's more to reader's knowledge than the language itself. If you helped me a bit by writing down some of your experiences or who might have insufficient knowledge to read this book, I could use that as a starting point, what do you think?

Ok you can count on me i'm really a beginner use case reader in that aspect but i do my best to help you

I'm thinking I'm only a samll unit (as well as you too) and a unit can't be strong as more units taken together if "the union constitute the power" what if you introduce your book in CodeRanch?
I discovered it in a casual way only lately as a recommendation from a book i was study from and i can say is a very nice place consisting of a really knowledgeable community started by valuable authors like i guess Kathy Sierra (Java Head First) and Jean Boyarsky(written OCA for Java8) between others. There are more members of all levels from beginners to them that work daily used TDD and other design techniques. People there are very polite i guess is not a problem collaborate.
Surely were not a bad idea at all if you present your work there maybe in the book forum

I can try to do that for the introductory chapters. For the later ones, I don't think it would improve readability to put the full listings. My feeling is that in the later chapters, I already repeat code fragments more than a typical book, but I may be wrong :-)

If your work have to be collaborative i guess is much better you think about guiding book's effort along the direction(s) the book have to follow and last the low level details (code scaffolding etc) to collaborators

By the way, if you have an issue translating the code to Java, please let me know. For the last two years, I had an adventure with Java so I have a pretty good feel of how the Java counterpart would look like and I ported the Any stuff over to Java as well (see https://mvnrepository.com/artifact/com.github.autofixture/autofixturegenerator).

Ok thank you very much I really appreciate 馃憤

Have a nice evening._
HK

PS : I notice your book is already in EbookFoundation/free-programming-books
list which i collaborate and by the way I enter it in Javaranch too here
CodeBranch forums seems a huge place to me so for your convenience here's a map I use for orientation purposes there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants