Development

Agile Database dot com

Have added some new features to my agile database framework and decided to release as a slightly more professional undertaking – say hello to Agile Database dot com.

The code’s hosted on GitHub so please feel free to take a look and let me know if you have any feedback or issues.

I’m going to add a section on Usage shortly, and probably delete the old code hosted on this blog, but aside from that I don’t have much of a plan for a roadmap. Certainly multi-database / OS support without having to refactor the scripts would be beneficial. Please feel free to let me know if you have any other ideas!

Wednesday, September 14th, 2011 Agile, Database, Development No Comments

RESTful system design

A useful resource (see what I did there?) showing starting point and evolving maturity when designing RESTful systems, courtesy of the ubiquitous Martin Fowler.

Tuesday, July 13th, 2010 Architecture, Development, Internet, REST No Comments

Oracle 11g UCP with Tomcat

Download Instant Client Package – Basic and SQL*Plus from Oracle.
Unzip packages to /Applications/oracle/instantclient_10_2.
Add the following to ~/.bash_profile:

export DYLD_LIBRARY_PATH=/Applications/oracle/instantclient_10_2
export TNS_ADMIN=/Applications/oracle/instantclient_10_2
export PATH=$PATH:$DYLD_LIBRARY_PATH

Ensure you have the below tnsnames.ora file in TNS_ADMIN so as to connect to the server from client using connect string: sqlplus <username>@xyz


xyz =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(PORT = <port>)
(HOST = <server_name>)
)
(CONNECT_DATA = (SID = <SID>))
)
Add the following to your tomcat/conf/server.xml file:

<GlobalNamingResources>

<Resource
name="jdbc/<pool_jndi_name>"
auth="Container"
url="jdbc:oracle:thin:@<server_name>:<port>:<SID>"
user="<username>"
password="<password>"
factory="oracle.ucp.jdbc.PoolDataSourceImpl"
type="oracle.ucp.jdbc.PoolDataSource"
connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
connectionPoolName="<pool_name>"
connectionWaitTimeout="30"
minPoolSize="5"
maxPoolSize="25"
inactiveConnectionTimeout="20"
timeoutCheckInterval="60"
validateConnectionOnBorrow="true"
sqlForValidateConnection="SELECT 1 FROM DUAL" />

...
and add the ucp.jar to tomcat/libs directory.

Wednesday, July 7th, 2010 Code, Database, Development, Oracle, Tomcat No Comments

Software Architecture Document

Really helpful Software Architecture Document guidelines. Worth a shout to codingthearchitecture.com, I like their “style” very much…

Sunday, February 21st, 2010 Architecture, Development No Comments

Agile Hype?

There is now a lot of “hype” around the Agile development methodology, possibly because it’s producing better results than traditional approaches, or perhaps it just makes people’s working lives more interesting and challenging?

Either way, I read an agile101 post suggesting that ‘doing’ agile is a sign of incompetence which put my hackles up as you might expect, given that I’m a keen advocate. But the article makes an extremely pertinent point which I’d like to stress – that Agile is only something you are going to ‘become’ with plenty of practice. Picking up a book is a good place to start but that’s all it is… Agile development is an intuitive mindset, not a bunch of rules you can follow and hope to immediately be good at.

It also struck me that as Agile has gathered pace there are now many different ways of wrapping lots of processes and metrics, management techniques and so on around the basic concepts. In my opinion this in many ways detracts from the fundamentals that are ultimately going to help you deliver, and feel these demands can actually make a team less agile as the post suggests.

Here’s my mantra, if I can call it that, which I try and religiously stick to whilst leading Agile software development teams:

  • Focus, focus, focus – if it doesn’t make the boat go faster then save it for another day.
  • Refactor, refactor, refactor – even the smartest and most experienced developers rarely get it bang-on first time around, especially given that priorities and requirements are often less than stable.
  • Challenge the business sponsor and requirements – often I’ve found that requirements are over-complicated for the problem at hand. Get to the root of the issue, understand it, and then propose simpler alternatives which actually address the real issue.
  • Aim for the best in every single line of code and development practice if you can – look after all the little things and the big things will take care of themselves!

Sure, there are many tips and suggestions that can help you and your team to a place where you are able to “move light, travel fast” but as a Technical Lead or Architect (as opposed to Project Manager, say) I think it’s more important to get an intuitive “feel” for what’s a true value-add.

Although you’ll probably have to compromise at times on some of the points mentioned above, they’ve been great cornerstones for me when I feel there are too many demands on my time from what I consider to be less important techniques or deliverables.

Tags: ,

Tuesday, August 25th, 2009 Agile, Code, Development, Management No Comments

Hibernate StatelessSession with Transactional Annotation

I have a bi-directional collection mapping in Java which I thought was causing me problems when persisting using Hibernate’s StatelessSession API.

However, it looks as though the issue was being caused by the fact I was using the @Transactional annotation instead. The API states:

“Operations performed via a stateless session bypass Hibernate’s event model and interceptors.”

I didn’t pick up on the importance of the above statement as it’s not particularly clear at first glance, but it looks as though using Annotations via AOP just isn’t supported when streaming directly to the database using the StatelessSession.

Commenting out the annotation and using a programmatic Transaction instead corrected the problem:

//    @Transactional
public List<Package> insertAvailability(final List<Package> packages) {
    final StatelessSession session = sessionFactory.openStatelessSession();
    final Transaction tx = session.beginTransaction();

    session.insert(aPackage);
    // insert collections manually etc...

    tx.commit();
    session.close();

    return packages;
}

Tags:

Monday, July 20th, 2009 Code, Database, Development 2 Comments

Laws of Productivity

This article discussing productivity of technical teams is really good stuff. It’s all backed up by research, which is especially helpful for those who might be building or managing a technical team and need to make a case to business sponsors or stakeholders.

A nod to Tales from a Trading Desk where I first discovered the article.

Tags: , ,

Tuesday, October 7th, 2008 Agile, Development No Comments

Apple of my eye?

Having just signed up to collaborate on JDK7, it looks as though there’s about zero chance of this happening on a Mac OSX. Grrrr….! Having done some further reading, it seems like this might be old news to some people – I’ve only really started to cut code on my Mac recently – and I do vaguely remember the storm in the news when Leopard was released, so there’s obviously been a lot of frustration within the Java development community at Apple’s latency on JDK updates… Now that we are a year down the line however, is anyone any the wiser as to why Apple are not listening?

Tags: , ,

Tuesday, September 30th, 2008 Apple, Development No Comments

Agile CTO