The Pragmatic Craftsman :: Simplicity from complexity : by Stanley Kubasek ::

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.

Core JavaServer Faces


Core JavaServer Faces (2nd ed)
by David Geary, Cay S. Horstmann
ISBN 0131738860
Date Read 1/2008

My Rating


One Minute ReviewPositives* Lot of examples — with complete source code* Excellent writing style* Focus on helping the reader

Negatives* Some chapters deviate from others: only snippets of code and no complete examples

SummaryIf you want to learn JavaServer Faces (JSF), this is the book to learn it from! What is the best technique to learn a new technology? By examples, in my opinion. This book takes that approach to the extreme, by giving you full source for the discussed examples! This really helps to see the big picture. I really liked that style.

This book comes from the creators of JSF, so the material in the book is well researched. And it shows. You’ll learn many tips that the authors have learned from writing the first edition of the book and by revising the JSF itself.

This is really an excellent book, and a true reference for JSF. When reading this book, I got a sense that the authors really care about the reader: they do the hard work so that the reader will have an easier time implementing/understanding JSF. This is really what sets this book apart from many others.

ReferenceThis review on Javalobby — yes, as part of the book-review team, I get to keep the book and get published on Javalobby.org

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 LayoutsI 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!

ReferenceStylin’ 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 podcasts7. Read blogs8. Learn a new language9. Learn the anti-patterns10. Be Humble

Reference10 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.

Spring in Action


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

My Rating


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

Negatives* Feels lengthy* Too pro-spring

PositivesWhat’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.

NegativesI 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).

SummaryExcellent 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 Top 5 Attributes of Highly Effective Programmers” href=”http://www.philosophicalgeek.com/2008/01/20/5-attributes-of-highly-effective-programmers/”>Philosophical Geek -> Top 5 Attributes of Highly Effective Programmers, Philosophical Geek blog

Enterprise JavaBeans 3.0


Enterprise JavaBeans 3.0 (5th Edition)
by Bill Burke, Richard Monson-Haefel
ISBN 059600978X
Date Read 11/2007

My Rating


One Minute ReviewPositives* Excellent coverage of EJB technologies* Thorough coverage of Java Persistence* Focuses on doing best-practice development* Full of examples

Negatives* Explanation on how to create an external client not clear

SummaryThis is an excellent book on a simplified (still overcomplicated) EJB 3.0 technology. I had high hopes for this book and for the technology in general. I am still skeptical. I think this book shows the state of EJB well: greatly simplified in version 3.0, but still a complex beast. I liked this book’s thorough treatment of the subject (although at times I thought it would never end); I liked the authors’ numerous recommendations and explanations of the best practices. I think this is a very good book, but in my opinion the technology and this book could use even a more drastic reduction in complexity. For instance, I still had a hard time creating an external client application.

Test Driven


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

My Rating


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

Negatives* Could be more concise

SummaryThis 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.

SimplicityWhy 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.

FlexibilityPrograms 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.

Favorite Quote

Topics

Tags

Archive

Currently Reading

Info

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

Me on Twitter

»see more

Recent Entries