Bog Roll :: perl

It's Not Magic, It's Work!

18 Sep 2008

SAP Interfacing

This week I've been on a SAP training course at their Heathrow facility near London. It's an okay commute for a few days but I'm glad I don't go that far every day.

The course is interesting enough, it's SAP old and obsolete IDOC/ALE technology, which we'll probably be using on our antique SAP system for some time to come, so it's not a total waste of time.

It's useful stuff but I could have done with it 12-18 months ago...


07 Aug 2008

Find Duplicate Files

Yesterday I thought I'd add a delete and hard link option to my fdf application. It's not ready for public release yet but it has turned out to be a relatively easy feature to add and it also appears to be quite robust too. It's not suitable for non-UNIX like systems like Microsoft Windows which are just too primitive, but on any modern UNIX or Linux system it works perfectly well.

I also took the opportunity to switch the code base from a CVS to SVN code repository. I was surprised to see that it's also two years since I released the last version.


05 Aug 2008

Insanity

I don't know if I should be proud, but one of the R&D engineers though I was a twisted **** for my plan to get SAP to talk to a Fluka Metron electrical test device and one of our pumps. I've done all the mock-ups and now that the Perl and Ksh pieces work reliably, it's time to start the SAP integration piece.


31 Jul 2008

SAP...!

This week I've been doing some hideous programming, one process involves SAP ABAP, Ksh scripting on AIX, cURL/HTTP and Perl/XML on a Linux box. It's all horribly convoluted and unnecessarily complex but or antique SAP system doesn't speak XML, so it's the only way to get the job done.

Today I've been banging my head against a brick wall trying to find an ABAP function to change a single text description field in an inspection lot. All I've run up against is obscure functions with no documentation and cryptic comments in German.

SAP ABAP development may pay the rent but there are some days I don't like it all that much...


01 Jul 2008

XML::RSS::Tools 0.31

A new version swooshed up-to PAUSE last night and is appearing on CPAN today. It fixes a small bug in the 0.30 version that went up the night before. I'm still getting some FAIL data from some testers but that looks like a subtle bug in Test::More that I've not seen on any of my test systems, so that could be hard to fix.


26 Jun 2008

XML::RSS::Tools

This week I've been working on XML::RSS::Tools. It's mostly a test/build fix, no real new features are being added.

Now that Perl has evolved to version 5.10, the 5.8.x branch is now legacy and the 5.6.x branch is "antique". While I don't want to deliberately exclude people trapped on older versions of Perl it is getting hard to work and test on them. This release may contain a warning that 5.6 isn't officially supported anymore because of the complex dependencies that exist.


11 Jun 2008

In Between The Meetings...

In between the meetings I do actually do "actual work". This week I've been doing some very tedious but important asset revaluation stuff and some SAP Scripts. It's all very boring and not at all fulfilling.

Next week I'll start some Perl/SAP integration work, which could be much more interesting. The only pain will be it's going to have to work on a Windows platform, which is always a pain, but at least it will be more challenging than SAP Script.


02 Apr 2008

XML::RSS::Tools

A long time ago I wrote XML::RSS::Tools to solve a problem I faced. I no longer have the problem so the Perl module is now rather unloved. Interestingly the search terms: "RSS"; "XSL" and "XSLT" are the most popular terms for this server. I don't know who if anyone actually uses my code but people's search terms suggest some people have the same problem I once had.


11 Jul 2007

Perl Introduction Talk

Yesterday I gave my Perl Introduction talk to the new Thames Valley PM. It was a bit of a preaching to the converted talk but even so it was useful to the non-Perl users and even the Perl users picked up something useful I hope.

I realised that things have moved on since I wrote it last year, so before I give the talk again (Surrey LUG have asked for it) I'll add a few extra slides.


12 Jun 2007

Bugs...

This week I've figured out a subtle bug with IO::Capture::Stderr which causes some of my tests to fail on Perl 5.6 platforms. I've contacted the author but had no response yet.

Today an ABAP report I wrote at work failed a test. There is an ever so subtle bug in the code which has actually shown up a much greater logic flaw in the report[1]. I can easily fix the bug and make the program pass the tests but it won't be logically correct and I could easily make it fail horribly - though it will probably pass the actual tests. I have to tell the requester I can fix it but to do it properly will take a re-write of a key component, which will mean a delay of at least a few days - made worse because of a code freeze in the only systems I can run the tests in...

  1. Incorrect assumptions strike again...

16 Apr 2007

Python

I keep thinking I should try to learn another programming language. I taught myself Pascal, Shell and Perl a long time ago, and have been very happy with Perl in particular. At work I use ABAP (COBOL+SQL), and I keep trying and failing to learn Java.

Python is supposed to be a good language to learn as is Ruby, both have been influenced by Perl and in turn have influenced Perl 6. They can't be any worse than ABAP or Java...


14 Apr 2007

Pedesagittry II

Apparently in the French edition of PBP this phrase comes out as "fusillade auto-podale".


12 Apr 2007

Pedesagittry

Someone noticed this word this week in PBP by Damian Conway. Some digging suggests it may mean "To shoot oneself in the foot", from the Latin: pedes viator = a traveller on foot and sagittarius = a kind of archer.

Interestingly I've done quite a bit of that this week in both Perl and ABAP... I could do with arrow-proof footwear now.


04 Apr 2007

Old ABAP...

Today I spent most of the day tinkering with a scratch ABAP program. We have an old 2.3k line report that doesn't do quite what we want. It turns out that the info-sets that it reads it's data from have been borked so the report doesn't give a true picture of the business...

My scratch program is currently just under 200 lines of code and seems to get all the right numbers is about as quick. Once I've added some optimisation and extra rigour it should provide the correct results which the original doesn't, run faster and give a prettier result. Best of all there will be a chance that it will be maintainable too - being much simpler.

ABAP coding isn't as much fun a Perl coding but it's better than a poke in the eye with a sharp stick, plus it pays the rent.


07 Mar 2007

Old Code...

This week I've been working on an old SAP R/3 ABAP script at work. The original script is quite old, being written over 5 years ago - before our current SAP system was deployed - and it's not very idiomatic.

The changes required removing several functions of the report, fixing some features that didn't work properly and adding some new functions. Most of the time I've spent refactoring the code to make it shorter, simpler and cleaner. Only when I figured out what the spaghetti was supposed to do have I been able to extend the report as requested.

It's fun to do for a few days but I don't like wading through old messy code forever, I'll be happy to do something new next week. As Ovid recently said: you know when you are coding too much when you are embarrassed about having old legacy code visible on your computer to the contradictory gender...