Wikipedia:Reference desk/Archives/Computing/2011 June 8

Computing desk
< June 7 << May | June | Jul >> June 9 >
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.


June 8 edit

cable provides telephone service edit

I get my internet and TV from a cable TV provider; and my telephone from the telephone company. Today the cable company called me up offering me a package including telephone service, without changing my telephone number. If the cable TV company provides my telephone service, does it go over their lines or does it continue to go over the telephone company lines? Bubba73 You talkin' to me? 02:19, 8 June 2011 (UTC)[reply]

It would be over their lines. Basically, it's a VOIP service like Vonage and others sell, only it's from your cable company. Grandmartin11 (talk) 03:02, 8 June 2011 (UTC)[reply]
Thanks. So when my internet connection is down, the phone will be down too, right? Bubba73 You talkin' to me? 04:33, 8 June 2011 (UTC)[reply]
Maybe. I've had phone service through the local cable monopoly for years, and I believe that occasionally I've lost Internet service but not phone service. Comet Tuttle (talk) 05:38, 8 June 2011 (UTC)[reply]
In many jurisdictions anyone providing residential phone service has to meet strict requirements for reliability and availability due to the need for dependable emergency service. For example, in many cases the cable telephone box is required to have a built-in battery sufficient to provide phone service for several hours after a loss of mains power. I would expect cable telephony to be quite reliable as long as the physical connection to the cable company is intact, even if internet service is interrupted; however, I don't have any direct experience with it. Of course, not much can be done if there are physical disruptions in the cable provider's network. Dragons flight (talk) 06:00, 8 June 2011 (UTC)[reply]
The real answer is that it could be either, and so the best option would be to ask your cable provider. --Phil Holmes (talk) 15:59, 8 June 2011 (UTC)[reply]
My internet over cable is so unreliable that I don't want to trust the phone over it. (The cable repairmen just left here a half hour ago. I have the cable company trouble line on speed-dail - the only one that isn't a family member.) Bubba73 You talkin' to me? 18:06, 8 June 2011 (UTC)[reply]

World Mode G3 edit

After doing a search on this topic I received many link discussing the use of World Mode G3, but no specific definition of what it is or who provides it.99.4.183.96 (talk) 10:36, 8 June 2011 (UTC)[reply]

Could you clarify what you're talking about? Googling "World Mode G3" gives me no clue. AndrewWTaylor (talk) 11:01, 8 June 2011 (UTC)[reply]

Game programming languages? edit

Hi, what languages are used for programming games like world of warcraft, runescape, and for ones on consoles (handhelds, etc.)? Could anyone direct me to good sites/books/tutorials with useful info (general and/or code) on said languages? 3879orcs (talk) 14:30, 8 June 2011 (UTC)[reply]

