We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

266

"Looking very different" is a matter of perception. Today's graphics have to look good at totally different screen resolutions than they used to, with the result that a 100x100 image that used to be more than good enough for a logo would now look horribly tacky. It has had to be replaced with a 1000x1000 image of the same thing, which is a factor of 100 ...


109

If you compare Netscape Navigator to a modern browser, there is a massive difference in functionality. Just compare the HTML 3.2 Spec (51 pages when I do a print preview) with the current HTML Spec (PDF version is 1155 pages). That's a 20x increase in size. Netscape Navigator did not have a DOM and did not have CSS! There were no dynamic changes of the ...


79

One reason is that the data packaged within applications are larger because they are of higher resolution and quality. An icon back in the days of Netscape was at most 32x32 pixels, with at most 8 bit depth, (possibly only 4,) while now it is probably something like 64x64 and it is in true color with transparency, meaning 32 bit depth. That's 16 times ...


34

Binary means composed of two pieces or two parts and may refer to different things in different worlds of Mathematical, Computing, Science and Others. But, in Computing, Binary refers to :- Binary file, composed of something other than human-readable text Executable, a type of binary file that contains machine code for the computer to execute Binary code, ...


24

It makes sense to specify the version you require. Behavior you may rely on could have changed, so newer is not always better. First, test whether a new version of a library works for you. Then, update explicitly. In the case of web resources, having the version be part of the filename is important in the context of caching. For static resources like jquery....


23

If changing the sound files for each single grade without modifying the code is the requirement here, I would externalize the configuration (mapping). Create entries in your configuration mechanism (config files or database) which contain the sound file names for each grade. Instead of duplicating the sound files I would rather list the same file name ...


17

It's because it would break every build system like make, maven, gradle, etc. that depends on file modification times to know what needs to be rebuilt. If a git checkout or a git pull pulls in commits that are older than the last executable you built, it would give those files an older timestamp. make therefore won't detect them as an updated dependency, ...


16

In additional to the other ansers, 10 years ago there typically would have been separate versions for localised / internationalised versions. Now it's generally the case that programs will bundle full localisation support into every released version which pads the program size.


15

The performance overhead of writing lots of data to disk isn't the execution speed of your code, but rather the physical limitations of the actual hard drive. Doing it assembly won't give you a noticeable performance increase. Your best bet is to either log less data (recommended, if you're logging that much stuff how useful can it be) or change the drives ...


15

Since you're not talking about booting, your answer is actually that the concept of "executable," or even "files" is rather irrelevant. The concept of files is an OS concept. Without an OS, all you have is a harddrive, with some bits on it. It is the OS that gives structure to that information that makes it meaningful to think of the data as a file. For ...


14

A path from the root of the file system to the file, including the file name, is usually called a full path. If the path doesn't go all the way back to the root, it's a relative path. If it doesn't include the file name, it's a directory path.


13

Store them in source control. The benefits you listed are all very good ones. When you say that doing this will result in a "huge" size, just how huge are you talking? 100's of gigabytes? Terabytes? If storage is really that much of a problem, could you zip the files, store the zip file in source control and then have a script that unzips them when the test ...


13

One reason is dependencies. A program with rich functionality and good looks needs a lot of things done - encryption, spell checking, working with XML and JSON, text editing and lots of other things. Where would they come from? Maybe you roll your own and keep them as small as possible. Most likely you use third party components (MIT licensed open source ...


11

Note: if you stated the purpose of your file container more clearly, describing access patterns, desired platforms, and the problem you're solving in general, the answers might be better. Your description looks awfully similar to a game resource file, a renowned file type. These files are not intended to be updated frequently (if ever), but are optimized ...


11

Theoretically, you could implement a file that would allow this sort of thing. For maximum flexibility, though, you'd need to store a pointer to the next byte along with every byte in the file. Assuming a 64-bit pointer, that would mean that 8 of every 9 bytes of your file would be composed of internal pointers. So it would take 9000 bytes of space to ...


11

It is neither good or bad, and definitely neither a "pattern" nor an "anti-pattern". This is all about what your (non-functional) requirements are. You wrote you want to be able "to change grade 0 to play fairSound.mp3" (or another sound), without changing the code. This looks to me as if it is more or less "by chance" that some grades have the same sound. ...


10

While the graphics/usability are indeed contributing factors, there's an awful lot of it that's library/excess compiled code. Example of how small code CAN still be: MenuetOS, a full 64-bit OS with powerful apps that fits on a single floppy disk. Example of how big code can be for no obvious reason: I did a simple text output "Hello, World!" in Ada ...


8

The word binaries is used as a set of files which are produced after compiling essentially the object code that runs on machines. (and virtual machines/runtimes in case of Java/.NET) While there are other things like JPEG photo, MPEG video, Zip files etc. are also binary in the sense they are not text or ascii files, but word binaries (used in context of ...


8

The ability to scale will depend on the specific usage. If I take your example of lines inserted in a database, the closer model is a log. An application, such as a web server, writes some data to a log. Daily (or once per hour, or any other period of time), the log is rotated, i.e. the application frees the current file and starts writing to another one. ...


8

Because Depth First Traversal Is A Silly Way To Display Files


7

In the linux/unix world, developers and geeks prefer source code to executable binaries so they can compile and tweak them themselves. When an app is free that is awesome. If it is distributed as binary, that is still awesome. When it is distributed as source that is really awesome.


7

Why not call it 'Path'? From Wikipedia: A path, the general form of a filename or of a directory name, specifies a unique location in a file system


7

Most file system limits how many files you can have in a directory, which means you are forced to use subdirs anyway if the amount can grow indefinitely. Beware there is a limit on number of dirs as well (which is usually lower, say 32000 on ext3) If you can calculate the exact path to a file then there is no performance problem reading that file. Listing ...


7

Because we want our computers to do more than just execute one fixed program. Having a stream of opcodes in memory and endlessly stepping through it is fine if you have a single-purpose machine. But on a real computer, you want to achieve things such as have one binary call another and transfer control to it have one binary call another and get control ...


7

If you move the file in Windows Explorer, you still have to git add the new file location and git rm (or git add --all) the old file location. Once those two things are done, git will work out on its own that the new file is mostly identical to the old file, and will automatically display it as a move in commands like git status. The benefit of git mv is ...


7

It's trivially true that software has to be built to fit two things: The users and the available hardware. A program is fit for its purpose if it does what the user wants in a timely manner with the hardware at the user's disposal. Well duh. But as hardware improves in basically all measurable dimensions the number of discrete programs which move from unfit ...


6

I use Mercurial for this. My work is on both Linux and Windows, so I have such small code snippets for both the system. I have created a repository on windows, on which I save all this scripts and then the clone of this on linux. I keep both in sync. Other than the use of DVCS, I also have a single csv text file which works as a key, value pair. The key is ...


6

In the time of clouds and the Internet, I like to use uri. There's even a RFC. The only problem I see with this naming convention is, when you are using a programming language like C#, where Uri is an Object containing an Uri (of course). Then it would be pretty strange to name a String uri. This is why I always use the Uri object if it is available or ...


Only top voted, non community-wiki answers of a minimum length are eligible