Archive for the ‘development’ Category

Do you know the data type?

Tuesday, 6th May, 2008

When working with cell values in code, do you generally know the data type you expect in the cell?

Or do you often need to assign the cell value to a variant or whatever and then look inside at the type before deciding what to do?

I reckon most of the time I know as I’m coding what type I expect, basically either a double or a string or an empty cell (and the occasional error 2042). Normally the type of processing is dependent on the data type, and usually I work out the target range before starting processing.

I think its quite rare I would not know, although there are times I might want to check maybe. What about you?

cheers

Simon

State of the profession

Wednesday, 23rd April, 2008

Dick M asks if we (Office developers) are a dying breed. At least I think he’s asking - he could be telling us our profession is wilting away. Whatever, I agree. Completely.

Office developer, Excel developer, business developer, these mean pretty much the same thing to me, its a person nearer the business than a traditional IS department dev. They probably use a range of tools/platforms, they mainly target desktop rather than server, Excel usually features as at least part of the interface (or calc engine), source data may be from a server database, but working data is likely to be in jet. Glue code may be VB6 or .net but most likely VBA. The best differentiators (from mainstream devs) are around business acumen rather than technical tool choice.

Anyway Dick mentions a few items, here are my thoughts:

Value for work - Bad and getting worse, its getting so only City institutions understand the value of Excel, which is bizarre considering their normal sheep like tendencies. ( I suppose they are flocking round each other).

Respect - Bad and getting worse, for years I was embarrassed to admit I did a lot of work in Excel, as ‘real devs don’t touch Excel - hobbyists only’. Then as Eusprig gathered momentum I got a bit more confident, but I think that quality/error movement has stalled a little now. So back to claiming to be a mainstream dev for me I reckon.

Continuity - Bad and getting worse, I used to coach client staff in what I was doing in Excel/Access/VBA etc. These days they turn their noses up, happy to pick up some SQL or C# but no Excel/VBA thank you. I just don’t see many people rushing into our technologies.

Conclusion - yeah we’re proper fooked. Unless MS are going to wake up to their most valuable asset - MS Office on an MS Windows desktop. By wake up I mean the hand in pocket wake up, not the cheap soundbite one thats been (pointlessly) running (well walking) for as long as I can remember.

I don’t think us devs will be the losers we’ll just move to techs where the opportunities are better. The real losers will be MS as customers move to other platforms that have an apparently better cost/benefit story, but only because they are unaware of much of the benefit of the MS Office platform. [Ignoring for the time being the cost/no benefit fubar known as the 2007 UI shuffle]

The other losers of course will be businesses far and wide that have to wait for their IS departments to implement their grossly over engineered, over priced, over due, big iron monsters, just in time to realise the business requirement has moved on.

The winners are of course the IS departments who gain control, power and loads of low pressure work. If you know you will release straight into retirement (rather than production) there are lots of unpleasant things you can forgo, like testing, and documentation for example.

Is this how you see things?

or are you seeing different trends?

How do you think things will pan out in 3-5 years?

Do you have an escape plan?

Please comment here or on Dicks post

cheers

Simon

First thing

Friday, 18th April, 2008

Whats the very first thing you look at/for when you open a workbook from someone else? (that you trust not to be malicious)

And whats the first thing you look at/for when looking at someone elses code?

For spreadsheets its neatness/layout of whatever opens
too neat = gold plating/time wasting
too scruffy = slack/ little care

(Of course the ‘correct’ level of neatness is the sort of stuff I produce ;-)). I’m thinking use of formatting, use of number formatting, use of space etc.

I’d like to pretend thats its some kind of rational measure (file properties maybe?), but really its just a judgement on the initial visual appeal.

For (VB/VBA) code it is Option Explicit - missing = cowboy everytime. If its a snippet/function then I look to see if parameters variables and return are typed (as in Dim … as …., rather than dim x, y, z)

What about you?
one only for each category.
And is it relative to your own work? or do you think its an absolute measure?
cheers
Simon

Consistency

Wednesday, 9th April, 2008

important or overrated?

I think I am gradually getting more consistent in more things as time goes on and I find ways of doing stuff that I think are the best in the circumstances.

But every project is different and in many I will do a similar operation in different ways. Sometimes because I am searching for a ‘best’ way. Often because I forgot I already solved this in a previous project (even with the nagging deja vu). Sometimes I know I solved it before but can’t find the right project.

I do have tons of library code that finds its way into nearly all my projects, for managing Excel, managing Essbase, menus, common constants, ADO, logging etc.

I am thinking things like working with certain types of list, managing application state etc. Stuff that is not totally general but is in 1 in 3 projects or something. And I mean consistent across projects, not within one.

When I work with other peoples work if I find the same thing solved is many different ways in the same project I would probably start to worry. But if I got 2 projects and one used the app.rows approach and the other used the used range intersection approach it wouldn’t bother me as being inconsistent, would it bother you?

I think some consistency is handy enough, but overall I think it could be a little overrated, especially if we are constantly learning.

What do you think?

how consistent do you think you are (beyond library code stuff)?

cheers

Simon

Slack

Monday, 7th April, 2008

[Not the Yorkshire meaning!]

