Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: What's the biggest piece of work you've done alone with Perl?

by dragonchild (Archbishop)
on Apr 21, 2003 at 22:26 UTC ( #252142=note: print w/replies, xml ) Need Help??

in reply to What's the biggest piece of work you've done alone with Perl?

While at Motorola, I rebuilt (practically from scratch) a system called BOOST, which was used for 90% of all sub-system, system, and regression testing of the software used in Motorola's CDMA base stations. I inherited this system and it was a mess when I got it. I left it in a very beautiful OO state.

Strategies? Your basic refactoring strategies, I guess.

  • Get everything to run under strict.
  • Identify common code that seems to be repeated and get it to live in one place.
  • Identify bits of business logic that should live together, then make them live together, preferably in some object.
  • Identify bits of application logic that yadda, yadda, yadda.
  • If there's a way to make Perl do your work for you, then be intelligently-lazy. For example, all the messaging was done by having each message be its own class. But, I didn't want to maintain 1000+ messages in three different strains by hand. So, I developed a common data structure that would be inflated by Perl into the classes. (That was over 75% of the code and about 45% of the success.)
  • Build a logging methodology and put it everywhere. Unless you know exactly what went wrong, you'll never make it right.
  • Get the buy-in from your group leader, but ignore anyone higher. All they want to know is that it works, not the cool things you did to get it there.
  • Write migration tools. Part of this effort involved changing the configuration files that the userbase used. Absolutely necessary. However, if I wanted acceptance, I had to make it as painless as possible to migrate.

Mistakes? The biggest mistake anyone can make is to not have a design document, preferably coupled with a requirements document. This isn't an ivory-tower nicety. This is a real-world, in-the-trenches, life-and-death necessity. Spend the 100 hours to make one and you will recoup that 100 hours in the next four weeks. (In case you think I'm exagerrating, ask Elian what he thinks of design documents.)

We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: What's the biggest piece of work you've done alone with Perl?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://252142]
[Happy-the-monk]: LanX&Corion: renting a car might be an option... ~150 but we need to travel early on Tuesday.
[LanX]: early on tuesday (morning)? why?
[LanX]: trains are probably not that bad...
[Happy-the-monk]: LanX: Perl@embedded/IoT workshop on Tuesday Morning.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-03-19 12:50 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.