resizing columns in wordpress

Our OCP 11 (IZ0-815) book is at the printer. It comes out this month! In fact we are doing a CodeRanch promo for it next week. The book comes with an online test bank. The online bank includes two full length mock exams and every question in the book.

While uploading our questions to the test bank software, one of the test bank staff noticed an error. Two of our answer choices were the same. Luckily this wasn’t the correct answer, so a pretty minor errata. But it is our first errata so time to start the errata list.

For our Java 8 books, we used an HTML table for the errata list because our WordPress instance didn’t have table support. Editing the HTML was a pain so I was happy to see that now there are native WordPress tables. So I tried it out. Easy to enter data, add/remove rows/columns. Excellent. It’s all you could want in a table editor. Well. Almost.

Attempt #1

I chose the striped option. And this is what I got my default. I agree that the error column is the most important. And it’s nice that it is wide. But the other columns are so narrow to be unreadable.

Attempt #2

I looked at what my options were on the table. There was only one option that looked relevant. So I clicked it

Yuck; that’s even worse. The error column is the most important and it is so narrow it is hard to read. And there is lots of wasted whitespace.

Attempt #3

I got rid of the Type column to get a bit more real estate. Then I discovered there was a CSS option. I made up a unique CSS class name. Given that 815 is in the exam name, that sounds unique on our site.

I also went to the Additional CSS screen:

  • Settings
  • Appearance
  • Customize
  • Additional CSS

I added this CSS:

/* By default, wordpress only allows default or equals column size. Both look bad on the errata table so using CSS to customize */

/* page # */
.ocp-815-errata-table td:nth-child(1) {
  width: 10%;
  }

/* chapter #*/
.ocp-815-errata-table td:nth-child(2) {
  width: 10%;
}

/* actual errata */
.ocp-815-errata-table td:nth-child(3) {
  width: 50%;
 }

/* reporter */
.ocp-815-errata-table td:nth-child(4) {
  width: 15%;
 }

/* confirmed */
.ocp-815-errata-table td:nth-child(5) {
  width: 15%;
 }

Finally I published and got:

why it is hard to publish a book with zero errata

As Scott and are finishing up on Z0-815 book, I want to share an example of an error’s progress through the editing process.

We have a method. Pay careful attention to the name of the method:

public void requiresAssistance() { }

Then we reference the method: new MoreHelp().requireAssistance();.It’s an error. Let’s see what happens to it as the editing process proceeds:

  • Scott and I read each other’s chapter.
  • Our Tech Editor reads the Word document and runs all the examples. In theory it should get caught here. And most things do. But I’ve tech edited. There’s a lot to see and a ton of detail.
  • We reply to our tech editors comments.
  • The book gets turned into a PDF.
  • Our Tech Proofer reads the PDF. Excellent it got caught at this phase.
  • We submitted the request to change “requireAssistance” to “requiresAssistance”. Scott and I proofread each other’s change requests to ensure we don’t introduce more errors.
  • We got the final PDF back for review. (I’m not sure if this is part of the process, but we ask for them anyway). It says “requiresAssistence”.

We submitted a request to get this fixed before the book prints. But this shows how hard it is to get all the errors out of book. “Assistance” was spelled correclty in every draft and revision except the final one.

If you followed that process closely, the Tech Editor and Tech Proofer didn’t even have the opportunity to catch this. And it wasn’t created by the authors.

“resetting” docker

I tried to run “docker –version” on my Mac and it hung. That’s odd. I rebooted and same thing. After some useless fiddling, I decided to try reinstalling. Here’s what I did:

  1. Deleted /docker folder from Applications (this was the old Toolkit which I think I haven’t used in ages)
  2. Tried to delete Docker app from Applications. That failed because it was in use.
  3. Opened Activity Monitor and killed docker
  4. Actually deleted Docker app from Applications.
  5. Reinstalled Docker Desktop

While this was likely way overkill, it worked. And once I stopped fiddling, it took less than 15 minutes

Update: The next time I tried to do something, I got a prompt to accept XCode’s license agreement. That was likely the original problem causing the “hang”