Archive for April, 2009

Business benefit of ensuring fit for purpose presentation layer

“What exactly is the business benefit of doing that?”, a cry oft heard.

Well, what exact business benefit is there for not ensuring the presentation layer is ‘fit for purpose’? To build a “web” based application meeting all specific requirements and policies in regards scalability and the like – then ignoring its output “just because” it does what it does and appears on the surface to render as it should …. ?

Folllowing modern techniques, ensuring your presentation layer is split against semantic markup and seperate styling gives the ability to alter the way an applications output looks and feels merely through editing CSS stylesheets in the presentation layer. Business benefit? You don’t have to raise the same level of change requests and prioritise development work to back-end developers nor do you have to ensure you’re within a release schedule several months away – where the focus will be on ensuring business layer upgrades requested by the business take first priority! Nor is there a need to edit deep down in the business layer at what are most likely multiple points to alter inline styling.

A benefical frontend development strategy creating real cost savings

Why? Because, it can be done by front-end developers and can be done in a fast turnaround with next to no cost leaving backend developers prioritising and developing workstreams providing “real” long term business benefit without wasting precious effort and time! User interfaces can be improved/tweaked adhoc providing end-user centric benefits when required without conflicting with underlying business logic or data storage.

For instance, improving end-user input without additional requirements of backend error-checking and processing by simply altering the user interface can pay dividends further downstream! Improved data quality and removing the need to re-key information or use generally poor scrub & match automation delivers on-the-ground business benefits through no cost. The only definite requirement is to ensure alignment of a presentation level release schedule that fits with the programmatic release.

Making certain frontend web industry standards are applied is a forward planning strategy producing real cost and time savings!

  • Share/Bookmark

Photoshop – The memory could not be “written” error

Bizarrely I couldn’t figure out why my version of Photoshop CS3 was playing up and dumping me out with a dialog box proclaiming that memory at some segment couldn’t be referenced and giving me a “The memory could no be ‘written’” error.

Well, it’s definitely not the fact that my profile was stuffed though refreshing it did for a little while give back control of Photoshop. A colleauge pointed out that how he had solved his same issue was to choose a different default printer! Which amazingly does the trick?!

So is it the RICOH Alficio MP C3500 PCL 6 printer, or the fact that it’s on a shared queue? Not entirely sure but not having it as default does the trick!

  • Share/Bookmark

Use Javascript to find which render mode browser is in

When designing pages utilising CSS for their styling and splitting the semantic content away in an attempt to move legacy systems into the dot com era it might be necessary to show why kicking a browser into CSS Compatability mode might be a good idea. Not least that you can position elements as you see fit and can move away finally from table based layouts.

Though how are you physically able to show a change having taken place to management other than through overkill style demo pages or pointing with your finger ..? Using the below code by simply pasting it into the URL address bar and launching by pressing the enter key, you will receive a dialog box detailing which CSS rendering mode you are in.

BackCompat = Backwards Compatibility (quirks mode)
CSS1Compat = Standards Compliance mode.

Quick and simple! This hidden Javascript browser gem and further great insights can be found at quirksmode.org “for all your browser quirks”. A fantastic resource on all things browser based!

  • Share/Bookmark

Interactive BATCH file with DEBUG script

Still sometimes need to use batch files to do stuff even in this day and age? Yes, is the usual answer but, unfortunately many of the standard errorlevel checking tools such as CHOICE etc. have either been removed or cannot be used without administrator access in Enterprise environments.

It’s not always entirely wise either to install compiled errorlevel tools into an Enterprise environment. This will potentially go against an application or network policy or you’re just plain unable to.

The below batch file instead is self-contained outputting a DEBUG script before compiling it and utilising it to check for user input. This it utilises within the demo. Save the text down to a textfile and give it the extension .bat

It is an extension of and use of the following Microsoft support site example - Accepting Keyboard Input in Batch Files. Note that there should be a backslash after %temp% and before the word REPLY which is being stripped out by this parser.

  • Share/Bookmark

Hyperion Essbase -> Excel -> Access -> automagic

Accessing Hyperion Essbase is no problem directly from their MS Excel plugins. Though what happens if one wants to import on-the-fly and put that into MS Access so you can deliver your MI: Management Information, alongside current data without having to analyse and alter Hyperion Essbase output in Excel before exporting to textfile format or CSV before manipulation?

Well, why not try the below code!

The below function run within MS Access will write an “Essbase connection plugin” before instantiating a copy of MS Excel to run Essbase from. Unfortunately if you don’t write out and pull in the textfile to create a module in Excel as is within the code Microsoft’s security permissions now deny access. Give them their due – it was a good move for certain issues.

After the “plugin” is pulled into the MS Excel workbook it fires a connection to Essbase and in this case draws down and partitions the relevant info to worksheets. Note the code will require setting up against whatever Essbase fields you require from your system.

The code as you will see at the bottom will clear down any previous retrieval before using MS Access’  TransferSpreadsheet import functionality to pull in the retreived workbook. The code also requires a table within MS Access to hold your Hyperion Essbase login details. In this case the table is called tbl_essbase_credentials and can be seen within the code. The Excel workbook is cleared down and you are left with your Hyperion Essbase MS Excel retrieval in your MS Access database.

Way to go!

So the process from MS Access is to run function and -> create a module for import into MS Excel -> start a virtual copy of MS Excel -> import the module into the virtual copy of MS Excel -> run virtual module to connect to Hyperion Essbase and download required data -> save MS Excel workbook and transfer the spreadsheet into MS Access -> clean up. All from within MS Access!

  • Share/Bookmark

find – what you’re looking for and more

Using find on the command line as su is a great way to remove spent sessions from your /tmp directory for instance.

find -user theusersname -delete

Will remove all instances of that users files. A great quick way to clean up after a rogue application in development.

  • Share/Bookmark

Change word in all files in directory (+recursively)

These commands will replace all instances of ‘foo’ with ‘bar’ in all files in the current working directory and any sub-directories.

Current Directory:
sed -i s/foo/bar/g *

Recursively:
find * -type f -exec sed -i s/foo/bar/g {} \;

  • Share/Bookmark