Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Thoughts on designing a file format.

by adamc00 (Initiate)
on Sep 13, 2005 at 05:32 UTC ( #491478=note: print w/replies, xml ) Need Help??


in reply to Thoughts on designing a file format.

We also work on this sort of stuff a lot, here are some additional thoughts.

We dropped the requirement for a footer row in favour of an MD5 checksum since it is a better indication of file corruption than a footer count. Once you have an MD5 there's really no need for the count.

>Data records should be easily identified
> Each record type in the file should be easily identified
> from the others. Using the first field as an indicator > works well."

If you used fixed length records (and therefore fields) save yourself some heartache and make sure that all the record indicators are the same length. Yep, we've seen it done otherwise. When done this way a simple chunk off the front of the record tells you what to expect, gymnastics are required otherwise.

Also leave plenty of space, because at some point there might be variations on record types that are acceptable and a sub version can be handy.

A final anecdote. Dates, how might I **** thee, let me count the ways.

We were involved in rescuing 3 months of data that had been entered where on one of the workstations, and I quote... "Sometimes, on this one, the dates don't work. When that happens we just swap the day and month and it's OK.". Fan*******tastic.

  • Comment on Re: Thoughts on designing a file format.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://491478]
help
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-01-31 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?