asked to do something that is I suppose a little strange. maybe because it's out of the blue and never tried it before.

Essentially take a .txt file and split it up into 4 files. (no criteria on size, readability etc.. etc. ) Just split it up.. give each a tag and allow them to be reordered anyway the user would like. User reorders by tag and then I believe tag is stripped.

I'm only pondering the splitting aspect of the program. I suppose something like a file splitter.. but split by what? by bytes/lines? Apparently as long as it can be split and reordered. Its good. Ideas on an algorithm?

if it's a normal text file, I would cut it by the lines. Count how many lines there are, divide it by 4, and write them into new files. I'd probably add a byte or a line to the end of the file as the tag. The only thing I see as a problem, is if someone types a really long ass line without a newline.... then you would kind of have to go by bytes. In order to avoid that entire mess, you could just do it as byte from the beginning.

if it's a normal text file, I would cut it by the lines. Count how many lines there are, divide it by 4, and write them into new files. I'd probably add a byte or a line to the end of the file as the tag. The only thing I see as a problem, is if someone types a really long ass line without a newline.... then you would kind of have to go by bytes. In order to avoid that entire mess, you could just do it as byte from the beginning.

well I am given the txt file so I can probably implement it correctly by lines. Originally it was done using a word doc because of some formatting issues. Being given the file should make the task easier because I can use static variables. hopefully this doesn't take more than an hour.. hopefully.. =/

This article has been dead for over six months. Start a new discussion instead.