A great number of professional games, for all platforms, are written in C++. It's fairly common for scripting inside games to be written in Lua. Both articles contain links to Wikibooks (and C++ to Wikiversity too) tutorials. -- Finlay McWalterTalk 14:39, 8 June 2011 (UTC)[reply]
If you are asking because you want to choose your first programming language, I think Lua is the best choice. It's easy to learn and use, easy to deploy and very fast. You probably want to start with Löve, which has a lot of support for things typically needed in games.
A lot of commercial games are written in C++ but have Lua embedded, and in Manufactoid you can even program a little in Lua to solve levels. (However, I believe it's not strictly necessary, and it assumes that you already know Lua.) Hans Adler 14:51, 8 June 2011 (UTC)[reply]

Lua is written in C. C++ is C with classes. http://www.iso-9899.info/wiki/Main_Page /Books ¦ Reisio (talk) 08:07, 10 June 2011 (UTC)[reply]

Breaking out of alert() loops edit

Do any modern browsers offer satisfactory ways to break out of Javascript alert() loops?

Consider the following code:

while(i=1) {
alert("Annoying!");
}

How does one break out of such a page? When I've gotten trapped in loops like that, I've often had to force quit the entire browser, which seems like overkill.

(In general, I find alert() boxes pretty irritating and wish they were easy to disable entirely, or turn into something more innocuous!) --Mr.98 (talk) 17:26, 8 June 2011 (UTC)[reply]

Firefox: lets you close the individual tab responsible.
Chrome: the 2nd occurrence has a "prevent this page from creating additional dialogs" checkbox.
Opera: lets you close the individual tab and has a "stop executing scripts on this page" checkbox on the dialog
Konqueror: nothing
-- Finlay McWalterTalk 17:37, 8 June 2011 (UTC)[reply]
Out of curiosity: does Firefox allow you to stop executing scripts at such a time, too? My thought is those pages that have the alert boxes in their close action, which are doubly irritating. The Opera/Chrome options seem like the most favorable of your list. --Mr.98 (talk) 17:43, 8 June 2011 (UTC)[reply]
Firefox doesn't offer me such an option (but there's probably an extension somewhere to limit this). Firefox and Opera treat alert dialogs as modal only to the tab; Chrome (at least on Linux) treats them as app-modal, which means the browser becomes effectively unusable until you check that box. Opera's is the best, and most responsive, solution. I also tried Windows Safari on wine on linux (so that's not really very representative) and it behaved as Konqueror. -- Finlay McWalterTalk 17:51, 8 June 2011 (UTC)[reply]
For the most part, Firefox is still designed to be extended for your needs. So, you can install NoScript. Then, you can press ctrl-backslash (if I remember correctly) to turn on/off scripts on the page. -- kainaw 17:52, 8 June 2011 (UTC)[reply]
But would that work if you are stuck in a loop like that? I ask because many browsers seem to interpret "alert()" as something that takes total focus (so you can't even go to Quit the browser — hence the force quit). --Mr.98 (talk) 18:55, 8 June 2011 (UTC)[reply]
More: IE9 and Safari on Windows 7 both block (app-modal), chrome and firefox as above. I also tried a developer build of Opera Mobile on Linux (which has no concept of tabs); it doesn't have the "no more scripts" box, but the back button still works inside the dialog (so does reload, which fixes the loop unless it's called from the onload event). -- Finlay McWalterTalk 18:13, 8 June 2011 (UTC)[reply]

Looking for a Programming language edit

Hello. In French (the non-programming language :), you negate a verb by surrounding it with 'tags' of sorts; the "opening tag" is always 'ne' but by itself does very little, it just indicates that you are going to begin a negative; the "closing tag" may be any of several (pas, point, jamais, guère, aucun, etc.) and is where the real information is, telling you what sort of a negation you're going for. For example, if I said, « Je n'ai pas faim », it would mean "I am not hungry". If I said, « Je n'ai jamais faim », it would mean "I am never hungry". This distinctly reminds me of a programming language, though I cannot pinpoint which. I am not looking for negation in particular, but rather sort of the opposite of HTML, where the opening tells you only something general but the closing tells you something specific. Does anyone know a programming language like that? Thanks. 72.128.95.0 (talk) 17:34, 8 June 2011 (UTC)[reply]

