Archive for February, 2007

The Elements of UML Style …

Wednesday, February 28th, 2007

The Elements of UML Style, Scott W. Ambler (Cambridge) is one of the small pocket books like The Elements of Java Style that is very handy to have around. I’m constantly forgetting little bits here and there about UML like if dimonds are filled or not-filled and this reference covers everything in a handy keep on your desk or in your backpack size. There is even a section on Agile Modeling.

Design Patterns Java Workbook …

Tuesday, February 27th, 2007

The Design Patterns Java Workbook, Steven John Metsker (Addison-Wesley) is a great book covering the usual Desing Patterns and more with a set of exercises after each pattern to test your knowledge. The book is very clear and concise with good class diagrams and java code. There are 15 patterns covered. I found this book a more useful read than the Head First series on the same topic.

Bout #2: Boxing with CSS …

Tuesday, February 27th, 2007

I continued with my box styles and removed each of the background elements and replaced them with colors so I could see which elements were where and how they overlapped thinking this could really help me place the backgrounds and it did.

My goals were to have as small and simple xhtml and CSS as possible. I wanted to see what I could remove and still have what I wanted rather then introduce new elements (DIV’s etc) just to support my markup. After all I thought CSS is meant to replace the need for tables and cells so I didn’t want to just rename these to DIV.

Onward I pressed and in very short time I had all the corners in place but the lower right was still giving me trouble so I turned the background colors back on to hopefully get more info. It turns out that the bottom right wasnt appearing the way I had wanted because of the background color and so I changed it and all was good. It’s possible something else may fix the bottom right without the need to change the background color but right now I’m ok with having to do this.

Now that I am done and I look back at the box that scales horizontally and vertically upto a point* and the simplicity of the xhtml I am very happy with the results. One DIV marked with a class and the contained DL/DT and DD all do the right thing, a knockout you could say. So the round and bout goes to CSS.

* The Bulletproof Web Design book suggests that the ’sliding doors’ technique that I have used is bulletproof because it scales horizontally and vertically which isn’t entirely true since increasing the font size will eventually reveal the extent of the graphics underneath. However a solution that allows a limitless scroll would require adding elements (DIV’s) to the xhtml to support the style which I didn’t want to do as it seems like a backward step.

The final working files

Boxing with CSS …

Monday, February 26th, 2007

I wanted to have some nice boxes around my content like I have done before but this time I didn’t want to use tables and cells but CSS as CSS is meant to be leaner, quicker to develop and removes the markup/layout from the content. So round one went to CSS since I was going to use it over tables.

I chose to use Description Lists (DL/DT/DD) elements as these suit my purposes and together with a DIV for the content provided me with ample elements to hang layout from should I need to. I also had my copy of Bulletproof Web Design handy to guide me along the way, it even has a chapter called “Indestructable Boxes” so I thought this would be an easy task.

I made my content sans any styling and look at it and thought it was good. So round two went to CSS since I was on my way to content without embedded styling and the content was ultra compact. I just had to add some styling and how hard could that be since everyone was doing it?

I added a base style sheet to set the font sizing and styles for the body of the page just like the book suggested and I imported this into the page which looked rather snazzy and sizing the font up and down worked too. Now I just had to add a style or two to get the box with the rounded edges that I wanted, one that sized correctly both horizontally and vertically.

I added another style sheet and imported that. This one added background elements and positioning to the DIV, DL, DT and DD elements. However, when I looked at my page it wasn’t the nice box I desired but something close, so I tweaked the CSS here and there to try and get what I wanted. After about an hour of frustration I turned back to the book to see if I had missed something. Round three went to Tables since I would have been done in under one hour.

The book uses a different set of elements to layout the content and then mark it up with styling so I thought I’ll just copy what the book did and then try and use the same results in my layout or in the wose case just use the books solution. To my surprise the books example didn’t look right either. Hmmmn. Round four to Tables.

I’m still not sure why my solution doesn’t appear correctly and suspect that it’s the sizing of the images. Attached are the files as they were when I left them after some frustration. Boxing with CSS files If you are able to see why they don’t work the way I expect then please send me an email.

