Wednesday, December 23, 2009

Book Review: Beginning Groovy And Grails

Book Review: Beginning Groovy And Grails
Author: Christopher M Judd, Joseph Faisal Nusairat and James Shingler
Publisher: Apress Inc
ISBN: 978-1-4302-1045-0

What I was looking for was a good beginning Groovy book. What I found was a good beginning Grails book. I know that the book covers Groovy in the first three chapters but I was wanting a little more. Anyway, the book does cover Grails fairly well over the next 10 chapters albeit a little dated. The Groovy chapters covers just enough to get someone setup and starting to program in Groovy. But what I want to use Groovy for initially testing and mocking my Java code. Unfortunately this book really didn’t cover any advanced Groovy based topics. Oh, well I’m sure that it’s available in other books.

The Grails sections are far more complete. This book really takes you from creating a web app from scratch using Grails. From the initial configuration to security, restful web services and implementing a reporting system the book covers many of the important areas of creating a web application with Grails. It takes a good approach at explaining the basics and gives enough information in most cases to get to on the right track in more advanced development. You will probably want to reference other texts after this one to bring you more up to date with the latest versions of Groovy and Grails and to cover specialized issues.

I liked the book but in the few areas where it was lacking like more Groovy support it made it a harder read than I expected. In all fairness I cannot really recommend this book as there are others that may be better suited for a beginning Groovy and Grails introduction. It’s not that this book is terrible it just that others are better and this one is a little dated.

Tuesday, December 8, 2009

Book Review: Spring Persistence: A Running Start

Book Review: Spring Persistence: A Running Start
Author: Paul Tepper Fisher and Solomon Duskis
Publisher: Apress Inc
ISBN: 978-1-4302-1878-4

Persistence is a necessary evil in creating applications that enable user interaction. Using Spring makes dealing with persistence much easier but there is the configurations that get everything starting which confuses some new to the framework. The book Spring Persistence: A Running Start is a quick overview on how to get the most common persistence types setup and running with a minimal effort. I liked the breakout by chapter for each persistence style. The book covers the basics of why to separate your application into layers to break the dependencies, JDBC, Hibernate and JPA, IBatis then some transaction and testing. Lastly it covers a little of Groovy and Grails. This book which is aptly named gives a person with little or no experience integrating persistence into a Spring application a Running Start with good examples of configurations to get the basics going. From there the user needs to work on their own, or consult with a more advanced reference or find the information on the web. I would have liked to see a more in depth coverage about the various types of persistence technologies and more advanced examples. Not all the time do we get to deal with easy database scenarios as in the provided examples. Many times we need to work with legacy databases that were not built with ORM friendly tables. This book does what it comes to do but I feel that there is an audience for more advanced but just as focused books on the Spring layers. I come away from reading this book with a since of knowing more about some of the persistence types that I have not dealt with yet but I feel that I want more. I recommend this book for anyone new to Spring or someone that needs to start using another ORM type like Hibernate or IBatis.

Monday, November 23, 2009

Eclipse Plugins that I use.

I’ve been using the Spring Source Tool Suite (STS) every since they released it to open source. STS is a very good version of Eclipse with many cool Spring tools rolled into it. However, there are some plugins that I like to add to make my development a little easier.