In general, it sounds like anything that contains simple Negation operators, e.g. Boolean NOT, or the "!" used in many C-like languages. (HTML is a markup language, not a programming language, which is why it operates in the way you've described — it is about describing the characteristics of something in a positive way, not a negative way.) --Mr.98 (talk) 17:41, 8 June 2011 (UTC)[reply]
The closest thing I know of is reverse Polish notation. Looie496 (talk) 17:47, 8 June 2011 (UTC)[reply]
Actually, thinking about it, any stack-oriented programming language more or less fits the description. Looie496 (talk) 17:50, 8 June 2011 (UTC)[reply]
MUMPS is a rather distasteful programming language that allows for all kinds of nonsense - such as having a FOR loop that changes behavior based on if you end it with a QUIT or GOTO statement. In general, a programming language should not leave you in the dark about the context of what you are currently viewing while you wait for more information. It should precede what you are viewing with all the information you need. That is why HTML places all options in the open tag and not the closing tag. -- kainaw 17:48, 8 June 2011 (UTC)[reply]
I think Kainaw is describing what we call a context free grammar; but the way he phrased it, it sounds like he's conflating this with a strict rule about statement-order. As Looie496 has pointed out above, a language can be constructed that is "backwards" (i.e., a valid statement in the language can provide important structural information about a term, even after the term was introduced). Nonetheless, even with this ordering, the language can still be defined using a context free grammar (CFG). For a rigorous language that is useful to machines, it is important to be context-free, so terms may not overlap. But there is no requirement that terms appear in any specific order. Kainaw's suggestion for strict ordering of terms definitely does help humans to understand the language, but there are many reasons why machine languages should have "backwards" orderings. Human languages (including French) may include statements whose terms are not strictly context-free; i.e., whose sub-statements overlap; this is because human language does not follow the rules of a CFG. (Or, more precisely stated: most efforts to define CFGs for most human-languages have been unsuccessful to date. Once this definition-task is accomplished, we should be able to translate French and English into GIMPLE and compile natural statements into machine code - but this appears to be far off on the horizon of Computer Science). Nimur (talk) 18:52, 8 June 2011 (UTC)[reply]
The standard language doing everything backward is Forth. --Stephan Schulz (talk) 19:04, 8 June 2011 (UTC)[reply]
Quibble: I'm not sure what you mean by "overlap", but context-free grammars are permitted to be ambiguous, which is probably counts as overlapping. Now, if you want to return a single parse (and you don't have any after-parsing precedence rules), you need to supply the grammar with a string that produces an unambiguous parse, but that's a much less strict restriction. CFGs are quite powerful, though the traditional parsing tools tend not to provide the full power, settling for something like LR(k) or LL(k) instead. If you reverse a production in an LR(k) or LL(k) grammar, you might get something that can no longer be parsed as LR(k) or LL(k), but no matter what you flip, it'll never stop being a CFG. Paul (Stansifer) 02:11, 9 June 2011 (UTC)[reply]

Install DMG programme on Windows 7 edit

Hi, I'd like to install the demo of this software on my Windows 7 laptop. How would I go about this? Thanks! ╟─TreasuryTagActing Returning Officer─╢ 19:18, 8 June 2011 (UTC)[reply]

.dmg files are Apple Disk Images. That article lists a few archivers on other platforms that may read them; but if the archive contains a MacOS-X application then it won't work on Windows. -- Finlay McWalterTalk 19:22, 8 June 2011 (UTC)[reply]
That software appears to be mac only. Sorry. --Thekmc (Leave me a message) 20:41, 8 June 2011 (UTC)[reply]

You can run Mac OS in a virtual machine. You can get cheap Apple computers secondhand. You could ask the ImageMagick people how they'd do such things. ¦ Reisio (talk) 08:02, 10 June 2011 (UTC)[reply]

Best word to describe "Software which is run by an operating system" edit

Is there one single term for describing the difference between a software running on a microcontroller, and alone responsible for the setting of pinouts, handling interrupts, processor registers, etc., and those that run under an operating system? When I casually say "software", it is usually understood as a desktop application, something running under an OS, but how to specify it? "Application software" is not accurate either, I think, because it's more about the role in regard of the user.

Maybe embedded vs non-embedded? Is there something more accurate? — Preceding unsigned comment added by 87.169.30.70 (talk) 19:32, 8 June 2011 (UTC)[reply]

