BottleIT - All posts by Peter Hancock

BottleIT uses Umbraco now

by Peter Hancock 20. February 2009 18:33

Umbraco is a very neat and very cool CMS.  After about six months of learning it, BottleIT has started implementing sites with it.  The first one naturally is my personal site - FreshTerrain - and has been used to test the blogging engine and bulk photo uploads.  Also, all the content is now managed internally via the CMS.

 I like it  - a lot.  Editing is really simple, adding content is easy, and it finally means we can ditch our own internal CMS and use a more fully featured one.  We benefit, our customers benefit.  Gold.

 So, over the next few months, as well as rolling out some new sites, we'll also be upgrading our own site - AT LAST!  And best of all, giving OurDay a much needed overhaul.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Membership Provider and validating password strength

by Peter Hancock 16. May 2008 06:29

I was finishing off a custom membership provider as part of a migration of code, and one of the requirements was to ensure that the login password in the membership provider matched the password strength requirements of the customers LDAP directory.  PasswordStrengthRegularExpression was the obvious way to do it.

After fussing around and trying to test it, I finally downloaded the SqlMembershipProvider source code, and found the missing part.

Override the OnValidatingPassword event, and use that event to validate the strength of the password

  1. Validate MinRequiredPasswordLength
  2. Validate MinRequiredNonAlphanumericCharacters
  3. Validate PasswordStrengthRegularExpression.   (voila)

It's a pity, the sample ODBCMembershipProvider doesn't actually mention in the MSDN documentation that this should occur.

Currently rated 4.0 by 2 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Web deployment project CTP for VS2008 - missing connectionStrings element

by Peter Hancock 15. December 2007 23:32

I've installed this morning the web deployment project ctp for VS 2008 and immediately had an error with merging connectionStrings for my release build.  It presents with error WDP00002: missing section connectionStrings.  This is occurring because the project is not copying from the TempBuildDir to the output directory before the merge process.  The result is that it's trying to merge the connection string section into a web.config file that doesn't actually exist.  This should also work for the missing appSettings posted on some of the forums - but I haven't test that

After a bit of research, I thought I'd found the solution here, but had to modify it slightly.  For me, it works when I move it into the AfterMerge target of the deployment project - like thus    

<Target Name="AfterMerge">	
	<CreateItem Include="$(TempBuildDir)\**\*.*">		
		<Output ItemName="CompiledFiles" TaskParameter="Include" />	
	</CreateItem>	
	<Exec Command="if exist &quot;$(WDTargetDir)&quot; rd /s /q &quot;$(WDTargetDir)&quot;" />	
	<Exec Command="if not exist &quot;$(WDTargetDir)&quot; md &quot;$(WDTargetDir)&quot;" />	
	<Copy SourceFiles="@(CompiledFiles)" DestinationFolder="$(WDTargetDir)\%(CompiledFiles.SubFolder)%(CompiledFiles.RecursiveDir)" />	
	<Exec Command="if exist &quot;$(TempBuildDir)&quot; rd /s /q &quot;$(TempBuildDir)&quot;" />
</Target>

Hopefully they'll fix this for the release build.

Currently rated 3.5 by 2 people

  • Currently 3.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Churn for banks

by Peter Hancock 5. December 2007 07:06

Why can't we have a churn for the banking sector?  You go in to, say...  Colonial First State, and say "I want all my accounts with you.  Here are all my details.  Make it happen".  And then somebody at the bank goes through and chases up all your existing accounts, arranges the papers for your new accounts, organises the payout figures, arranges the cancellation of credit cards, and voila...  you have all your accounts with your new bank.

Is it any wonder people don't leave change their existing accounts.  Over the last few days I've spent about 5 hours arranging a new personal loan, and the payout and closure of my old personal loan, visa card, and personal transaction account.  The scary thing is - that's five hours of waiting in queues and filling out paperwork.  If a bank really wants my business, and they offered me that ability to just automagically churn my accounts, there's a better than even chance they'd get it.