The first one that I load is the Infinitest plugin (http://eclipse.infinitest.org) . This plugin used to be free but they made it free for only non-commercial development however, it is the single biggest development booster when it comes to TDD development. I could argue for a while about the pricing model that they adopted for commercial development but if you can get your company to flip for the high cost it is a great plugin.

Next I usually load in a few bug detectors. Findbugs (http://findbugs.cs.umd.edu/eclipse) and checkstyle (http://eclipse-cs.sf.net/update) . Eventually I’ll end up using just one of these type of detectors but both are good for certain type of issues. Checkstyle is highly configurable and can enforce a coding style and findbugs can locate more issues than the internal Java code checker. STS already has PMD loaded by default which I also use at times. Now if I could just get my co-workers to start using them…

Now I load up some persistence plugins. IBator (http://ibatis.apache.org/tools/ibator) is nice sometimes when working with IBatis development to generate some code and Hibernate Tools (http://download.jboss.org/jbosstools/updates/stable) I sometimes use for some hibernate development. However, I think that Spring Roo will take over for most of the work that I do with Hibernate Tool very soon. If you haven’t really looked at Spring Roo yet you should. In fact stop reading this right now and go do it! But don’t forget to come back and finish reading my blog… :)

Lastly, I usually load up Subeclipse (http://subclipse.tigris.org/update_1.6.x) I like Subeclipse for SVN maintenance more than Subversion so far. They both look good but I started out using Subeclipse and haven’t had any problems so far.

Well that’s about it. Any plugins that you load that I don’t? Let me know why you use them.

Friday, October 9, 2009

New FTC Guidlines for posting reviews or products

The FTC posted new guidelines about doing reviews of products in blogging posts as I read on the PC Mag post by Editor Dan Costa today. I agree with Dan that the way this is wording is not enforceable being that there are thousands or millions of blog posts each day. I post reviews of books at times. Most of the time I get the book for free for writing up the review and posting to my blog and to Amazon reviews. However, some of the time I post the review for a book that I purchased. I assure you ALL of the time it is a fair review and will not be swayed by any fact about how or where I got the book. This is how I see the book and or product that I’m reviewing. I don’t hold any punches; if the book is crap I’m going to say its crap. If the book is great and the best thing since the dawn of mankind, I’ll say so.
Read my reviews and post any comments of your own. I’m open to any debate on any book or product that I post a review. However, I don’t see the need to add a disclaimer on each posting that I did or did not receive the product for free. I’m not a lawyer but this should be challenged by the freedom of speech act or something.
What do you think?

Monday, September 28, 2009

Book Review: The Definitive Guide to Spring Web Flow

Book Review: The Definitive Guide to Spring Web Flow
Author: Erwin Vervaet
Publisher: Apress Inc
ISBN: 978-1-4302-1624-7

The first thing about The Definitive Guide to Spring Web Flow that I noticed, and the book was very up front about, it only covers Spring Web Flow v1.0. In the introduction it states that this book only intends to cover the core concepts about Spring Web Flow and the details about v1.0. It states that v2.0 is dramatically different and is a subject for another book. If you’re starting out in Spring Web Flow then you might want to pass on this book and look for another book that specifically focuses on the Web Flow v2.0. However, if you have a need to learn v1.0 this may be a book for you.

The book starts out with an introduction to what Web Flow is and how to get it setup. It then proceeds to explain the basics of web flow and how to get the jars and setup an IDE. I think that this part is a little overkill since anyone with enough Java knowledge should know how to add the dependencies through Maven, Ivy or to manually copy of few jars and add them to your classpath. From there it takes you through the background of what is a web flow and how to plan a web flow in the code. From entry points to exceptions it covers the necessary points to get going with Spring Web Flow v1.0. Chapter 8 gets into the testing of a web flow and how to mock out the flow objects. This takes the unit testing to a new level in my case since in our traditional web applications that I have worked on we have not come close to testing the flows of a page with unit tests. At best we have only tested the individual pages in isolation. The next chapter walks you through an example application. Where other chapters may have left you wondering how to do something with minimal examples this is a full detailed application to get you started with Spring Web Flow. I wish more books would take this concept of using one full chapter and go through a application from start to finish like this.

The book continues on with some real world use cases and a short piece about how to extend web flow to meet any special needs that you may have. The real world cases was nice but I didn’t get much from that as I know where web flow will fit into the tools that I need it to and where I’m going to use it. The extending web flow chapter was a good quick coverage of how to manipulate the web flow for you unique cases. Maybe I read this part too quick, too late at night or the editors got to it and remove too much but I thought that it was lacking some of the good detail that was presented in the other chapters.

Overall, I do recommend this book with the caveats that you understand that this is about Spring Web Flow v1.0.

Tuesday, September 22, 2009

Book Review: Beginning Scala

Book Review: Beginning Scala
Author: David Pollock
Publisher: Apress Inc
ISBN: 978-1-4302-1989-7


I’ve been hearing about various other languages that are available for the JVM for a while. I’ve seen presentations at my local Java user group and at conferences like NFJS and TechFest however, until now I have not really checked into what all of the excitement is about. I just received the book Beginning Scala by David Pollak and read the first 4 chapters the first night. Over the next few days I finished out the rest of the book. I like the idea of a better than Java language as I will admit Java is not perfect. It takes more code than it should to accomplish some tasks. However, is Scala the best alternative to languages for the JVM, I think that the jury is still out. Scala brings to the table a more simple construct but does have a learning curve from Java. Scala is much more functional than Ruby, has better synchronization than Groovy and includes immutability which Java should have had in the first place. The only downside that I can see (and this is just from reading the book without experience in Scala) it may be a little too terse.

The book itself is a great introduction to Scala and if you have not used a dynamic language and want to start with Scala you need this book. It takes you through, rather quickly, the installation and basic syntax of the language. I wish that this part was explained a little more but it does get its point across. I would also like to see more comparisons against Java. Since most people that would be using this book would probably know Java it would be helpful to have more comparisons especially in the syntax area. The rest of the book walks you through using collections, JDBC and Scala’s strong suit concurrency plus a few other items. I also think that the author’s writing style and grammar was excellent for this type of book. Many times you read a book in the information technology field and there is poor sentence structure and spelling mistakes. I did not see any blatant issues at least in my first pass through the book.

The last chapter (9) gives you a compelling reason to start using Scala and introduce it into your corporate culture. Working at a large company that has known to not live on the technological edge, language wise, I know what kind of uphill battle it may be to bring a new language into a company. However, this language may be on my list to work with over the next year.

Saturday, June 20, 2009

Dallas Techfest 2009 review

Arrived at Dallas TechFest 2009 this morning. Found the place just fine but it may have been a little better if there was some signage at the doors to show people where the check in desk was. I had to walk around for a while to find it. Check in was a breeze but that might be because there wasn't many people here yet or just couldn't find the desk. Hmmm.

After check in I walked around to the vendors or at least the 3 that I saw so far. There may be others, I'll look later. I went to find the room for the first event. After arriving at the room I was disappointed to see just chairs in the middle of the room. Clearly the room was big enough to utilize a classroom style seating with tables to facilitate note taking, beverages and laptops! Yes, people like taking notes with laptops, this is a techfest, go figure... (Think NoFluff)

I started to get setup in the conference room got my laptop out and started to connect to the internet. Wait! What is the code? WTF No free internet access! Ok let me get my CC out and buy some. OK... Looking... Looking... WTF No place to purchase it on the site that I can see. I can't fully ding Dallas Techfest for this since Westin has a crappy site but next year lets hope for a location like No Fluff (Wait my Power cord just got kicked out by someone tripping over it. Now what was I saying? Oh ya.. ) I think that every tech conference should measure itself to the No Fluff style of setup. It works, it's efficient, and they don't charge for the internet. Ok, conf #1 is about to start.

First presentation complete on closures. From the examples it looks like a lot less code that is less complex visually. I think that I'll wait for the final proposal and it gets accepted into the core Java before I really start to investigate using this in any production work. Either that or when I work with Groovy.

Next I attended the TDD talk by Ben Rady. I saw a simular talk last year at JavaMUG and attended TDD talks from Neal Ford. Ben's talk was much more code example focused. I would love to see more of a persistence level TDD example at some point but it is a good discussion about TDD and why we all should be writing tests. Even if we don't write the tests first we need to be at least writing them. Tests create the confidence that your code works and other changes, enhancements or refactors do not affect the code under test control. I think that key to starting on this especially with a existing project is to just take pieces like Ben and Neal also mentioned, and refactor the code so some can be tested. Then repeat as necessary until you have effective code coverage.

After purchasing own lunch at Westin Grill. (Houston Techfest, and Dallas BigDesign Conf both provided box lunches for less conf cost, Hmmm) I headed back to the conf rooms. I joined Ben Rady for the 2nd part of his presentation on testing. This one was Continuous Testing using Infinitest. I have been using Infinitest since the last time that I saw this presentation at JavaMUG.org. Basically the same presentation but very effective. This really shows WHY we need to test and the benefits of continuous testing and how that affects the quality of code.

I attended Craig Walls' talk about what is new in Spring 3.0. Great talk as always Craig and I can't wait to start working with Spring 3 and try out some of the new features. It looks cool. Before attending this talk I was a little worried about the MVC changes and how that will affect legacy Spring code but per Craig it sounds like it will be a good change. I'm looking forward to using some of the new @Cookie, @RequestHeader annotations also.

Next I went to the Maven 2 talk from Ryan Breidenbach. Fabulous job Ryan. I attending the same talk at No Fluff a few weeks ago and it had most of the same content. This talk was so much better. Better speaker, maybe? Whatever the deal is I got a lot more out of this presentation than I did at No Fluff. (In fact that No Fluff session was the only session that I rated very poor)

All things considered this was a good conference and I would attend next year. I'm still a little confused over the whole pricing structure. First I heard that it was one price, then they gave out discounts, then they raised the price, then a different discount. Next year I just hope that everything is posted up front where we know when the early bird discount expires, when the discounts for user groups expires, etc. Also next year I hope they don't use the Westin Stonebriar. Nice place but it did not have enough parking and I hate the seating style. Rows of chairs for a tech conference? Who thought of that! Why not classroom style with thin long tables so we could take notes on a table, put our laptops on a table rather then holding them for the entire day. Think ergonomic! If anyone has any questions about how to put on a great conference they should attend a No Fluff event! We don't have to have the full buffet but a box lunch would be nice. Also don't forget the WIRELESS access!

I know that a lot of hard work went into this and I don't want to take away from any of that. They did a great job expecially with the speakers.

So what is next hmmmm... Spring One?

Today's tweets since no WIFI at Dallas Tech Fest

Here is the tweets that I would have done today if we had Free WIFI access at the Frisco Westin Stonebriar Resort. I've never heard of a Tech conference (and have never attending one until now) that didn't have free WIFI... Westin /dtf09 = #fail.


#dtf09 08:00 No WIFI access dtf09=#fail

#dtf09 08:15 2nd #fail No classroom style seating with tables? WTF! Not starting off well...

#dtf09 08:30 No internet access at Westin Stonebriar. Cost $10 per day but you can't sign up online? WTF #fail

#dtf09 09:00 Attending Closures talk by Paul Holser

#dtf09 09:36 my leg is already getting warm from my laptop. I'm sure that I'll have 3rd degree burns by the end of the day...

#dtf09 10:09 Closures almost over. Wish there was more business like examples. Overall good presentation.

#dtf09 10:15 TDD talk by @benready starting

#dtf09 11:30 TDD or variations is the way to create software. Much better than hacking at code.

#dtf09 11:35 So were at a hotel and we have to go out for lunch? WTF

#dtf09 13:00 Finished lunch at Westin grill. Good lunch but Houston Techfest provided a box lunch

#dtf09 13:30 Starting @benrady talk about continuous testing.

#dtf09 14:20 Infinitest @benrady love the talk 2nd time seen it really shows WHY we need to be testing

#dtf09 14:45 Wishing I had a iPhone for email and twitter access today.

#dtf09 15:00 Next is the one that I came for (mostly) What's new in Spring 3 by Craig Walls

#dtf09 16:30 About to start the last session of the day. I'm going to hang with Ryan and learn a little about Maven2

#dtf09 17:05 Good presentation but Ryan is also missing wireless and may have to cut it short because of it.

#dtf09 18:00 Dallas Techfest is over. Now I get to go home and send all my tweets? WTF

Sunday, June 14, 2009

Using JavaRebel to speed up development

I was at the last JavaMUG.org meeting where the creators of JavaRebel demonstrated how this software helps out by eliminating the need to restart Tomcat or the JVM while changing classes. The presentation was very compelling but I don't just jump to every piece of software that comes along which promises to help out development speed. However, I went ahead and tried it out the day after the meeting while I needed to make some changes to some code. It really worked. After a little configuration change to my development setup to put the classes in the WEB-INF/classes directory instead of a jar file in the WEB-INF/lib it was working. I made several changes to the classes and refreshed the browser, BINGO, changes were recognized. This must have saved me a few minutes of development time already in the short amount of time that I have been using it. It should save hours in the next year.

Wednesday, June 3, 2009

Monday, June 1, 2009

Big(D) Design conference reflection

I attended the first Big D Design conference this Saturday. Overall I was impressed about the structure of the conference and how well it seemed to flow in spite of the lack of time between sessions. It did feel rushed and I was extremely tired at the end of the day after trying to take in 9, YES --> NINE <--, one hour sessions in one day. That is a lot of conference sessions to take in for one day and retain the disparate information.

Some things that I liked about the conference. Good quality of speakers for a low cost conference. This does show how much good talent that we have in Dallas. Good central location for most people. At least it was easy access off Hwy 75. The meeting facility was in good condition and had enough room for most of the events/sessions. No problem with the food. It was a great little box lunch with sandwich, chips and cookie.

Some things that I did not like as much: Parking was not great but was acceptable. This may be attributed to not knowing much about the SMU campus. The only issue about the facility is it didn't have enough power outlets to charge up the laptop. I was out of power by the 3rd session until I was in a room that had more outlets. One conference room had classroom stadium seating but not all outlets under the desks were working. The last thing is the initial wait to check into the conference. I think that it took about 30 minutes to get checked in. I would have loved to use that time to walk around the sponsors tables or even get a little breakfast or coffee. However, by the time that I got in to the conference area the first session was about to start and I wanted to get a seat and make sure that we had wireless access.

Overall I am glad that I attended and will probably attend next year. However, that may depend on the content and speakers.

Thursday, April 30, 2009

Big (D)esign conference

I signed up for the Big (D)esign conference that will be held May 30th at SMU. It looks like betwen this conference and the ones that I'm attending in June it's going to be a great next few months. First is this Big (D)esign conference then NFJS Dallas June 5-7, then Dallas Techfest June 19th in Frisco...

I've ready been to the Houston techfest this year so what other conferences can I attend in 2009 that don't break the bank?


Brian

Tuesday, April 28, 2009

I just read....

I was just reading Chris' blog about the right way and the wrong was to do things. We read many posts every day about the "best" way to write java, or the best way to use ORM or the best way to design a database schema. However, not all co-workers are always in agreement with anything that has the word "best" in the sentence.

Let me highlight a discussion that I had yesterday about a database schema design. (names have been changes to protect their stupidity).

Overview: I found that during the initial database design that I was not involved with some items was left out. For instance foreign keys, check constraints, First normal form, etc. (Small things...) <--- scarsam... During the meeting where I found that a table is not available to hold the attachments for some data since the data relates to another part of the application. I suggested that we create another table and tie in the FK back to the original table that this data will be attached. However, the conversation when a little like this... Person 1 = Boss Person 2 = project owner and BA Person 3 = business expert and technicial architect Person 4 = team member, (Java Programmer) Me = Me, team member, (Java programmer and 12 years experience in Database design) <Me> I'd like to add in this table and then relate it back to the master table with a FK
<Person 4> We don't need FK's since the application takes care of it.
<Me> We had this conversation before and we agreed that FK's are good for the relational integrity of the data. Are you saying that we should use the current table that relates to (this other table).
<Person 4> Yes, because why have another table to store the attachments?
<Me> Because of data integrity...
<Person 2> We could create the table that links the current attachment table to the master data table.
<Me> But we cannot enforce the integrity of the attachments that way because two link tables would be related to the attachment table.
<Person 4> (calls person 3 name) what to you think?
<Person 3> I don't know about databases so it's up to you.
<Me> So we are not going to worry about data integrity on this project?
<Person 4> The application will take care of it.
<Person 2> (referring to me), can you create the table like I showed and let the rest of the team know?
<Me> Are you sure?
<Person 2> Yes


Ok, I'm sure that someone will point out that maybe I caved in too soon. However, this is not the first time that I've had this conversation about database integrity with someone. Most of the time I do convence the other side that we should use the relational database (Oracle in this case) to manage the integrity of the data. Some of the checks can be in the application but it is my belief that the database should be the last line of defense for the data. If there is something that the database can make sure is related or helps to keep the data clean why not do it. In this case there is no concern about space differences. We are adding a table either way so why not do it where the database can make sure that the data from one table can relate to the other table.

I could go on and on about this but I'll start to ramble at some point if I haven't already. I guess my question is how do you convince people to use the best practices when it seems like they are not willing to accept suggestions to make current designs better?


Brian

Thursday, April 23, 2009

Comming this June!

It looks like June is going to be an incredible month in Dallas for Java. First we have the NFJS conference coming June 5th - 7th. Then just a few weeks later we have the Dallas TechFest conference on June 19th.

I'm counting the days!

Brian


Wednesday, April 22, 2009

Time for a Post

I've been thinking about what to post about for a while now. I have come up with an answer. Since I'm now heavily involved in JavaMUG.org and have attended several conferences about java related issues I think that it's about time that I start to post about Java? Hmmm sound good?

Ok keep looking here over the next few weeks and you will start to see posts about my idea of best practices for developing Java, Spring, IBatis, apps.

Brian

Friday, January 30, 2009

Dynamic PL/SQL and Bulk Collect

Today was the first time that I needed to use dynamic sql with BULK COLLECT. It was due to a distributed database system that used dblinks from a master reporting database. I programmed this on Oracle 10g but it should work on 9i or later.


declare

TYPE table1Type is TABLE OF table1%ROWTYPE
index by binary_integer;
v_results table1Type ;

begin
v_sql := 'SELECT *
FROM table1@' || v_dblink || '
WHERE mydate_dttm > sysdate - 1';

EXECUTE IMMEDIATE v_sql BULK COLLECT INTO v_results;
end;



That's it... This loaded all of the records into the v_results PL/SQL table and you can loop through the results like a array.



Saturday, January 24, 2009

Notes from Houston Techfest, Part 2

After lunch we had three more sessions.

Darin Marple
Topic: Using java to solve capacity issues


What can we do from a design perspective to identify or prevent capacity issues.

Transaction Model: Move transactions to as low of level as possible. Avoid two phase commits. Consolidate transactions at the db layer with stored procedures or DAO patterns.

Dependency Management: primary concern is dependency is not available at the time its needed Solutions caching dependency using any of the caching methods Workflow management: Provide alternative business path to using the data using possible older data.

Application Metrics:
Metrics via JMX: Monitoring with logging, JMX can publish metrics for mbeans

Persisting Metrics: Save metrics for analysis over time. Preferably to a database for persistence. Watch for extra load on database. Can output logs to file then batch load them into the database.

Validation: Load testing with LoadRunner: Validates application will work on a test system. Allows capture of true SLA and ability to tune and retest. Try to simulate real load as close as possible.

Deployment
Horizontal Scalability. Use JMS Distributed Batch. Use singleton at low level and workers at a higher level to pass information to the lower level.

---------------------------------
David Neal
Topic: Coding Considerations for Production Support: Instrumenting your code to reduce your support headaches

Carnegie Mellon University's Software Engineering Institute
Capacity Maturity Model

Avoid the standalone application mindset. Use useful error message. Dynamic adjusted diagnostic levels, Use progressive level of detail. If your using threading applications make sure that you include a key to be able to get the output back out of the logs for that one. Check log4j to output thread information. Log4j can also watch the logging level and if it changes in the properties it will update.

Aggregate the data from the method level to the caller level. Make sure that the context of the work is logged. If you return 100 records or 1M records put that in the logging so another user will know what the context of the results are.

Recoverable: Make sure the processing has the ability to recover preferably in stages especially for the larger jobs that need to be completed. Fuego is used for common recovery procedures.

JP Morgan uses a dashboard system to aggregate the data from the monitoring systems and that needs to demonstrate SLA. That also gives the ability to drill down into various problems.

--------------------------
John Teague
Topic: Principals of Object Oriented Design

Principals based on Robert's Martin's book.

High Cohesion and Low Coupling helps to make a solid OO design.

Makes code: Maintainable, Easier to test, Less resistant to change, reduce repetition, allows for continuous improvement, allows for agile development with vertical design.

If your going to mock it put an interface around it.






SOLID

Notes from Houston Techfest, Part 1

Notes from Houston Techfest:

Keynote Sang Shin from Sun Microsystems
Topic: Having fun in building Web applications with Ruby/JRuby/Rails

Notes: Not real instested in Ruby or JRuby. My Personal feelings is this is a fad language and will disappear the way of cobol in a few years. However, Sang gave a good presentation about the Ruby basics and how to get started doing web development. His web site http://www.javapassion.com/ looks like it has jump start guide. I just don't see this as mature a development framework as Spring or other DI design patterns.

--------------------------------------------
The next session that I attended was by Brian K Oxley from JP Morgan
http://binkley.blogspot.com/
Topic: Fluent Interfaces for testing in Java

Basically this shows how to add testing to Java code using code that look like english sentences. Proponent of static imports.

org.hamcrest.matchers testing library looks promising. Need to check into that library more.

Building fluent interfaces promotes the Builder Pattern to implement a testing interface for the code. So this creates an additional layer between the use case test and the code to be tested. This layer abstracts the test building so more syntactically correct English can be used to create the tests.


Even though I can understand the benefits for creating a more English like structure to create the tests it looks like with this additional layer of code that there is more code to test. What tests the test interface and what if the test interface is wrong or introduces a new bug that hides a bug in the code. This can happen in single level testing also but I'm not convinced that adding an additional layer to the testing will streamline code testing.

Brian also plugged Ron Coffin from Improving Enterprises


---------------------------------

William J Ferris
Topic: Topics in ava Concurrency

Recommended:
Brian Goetz, Java Concurrency in Practice
Herb Sutter, DDJ March 05: Free Lunch is Over

Why do we need to work on concurrency. Increasing need for threading because of multiple cores. Biggest threat to programming concurrency race condition when you expect one thread to finish first all the time or one thread accesses a object after another thread read it but before it writes to it. Other threats are deadlock and starvation. Deadlock is when two or more resources are waiting on resources. Starvation is when a thread cannot get cpu time.

To fix race condition: Concurrent Solutons
1. Elimination: Don't share the object if possible
2. Dynamic Exclusion: Use locks and barriers
3. Structural Exclusion: Code with immutable objects and confinement,isolate variables to specific threads

#2 Locks Intrinsic use synchronized keyword, Synchronized locks on getter and setters doesn't work!

Explicit locks java.util.concurrency.locks

Atomic new in java. Creates thread safe objects. Uses new methods to access the object.

Atomic best preforming, then explicit locks. Synchronized and fair share model are the slowest when more threads are added.

Maps are not thread safe, ConcurrentMap is threadsafe.




---------------------------------
Next was lunch -> See part 2....

Wednesday, January 21, 2009

Houston Tech Fest this weekend!

Looking forward to the Houston Tech Fest this weekend. It will be good to see some friends again and learn some new stuff. I noticed on the agenda that some spots are still open. I guess that some presenters backed out. Hope they get some more to fill in the spots.

Anyone else going? Let me know so we can meet up at the event.

Sunday, January 11, 2009

Dallas Techfest 2009 Postponed

I just read in Tim's Blog that the Dallas Techfest 2009 has been postponed and will not happen by March as originally planned. This is due to the last of sponsors for the event. If anyone has additional contacts to get support let Tim know or contact me and I'll pass the information on.

Saturday, January 10, 2009

Houston Tech Fest

Houston tech fest is only two week away now. I'll be blogging about it that night or when I get back to Dallas. Check out the tech fest lineup at http://www.houstontechfest.com/.

You can also find links to all of the techfests at http://techfests.com.