Up again

Sadly this blog’s server crashed with a hardware error six years ago. I could fix a main board issue, but it still failed randomly after some hours or days. Due to lack of time I didn’t check this so far. Now I discovered a mass of bad blocks on my disk. Nothing to repair.

Anyway I could save most of the files and set up a new server.

I’m curious, whether I’ll find time to work again on my blog…

Belong to the 50 first

How would your computer run a program written in human readable code?

Know the right tools. And even if you’re new to software development, you’re able to verify your code.

Why the square of int 65536 is 0.

And, of course, learn software development with Java.

Yesterday, I published an early version of my new book, “Beginning Java”. Dive into the fascinating world of software development. For promotion, I just created a coupon: Valid until March 15th 2019, the first 50 users may purchase my book for only 5 US$. Once purchased, you’re able to download all updates.

This is your coupon: http://leanpub.com/BeginningJava/c/HTI8k9CpQbOt

Spread the word and stay tuned!

Beginning Java

Back in 2015 I created 4 sibling books about software development. Each two beginners and advanced books. One pair about Java development, the other about C#. For a couple of years, these books had just a title, but content. After finishing my JSF book and after all the sad things which devoured my spare time [1] last year, I started to write theses books in the very early days of 2019.

But when a near relevant died at the end of January, I gave up my original plan to publish all of them together at an early state in February. I just start with one book, and publish the others as soon as possible – without any promise.

Today I’m proud to publish a first edition of my book “Beginning Java” [2]. It’s not only about beginning coding with Java. It’s about beginning software development with the programming language Java. Beside Java itself, I discuss the different approaches to run software, the building process, build tools, testing and refactoring, inheritance and interfaces, data structures and more.

This might be a cheap book. You may change the recommended price down to nine US$. Or pay whatever you want. I’m writing this book in my spare time. Maybe that’s crazy, cause I could earn much by programming, but I like to teach people. I would be glad, if you honor my work and support the writings.

It is a living book. Just in an early state and like the Java language never complete. Once purchased, you may download all future editions without extra payment.

So enjoy reading and stay tuned!

[1] blog.mueller-bruehl.de/other/restart-blog

[2] leanpub.com/BeginningJava

Data base tables

Within this blog, and especially within my book “Practical JSF in Java EE 8” [1] I described the Books project. Some listings show the structure of the tables which are used by this app. But I did not describe all every table. In my poor opinion I assumed, it would be very simple to create the tables with all the info of the entity classes.

Of course, you may derive all table and column names from the entities. But sometimes Java types slightly differ from SQL types and without sufficient experience it might be hard to figure out the right types.

You may modify the persistence.xml file to enable automatic creation of the tables:

<properties>
  <property name="javax.persistence.schema-generation.database.action" 
  value="create"/>
</properties>

Personally I prefer creating the tables by SQL. Here are the create statements:

CREATE TABLE Category (
catId int(11) NOT NULL AUTO_INCREMENT,
catName varchar(45) NOT NULL,
PRIMARY KEY (catId)
)

CREATE TABLE CategoryTranslation (
ctId int(11) NOT NULL AUTO_INCREMENT,
ctCategoryId int(11) NOT NULL,
ctLanguage varchar(10) NOT NULL,
ctName varchar(45) NOT NULL,
PRIMARY KEY (ctId),
KEY FK_listCategoryTrans_listCategory2 (ctCategoryId),
CONSTRAINT FK_listCategoryTrans_listCategory2 
FOREIGN KEY (ctCategoryId) REFERENCES Category (catId) 
)

CREATE TABLE Book (
bookId int(11) NOT NULL AUTO_INCREMENT,
bookTitle varchar(200) NOT NULL,
bookSubtitle varchar(200) NOT NULL,
bookAuthor varchar(255) NOT NULL,
bookPublisher varchar(45) NOT NULL,
bookYear int(11) NOT NULL,
bookLanguage varchar(10) NOT NULL,
bookISBN varchar(45) NOT NULL,
bookShorttext varchar(500) NOT NULL,
bookReference varchar(500) NOT NULL,
bookAdReference varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (bookId),
UNIQUE KEY IX_Book (bookISBN)
)

CREATE TABLE BookTrans (
btId int(11) NOT NULL AUTO_INCREMENT,
btBookId int(11) DEFAULT NULL,
btLanguage varchar(10) NOT NULL,
btShorttext varchar(500) NOT NULL,
btReference varchar(50) DEFAULT NULL,
PRIMARY KEY (btId),
KEY FK_BookTrans_Book2 (btBookId),
CONSTRAINT FK_BookTrans_Book2 
FOREIGN KEY (btBookId) REFERENCES Book (bookId) 
)

CREATE TABLE mapBookCategory (
bcBookId int(11) NOT NULL,
bcCategoryId int(11) NOT NULL,
PRIMARY KEY (bcBookId,bcCategoryId),
KEY FK_mapBookCategory_listCategory2 (bcCategoryId),
CONSTRAINT FK_mapBookCategory_Book2 FOREIGN KEY (bcBookId) REFERENCES Book (bookId) ,
CONSTRAINT FK_mapBookCategory_listCategory2 
FOREIGN KEY (bcCategoryId) REFERENCES Category (catId) 
)