This fight isn’t over yet since there are plenty of nice rounded boxes all over the web so it must be my technique !

iRobot - Roomba

Sunday, February 25th, 2007

We have two pugs and they shed a lot of hair. We had one pug for a while and we were amazed how much hair she shed and then we got two. You might think this means twice as much hair but I think there are some quantum machanics at play, like with milk when it goes off, because there is much more hair shed than twice as much. Vacuuming is a big part of our cleaning tasks and it needs to be done regularly so we decided to get an iRobot Roomba robotic vacuum cleaner.

I didn’t hold out much hope of the roomba being that good at doing the job but even if it made vacuuming a fortnightly thing rather than a weekly thing that would be great. Having pugs means we should vacuum every day or second day but since we have busy lives and we don’t want vacuuming to be a major part of it we leave it to the weekends or do it before friends come over.

We got the roomba home and charged it up until the power light shone bright green indicating it was ready to go then we set it off on the ‘max’ setting to let it do it’s thing. We didn’t vacuum the floor first since we figured the gizmo had to earn it’s keep and it couldn’t cut any corners or have an easy time of it. To our amazement the device whirled around the room, under the couch, between the chairs, stairs and table and did a fantastic job. I remember thinking to myself that I rarely got as close to the corners or legs of things as this little device did. It was showing me up but in a good way.

The dogs don’t mind it either but since Daisy is a big chewer we didn’t want to run it without us being home. Gretel just looks at it and only moves if it seems to be stalking her. Daisy will chew the rotating corner brush if we are not careful but I also think that phase may fade after a while. She just follows it around but we are watching her !

The roomba isn’t as noisy as a normal vacuum cleaner, it does as good a job but needs to be emptied more but we are happy that we bought it. We have floor boards so I can’t comment on the results with a carpet.

Expert Spring MVC and Web Flow …

Friday, February 23rd, 2007

Expert Spring MVC and Web Flow by Seth Ladd with Darren Davison, Steven Devijver, and Colin Yates (Apress) describes how to use Spring to implement the MVC pattern and workflow in the context of Web Applications. The book is very detailed and covers the topics well and even looks at Ajax and DWR.

After using Spring MVC I’m not keen to use anything else.

Don’t you love it when a plan comes together?

Thursday, February 22nd, 2007

This is a rather excellent video that reminds me a lot of the game ‘mouse trap’ and various elaborate domino toppling achievements. Well worth a watch.

Effective Java, Programming Language Guide …

Thursday, February 22nd, 2007

Effective Java, Programming Language Guide by Joshua Bloch (Addison-Wesley) is a book I think all Java programmers should read and then read again on a regular basis. It’s simple and effective (pardon the pun). The book makes you think about your code and how it will be used and how it can be used and abused. A must have for your java bookshelf.

Data is the new black

Wednesday, February 21st, 2007

I’d like to be able to claim this quote but I saw it on a t-shirt. It made me laugh.

iCon and The Apple Way …

Wednesday, February 21st, 2007

As you may have guessed I have an interest in Apple and have long thought their products were amazing, so it probably comes as no surprise that I have read iCon, Steve Jobs, The Greatest Second Act in the History of Business by Jeffrey S. Young and William L. Simon (Wiley).

The books was a roller-coaster for me, one moment thinking Jobs is awesome then Jobs is a tyrant and Jobs is childish but eventually leaving with the thought that Jobs is a human, a special human with quite a gift for design. I don’t think I’d like to work for him though. Worth a read.

I also read The Apple Way, 12 Management Lessons from the World’s Most Innovative Company, Jeffrey L. Cruikshank (McGrawHill) which was also a rollercoaster of the business ups and downs at Apple an what caused them. I came away thinking that the Apple ‘way‘ is to go 100% for design perfection in your products. See here for what design means.

The two books go hand-in-hand and I can’t suggest one over the other but I do suggest adding them and iWOZ to your reading list. I haven’t read iWOZ but I’m eager too after reading iCon.