Wikipedia:Reference desk/Archives/Computing/2015 September 27

From Wikipedia, the free encyclopedia
Computing desk
< September 26 << Aug | September | Oct >> September 28 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


September 27[edit]

Syntax find -printf "%C@ %p\n" | sort[edit]

Can someone explain the syntax in the middle of the expression find -printf "%C@ %p\n"|sort? --Bickeyboard (talk) 16:41, 27 September 2015 (UTC)[reply]

find's printf option supports a format string (similar to the normal printf format string, but with find-specific meanings for the format directives). According to the find manual page, %C prints the file's "last status change time", with the the @ argument to that meaning to specify the format "seconds since Jan. 1, 1970, 00:00 GMT, with fractional part"; and %p is just the filename. -- Finlay McWalterTalk 16:48, 27 September 2015 (UTC)[reply]
and the "\n" tells find to emit a newline character for each entry it prints - without that, all the numbers and names smush together into a giant single line. And as sort works by line, it wants those newlines. -- Finlay McWalterTalk 17:08, 27 September 2015 (UTC)[reply]

why do I have to see for 3 minutes a loading page in my Playstation 3,[edit]

if this game has taken 55 Minutes for the installation? I remember the times with Windows 2000 where was also needed 60 minutes for a regular installation - but the game was working without any loading time - and some games were even working without the disc. Why can´t the ps3 also work without the disc if it writes 12 GB data to the HDD? --ZinssätzigeTargobank (talk) 19:52, 27 September 2015 (UTC)[reply]

Requirements for discs to play may be related to copy protection, just as they are in the PC. Also, a Bluray can fit 25GB, or 50GB if it's dual layer, so 12GB could easily not be the complete game. Even more so if there is some compression on the Bluray. It may seem a little odd to write so much to the disk, but it's possible all 3D and engine game assets are written to the disk, but prerendered cutscenes (i.e. videos) are not under the assumption loading them from Bluray is only going to cause a small number of second loading just before these are played at worse, and since the play can't control they may be less concerned, compared to if they need to load the rest. Nil Einne (talk) 20:43, 27 September 2015 (UTC)[reply]
I interpret this question as a specific case of a more general inquiry: why do simple tasks run slowly on fast hardware? The question implies that a PS3 should do simple tasks at a faster rate than a personal computer from fifteen years ago. By the numbers, the PS3 is actually quite powerful; but don't let the clock-speed fool you: that is part of the megahertz myth; and even more to the point, it assumes an efficient software implementation that actually uses the fast hardware to do work quickly.
It does not matter how weak or powerful your hardware is; how old or new the software is; how large or small the resources are. Now that machines can execute billions of instructions per second, an inefficient software implementation can waste billions of cycles at rates that our technical forebears could only dream about. If the designers and engineers who created the software have not emphasized user-experience, and prioritized fast response times, the machine may spin for a long time doing work. Sometimes, that work is important to the software's purpose; sometimes, it is not.
It is a common software anti-pattern for a programmer or hardware designer to emplace delays inside loops. More commonly, one designer with good intentions emplaces a single delay inside a simplex operation; a second designer, who cannot see inside the software or hardware implementation of the operation, then iterates over that operation (inadvertently multiplying the delay by n iterations). There might be a good reason, or not, for that delay... In my experience, a very great deal of the user-perceivable latency on our machines today ultimately stems from the liberal application of this anti-pattern at some layer of the software- or firmware- or hardware- stack. Our machines - and their I/O peripherals - today clock at billions of cycles per second - so if you see a machine taking 180 seconds to do anything, there is a good chance that whatever it is doing, it's doing it inefficiently, and waiting between work. This kind of methodology is often used to sloppily avoid problems related to thread synchronization, I/O latency (particularly when communication with a peripheral occurs at other-than-the-clock-rate, i.e. a clock domain crossing), and sometimes because of poor-quality copy and paste programming. It is rarely the optimal solution to a synchronization problem, but it is often the easiest to write on a tight schedule.
Another item to emphasize: a PS3 is not doing the same work as your PC; it's not fair to compare load times of Game A on Hardware X against Game B on Hardware Y. They're totally different workloads! We can't know what work is happening when the "loading" message is on screen. Perhaps - giving the designers the benefit of the doubt - the computer is calculating some incredibly sophisticated long-running algorithm to generate content, uncompress stored data, or perhaps it is communicating with slow network resources. This type of work might truthfully require hundreds of seconds to complete.
A handful of other possible explanations might exist for these long "loading time" experiences; we really can't know what is taking so long without performing elaborate software profiling. On a consumer entertainment product like a PlayStation, this task is not generally accessible to end-users: you must rely on the hardware- and software- engineers to do their job well, and you must accept their work, whatever quality they deliver.
Nimur (talk) 23:18, 27 September 2015 (UTC)[reply]
  • To add a bit to Nimur's very extensive reply: when limited RAM and processor cycles were available, programmers had to work very extensively to optimize the software to get as much as possible out of the hardware – otherwise, the program simply wouldn't run in a sensible length of time! As computers got more powerful, this became less important (outside specialized fields like scientific software and 3D rendering tools) and developers could get away with doing something a bit inefficient: this is one type of software bloat. Some engineers get incredibly snooty about this, but to be fair, the programmers are working to tight schedules and usually in very large groups. If you're shipping in two weeks, and suddenly a terrible bug appears, simply fixing it is far more important than streamlining your code. As an aside, game developers do tend to put a lot of effort into reducing loading times – just compare Sonic 2006 with any game from that year. The game lost half its developers and was rushed for a Christmas release, so quality assurance was largely ignored. The result is a game with infamously long loading times; one person who videoed themselves playing the game calculated that 11.88% of the video (in other words, 2 and a half hours of a 20 hour play time) was loading screens. Smurrayinchester 10:00, 28 September 2015 (UTC)[reply]

It is sad that there was no warning message on the ps3 Box, that I need to spend every time I buy a new game 1 hour of my life to install something I don´t even know what is getting installed to, and this suck. And the Ps4 is not better. Also time for installation is getting lost and no warning message. If I had knew this with the installation I had never bought a ps3 to be honest. --ZinssätzigeTargobank (talk) 19:26, 28 September 2015 (UTC)[reply]

Just to correct you, the PS4 is a lot better. It will play games after only part of them has been installed (how much needs to install differs for each title, and goes back to the above code optimisation problem). - X201 (talk) 16:07, 29 September 2015 (UTC)[reply]
This is not limited to Playstation devices. All devices have installation and loading times, even mobile phones that have no disc at all. Nothing is instant. Mingmingla (talk) 15:58, 29 September 2015 (UTC)[reply]