In the process of writing a hard disk reader-writer, I referred to the parameters for representing hard disks and partitions in GHOST, which are very concise, such as: 1:2...
However, at the same time, I feel that other parameters in GHOST, such as SRC, DST, CLONE, PDUMP, PRESTORE, SPLIT, etc., are a bit deviating from this spirit..
I saw some programming books (about user interface) introducing that when designing a program, users should not be involved in the internal things of the program, such as read mode (READ), write mode (WRITE), what type, source data (SRC), target data (TARGET), dump (DUMP), restore (RESTORE), etc., because these are the business of programmers. Programmers often involuntarily bring out these things when writing programs, which is not fully considering users. One should use one's brain to design something that is free of program traces and easy to use (user friendly)...
Of course, there should also be a simple convention (for example, 1, 2 represent hard disks, 1:2 represents a partition of a hard disk....)
Just now, I was thinking about what parameter mode to adopt for the mini hard disk reader-writer I just wrote?
To achieve both conciseness and rich functions (of course, just for the functions contained in my program..)
The initial design of the following parameter mode is for reference..
Except for TO, there is no programmer's term seen...
1
Program 1 TO 2
Naturally, it is to copy hard disk 1 to hard disk 2. There is no need for source hard disk and target hard disk. Naturally, the left is the source and the right is the target, which conforms to the thinking habit of most people. Even without TO, it is also possible... Of course, with TO, the thinking is clearer
4 (multiple hard disks)
Program 1, 2 TO 3
5 (adding partition function)
Program 1:2 TO 2:3
Copy partition 2 of hard disk 1 to partition 3 of hard disk 2
6 (support drive letters)
Program E: TO 2:3
7
Program C: TO G:
Support image files
8
Program 1 TO (1)
Load hard disk 1 into image file 1
9
Program 1 TO (1=C)
Load hard disk 1 into image file 1, compress, default level
10
Program 1 TO (1=C9)
Load hard disk 1 into image file 1, compress, level 9
11
Program 1 TO (1=C9=K)
Load hard disk 1 into image file 1, compress, level 9, encrypt
12
Program 1 TO (1=C9=K=V)
Load hard disk 1 into image file 1, compress, level 9, encrypt, default volume (1000MB)
12
Program 1 TO (1=C9=K=V1500)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB)
12
Program 1 TO (1=C9=K=V1500=E)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB), each volume should be encrypted (with the same password as the first file)
12
Program 1 TO (1=C9=K=V1500=E?)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB), each volume should be encrypted (each file should prompt the user to enter a different password)
13 (restore according to image file)
Program (1) TO 1
Restore image file 1 to hard disk 1, automatically check whether it is compressed, but do not automatically check whether there are volumes
14 (restore according to image file)
Program (1=V) TO 1
Restore image file 1 to hard disk 1, automatically check whether it is compressed,
Automatically check volumes. If not, prompt the user to enter the volume name (if the user renamed it later)
If you need to enrich functions:
Comprehensive:
Program 1:2, 2:3, 3:4 TO 3:2, (G:\BACK.Z=C9=K=V1500=E?)
If you need to specify the sector position and specify the number of sectors to operate:
(- means the starting sector position to operate
+ means the total number of sectors to operate)
1
Program 1-100+1000 TO 2
Copy 1000 sectors from sector 100 of hard disk 1 to sector 0 of the hard disk
2
Program 1-100+1000 TO 2-200
3
Program 1:2-100+1000 TO 2:3-300
4
Program 1:2+1000, E:-300 TO G:-200, 2:4-500
5
Program 1:2+1000, E:-300 TO G:-200, (H:\BACK.Z=C9=K=V500=E?)+1000, 2:4-500
Load 1000 sectors of partition 2 of hard disk 1 and 300th sector of E: drive into sector 200 of G: drive (all remaining sectors) and file H:\BACK.Z (1000 sectors, referring to uncompressed) and 500th sector of partition 4 of hard disk 2....
My mini hard disk reader-writer will try to adopt this parameter mode....
[ Last edited by GOTOmsdos on 2006-8-19 at 21:46 ]
However, at the same time, I feel that other parameters in GHOST, such as SRC, DST, CLONE, PDUMP, PRESTORE, SPLIT, etc., are a bit deviating from this spirit..
I saw some programming books (about user interface) introducing that when designing a program, users should not be involved in the internal things of the program, such as read mode (READ), write mode (WRITE), what type, source data (SRC), target data (TARGET), dump (DUMP), restore (RESTORE), etc., because these are the business of programmers. Programmers often involuntarily bring out these things when writing programs, which is not fully considering users. One should use one's brain to design something that is free of program traces and easy to use (user friendly)...
Of course, there should also be a simple convention (for example, 1, 2 represent hard disks, 1:2 represents a partition of a hard disk....)
Just now, I was thinking about what parameter mode to adopt for the mini hard disk reader-writer I just wrote?
To achieve both conciseness and rich functions (of course, just for the functions contained in my program..)
The initial design of the following parameter mode is for reference..
Except for TO, there is no programmer's term seen...
1
Program 1 TO 2
Naturally, it is to copy hard disk 1 to hard disk 2. There is no need for source hard disk and target hard disk. Naturally, the left is the source and the right is the target, which conforms to the thinking habit of most people. Even without TO, it is also possible... Of course, with TO, the thinking is clearer
4 (multiple hard disks)
Program 1, 2 TO 3
5 (adding partition function)
Program 1:2 TO 2:3
Copy partition 2 of hard disk 1 to partition 3 of hard disk 2
6 (support drive letters)
Program E: TO 2:3
7
Program C: TO G:
Support image files
8
Program 1 TO (1)
Load hard disk 1 into image file 1
9
Program 1 TO (1=C)
Load hard disk 1 into image file 1, compress, default level
10
Program 1 TO (1=C9)
Load hard disk 1 into image file 1, compress, level 9
11
Program 1 TO (1=C9=K)
Load hard disk 1 into image file 1, compress, level 9, encrypt
12
Program 1 TO (1=C9=K=V)
Load hard disk 1 into image file 1, compress, level 9, encrypt, default volume (1000MB)
12
Program 1 TO (1=C9=K=V1500)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB)
12
Program 1 TO (1=C9=K=V1500=E)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB), each volume should be encrypted (with the same password as the first file)
12
Program 1 TO (1=C9=K=V1500=E?)
Load hard disk 1 into image file 1, compress, level 9, encrypt, volume (1500MB), each volume should be encrypted (each file should prompt the user to enter a different password)
13 (restore according to image file)
Program (1) TO 1
Restore image file 1 to hard disk 1, automatically check whether it is compressed, but do not automatically check whether there are volumes
14 (restore according to image file)
Program (1=V) TO 1
Restore image file 1 to hard disk 1, automatically check whether it is compressed,
Automatically check volumes. If not, prompt the user to enter the volume name (if the user renamed it later)
If you need to enrich functions:
Comprehensive:
Program 1:2, 2:3, 3:4 TO 3:2, (G:\BACK.Z=C9=K=V1500=E?)
If you need to specify the sector position and specify the number of sectors to operate:
(- means the starting sector position to operate
+ means the total number of sectors to operate)
1
Program 1-100+1000 TO 2
Copy 1000 sectors from sector 100 of hard disk 1 to sector 0 of the hard disk
2
Program 1-100+1000 TO 2-200
3
Program 1:2-100+1000 TO 2:3-300
4
Program 1:2+1000, E:-300 TO G:-200, 2:4-500
5
Program 1:2+1000, E:-300 TO G:-200, (H:\BACK.Z=C9=K=V500=E?)+1000, 2:4-500
Load 1000 sectors of partition 2 of hard disk 1 and 300th sector of E: drive into sector 200 of G: drive (all remaining sectors) and file H:\BACK.Z (1000 sectors, referring to uncompressed) and 500th sector of partition 4 of hard disk 2....
My mini hard disk reader-writer will try to adopt this parameter mode....
[ Last edited by GOTOmsdos on 2006-8-19 at 21:46 ]



