Excel-Lite: Hey coder! This spreadsheet's for you!

Excel-Lite (XLL) has all the calculating power of regular Excel, but without the bloat, the baggage, the bulge, the.. the.. obligatory overheads, the albatrossicle accoutrements, the embarrasing encumbrances, the chaff.

For generating SQL statements, or HTML, or any sort of code, for manipulating raw data, you can't go past XLL.

There is no limit to the number of rows or columns you can use. No limit to the number of sheets.

XLL does not reformat your data. It won't drop the '0' from the front of a number. It won't alter the format of a field that happens to resemble a date. Currency symbols don't confuse it.

It has excellent support for Regular Expressions. Plus a genuinely comprehensive 'reveal-codes' mode to help you get to grips with your data.

Okay, there's no ability to set text colours or bold or italics or varying fonts or font-sizes, and there are no charting capabilities and even no printing (without plug-ins). But those features are outside the intended use of the product. The trade-off is a fast, versatile, bloat-free application, targeted at programmers and information-workers.

It's quick to load. And damn quick at performing calculations. It takes up about 100k of memory (excluding spreadsheets) and has a versatile undo/redo capability that appears to be unlimited.

Files are internally represented (and stored) as XML. Hence spreadsheet searches can be performed with XPath!

(continues...)

You can load data from most any format ever devised (Yes, VisiCalc too!). And there are plug-ins that allow you to define new custom input formats, too. (What else would you expect?)

You don't have to import from files either -- you can import from webservices, databases, ftp, smtp, streams ... you name it! Files can only be saved as XML (or compressed XML). But the package includes a wealth of XSL-templates, so you can transform your XML output for presentation, or into other formats, if you wish.

Keystroke Macros can be easily recorded, stored, edited or replayed. For more serious functionality extensions, you can write a plug-in in any .net language -- just implement the iXLLPlugIn interface.

There's already a vast wealth of plug-ins available for anything you might want to perform. Plug-ins exist for database access (it can act as a replacement for SQL query analyzer!), for manipulating XML in any way imaginable, for authoring XSLT, CSS, batch files, circuit design, statistical analysis, timetabling, reporting, scheduling, and more fractal-toolkits than you could ever know what to do with. There are some quite impressive plug-ins for integrating with numerous applications, such as Biztalk, Infopath, MS-CRM, Sharepoint and even that lame-elephant, SAP.

Only one real problem. Excel-Lite is not a Microsoft product. In fact, no-one has written it yet. It's just a figment of my imagination, dreamt up a few days ago thanks to a post by Dave Burke. But hopefully, i'll have my hands on it one day not too soooon.

Ahhh... dreaming of software...

as seen on the daily grind
 

I am not worthy

Some of the people who read this blog are amongst the cleverest, most productive and influential programmers and technical authors in the world. This, despite the fact that I am an utter fool, obsessed with toilet humour and cheap satire. I am utterly bewildered at how fortunate I am to have the ear of such industry legends as Kathleen Dollard, Julia Lerman and Mike Gunderloy, amongst others.

I was so blown away, just now when I found a comment from Kathleen Dollard that I burnt the meal I was half-way through cooking. The long suffering Mrs. Secret Geek was less than impressed, but ultimately sympathetic.

Kathleen, in case you don't know, is the author of 'Code Generation in Microsoft .NET', a topic which I am right behind, even though I confess to not having seen the book personally. On her site she uses a lord of the rings metaphor to explain the importance of Code Generation:

"...line by line code creation [is] the Ring of Doom we've all been dragging around. In spite of all our brilliant technological advances, we still write code the same way we did 20 years ago - line by line in an editor. The ring is our blindness to recognizing this legacy because we can't see past the need get that next line of code written."

I couldn't agree more. As my boss, Bill Murphy, always says:

'you simply cannot be profitable in this business unless you can automatically generate the basic maintenance programs that we find ourselves writing again and again, year after year.'

The company I work for spends a lot of time getting code generation right. It can be a frustrating purpose, writing or fixing templates when you'd rather be writing or fixing code. But the economics are a no-brainer.

Here's to code generation!

 

Riddle me this, batman.

sql,

Why do database designers deliberately create one-to-one relationships?

e.g. You can have a table with 50 columns, or you can have two tables with a one to one relationship, having 25 columns in one and 25 columns in the next (the foreign key acting as a primary key). Maybe the first column is called "Contact_Details" and the next table "Contact_Details_Extended"