Hmm... customer service from a bank.  I'd like to see that.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

General

Schema trap with SQL 2005

by Peter Hancock 24. November 2007 02:42

It's been awhile since I played around with Oracle, and for me, the introduction of schemas in SQL Server 2005 really went unnoticed.  Well, today it came up and bit me in the backside pretty savagely.  It's quite obvious, (like everything) but the following code created a few issues for me...

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = "Address")
DROP TABLE Address

The issue? If any table in any schema has the name Address, then it will drop my table. The fix is pretty easy...

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = "Address" AND TABLE_SCHEMA="DBO")
DROP TABLE dbo.Address

As I said - obvious. Embarassed

Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Code Hoarders and Rewriters

by Peter Hancock 23. November 2007 19:31

Trying to take on legacy code can be quite difficult.  You need to understand the business logic.  You need to understand the underlying architecture.  You have to learn the new frameworks.  And you need to understand the why.  This difficulty is compounded when you not only have to wade through a morass of existing code that works, but the plethora of tables, stored procedures and business objects that have been retired but never actually removed from the codebase.  I'm not sure what the phenomen is, but some programmers are hoarders.  In another life, they'd be the person that has ten year old newspapers stacked up in a kitchen because they might need it one day.  Or they still have the key rack they made for Fathers Day in preschool with the garish purple paint and the bent nails because they can't bear to throw it out.

I think the other big trap that catches the developers out is the urban legend that rewriting the code is faster than refactoring.  So a whole bunch of new objects and new methods are made, new tables are introduced, and then finally, the new code is "pointed at".  The old code is no longer referenced or used, but it's never actually deleted.  Unfortunately, it stays there.  Eventually, the individual responsible leaves.  The old code still looks like it does the things that it's meant to do, but it doesn't actually do it anymore as it's been replaced and nothing points to it anymore.  Tools like resharper aren't able to recognise that they're not used because all the plumbing still exists!  These developers might not be code hoarders, but they nevertheless leave a trail of obsolete but apparently useful code in their wake.

Fixing the code hoarder is not so easy.  Educating in source control, wielding a stick perhaps.  Code metrics highlighting complexities?  Not sure.  When the culture is to comment out but leave in, that's a difficult thing to change.  When you use a source control system that's not really up to it, that's also very difficult to change.  Wielding the stick can be a little easier - a senior developer running through a code review.  Paired programming with a non code hoarder.  I'm not really sure, but it's something I'd love to figure out.

Fixing the rewriter?  Refactor.  Migrate the old code in small, bite size steps.  Refactor tables using database refactoring techniques.  You're actually changing the code instead.  The code evolves and morphs into the new code, and we're not left with a bunch of year old stale code that some other developer may have to wade through down the track, only to find out that it's a red herring.  Introducing effective refactoring tools can go a long way towards this.  Even simple things like allowing users to quickly change the names of variables and methods can quickly improve the quality of code - often to the point where the desire to rewrite is no longer an overriding desire.  As code evolves, obsolete code has a way of just disappearing, and the "rewritten" code just magically takes its place.  Introduction of database refactoring techniques and working with legacy code techniques.  Overall, in these cases it's more about education.  I often find that once I've shown somebody how to refactor towards the design goal, people take it on.  It's much easier both in the short term, and in the long term.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Underestimating the Customer Experience

by Peter Hancock 16. November 2007 08:23

Attended a Thoughtworks presentation this morning - "Your first mistake - underestimating the customer experience".  Interesting way at looking at why customers choose between products and companies.  The gust of the presentation was that companies need to look beyond competing on price, quality and time to market, and look at differentiating your product based on not just whether the product does the job, but the entire customer experience - from hitting the website, to installing or using the product, to customer service when having issues.

