The Pragmatic Craftsman         :: Simplicity from complexity :: | About Me |

Book Review: stylin' with CSS


stylin' with CSS
by Charles Wyke-Smith
ISBN 0321525566
Date Read 5/2008

My Rating

I looked at this book over at B&N and it got me hooked. Especially the chapter on how to do some basic page layout. I could not believe how simple it could be! The author really got me very interested and that eventually led to me buying this book. I'm glad I did. :-)

If you're a Java developer like me or a CSS beginner, this is a great book to get you started. It's really easy to read. Complex concepts are explained in an easy to understand fashion. And the author follows and breeds best practices. These and many others, make this book excellent.

The book is broken in 7 chapters.

The 1st chapter explains the basics of HTML, the different standards and how the page is structured. Simple chapter, but it's important to understand the basics.

The 2nd chapter, How CSS Works, is really a CSS 101. Basic stuff as well, but as in the first chapter, this is a fundamental knowledge.

Chapter 3 is more of a reference guide on how to style fonts and text. Some very useful info.

Chapter 4 is where the interesting stuff starts: positioning elements. An excellent overview of the box model and some good information about floating and clearing.

Chapter 5 is the best chapter in the book. It goes over several ways to create page layouts. Want to create a 2-column layout? A simple example is shown. How about a 3-column layout? 3-column liquid layout? With the techniques presented by Charles, you can create any type of a layout and you will actually understand what's going on. Really neat stuff.

In chapter 6, focus is on styling tables, forms, and menus. The author basically presents some techniques on how to style tables for tabular data, and explains the technique on how to create CSS menus. Good chapter to dive in when you're involved with these.

Chapter 7 summarizes the overall process of building a real site.

I learned several new techniques and tips from this book. I love how the book makes complicated things simple: this is my type of a book. Also, Charles has a good way of making sure these things come across and stay in your head. Not a simple thing to do, but he did a great job.


CSS Notes: Layouts

I'm reading an excellent book on CSS - Stylin' with CSS (highly recommended). I finished reading roughly half of it and I'd like to summarize some of the things I learned.

CSS Layouts
I am used to creating page layouts with HTML tables. It's easy to do and you can get any layout you want. But doing it that way is no longer recommended, and it's an ugly way of doing layouts. The "new" way of doing layouts is with pure CSS. It's cleaner and more concise. However, it's more complicated for a novice html guy like me. To really get this, you need to have some experience.

So how do you do it? Let's look an an actual example first.

<div id="main_wrapper">
<div id="header">
    <div id="header_inner">Header</div>
</div>
<div id="nav">
    <div id="nav_inner">Left nav</div>
</div>
<div id="content">
    <div id="content_inner">Main content...</div>
</div>
</div>

and here's the style for it:

<style>
#main_wrapper {
    width: 840px;
}
#header {
    
}
#nav {
    width: 20%;
    float: left;
}
#content {
    width: 80%;
    float: left;
}
#footer {
    clear: both;
}
</style>

Nice and simple. With this technique you can put together any layout you want.

Why the inner divs? Because CSS is weird. Even though you have a div with a certain size, by adding padding, margins, and border, the width actually changes! So, sure,you can go with just a top-level div, but you have to keep in mind that the size will change when you add those settings. How do you get around that? By using an inner div. The outer div controls the sizing and floating. Inside the inner div, you can then add padding, margins and border and the size of the outer div will not change: this is really how it should work. By using an inner div, you actually simplify your life!

Reference
Stylin' with CSS: A Designer's Guide, Charles Wyke-Smith


10 Ways to "Stay on Top"

If you consider yourself a good programmer, great! But is this going to hold true, two years, five years from now? If you are not going to learn new things, I can safely say that you're going to be "out of date."

If you want to stay still, you have to continue moving: being a good programmer means learning new things constantly.

Here are 10 Ways to Learn New Things by Philosophical Geek. Follow at least some of these and I think you'll be covered.