It is common to refer to the programs that manage the hardware as a collection of firmware and device drivers even though there are components of the operating system that are not in either of those categories and there are user applications which allow you to directly access the hardware. -- kainaw 19:44, 8 June 2011 (UTC)[reply]
The distinction is blurred anyway; even on a very simple microcontroller one frequently runs a primitive micro-executive which handles some very basic things like threading and messaging, and it's very common to end up with a two-stage loader (smartcards run tiny H8-3xx or 8051 microcontrollers, yet still contain things their authors optimistically call "applications"). -- Finlay McWalterTalk 19:56, 8 June 2011 (UTC)[reply]
Yes, I know... what I'm more interested in, how to describe the difference between an application which runs on an operating system, maybe even has a GUI, works around with threads, has memory management and everything nice provided by the OS, etc, and the one which runs on an embedded system and has to rely on interrupts, direct setting and reading of portpins, because there is no OS under it. I cannot find a good word or very short phrase to say it, without describing it at greater length, just like I did here. --87.169.30.70 (talk) 20:46, 8 June 2011 (UTC)[reply]
There is no single word to encompass all variants of the type of program in question. "It depends." It depends on the CPU architecture; the operating system that is already resident on the machine; and a slew of other things.
Hosted code, managed code, and user space program all refer to specific aspects of software that is limited in capability (and therefore relies on an operating system, managed code runtime, or hardware abstraction layer). In some contexts, such terms refer to specific program software or hardware features (like an execute-permissions bit mask in a 386 processor). In other contexts, these terms refer to specific tools and environments (like the Microsoft CLR). In general, most CPU hardware has a clear distinction between kernel space and user space; this dividing line is more instructive and more precise than the distinction between "GUI" and "not-GUI," because it specifies exact restrictions on executable capabilities.
If we want to be more precise than this, we need to start specifying exact machines and architectures. Many CPUs do not have user-mode virtual memory protection - so there is no distinction between "operating system" and "application program," except a matter of notational convenience for the programmer. Here are some examples for common platforms you might be familiar with:
  • On Unix, applications that are resident in user-space are hosted by the kernel, who may preempt, dynamically schedule, and allocate resources. A UNIX kernel typically also controls other permissions: for example, we can then talk about programs that require super-user permission on the file system to perform certain functions; as opposed to (software) user-space programs.
  • On some hardware platforms, especially tightly-knit, syncretic hardware / operating-system combos, file system permissions are managed separately from other resource permissions (such as access to physical memory or peripheral I/O devices). An example of this is VAX/VMS which ran on Digital computers.
  • On Java platforms, there is a clear distinction between Java bytecode and JVM internals. Bytecode is inherently sandboxed and may not perform action without permission from the JVM.
  • On Windows computers, code compiled with the Driver Development Kit has kernel privileges, while code compiled with the standard Visual Studio SDK does not. Only Microsoft may write Windows kernel code, but you can bluescreen the machine (or otherwise violate implicit, protective security contracts) by writing a kernel-space driver.
  • On an IBM computer with a Trusted Platform Module, code may either reside inside or outside the TPM security zone. Code that resides outside might be considered "privileged" and/or "unsecure," whereas code that resides inside must authenticate and present a valid credential and signature to hardware.
  • Using ucOS, there's nothing separating your code from the ucOS code. Most microcontroller hardwares do absolutely nothing to stop you from inserting a program-jump, memory-write, or memory-load; the kernel will do nothing to stop this from happening either; and you could disable software preemptive interrupts, denying return of control to the kernel.
As you can see, the term you seek is highly variable depending on the type of computer hardware and operating system you're working with. Nimur (talk) 21:28, 8 June 2011 (UTC)[reply]
Thank you. However, in this case not the highest scientific accuracy is needed, just an oversimplified general description, even if not correct in each and every special case. --87.169.30.70 (talk) 21:47, 8 June 2011 (UTC)[reply]
Then, I would use "hosted code," and if anyone needs more specific details, you can say that it is hosted by (e.g.) Linux. Nimur (talk) 22:15, 8 June 2011 (UTC)[reply]
I would call that "kernel space code", "kernel code", or say that it runs "in kernel land", as opposed to "user space code", "user code", or saying it runs "in user land". --Sean 15:55, 9 June 2011 (UTC)[reply]
Microcode runs on CPUs.
Sleigh (talk) 23:32, 10 June 2011 (UTC)[reply]

how do most php programmerse program the html part (mac) edit