Dick over on DDOE has recently done a post on investment analysis. His basic premise being that ‘lean’ companies may make better preforming investments.

In his excellent book ‘Slack’, Tom DeMarco almost goes the opposite way.

TDMs view is that these lean companies that have stripped the middle management layer back to the bone have made a huge blunder. His view is that this much maligned middle tier is where all the creativity happens, where great new ways of working are invented, where new products or services are imagined. Having a little slack in the business gives people the space to create.

Its a compelling argument, and the book is well worth the couple of hours it takes to read.

I certainly think it holds true in SW dev (for me at least!) - when I’m under massive pressure I just do what I know works, when I have a bit of time I try and find a better way.

Do you think the middle management layer in orgs is/was important? or just a bunch of fat cats with mid level company cars (and cheap suits)?

And do you think that less pressure or more pressure results in the best quality work?

Have you read Slack? what did you think?

Cheers

Simon

Software developers are patronising

Friday, 4th April, 2008

I just switched on my pc and went and brewed up. It turned itself off - thanks.

I read some software developer guidelines years ago that the default action of any dialog should be to leave the computer as is. Great! that saves idiots from accidentally destroying their computer. But it also means the default action is to ignore the users request. That seems pretty dumb/arrogant to me.

The Apple approach (as I understand it) is to let the user do whatever they want, but make it easy to undo. That seems to make more sense than to make it hard for them ‘for their own good’.

I did try turning off the ‘are you sure you want to delete that file’ warning, as I know I can get it back from the re-cycle bin, but I like the comfort of clicking Yes (without thinking) to the warning so I put it back.

I find that I turn off many of the Excel warnings, as they are covered by undo anyway. Things like ‘are you sure you want to overwrite those cells’ when pasting is turned off (along with all similar warnings) as I know I can either undo or revert to a saved version if things go badly wrong.

Do you agree that some of this stuff is patronising?

Do you turn off the warnings (Excel and elsewhere)?

What do you do with the systems you build for others?

cheers

Simon

Data types

Wednesday, 2nd April, 2008

Bearing in mind that cells in Excel worksheets are effectively variants is there any point in having an integrated programming language that is typed?

Is the whole ‘Option Explicit’ thing wrong headed for a spreadsheet automation language?

The modern trend seems to be towards dynamic typing, would that be a better option?

I’ve always properly typed all variables (and not with that $# nonsense either). But thats maybe a throwback to other types of dev work I have done.

When working with spreadsheet data in code should we worry about the underlying type?

And if so, should we also worry about it in spreadsheet formulas too?

What do you think?

cheers

Simon

Hope yet for 2003 UI

Friday, 28th March, 2008

Charlie sent us this rather ironic link.

Its a story about how the latest revisions to Google docs have reverted back to an Office 2003 drop down menu style. They used to be more like the tab based ribbon. Seems there are lots of useful screen space savings from using drop down menus.

This makes the Google docs v Office ‘battle’ (? too strong?) a bit more exciting, its becoming a battle of Office 2003 ui (Google) v Office 2007 ui. I really hope people switch to Google and justify it on the user friendly ui.

But according to this link Rob sent, that may be a challenge. (security privacy concerns)

I know the effluent UI battle lines are already drawn so lets not go over that, but does anyone here use Google docs regularly as part of work? and if so what sort of things do you do?

cheers

Simon

Getting a range

Wednesday, 26th March, 2008

How do you get a range in code?

If its a marker range (a single cell where I start my code from) I tend to name it at worksheet level then access it via

sheet1.[StartPoint].row/.column/.value etc

If I am looping through cells I use

.cells(r,c).value/.formula etc

I almost never use range(”A” & r) as it has a (part) fixed text cell reference that often ends in tears if someone modifies the sheet.

Bob P was outraged that I used [StartPoint] instead of Range(”StartPoint”), he now thinks I am a total cowboy. What do you think? if you don’t like [], why not? I was going to test the performance but its completely irrelevant as I only access these once.

I wish worksheet level defined names popped up in intellisense as a worksheet property, like public code thats added to a sheet class. This [] approach seems like a reasonable compromise to me. Obviously I’m not going to be wasting time wrapping a cell ref in a property (or variable) just to make intellisense do what I want. (Or should I?)

Whats your preference?

cheers

Simon

10,000 hours part 2

Tuesday, 25th March, 2008

Of course 10,000 hours wisely invested in becoming a spreadsheet guru isn’t going to be much help if you get a problem that would be best solved with a relation database right?

In skiing either you have developed the core skills to ski most terrain or you havent. You don’t get into a heavy powder field and think “bugger I should be snowboarding”. (Well I would actually, being more of a snowboarder these days).

In football you wouldn’t get to a position where you think “Damn I should have done this with a hockey stick”.

With spreadsheets, I have seen many ‘experts’ who can create a mega monster array formulas to solve all sorts of things. Way beyond what I can or would do.

To me any expertise has to include the ability to select the appropriate technology for the task. And potentially the confidence to say “you should do this in Java, for these reasons…I don’t do Java but I can recommend someone”.

Do you think being an expert in only one small area of IT means you really aren’t an expert in IT?

cheers

Simon