The factor contributing to this change in focus is the impact that Web 2.0 has on assisting customers to choose brands and products.  With growing numbers of people writing reviews, blogs, participating in forums, and generally publishing information - word of mouth is now reaching many many more ears.  Whilst in the past you might get newspaper reviews, or a personal recommendation, now you can Google virtually any product and find out what other customer experiences have been had with that product.

A brief rehash follows...

Designing for everybody pleases nobody

It's important to consider who you are targeting as customers.  Ideally, the ones with the most money to spend, the ones that are easy to attract, and require the least amount of effort to maintain.

Once these customers are identified, research is required to really find out what motivates them.  From market research, with its corresponding downside (don't actually do what they say they do), through contextual research (finding out how they use your product, (or similar)), right through to "ethnographic" research (really getting out there and following your customers and finding out what motivates them to choose a product).

At this point it's important to build a customer profile.  This helps to identify the customer, and make them a real person.  'I want to be a real boy" -Pinnocio.  Make these customers obvious and display the profile.

Identify

  • Demographic
  • Interaction Experience
  • Attitudes to task and technology
  • Goals
  • Experience Statements
  • Environment (where is the product used)

Goals are the new features

I wasn't really sure how the tagline related to the content, but the content was definitely relevant.  Essentially, like any good analyst, focus on identifying the customers "want", "need", and "feel" words to help identify there goals.  Also try and identify their frustrations.

Possibly relate to Maslows needs hierarchy - when all the basic requirements are met... then what does the customer look for?

Some ideas

  • Motivation
  • Practical Need
  • Brand / image
  • Environment
  • Emotional Need
  • Interaction
  • Social Need

They also touched on capturing user goals using stories - something along the lines of
As a <Customer type>
I want to <action>
so I can <goal>

Finally, it was a matter of prioritising the user goals - high value, low cost -> high value, high cost, -> low value, low cost -> low value, high cost.  (Guess which ones don't get done!)

Useability is not rocket science

I kind of found that a bit condescending, but again, the content was excellent.  It focussed around "eating your own dogfood".  ie - act as a user and use your site, product, service to see how user centric or goal focussed it is.

They did an 8 second blip of the Surf Lifesaving South Australia website.  I am a beach goer and I want to view the site so that I can donate some money.  8 seconds display... can you find it?  (Donate was very well hidden away).  To be fair to Surf Lifesaving SA, maybe their target user wasn't somebody donating but somebody wanting to become a member.  (See point 1 - design for everybody pleases nobody)

Also, I liked the point about using natural language - illustrated quite amusingly by using a Virgin Blue hostess comment about the emergency exit door...  "If I say get out... open the door quickly."  That struck a cord with me as I'm a big fan of avoiding buzzwords and wank words when not needed.  (My pet peeve is "If you need assistance please do not hesitate to ask".  Which is wank phrase for - "Ask if you need help").  Politeness CAN obscure the message.

Another point made that I appreciated is that the product should be consistent across all mediums.  If you login to a site and start an application, you should be able to complete that same application over the phone (if a phone service is provided).

Leverage Web 2.0

Maybe my attention span is short, but I found that the presentation started to wander at this point.  The crux of it was to pay attention to Web 2.0 features like forums, mashups, blogs and review sites where users contribute, and use those to help with points 1, 2 and 3. 

  • Noted that consumer publications and media was no longer as trusted
  • Peer reviews were preferred forms of information
  • Noted businesses starting to have Facebook pages to provide a peer style site and promote the brand
  • Use the internet to identify competitors and find information about it.

Change

"The only constant is change".  This last section wandered the most, and it became a little trite.  Essentially it was about making change part of the process, and making it evolutionary rather than big bang.  It's more approachable that way.

All up though, I found the presentation quite informative and some of the techniques very useful.  I can't say that there were any bombshells and a lot of it's common sense, but sometimes it takes an external party to make you realise what you're missing - and for that, it was definitely a good thing.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

General

Avoid People Telecom

by Peter Hancock 10. November 2007 07:32

Two months ago, after repeated issues with billing with People Telecom, I decided that it was time to change provider.  I rang GreenTreeFrog, and actually got somebody on the phone.  Purely because of that, I signed up for 12 months.  After some stuffing around with PeopleTelecom who were not very forward in providing me the information required, I was able to get connected.  Finally, the accounts were cancelled, and at last - I'm done with bad service.

Alas - I received an invoice in October.  Contacting them was rather difficult.  Waiting on hold for 20+ minutes, eventually, I tried email..  nobody responded.  Today, I received another invoice.  This is despite repeated emails to their support system.  Finally, I've had enough - I'm going through the Telecommunications Industry Ombudsman.  It annoys me that I have to do this, and what's worse - this is the third time that I've had to do it in order to resolve the situation.

Why am writing this?  To let anybody who reads it know.  Avoid them.  Do yourself a favour.  It's a real shame because when they were SwiftTel, they were great.  Frown

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

General

Negativity

by Peter Hancock 25. October 2007 02:49

One of the things that I look for in a developer is openness.  When a new technology is released, I like to see an instant "hmm, this could work" thought process, rather than a "it'll never take off" attitude.  Same for a new way to approach an existing solution.  An openness to change is an acknowledgement that things can be improved.  An openness to new technology reflects a belief that it could solve some problems that existing technologies have, or it could provide some opportunities that existing technologies don't.  The immediate negative response reflects to me a closed mind.  My current openness test is Silverlight.  (It used to be Ruby)

"What do you think of Silverlight?" is my current test question.

It's surprising the number of people who dismiss this entirely - because it's from Microsoft!  I usually follow up with "What does it do?" It replaces Flash. Oh.  Ok.  So you have a deep knowledge then to make that judgement?  What's scary is that often they don't even realise the bigotry that is occurring, and worse, peers look up to some of these people as mentors and guides.

So why does this bug me?  Because I'm responsible for ensuring a high quality technology solution.  One that meets the customers needs, one that meets my company's needs, and one that can be delivered as rapidly as possible.  In order to make a decision, I want people around me who can make educated choices on a way forward, not a choice based on software house bigotry, or the "not invented here" syndrome, or even worse, the "that's the way we've always done it" excuse.  The negative response to an alternative immediately predisposes that individual away from the alternative - even when it could be the "perfect" solution to the problem.

But how do you deal with this?  One way that I've found useful is to actually highlight the issue up front.  "So you won't even consider this option because it's open source?" Another technique is to confront them with their own lack of knowledge - "So why specifically won't it work?".  My third favourite technique is to paraphrase...  "So, using Sourcesafe is the only option because that's all our developers are able to learn?"  Unfortunately, all these questions are negatively stated - perhaps that's my personal reaction to the negativity around me in these situations.  I'm open for alternatives...

So... what do you think of Silverlight?

... and why?

Currently rated 3.3 by 3 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

General

Naming Methods

by Peter Hancock 22. October 2007 22:25

One of the yukky areas of code that we deal with is legacy code.  Whether it be taking old asp code and bringing it up to 3.5 asp.net, or C# code that has evolved beyond recognition, we all end up dealing with it.  My pet technique now with advent of refactoring tools like Resharper is to rename methods to reflect exactly what they do.

So - the 172 line validateUser method becomes, ValidateUserShowErrorLockedOutStatusLastLoginAndAccessPrivileges(username, password)

Why is this good?  Well, if I *can't* refactor it into smaller methods because it's all so inextricably intertwined, at the least, I'm highlighting this fact, and telling the next poor person who wanders along, just what the function does.  And when you review the code later for targets to refactor - this one suddenly sticks out - just because of the name.

My all time favourite though was...

CalculateFeeOnPortfolioForBrokerageTransactionSubscriptionAndApplyFeeToAccountAndRollFeeUpToGLAndPrintTransactionStatememtAndIfEndOfYearPrintFeeSummary()

Seriously.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Software development

Recent posts

Recent comments