in the same way that a couple of years ago people who were web desginers in html used dreamweaver, what would someone today use? especially if they're also working in php? Dreamweaver still or something else? Especially interested on the most common solution on a mac...

note: I do code in php and html, don't need something totally wysiwyg, more interested in what designers are doing these days. thanks.

I can't specifically answer what designers are doing nowadays, but I can say that Dreamweaver can code in php, too, and many jobs for webdesigners specify ability to use Dreamweaver as a prerequisite. --KägeTorä - (影虎) (TALK) 00:18, 9 June 2011 (UTC)[reply]
Most people I know who call themselves "web designers" use Dreamweaver, but do not use PHP. They do use some simple drop-in PHP modules (or even Ruby modules). But, they couldn't write a simple "Hello World" script. After they do the design, it is sent off to a programmer to add functionality. When I do a website myself, I do everything in Kate. It is far easier to type the HTML/PHP code by hand than to spend days searching the web to try and figure out how to make Dreamweaver do what I want it to do and not what it thinks I should do. -- kainaw 12:06, 9 June 2011 (UTC)[reply]
There are a number of smaller, but widely used IDEs such as those by JetBrains. Also have a look at List of PHP editors and List of PHP editors.Smallman12q (talk) 11:17, 10 June 2011 (UTC)[reply]

Using my choice of icon for each desktop shortcut, folder, or URL edit

I use WinXP in classic mode. All the folders, shortcuts and URLs on the desktop look the same as each other and just have different text below them. Is it possible to use a particular icon for each thing? For example folderA could be a blue square, but folderB is a red circle. Thanks. 92.24.128.171 (talk) 21:09, 8 June 2011 (UTC)[reply]

Yes - right-click the icon and select "Properties". Under the "Customize" tab you'll see a "Change icon" button. You might need to Google around to find the exact icons you want. AndrewWTaylor (talk) 22:39, 8 June 2011 (UTC)[reply]

Thanks. I'd be gratful for any information about how to make desktop icons. Such as what size they need to be, what format, etc. 2.101.15.113 (talk) 10:47, 9 June 2011 (UTC)[reply]

The basic format is ICO (file format), but icons can also be embedded in other files (e..g .exe and .dll). There's some information at Computer icon#Icon creation. Here's a tutorial on how to make one using GIMP. AndrewWTaylor (talk) 10:52, 9 June 2011 (UTC)[reply]

I'd recommend IcoFX, from personal experience. You can easily import an existing image and turn it into an icon. IcoFX has a lot of functionality, and yet is easy to use. Rocketshiporion 23:56, 14 June 2011 (UTC)[reply]

what might a beginner without formal training learn wrong about web design? edit

for example, I would consider it a mistake to edit html files on the server directly instead of using any kind of version control. what else might a beginner without formal training learn wrong about web design? (I mean something not obvious, bad habits etc, that migth still "work"). Thanks. --188.29.130.143 (talk) 21:50, 8 June 2011 (UTC)[reply]