What's the big advantage? Something tells me Frans Bouma might have an opinion on this. Anyone? Bueller? Bueller?

Any ideas? Leave a comment, or mail me.

 

Stupid Code To The Rescue!

A big dose of .NetFrustration this morning.

When you upgrade an assembly from version 1.0 to version 1.1 you are likely to get a lot of squiggley blue lines and warnings such as:

OR:

OR worse yet:

Google turned up blank, MSDN turned up blank, but I finally got rid of the warnings, by writing stupid code.

(Read on for some dodgy solutions and some stern lectures. :+))

For example:

Rather than:

I would write:

And voila! it works just fine.

The next failed piece of upgraded code was this

In this case you need to add two more parameters, an 'XMLResolver' and an 'evidence' param. This worked:

Evil Moral of the story is:

If a parameter is required, but you don't know why, just set it to 'nothing.'

That's not the sort of lesson I'd like to teach people. But it's what Microsoft taught me today.

Third situation was a bit trickier and called for an even nastier hack.

This worked in version 1.0, but threw a warning in 1.1:

The warning was a familiar one:

My first thought was: 'add a new parameter, value of nothing'. But this failed because the compiler couldn't resolve which overloaded interface I was after. The result of such an approach was:

i.e., 'Sure you want nothing -- but what type of nothing??' Fair cop, so I tried this instead:

Now there were no warnings and it did compile. But did it work? Who cares? Because right then i thought of a cleverer and nastier solution, that would be bound to confuse other developers. Naturally, I gravitated toward it immediately:

I didn't test that it worked, because 'hey, it should, right?'

At that moment, another, nastier solution occurred to me. I call this one: "What type of 'nothing'? **This** type of nothing!"

No time to test it, but the compiler doesn't freak, so my money says she works.

And now I can get on with writing other, better, faster bugs.

As an old friend said to me just yesterday: "One man's bug is another man's paycheck."

 

How to match a string value to its equivalent Enum value.

Updated! How to retrieve an Enum member given its name

To retrieve an Enum member given its name, use the Parse method of the Enum class, and cast the result to your Enum type:


MyEnumVal = CType(System.Enum.Parse(GetType(MyEnum), "gamma"), MyEnum)
Debug.WriteLine(MyEnumVal.ToString()) ' The output is "gamma"

Previous code:

To retrieve an Enum member given its name, use the ConvertFrom() method of the TypeConverter class and cast the result to your Enum type:

MyEnumVal = CType(TypeDescriptor.GetConverter(MyEnumVal).ConvertFrom("gamma"), MyEnum)
Debug.WriteLine(MyEnumVal.ToString()) ' The output is "gamma"

 

the unbearable lightness of being Delpino

A little bit of philosophy from Brisbane band Delpino.

(end of comment)

(nothing to see here)

 

Things I miss about London

  • leaves falling from trees
  • big coats and bitter cold
  • europe on your doorstep
  • crooked narrow streets
  • depressed shop assistants
  • people like roger, dinesh, anthony wong, liffey and scott
  • a swift-half after work that accidentally runs into the closing-time bell
  • belgian beer, belgian chocolate
  • italy just a stone's throw away
  • every alley wafts of piss
  • the tube. i even miss the frigging tube.

end of comment

(nothing to see here)

 

AspCompat='True'

Just a reminder. If you're writing an ASP.net page that invokes a RCW (runtime callable wrapper) to a COM component... you may need to include the attribute 'ASPCompat=True' in your page directive.

In particular, if you have this situation:

then it may be because ASP uses a STA (single-threaded-apartment) threading model, which the COM component may rely upon when returning calls.

The way to get the component to behave in ASP.net is to include that attribute, 'ASPCompat=True' in the calling page's page directive.

You already knew that right?

Well, should you accidentally forget... the chances of working it out on your own are very slim indeed, even with Google's help.

(end of comment)

nothing to see here... just move along

 

Royo on TV?

is it just me, or does Roy Oshergrove look like that guy off "Alias" whom Jennifer Garner is secretly in love with?

the guy off alias roy oshergrove

Come to think of it, there's someone else they *both* look like...

the guy off alias roy oshergrove royo?

(It's traditional to now say something like 'oh thats roy on the right, by the way.' But you know by now that I never indulge in such cliched humour. [100% sarcasm])

(end of comment)

nothing to see hear... comment if you want...