1. Read books.
2. Read Code.
3. Write Code - Lots of it.
4. Talk to other developers.
5. Teach others.
6. Listen to podcasts
7. Read blogs
8. Learn a new language
9. Learn the anti-patterns
10. Be Humble

Reference
10 Ways to Learn New Things in Development | Philosophical Geek


Criteria for good design

Uncle Bob listed a few Design smells -- the odors of rotting software in his book Agile Software Development. Take the inverse of that and what do you get? Criteria for good design -- that's the approach that the author of the book PHP in Action took.

Here are the characteristics of good design.


  1. Flexibility - easy to change

  2. Robustness - hard to break

  3. Mobility - easy to disentagle into reusable components

  4. Fluidity - easy to do things right

  5. Simplicity

  6. Once and only once

  7. Transparency - easy to read and understand

Very good criteria, in my opinion.


Book Review: Spring in Action


Spring in Action
by Craig Walls, Ryan Breidenbach
ISBN 1933988134
Date Read 1/2008

My Rating

One Minute Review
Positives
* Excellent overview of Spring (good coverage)
* Not too detailed; not too light
* Excellent writing style

Negatives
* Feels lengthy
* Too pro-spring

Positives
What's not to like? I think this is an excellent resource for the Spring Framework. I liked it as a refresher for some of the Spring 2.0 features, but I'm also going to use it as a reference.

This book is easy to read. It has a clear writing style. The author focuses on the important parts, and the subject changes quickly, as Spring's coverage area is huge.

One of the chapters I really liked (based on my previous experiences), is the web services chapter. Nice and simple. Easy to get it working locally. The Spring/Xfire combination is the best and easiest web services configuration I've seen: inject web services beans into the class and your class is not even aware it's using web services! Very powerful abstraction.

Negatives
I read the first edition of the book and I remember it as a quick read. No longer. This edition is over 700 pages! (On the other hand, this is a much better edition in terms of content.)

No mention of Java Config! As far as I know, you can now configure Spring in Java, no XML. It might be Spring 2.5 (I thought it was 2.0).

I think the author could be a little more bold. Yes, Spring is great, but it has some negatives. I did not learn about them in this book. The author has a very "neutral" position. I guess this is my personal desire to see a book that would tell me how to use Spring effectively, some anti-patterns, ie. Effective Spring (if you read Effective Java, you know what I mean).

Summary
Excellent overview of Spring. Good coverage on almost all Spring features. Could be more detailed at times, but overall it does an excellent job introducing the different parts of Spring. I recommend this book to anyone who is using/considering Spring.


Top 5 Attributes of Highly Effective Programmers

Ben Watson, whose blog I just came across, lists the following Top 5 Attributes...

  1. Humility
  2. Love of Learning
  3. Detail-orientedness
  4. Adaptability
  5. Passion

I think this is a very good list. I think effective programmers are humble. Why? Because you have to be able to work well with others. Just from my experience, it's hard to work with people with a lot of ego.

You just have to love to learn. Effective programmers constantly improve. How do you improve? By finding new ways of doing the things you're used to... better. You have to be exposed to new ways in order to do that. Being able to adopt and having a passion for the profession are essential.

Reference
Philosophical Geek -> Top 5 Attributes of Highly Effective Programmers, Philosophical Geek blog


Book Review: Test Driven


Test Driven
by Lasse Koskela
ISBN 1932394850
Date Read 12/2007

My Rating

One Minute Review
Positives
* Excellent coverage of Test Driven development
* Covers many development best practices
* Excellent writing style

Negatives
* Could be more concise

Summary
This is an excellent book on TDD -- I think it's the best book on the subject. At first, I thought this book is going to be just a review of the commonly known practices: test-code-refactor. Not true! In this book, I learned a lot more about this practice (of course), but also about how to do other types of testing (servlet, db, jsp, swing, and more), and also about the different tools available for the task. I really liked the author's open, direct style of writing. Makes it an interesting and a worthwhile read.