Oh, where to begin...
  • not testing on all reasonable browsers (even the old versions of IE we all wish didn't exist)
  • not taking adequate care that the site prints out nicely (heck, almost no-one does that, not just beginners)
  • not taking adequate care that users with disabilities can use the site successfully (this can be hard, as there are lots of different disabilities and access-methods).
  • writing the whole thing in flash, because menus that go "whoosh" is kewl.
  • writing non-validating markup that happens to work on the one machine they tested it with
  • doing stuff in javascript that can be done better with CSS hover
  • not testing for cases where the user has javascript, java, or flash disabled
  • not worrying about users who don't have a the same screen size, or same fonts installed, as they do
  • serving old versions if IE transparent PNGs
  • not thinking about, supporting, and testing for mobile platforms (where there's a different browser, tiny screen, different fonts, and a touch interface).
... but that's mostly true for lots of people who claim to be experts too. -- Finlay McWalterTalk 22:05, 8 June 2011 (UTC)[reply]
The absolutely #1 mistake that everyone from angsty tweens to major corporations make, however, isn't really a design mistake per se. It's spending a bunch of effort on the website technology and appearance (fancy graphics, fading menus) and not nearly enough on providing decent content that people will want to read, view, listen to, or play. -- Finlay McWalterTalk 22:16, 8 June 2011 (UTC)[reply]
To make it clearer... The most common problem on the web is that websites tend to follow the design before content model instead of the content before design model. So, you get a pretty website that has no content. Nobody wants to waste time on a website without content regardless of how pretty it is. However, people will spend hours on an ugly website if it has the content they want. -- kainaw 12:11, 9 June 2011 (UTC)[reply]
Two problems, in three words, with the first often leading to the second...
1. Clutter
2. Slow performance HiLo48 (talk) 22:32, 8 June 2011 (UTC)[reply]
Much of this is covered in Nielsen's Alertbox newsletters http://www.useit.com/alertbox/ -- SGBailey (talk) 08:49, 9 June 2011 (UTC)[reply]

I'd say the #1 biggest, most enduring, most damaging mistake people make is not including a proper doctype declaration properly. You might think merely validating would cover this, or that using popular HTML cleaning software would ensure against it, but you'd be wrong. ¦ Reisio (talk) 07:29, 10 June 2011 (UTC)[reply]

could you explain what makes it proper, or give a proper example? You also seem to be saying that it's not just how it's written, but how it's included... --188.29.60.182 (talk) 09:24, 10 June 2011 (UTC)[reply]

Indeed, as the second link I gave details, how it’s included is quite important. The simplest proper example is <!doctype html> with absolutely no character before the first <, and this includes invisible characters some editors insert by default. ¦ Reisio (talk) 23:07, 10 June 2011 (UTC)[reply]

I agree that the lack of content and overemphasis on graphics is the biggest problem for web designers. To put it simply "less is more", when it comes to graphics. Any NEVER start playing an animation/movie when somebody enters a web site. You can provide them with a play button, then they can decide if they want to grind their system to a halt to play your stupid animation. Just today, I tried to find out how to change the oil in my lawnmower, but the manufacturer's web site was only interested in providing animated ads for their products, and not in providing any useful info. StuRat (talk) 07:36, 11 June 2011 (UTC)[reply]
To add to my previous comment:
1) Anything which can be represented as simple text should be.
2) Anything which can't be represented by text alone, but can as a still picture, should be. Present a thumbnail initially, and let users click on it to enlarge.
3) Anything which can only be represented by animation, should be, but should not play automatically. An example might be a cross section of a running internal combustion engine, but only when trying to explain it's operation. Don't show such an animation when trying to sell cars, for example. StuRat (talk) 07:47, 11 June 2011 (UTC)[reply]

USB Devices No Longer Working (Vista) edit

  Resolved

Hello all,

I have a problem. Since removing my USB devices earlier today (by just taking them out, and not deactivating them through the icon in the taskbar, which incidentally wasn't there anyway), none of them works. I have a mouse, an external HDD, a headset, and also a Flash drive, and three USB ports. Of course, I only ever have three of them connected at one time. Power has not been a problem, so we can rule that out. I believe the problem was caused by my taking the USB cables out before deactivating them to 'safely remove' them. Therefore, is there any way to fix this?

I have rebooted several times, to no avail. The USB external HDD is not even detected before boot-up (I tried to boot into my Linux partition on the drive to see if it made a difference). I am unable to perform a system restore, as there are no restore points (I need to fix that, too).

Anyway, as I know the specific cause of the problem, maybe someone can give me some help specifically to that?

Cheers, Kage. --KägeTorä - (影虎) (TALK) 22:23, 8 June 2011 (UTC)[reply]

EDIT - No worries. I did what any self-respecting genius would do and put it on the road outside, then ran over it several times in my neighbour's jeep. Then I took the battery out and put it back in and everything works as normal now. Cheers. --KägeTorä - (影虎) (TALK) 22:37, 8 June 2011 (UTC)[reply]