agile software development, vertical formatting, implementation patterns, String Arguments, Successive Refinement Listing, Kent Beck
Programmers spend probably more than 80% of their time reading someone else code instead of writing their own. This is why is important that who writes the code pays particular attention not only to what it does but also to how it does that. For example, for a compiler doesn't make any difference if a variable is called p or pageCounter, but of course it makes a big difference for the programmer who have to figure out what kind of information that variable contains. That explains why it is easier to write code for compilers than for people.
Of course a well chosen name is definitively not enough to make your code readable. This book provides some really good principles that all developers can benefit from using in order to make your code more readable and consequently cheaper to be maintained and easier to be refactored. Among the suggestions made by the book to achieve these results you can find:
* keep each method as short as possible: 15 lines of code is a reasonable limit that should not be overcome;
* give each method a single responsibility: if you are trying to give a meaningful name to the method and it comes out that the name should contain an "and" there is a big likelihood that you are breaking this rule;
* never declare a method with more than 3 parameters: if you need more it is always a good idea to group them as properties of an object;
* don't use nested cycles or conditions: you can improve both readability and reusability by putting them in little separated methods;
* write comments only when strictly necessary and keep them updated with the code: there is nothing more useless than a comment that explains what you can easily read from the code or more confounding than a comment that says something different from what the code actually does;
* fix a set of shared coding standards: a programmer can understand a piece of code faster if he doesn’t meet unexpected surprises while reading it.
Reading this book you will learn how to implement in your code these and other advices through lots of wonderfully clear and easily reusable examples. The book put an important accent also on how to make your code more robust by building a set of meaningful unit tests and how to leverage that test suite in order to safely improve your code through successive refinements.
In the end this book will teach you how to make your code easily readable by another programmer, making his job more simple. And this is a valuable thing especially considering that there is a high possibility that the next programmer who will read that code could be yourself.
JavaFX, java, RIA
Approaching a book about a brand new technology can be dangerously misleading because you can end up to write about the latter instead to focus on the former. On the other side it’s really hard to separate the two things but I swear that I’ll do my best.
Let’s start talking about the book intended audience. The authors target the book to Java developers and to graphic designers as well. Probably people without a specific programming background will have some serious difficulties to follow many of the topics covered in the book. Speaking as a Java programmer I’d have appreciated more explanations where needed on the differences between Java and JavaFX script.
(Personal annotation. I looked astonished for five minutes at this
var num = if(sizeof args > 0) {
java.lang.Integer.valueOf(args[0]);
} else {
10;
}
before be acquainted with it. The JavaFX Script programming language is indeed an expression language, which means that everything, including loops, conditionals and even blocks, are expressions and can return a value.)
The first two chapters of the book are devoted to set up the environments for both the programmers and the graphic designers. In a few pages it really makes clear how to get started using NetBeans or Eclipse (for programmers) and Photoshop or Illustrator (for graphic designers). Just to reassure you: yes, "Hello, world!" is the very first example of the book.
In chapters three and four authors introduce the core of the JavaFX scripting language. Topics like sequences, expressions, binding and triggers are clearly covered with many short examples.
After this boring but necessary stuff the fireworks begin. From the chapter five to eight the power of JavaFX is unleashed: the creation of cool and appealing user interfaces.
The theater metaphor within the JavaFX user interface framework is really well covered. The reader will learn about the Stage, the Scene and the Nodes and how they combine as basic elements to make complex user interfaces. Special effects and animations are topics exceptionally well enlightened with clear descriptions, many examples, pictures and graphs.
In comparison, the multimedia topic is covered extremely concisely. This is due to the fact that putting images and video in a JavaFX project is really simple.
The publication of JavaFX project is an important topic covered in good detail in the chapter nine. The use of applet and Java Web Start as a way of publication is explained with many hints and with a cool paragraph about the integration between JavaFX and JavaScript. Unfortunately no attention is paid to other publication methods like mobile or television profile.
An advanced topic, namely the creation of RESTful applications, is covered in chapter ten which presents an example widget that shows current weather conditions using data received form external web services.
Java programmers will then be grateful for the chapter eleven, which covers in deep detail the integration between JavaFX and Java, with many tables about function parameter and return mapping and about type conversion mapping.
A special mention should be deserved for the contents of the chapter twelve, JavaFX Code Recipes. In this chapter the authors present many code samples that will help the reader in several real world situation. For a new technology like JavaFX the value of being taught by the creators comes out in this advices that surely help to understand the language and to avoid the traps.
In the last chapter of the book a complete Sudoku application is presented. This is an invaluable reference because all the range of topics are dissected, starting from the concept and the design, to the logic, to the interface. Many excerpts of code are analyzed with several useful considerations.
The book has been written before the specification JavaFX 1.2 was finalized. So in many parts of the book the authors complain the absence of definitive example and send the reader to the web site in which they’ll publish as soon as finished new chapters on 1.2 and revised examples. As this review has been written, those chapters have not yet been published on the web site. The examples instead have been updated for 1.2 specifications and can be downloaded for free.
In conclusion, this is a really good book to learn JavaFX. All topics are presented clearly and the overall readability of the book is excellent. It should be used for linear reading only; it hardly will work as a reference. JavaFX experts will do better looking somewhere else. New comers of the technology (with a good background of Java) will probably not find any better.
java, course, dvd, multimedia
Java Fundamentals I and II by Dietel & Associates, Inc
Java Fundamentals I and II is a multimedia Java programming language course. It's composed by 14 hours of video tutorials in 2 Dvd plus one book with code used in the video tutorials.
In the first Dvd, 7 hours of video are dedicated to the basic Java concepts: statements, classes and objects.
In the second dvd are approached the object oriented concept like inheritance and polymorphism.
In both Dvd there are tutorials about Netbeans and Eclipse very useful to the beginners.
The course don't need to be installed, there's a software that play video tutorials, you put inside and go. It run on Windows 2000, XP , Vista and on Mac but not on Linux (!!) you should use wine to run it on Linux but i didn't tested it. It would be fine if it could run on Linux too.
The Dvd needs at least 1280x960 video resolution so should not work fine on all personal computers. The course doesn't run on a dvd player, that improvement would be nice too , because you can work on the code you're learning while watching it on Tv.
The interface is simple and very easy to use.
Video tutorials are in English, Steve Dietel talk in all of them. It is not available another language or subtitles, but the English is clear for a non English speaker too. A good improvement could be to add subtitles, so it would be easier for non English speaker to follow the course.
Another good improvement would be add a bookmark, so if you have to stop for any reason the tutorial you can easily start from that point.
The strong point of the course is the “live code” approach , that means Java concepts in a working context. I found very easy to learn while working . For a lot of people this is the best approach and it's not boring indeed. To go further there's a lot of stuff on the editor website www.deitel.com.
It's not required Object Oriented programming skill to follow the course, it's easy for people that have few experience in programming. Everything you need is in the course.
A very nice feature is that after the course you learn how to help yourself with Java API, essential skill for a Java programmer.
I found Java Fundamentals very nice and complete, is highly suggested for people that never have played with Java but have generic programming skill, after the course the student will be able to write simple programs and to go further with practice. It could be a good inspiration for teacher too I suggest for the beginners to start the course following the tutorials on Netbeans or Eclipse, so you can easily repeat and improve the code of the course. Another good improvement would be to put some exercise about topic covered.
Topics covered: Introduction to Java applications, introduction to Classes and Objects, Control Statements, Methods, Arrays, Classes and Objects, Inheritance, Polymorphism, Introduction to Graphical User Interfaces and Event Handling, Exception Handling, The Collection Framework, Introduction to NetBeans, Introduction to Eclipse.
Product Details
• Misc. Supplies: 128 pages
• Publisher: Prentice Hall PTR; 1 Pap/DVD edition (March 20, 2008)
• Language: English
• ISBN-10: 0137131135
• ISBN-13: 978-0137131136
• Product Dimensions: 9 x 7.5 x 1.2 inches
Real Time, java
This book starts very intriguing: An elavator is a real time system. A web server is not.
Real Time in not 'run as fast as you can' like the Gingerbread says. It is all about reliable timing.
This book explain in thorough (very thorough) detail what's wrong with standard java and what happens when RTSJ comes to the rescue.
You will learn how the garbage collector, a bad guy of standard java, is tamed, the JIT compiler, another nasty mug, is rendered harmless and how you can instruct threads to perform exactly what you want and not let them dawdle.
You will find:
long deep theoretical explanations of how the garbage collertors are (or could be) implemented and
long deep theoretical and practical explanations of how you can avoid the JIT compiler and
long deep theoretical and practical explanations of how you can avoid the dynamic classloading and
long deep explanations of how to set up a real time environment: the JVM itself need a real time operating system (windows is obviously excluded)
Until you will see what means to write a program with RTSJ: in same ways is like coming back to C and sit right on the memory...
The examples in the book quite gently introduce you to the core concepts and the final application wraps up all the tecniques useful in RTSJ described in the book.
It's an interesting book if you want to learn the internals of java or if you need to evaluate real time java for your next project.
scala, functional programming
Scala is a recent programming language that mixes the object-oriented programming with the functional programming and DSLs (Domain-Specific Languages).
Programming Scala is a book written by Dean Wampler, consultant, trainer and mentor with Object Mentor, Inc. He specializes in Scala, Java and Ruby. The second author is Alex Payne. He has been working since the beginning of 2007 for the Twitter, Inc. as Platform Lead. Knowing that Scala is the platform used to develop Twitter, one of the most worldwide used social network, the book becomes very promising.
The first thing to know before studying this language is that it needs a relatively long time to be deeply understood. Scala presents some difference that, at the begin, can be heavy to digest to Java developer.
Scala is introduced in the first chapter as a language that addresses the major needs of the modern developer. To explain the power of Scala the authors compare it with the most popular programming languages: Java, C#, Ruby, Python, PHP, etc. After a fast explanation on how to install the Scala environment the authors show the usual Hello World program code.
In the subsequent chapters are explained all the concepts at the base of the Scala programming language: its syntax, the traits, its object-oriented and functional programming, the concurrency with the actors, DSLs, the Type system and a very interesting chapter about the application design with Scala. The last chapter covers the tools, the libraries and the IDE support for Scala.
The book contains many (working) examples that are very useful to learn the Scala structure. The language used by the authors is not complicated and helps to easily understand theirs explanations. One of the major hallmarks of the book is that the authors try to use the Scala syntax that they consider the best from the first examples. This feature of the book can help to learn from the begin what they think is the best way to programming in Scala. On the other hand, for newbies it can turn out to be difficult to understand why it's better to use some structure or some syntax instead of others.
Despite this feature, the final consideration is that "Programming Scala" is a good work and it's one of the best ways and one of the best books to enter in the wonderful Scala world.