Values for Excellence in Programming

I am reading Kent Beck's book Implementation Patterns (which is great so far) and he talks about three values that are consistent with excellence in programming: communication, simplicity, and flexibility.

Kent put it so well, and these values are so timeless... that I had to write about it.

Communication
"Code communicates well when a reader can understand it, modify it, or use it," Beck writes.

Programming for the computer works fine. For the computer! Not for the person modifying it. "Good things happen when I think of others while I program," Kent writes. Program for the other person!

But who cares? I just want to write the code as fast as possible and be done with it. Wrong! Beck writes, "The majority of the cost of software is incurred after the software has been first deployed." From Kent's experience, he sees that he spends much more time reading the existing code, than writing new code. And that's a fact! Is your experience different?

When you think "How would someone else see this?," you see your code from a perspective of another person.

Simplicity
Why would you make your code simple? For economic reasons, of course. "Eliminating excess complexity enables those reading, using, and modifying programs to understand them more quickly," writes Beck.

A little complexity is unavoidable. How much? It depends who your audience is. But Kent puts it perfectly, "Challenging your audience a little is fine, but too much complexity will lose them."

"Pursuing simplicity enables innovation." I can't agree more with Kent.

Flexibility
Programs should be easy to change. Simplicity can encourage flexibility. Enhancing the communicability of software also adds to flexibility.

The bottom line: create simple, understandable applications that can easily be changed.


Craftsman's Values

Here's what Ben Rady, who calls himself software craftsman, states under his Statement of Values. I value similar things: I can sign my name under this statement. Excellent summary.

As a technical leader, I value:

* Talented People
* Rapid Feedback
* Individual Relationships
* Facilitation over command and control
* Continuous Improvement
* Frequent Delivery

As a programmer, I value:

* Working Software
* Clean Code
* Rich Communication
* Flexibility over efficiency
* Sustainable Pace
* Simplicity
* Failing Fast over hiding errors

As a human being, I value:

* Courage, not cowardice
* Humility, not hubris
* Compassion, not callousness
* Curiosity, not apathy
* Discipline, not carelessness
* Honesty, not deceit
* Patience, not intolerance

Reference
Statement of Values, Ben Rady


Object-Oriented Analysis and Design with Applications


Object-Oriented Analysis and Design with Applications
by Grady Booch and others
ISBN 020189551X
Date Read 9/2007

My Rating

I am part of a book review team at Javalobby. I get a chance to get a free book, write a review, and get published. Not a bad deal. :-) I am not the biggest fan of the long review template that we use, but I have to follow what the team leader decided. :-(

This is a second book I reviewed for Javalobby. You can read the review at Javalobby.org here. Enjoy it.

One Minute Review
Positives
* Great use of abstraction
* Excellent (concise) UML 2.0 tutorial
* Filled with lots of useful ideas

Negatives
* Reads dry at times
* Too academic, too much theory

Summary
The information contained in this book is excellent. It has everything that you will if you want to adapt the Unified Process, learn UML 2.0, and do object oriented analysis and design. However, it is a very theoretical book, which makes it hard to read – hard to stay focused at times. Nonetheless, it is a very important book.

Resources
Applying UML and Patterns - in my opinion, the best book on OOAD

UML Distilled - the most popular UML book


© 2001-2008

Random Quote

Search

 

Topics

Architecture & Design :12
Better Coder :30
Books :43
Books Recommended :18
Buzzwords :5
Career :25
Craftsmanship :15
Java :15
Quotes :25
Recommended :9
Software Engineering :3
Uncategorized :33
Web Development :1

Archive

May 2008 (1)
April 2008 (2)
March 2008 (1)
February 2008 (1)
January 2008 (2)
November 2007 (1)
October 2007 (3)
August 2007 (3)

...since January 2002

Currently Reading


:: See list of books I finished reading

Info

© 2001-2008 Stanley Kubasek About me :: Contact me