Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

"Sybex 1Z0-815: Chapter 11:Compiling

 
Saloon Keeper
Posts: 1631
55
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things up-front.

1. It is clear that the Enthuware and Sybex teams have a healthy spirit of co-opertition, and while everyone wants to sell books, their first responsibility is always to getting the best results for the test takers depending on them.  Commendable and admirable in today's world, and consistent with the spirit that attracts me to CodeRanch.
Therefore, I am using advice from Hanumant Deshmukh's excellent book as a reference in here, I am not the tiniest bit sorry that I invested in both of these excellent 815 books.

2. The combination of 815 and 816 into 819 has thrown everyone for a bit of a loop, most particularly to those that provide training and mock exams, so the answer to this will probably reflect "What is in scope for the 819 exam" at this point.  I am studying Chapter 19 of the Enthuware book and this Chapter 11 like crazy to prepare me for the 816/819 part which opens up much more of this huge topic, and was hoping to "Know the Stuff In Both Chapters Cold" to reduce sweat and tears during the grueling second part of the study with the next book.

OK.
At first, I was just being pedantic about the naming of a placeholder in Table 11.5 on page 481.
It is called "classestoCompile" and "classesToCompileIncludingModuleInfo

I dislike that naming for two reasons:
1. So many tools, from gmake to gradle do indeed have you naming the desired target, figuring out all dependency analysis for you and just building whatever you need to get to it.  Running javac is saying "chop potatoes into 1/4" cubes and drop into soup."  Those names sound like you are asking for desired artifacts, not specifying explicitly what to compile, which is what we are actually doing here.
2. Both books (and better videos I've watched) make quite clear that while in the simplest case, there is a one-to-one correspondence between a .java file containing a single public top-level class, enum or interface of the same name as the source, containing no inner classes or interfaces or enums...it is important to remember that in general there is NOT a one-to-one correspondence between a single .java source and a single .class file, you can get additional non-public helper class files, inner classes, and maybe something else I am not thinking of at this instant.
So for these two reasons, I consider it less-than-optimal to call the arguments on the javac command line "classesToCompile", despite that when reading the chapter text it was very clear we meant .java source files.

I didn't remember why I didn't have a similar complaint for Enthuware's chapter, only that I didn't, so I went back to re-read that.

They had a totally different take on what was in scope for the 815 w.r.t. compiling modules.

They do mention for completeness that one can explicitly mention a list of .java source files to compile, but specify that use of -module and a list of which modules to build is preferred, and was the only variant in scope for the 815 at the time of writing!  Sybex S&B doesn't mention the use of -module with javac anywhere.

This is not a difference of style or philosophy, there is factual disagreement about which way of compiling a module is required to Ace this killer exam.
I fully realize that this is a topic that deserves an entire well-written book on its own, and everyone is choosing a subset of a forest of detail to include for those preparing to take the test, but I feel like I'd like to ascertain which one is right in this regard.

Like almost everyone else, I will be taking the 819, so I guess that is what matters.  Also, as soon as I wrap up this chapter and take a mock exam, I am moving on to the Sybex 816 book, where I will learn more stuff about modules.  My main goal is to not panic due to lack of solid foundation upon arriving there.

Cheers,
Jesse
 
Jesse Silverman
Saloon Keeper
Posts: 1631
55
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
p.s. similar question about --module-source-path
The Enthuware Chapter loved it, S & B never mentions it.

I believe that I read that "non-modular and mixed modular and non-modular" command line options fell out of scope with the jump to 819, but I am not sure, so any clarification of what command line build variants might be in scope for the 819 would be appreciated.  Just because my career has seen more celebration of me fixing broken builds jeopardizing crucial deploys just in the nick of time than anything else, I'd kind of like to know all the under-the-hood stuff, but most responsible places seem to be using gradle anyway, so I guess I am very concerned with what is in scope for the 819.

Thanks everybody!
 
Jesse Silverman
Saloon Keeper
Posts: 1631
55
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A tiny detail jumps out at me from the top of p. 484

The exports keyword specifies that a package should be accessible outside the module.  It can optionally restrict that export to a specific package.



The qualified exports feature restricts the export of one package to one or more modules, right?

Everywhere in the text except here this is made clear, I believe, including later down on the same page.  But everyone's head is swimming with details at this point, so even one misleading statement near the end of the chapter can potentially be harmful.  I know I went back in the text to check before continuing down the page to see the correct statement.

This is doubly confusing because of conventions.  Sometimes the module, package and .JAR have identical names, but the .JAR file could have a different name than the module if we want to be perverse.  Also, the module name could have the same name as the package, or maybe there are several packages in that one module and the module name is identical to a common stem of the package names, or someone might want to be perverse and name the module containing com.coderanch.moose and com.coderanch.bartender "herbie.lovebug".
Those issues filled me with angst and consternation while I was studying this material, trying to keep clear that a particular usage was a package name, a module name, a .Jar file name, whatever, so I was on alert to read each word quite carefully to keep it all sorted out.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic