Wikipedia:Reference desk/Archives/Computing/2011 September 6

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< September 5 << Aug | September | Oct >> September 7 >
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 6[edit]

Reordering the context menu[edit]

A lot of programs I have installed add items to the right-click context menu in Windows 7. Is there a (preferably easy) way to rearrange such items? For example, I'd like all my on-demand scanners grouped together, not separated by WinRAR commands. I'm comfortable mucking in the registry if I really have to go that route, but I was hoping for more a software alternative. Any ideas? Thanks a bunch, (talk) 04:13, 6 September 2011 (UTC)

You can get tools from LopeSoft[1] (see e.g. CNet) or NirSoft[2][3]. It's not clear if they support Windows 7. If you want to poke around in the Registry this link may help. I'm using XP, and as far as I can see, entries are arranged in the context menu according to the alphabetical order of the registry key - maybe you could rename the keys to reorder them, but please backup your registry first. --Colapeninsula (talk) 13:36, 6 September 2011 (UTC)

Firefox 6 freezes[edit]

Is it just me, or has firefox 6 been freezing a lot lately? I've been updating it regularly and clearing the cache and cookies when need be but for some reason it tends to freeze often for the past week or so. --Thebackofmymind (talk) 06:38, 6 September 2011 (UTC)

I've had no problems whatsoever with Firefox. Maybe it's an extension that you have installed? Dismas|(talk) 06:44, 6 September 2011 (UTC)
As a edge-cutting guy I prefer Nightly Builds... According to 6.0.1 release notes, only a revoke of a root certificate occurred. In fact I think it is nasty for the Mozilla to held such a version contest with Internet Explorer. The rapid growing of numbers only broke up the compatibility tag of Add-ons, eliminated the benefit of auto-update, and passed dozens of bugs (See known issues of the Release Note ) onto the new version. But anyway, I still prefer it. --LunarShaddowღIvy (talk) 08:19, 6 September 2011 (UTC)
Oops! For this problem, try to disable most of the extensions in the Add-on manager, only leaving out these well-known ones such as Adblock Plus etc., and have a further test. Good Luck! --LunarShaddowღIvy (talk) 08:22, 6 September 2011 (UTC)
Little buggier than it had been in my opinion, yes. ¦ Reisio (talk) 10:06, 6 September 2011 (UTC)

Has eBay gotten any better for their users since summer 2007?[edit]

Is it any easier to use and make money from now?

If not, how come, and what other auctioneering sites would you recommend us to sell from? Thanks, -- (talk) 11:14, 6 September 2011 (UTC)

Why is the C programming language called a middle level language?[edit]

Why is the C programming language called a middle level language? Why isn't it a purely high level programming language? --LijoJames (talk) 14:00, 6 September 2011 (UTC)

There is a lot of C which deals directly with the hardware. A purely high-level language would be completely hardware independent. -- kainaw 14:50, 6 September 2011 (UTC)
Yes, like Java for example. Also C lacks support for object-oriented programming, as opposed to C++ or C#. Looie496 (talk) 14:56, 6 September 2011 (UTC)
(After edit-conflict)... Right off the bat, I jumped up shouting "because of pointers!" (I usually characterize C as a "purely low-level language," though that's more my perception than actual fact - it is, properly, a "general purpose" language). After my initial excitement wore off, and I had another gulp of much-needed coffee, I had time to clarify my thoughts and consult a reference-book. Most programmers, especially today in 2011, consider C to be the very lowest level of programming language - except those very few of us who still write hardware drivers and occassionally slip into assembly, HDL, or talk to non-programmable computers. C exposes the device as it actually exists - direct access to native data types that are processed on the machine (... for most types of computer). Other programming languages do not necessarily contain native, first-class language structures to represent primitive data types or memory; they rely on an operating system and a runtime library to do a lot of conversion work for them.
In the canonical reference book, "The C Programming Language," Brian Kernighan describes C as a general purpose language, and expounds that it is
If anyone ought to know, it's the inventor of the language! Unlike Perl, FORTRAN, or even C++, in C, the language itself only represents very primitive, elementary types of data; and it allows direct control of the hardware representations of data - with bit operators, pointer arithmetic, and arithmetic that closely match true hardware circuits. Nimur (talk) 14:58, 6 September 2011 (UTC)
Though, according to our article, Prof. Kernighan denies any complicity it the invention of the language... Nimur (talk) 15:07, 6 September 2011 (UTC)
Related to this topic, when I teach introduction to C/C++, I regularly answer questions with the characterization of Dennis Ritchie as a minimalist and Bjarne Stroustrup as an inclusionist. I feel it helps students grasp how C is a small language with a lot of power while C++ is an expansive language with really not much more power than C (then the OOP rangers rush in and expound on the power of objects and the whole class is lost in a sea of confusion). -- kainaw 15:58, 6 September 2011 (UTC)
Object-oriented programming is not really about "power", per se. It's about maintainability and reusability. You may be able to write something faster in C and have it work just as well. But if you need to change it a little bit, you may have to almost rewrite the C program, whereas if you've used C++ cleverly, it may be just a small tweak to the C++ program. --Trovatore (talk) 20:28, 6 September 2011 (UTC)
Compare the respective textbooks: K&R C's front cover is a clean, simple minimalist "C" -- Bjarne Stroustrop's C++ textbook cover is some sort of ... maelstrom, or tornado, or something. Nimur (talk) 16:26, 6 September 2011 (UTC)
I would advise reading the books instead of judging them by their covers. Stroustrup's book is very good. Just the existence of the string and vector types in C++ makes it a far better language than C for beginners, even if you never teach them to define their own classes. -- BenRG (talk) 19:42, 6 September 2011 (UTC)
I've read (and own) both K&R and Stroustrup, and the former is much simpler to read and learn the language from that the latter (even allowing for the fact that C++ is much more complex). One can - and I did - learn C by reading K&R. I still have trouble following Stroustrup, even after several years of writing C++. (I actually learnt C++ from C++ for Dummies, and highly recommend it!) Mitch Ames (talk) 12:31, 7 September 2011 (UTC)
The claim that C's operators correspond closely to hardware operations is very problematic. The C standard leaves a lot of behavior undefined, which makes it easier for compilers to use the available machine instructions, but also means that you can't rely on them to do so. For example, the standard leaves the behavior of signed integer overflow undefined, which means the compiler can use the CPU's addition instruction without any fixup code. But it also means the compiler can assume x+1 > x when that's useful for optimization. Compare this with Java, where addition of ints is defined to behave like the x86 ADD instruction. Java is actually a better high-level assembler than C in this case. See this article (and parts 2 and 3) for more examples. -- BenRG (talk) 19:42, 6 September 2011 (UTC)
I take it you mean ...the compiler cannot assume...; is that what you meant? It confused me on first reading. --Trovatore (talk) 17:24, 7 September 2011 (UTC)
No, the compiler is allowed to assume that x+1>x, if it can use that in an optimization. It is allowed to make this assumption because signed integer overflow, according to the C standard, results in undefined behavior. If the program fails to behave as the programmer expected because of this assumption by the compiler, it's because x overflowed, resulting in undefined behavior; so really the programmer should not have had any expectations about the program's behavior in this case. The reason the C standard is written this way is so that compilers can make optimizations that assume things like x+1>x are true, without having to perform a bunch of run-time checks to make sure overflow didn't occur. See What Every C Programmer Should Know About Undefined Behavior for a good explanation of and rationale for this design decision. —Bkell (talk) 17:52, 7 September 2011 (UTC)
… Oh, that's the same article BenRG posted. —Bkell (talk) 18:03, 7 September 2011 (UTC)
It's also the same article I posted several weeks ago... incredible how it keeps coming up! Nimur (talk) 23:01, 7 September 2011 (UTC)
Yeah, I knew I the link had earlier been posted here on a reference desk somewhere, because that's where I first read it, but I couldn't remember where it was. Fortunately it's the first Google result for "C undefined behavior optimization." —Bkell (talk) 02:58, 8 September 2011 (UTC)

Because since its invention languages have only gotten higher, causing C to be categorized comparatively as lower. ¦ Reisio (talk) 18:05, 6 September 2011 (UTC)

Um, no. C postdates LISP and Simula, among many others. -- BenRG (talk) 19:42, 6 September 2011 (UTC)
But LISP and Simula are comparatively low level languages when compared to Haskell, Python, OCaml or Java. So while there were higher-level languages at the time C was created, the overall landscape has moved up a lot. --Stephan Schulz (talk) 14:20, 7 September 2011 (UTC)

Snow Leopard Virtual Machine on OS X Lion?[edit]

Just curious if it's possible to create and run a Snow Leopard 10.6 (or Leopard 10.5) virtual machine using Mac OS X Parallels or VMWare Fusion? I'm running Lion 10.7 now, but I have a need to occasionally run some old apps with Rosetta. -- (talk) 16:02, 6 September 2011 (UTC)

Answer here: VMware Fusion ¦ Reisio (talk) 18:08, 6 September 2011 (UTC)

Google bombing?[edit]

I encountered the term "President Ray Gun", which I'd never before heard, so I put it into Google. The first hit is our article on the Strategic Defense Initiative, a project proposed by US President Ronald Reagan. The phrase for which I searched isn't in the article or in Google's cache thereof; is this an example of Google bombing? Nyttend backup (talk) 16:49, 6 September 2011 (UTC)

No. Our article is not full of links designed to get it placed at the top of search engines. -- kainaw 17:00, 6 September 2011 (UTC)
But Bush's official White House biography was not full of links to get it placed at the top of search engines for "miserable failure" — I was wondering if people had used the same strategy here, although for whatever reason I don't understand. Nyttend backup (talk) 17:52, 6 September 2011 (UTC)
Google has (or used to have) a note on some cached page displays saying "These terms only appear in links pointing to this page: (your search term here)". --LarryMac | Talk 17:18, 6 September 2011 (UTC)

"President Ray Gun" returns very few results, so Google automatically changed your query into searching for the 3 words separately (without telling you evidently). Since the SDI article indeed contains all 3 keywords (this can be confirmed by googling President Ray Gun without the quotes), and is the only Wikipedia article to do so, Google's pagerank algorithm correctly selected it as the top result. Anonymous.translator (talk) 17:23, 6 September 2011 (UTC)
The other nine entries in the first page of results feature those three words in sequence, so I'm not sure why you believe that it automatically removed the quotes. Nyttend backup (talk) 17:51, 6 September 2011 (UTC)
If you click on the "Cached" link for the other nine entries (also applies to all other 719 entries), you will find the phrase "president ray gun" highlight in yellow, as well as a bar at the top informing you that "These search terms are highlighted: president ray gun". If you click on the SDI link, no such highlighting occurs, which implies the first search result was obtained differently than all other 719 results. This blogger confirms my theory.
As an aside, lately I noticed that Google has been adding a lot of these "silent auto-corrections" in their front end. They even go as far as to automatically search based on synonyms, which I found extremely helpful. Anonymous.translator (talk) 00:21, 7 September 2011 (UTC)
Er the blogger is discussion something else i.e. Google suggesting you search without the quotes when the quotes return no results which they've been doing for a long time (the blog itself was from 2008) as they do with other no results. And I'm pretty sure Google has been automatically searching based on synonyms for a very long time, it's one of the many reasons counting Google results to determine stuff for wikipedia is usually a flawed idea. Nil Einne (talk) 02:02, 7 September 2011 (UTC)

Google does not explain how it produces search result pages. The algorithm is proprietary and unavailable for inspection. That means that there is no way we can know why Google decided to return those results. It could be an algorithmic result; it could be a joke special-cased in to the search-engine by a programmer as an easter egg - we just can't know, because Google's search-engine implementation isn't public. Nimur (talk) 18:07, 6 September 2011 (UTC)

That's a nickname I have heard from Reagan critics referencing the SDI.-- (talk) 01:52, 8 September 2011 (UTC)

Programming an EEPROM[edit]

Can it be possible for an EEPROM to exist that can be programmed without communicating with an OTP area? I ask this because some flash chips are usually programmed by communicating with some type of ROM or microcontroller. --Melab±1 18:40, 6 September 2011 (UTC)

Of course! How do you think the controller on the flash module does it? The trick is that you need hardware support to write to memory of any particular type. The on-chip controller has hardware to write data to the nonvolatile flash memory, unlike your computer. The flash controller is not all that different from your computer, except it is small and has been pre-loaded with its single-use program; if it even operates via software! If it does, its operating system probably consists of nothing more than a few hard-coded register-accesses and a giant memcpy loop. The storage controller has memory-mapped I/O that corresponds to the write control (address and data) for the nonvolatile storage area, in whatever addressing scheme it uses. A storage controller also contains hardware or software to decode commands received on a higher-level protocol like I2C or SPI. Your computer can probably speak that - because it doesn't have memory-mapped I/O that can directly control the voltages on the nonvolatile storage. So, your CPU delegates your data to the controller, who does directly control voltages for the storage elements.
Unless you are a manufacturer of silicon, it is very unlikely that you can build a computer with the types of low-level access you want to customize; that's why you must use the existing protocols to talk to pre-built flash-controllers. If you are inclined to design your own hardware and route your own pinouts, you should investigate a programmable logic-array or gate array: I recommend the DE2 development board, now on sale at academic rates. You will be interested to know that even the FPGA, which could directly configure its GPIOs to write to flash, typically delegates to a flash controller over I2C (saving precious GPIO pins for other, more important uses). Nimur (talk) 23:05, 7 September 2011 (UTC)
In that case, do flash modules exist where the controller relies on pattern matching (ZISC) or is so simple that it cannot be considered a program (lacking microcode, if I have that concept right)? --Melab±1 20:17, 8 September 2011 (UTC)
That isn't the terminology I would use to describe it; but sure - this is a very common operation mode. I randomly selected an 8MB Flash NOR from Digikey, the STMicro M50FLW080A/B. Look at the Address/Address mode: just specify the address you want, in row/column mode; specify the write-enable as desired; and you have data in or out of the nonvolatile storage. The exact characteristics of the signal (voltages, timing, rise-times, etc.) are specified in the datasheet. Nimur (talk) 22:02, 8 September 2011 (UTC)
What I mean is, can a flash module be read and written without a complex facility that performs the functions? I got a reinforcement of this idea after this discussion, where Finlay McWalter responded by saying that a voltage can be applied to certain types of flash memory to lock or unlock their sectors. I assumed it was a simple mechanism that did not use any kind of computing facility within the flash module itself (i.e., separate OTP read-only memory). I am designing (not intensively) a hypothetical smartphone architecture where most, if not all, of the processes execute on the application processor—the goal being to consolidate microcontroller code into software stored on a single NAND chip. --Melab±1 00:47, 9 September 2011 (UTC)
Yes, I think you are describing the direct addressing mode ("A/A" mode, in the part I linked above). That sort of means that you simply apply a voltage (+VDD or 0, for logical 1 or 0) to each pin; the pin-outs are specified on a datasheet; and you just "dial in" the address and data, and either read or write the data at that memory-location. I don't know if you consider this "complex" or "not complex." I think that entirely depends on what you're trying to connect on the other side! If your microcontroller supports I2C, but has limited GPIO pins, the direct-addressing mode is more effort than the serial data stream. On the other hand, if you have plenty of GPIO, but for some reason, you lack I2C, direct addressing may be your best bet. Nimur (talk) 01:48, 9 September 2011 (UTC)

Wikipedia article on Google Maps[edit]


How can I add a wikipedia article on google earth at certain location?. And how can i relocate an incorrectly located wikipedia article in google earth?.--Inramji (talk) 23:03, 6 September 2011 (UTC)

Google appears to harvest wikipedias (of various languages) on timescales I don't entirely understand. The best you can do is to ensure that relevant articles have the right coordinate in them. Then wait. See also {{coord}} --Tagishsimon (talk) 00:24, 7 September 2011 (UTC)
If you name the articles, we can do more to help you; but see WP:GEO. Andy Mabbett (Pigsonthewing); Andy's talk; Andy's edits 16:57, 8 September 2011 (UTC)