Questions tagged [files]

62 questions
191
votes
15 answers

Why are the sizes of programs so large?

If we look at the vintage program Netscape Navigator or an early version of Microsoft Word, those programs were less than 50 MB in size. Now when I install google chrome it is 200 MB and desktop version of Slack is 300 MB. I read about some rule…
Niklas Rosencrantz
  • 8,008
  • 17
  • 56
  • 95
43
votes
3 answers

What are binaries?

I see very often people using term binaries in different context. What are binaries? Collection on binary files, installation files, .dll files or what? Or is it just an general term for some collection of files on disk?
jrara
  • 595
  • 1
  • 5
  • 5
24
votes
1 answer

What is the name for the non-extension part of a filename?

Given the file path: /some/path/abc.txt The filename is "abc.txt", and extension is "txt". What is the "industry standard", unambiguous name for the "abc" part? For reference, in both java's older java.io and newer java.nio libraries, filename…
Bohemian
  • 1,956
  • 2
  • 17
  • 24
16
votes
2 answers

Version number as a part of a file name

I see that some software have the version number included as a part of their file name, while others do not. I am more used to the latter type, and I think that is more popular, but I see the former type sometimes in javascript libraries. For…
sawa
  • 444
  • 3
  • 11
14
votes
2 answers

Why doesn't Git set the file time?

Git by default does not set the file-time accordingly when the files are synced with the origin. It just ignores the file-time of the pushed files. Doesn't it make sense for the file's modification date to be set to the value of the last commit…
David Refoua
  • 1,101
  • 1
  • 10
  • 16
13
votes
7 answers

Why can we not insert into files without the additional writes? (I neither mean append, nor over-write)

This occurs as a programming language independent problem to me. I have a file with the content aaabddd When I want to insert C behind b then my code needs to rewrite ddd to get aaabCddd Why can I not just insert C at this position? I can not do…
11
votes
3 answers

Should I store test files in source control?

I have a number of (large) test files that need to be maintained. This means access to their history is a requirement. Benefits Any new developers get the entire test suite with just a git pull. The history of the files is backed up. The files…
sdasdadas
  • 511
  • 1
  • 3
  • 12
7
votes
5 answers

What is the optimal algorithm for estimating number of lines of text in a file?

Given a file > 5Gb, simply with lines like Apache's access.log. I need to get number of lines. Any constructions like file(filename).read().counter('\n') would read all of the file and it would take a very long time. On the other hand,…
rezeptor
  • 87
  • 1
  • 1
  • 2
6
votes
6 answers

Is duplicating files to avoid programming branching a good or anti pattern?

for example, suppose I need to play different sounds according to "grade": file list: fairSound.mp3 goodSound.mp3 excellentSound.mp3 code: showResult(grade){ if(grade==0 || grade==1){ SoundUtility.play(fairSound); }else if(grade==2 ||…
ocomfd
  • 5,652
  • 8
  • 29
  • 37
6
votes
1 answer

Optimizing a file type for compare tools

Context: I am developing a visual studio plugin that generates layer diagrams. I want the tool to be able to produce an intermediate output, which is the data representation of what is being rendered in the diagram. The idea is that this serialized…
David
  • 163
  • 5
5
votes
2 answers

Move Files Using Git mv Or Use File System Instead

I am wondering what the difference in Git would be if I used the mv command versus moving it in Windows explorer. From Perforce I know it's important because the version system keep track of the file origin. I am wondering if this is just as…
Serguei Fedorov
  • 191
  • 1
  • 2
  • 7
5
votes
5 answers

How are new file formats constructed?

I've used a software suite that is installed in offices and on remote vessels. The installations communicate back and forth, and they do that by using a simple proprietary file format that looks something like…
5
votes
3 answers

How do programs like subversion detect when a file has been edited as opposed to created/deleted?

This is my first question here so I hope it is not off topic. Although I am using the Linux inotify library to listen for changes to files, and I compare use of that against the Subversion program, I am specifically looking for the algorithm…
puk
  • 151
  • 5
5
votes
4 answers

Randomly Accessing Data Packets in a Compressed File

In my line of work I deal with very large files, hundreds of Gigabytes in size. The nature of the data in these files is such that compression would greatly reduce their size. The problem is, the records/data packets within the file must be…
Robert Harvey
  • 198,589
  • 55
  • 464
  • 673
4
votes
4 answers

Why do disks write data in chunks of page size?

In my understanding, even if i want to overwrite a byte in middle of a file, OS and/or disk will read the content of the size of page, modify one byte and then write the contents back. What is the fundamental reason that disks are designed this way…
Ashish Negi
  • 251
  • 2
  • 8
1
2 3 4 5