CREATE TABLE Review (
rvId int(11) NOT NULL AUTO_INCREMENT,
rvBookId int(11) NOT NULL,
rvDate date DEFAULT NULL,
rvLanguage varchar(10) NOT NULL,
rvText longtext NOT NULL,
PRIMARY KEY (rvId),
KEY FK_BookReview_Book (rvBookId),
CONSTRAINT FK_BookReview_Book FOREIGN KEY (rvBookId) REFERENCES Book (bookId) 
)

CREATE TABLE ReviewLink (
Id int(11) NOT NULL AUTO_INCREMENT,
BookId int(11) DEFAULT NULL,
LanguageCode varchar(5) DEFAULT NULL,
URL varchar(255) DEFAULT NULL,
PRIMARY KEY (Id),
KEY FK_ReviewLink_Book (BookId),
CONSTRAINT FK_ReviewLink_Book FOREIGN KEY (BookId) REFERENCES Book (bookId) 
)

Remember, that database provider may use slightly different SQL dialects or data types. The statements above are fine with MariaDB or MySQL. Using a different DBMS you might adapt the statements a little.

I like to thank all of my readers for purchasing my book.

Stay tuned!

 

[1] www.apress.com/de/book/9781484230299

 

Restart blog

In August I promised to continue my blog. Sadly a relative had to stay in diverse hospitals from August till end of October and I spend a lot of time there. And during almost complete November I could not sit in front of a PC for personal reasons.

My lessons learned: Do not promise anything 😉

But today I started to prepare a short article and I hope to finish today or at least tomorrow. Thanks for your patience

 

Live continues…

…and so my blog does.

You may have wondered that I didn’t have written any article within this blog such a long time. Last year I agreed, when apress asked me to publish a new version of my book “Web Development with Java and JSF”. My book had been a living book so far. I frequently added or updated content, depending on my spare time. I didn’t know how much effort it would imply, reaching a “terminated” state and going through the copy-editing process. By the way, I updated the existing stuff. Sorry, but no time for this blog.

When my book “Practical JSF in Java EE 8”  [1] was published end of May, my family send me signals to reduce this work and to find some more time for the family. More than that, I spend nearly all of my time with my family and hobbies: Some time ago I bought an excellent camera for my congress reports. Using such a camera, you might discover unexpected details when taking photos from the macro perspective. And even better with good (bust costly) objectives, I recorded details of insects and other stuff. I produced fascinating photos that I like to share. I discovered a photo shop system that I started to use as part of my domain (photo.mueller-bruehl.de [2]). You may purchase my photos of nature and insects at the lowest earnings the platform provider suggested. And I created download packages with up to 71% discount. Purchasing a photo, you support me to by even better equipment for more detailed photos which I will share. I hope you enjoy the pictures. Beside photography I started to learn scuba diving together with two of my kids. The time consuming training has nearly finished.

The creative pause is over and its time to continue this blog. Two days ago, I updated the link to my book – till then I still presented my old one, which you cannot purchase any more.

During all that time, a lot happened. Oracle donated NetBeans to the Apache foundation and Jave EE to the Eclipse foundation.

Sadly the donation of NetBeans became effective just when the NetCAT (NetBeans Community Acceptance Testing) of version 9 started. As an Apache project, all intellectual properties needed to be cleared before continuing the delivery process. Even though this delayed the delivery process, we may be lucky of this donation: It enables the community (including you) to drive the complete development. Apache NetBeans (incubating) has been released on the 29th of July, 2018. You’ll find it on its new web site [3]. The additional tools for the Java EE package are part of a second donation and are not available yet. But if you want to develop JEE applications, you may add the existing plugins of the former version.

Java EE is a brand of Oracle. And even if they donated Java EE to the Eclipse foundation, the community is not allowed to use this brand. It became the Eclipse Enterprise for Java (EE4J) project [4]. After a voting process, its new product name became Jakarta EE. Nicely this might be abbreviated as JEE, like the former version. Eclipse foundation hosts an interesting FAQ for this topic [4].

Ok, this writing will be enough for the restart (or continuation) of my blog. Even though it is my first after the break, I’ll promise, it would not be the last one.

Stay tuned!

 

[1] apress.com/de/book/9781484230299
[2] photo.mueller-bruehl.de
[3] netbeans.apache.org
[4] eclipse.org/ee4j/faq.php

 

Mond im Wolkenmeer

In Erwartung des Vollmonds bin ich hinaus ins Feld gefahren. In der Nähe nur ein Hof, über dem ich den Mond erwichen wollte, Doch es herrschte Sturm und die Wolken flogen über den Himmel. Erst 40 Minuten nach dem rechnerischen Mondaufgang fegte der Wind die Wolken für einen Moment zur Seite, so dass der Mond kurz zum Vorschein kam, schon zu hoch, um ihn über dem Hof abzulichten.

Dabei stürmte es so stark, dass Bilder mit längerer Belichtungsdauer einfach nur verwackelten, trotz Festhalten des Stativs, das (ohne Kamera) mehrfach umgeblasen wurde. Und so war die Ausbeute an verwertbaren Bildern leider recht mager.

Wie stürmisch es war mag das nächste Bild ausdrücken, dass ich kurz zuvor aufnahm.