Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 December 7

From Wikipedia, the free encyclopedia
Computing desk
< December 6 << Nov | December | Jan >> December 8 >
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.


December 7

[edit]

Rexx versus Python

[edit]

I used BASIC years ago, now I'd like to learn a more modern language. Most people say that Python is the one to go for, but I've just found out about Rexx. Rexx only has 23 instructions, so should be quick to learn.

Is there some disadvantage to Rexx that I've overlooked, that means I should spend the time learning some other language? Thanks. 92.15.18.168 (talk) 00:11, 7 December 2010 (UTC)[reply]

Why are you learning it? If you want a language people actually use in real life, you want Python over Rexx. Marnanel (talk) 00:46, 7 December 2010 (UTC)[reply]
The difficulty of a language is not related to the number of instructions. PHP has hundreds of possible functions, but it is actually a very easy language to learn, because its syntax is straightforward, extensible, and one is not expected to memorize the functions. There are only a dozen or so core "control structures" in PHP, for example, and the rest of the functions you just look up when you need them. (PHP is just an example I am familiar with; I am not lobbying for it over, say, Python.)
Looking at the Rexx specs (spexx?), it strikes me that its lack of arrays and existing array functions would make a lot of things quite difficult (you'd have to develop workarounds that you would not need to in other languages), and its lack of easy ability to integrate external libraries means you'll have a harder time with code reuse (thus reinventing the wheel more than you ought to). All of this is aside from the fact that a less-used language is going to have fewer community resources (shared code, communities to ask questions of, functions developed that can do more "modern" things like interface with graphics or the web or etc.), totally non-transferrable code syntax (you're learning something that can basically only be used with itself, and cannot be a base for learning other languages), and is not very "modern" without having to use specific implementations which may or may not have their own buggy incompatibilities. Not to mention that if you did learn Rexx and its particular and peculiar ways of doing things, they would in many cases not be transferrable skills at all to other programming tasks (e.g. the way it handles "stems" is very non-standard). --Mr.98 (talk) 00:55, 7 December 2010 (UTC)[reply]
It depends which Programming paradigm you want to learn.Smallman12q (talk) 02:29, 7 December 2010 (UTC)[reply]
Another example of fewer functions not making a language easier is Brainfuck. 8 commands, but, as implied, more-or-less impossible to work with. KyuubiSeal (talk) 02:30, 7 December 2010 (UTC)[reply]
If you need to chose one of them you should definitely chose Python, it has a easy syntax, good user manual/help pages/community, good development tools, a comprehensive standard library with many functions and a large set of third party libraries. So unless you going to use it in a special context were REXX is widely used/available chose Python. Python programs are easy to read yet the code are very compact so you get much done with little code to write. The main drawback is the execution speed it is about 30 times slower than a C or C++ program but I think REXX is even slower.--Gr8xoz (talk) 02:55, 7 December 2010 (UTC)[reply]

Why is Rexx available for many different OSs, and be put to so many uses, if its not very good? As it says somewhere "It’s as easy as Basic Yet about as powerful as Perl". It appears to be able to manipulate other programs eg spreadsheets or the OS easily. 92.15.11.224 (talk) 13:20, 7 December 2010 (UTC)[reply]

What do you mean by "good"? Nobody here has said or implied that Rexx isn't powerful. Marnanel (talk) 13:22, 7 December 2010 (UTC)[reply]
Huh? You're being disingenuous? Dosnt powerful imply good for programming languages? 92.15.11.224 (talk) 13:50, 7 December 2010 (UTC)[reply]
Powerful is a pretty subjective term. It usually means either "you can do a lot with a little" or "this language can be used for many different tasks." There are plenty of "powerful" languages. As for why Rexx is widely used as a macro language, it's probably just because the tools for adding a Rexx interpreter into your program are straightforward. Anyway, nobody is trying to rank the languages objectively. But if you're going to learn ONE more language other than BASIC, Rexx is a very odd choice. --Mr.98 (talk) 14:38, 7 December 2010 (UTC)[reply]
Just like human languages, there are loads of reasons to learn a computer program language. Maybe you want to expand your mind or think about things differently. Maybe you want to commuicate to a community who speaks that language. Maybe you have no choice, because your work requires you to communicate this way. I would say, as a rough analogy, that learning Rexx after Basic would be like learning Faroese after English. It's neat, and has a lot of unique cultural and historical significance; and if you happen to have a job which for some reason requires you to speak Faroese, there's not much of a choice. Because of similarity, with a little extra work, you might be able to port your Faroese skills to Norwegian, or Icelandic; but not as easily as you might hope. It will be hard to find good language training resources, because few people study Faroese. And when you're done, you'll find almost nobody else will be able to communicate in the language you have just invested so much effort to learn. Most of the world doesn't even know Faroese exists. That doesn't mean it wasn't worth learning - but keep all these counterpoints in mind. If you spend a lot of effort learning Rexx, you might be able to port some of those skills to Python or Perl; you might have a specific job that requires this programming skill; but mostly, you'll be engaging in a difficult intellectual exercise, with little practical use, in a subject that interests very few people. I won't even try tell you that's a bad thing. Nimur (talk) 16:16, 7 December 2010 (UTC)[reply]
Its worth learning Faroese if a) it takes 10% (or whatever) of the time to learn another language, b) it is understood by everyone (ie its got interpreters for every OS), c) you can do all sorts of things with it that you cannot easily do in other languages, d) it is more concise than flowery other languages, e) the listeners/readers (ie the interpreter) does all the hard work, not the speaker. 92.29.123.221 (talk) 13:03, 8 December 2010 (UTC)[reply]
In practical terms only, your premises b and c are false. For significant projects, you do not merely need the interpreter to understand you, but also other people to do so. Additionally, significant projects often already exist and it is much more practical to extend them in the language they are already using (which is almost certainly a mainstream language and not Rexx). Finally, because popular languages (let's say Python) have more libraries written for (or ported to) them, many useful things are trivial to do that would require a lot of effort in unpopular, less well supported languages (like Rexx). When you are just learning, none of these points seem relevant, because you aren't yet able to work on significant projects, and the programs you're writing are closer to hello world than to httpd. But unless you confine yourself to trivial work, these points will be relevant. --Tardis (talk) 15:47, 8 December 2010 (UTC)[reply]
Its obvious from the question asked that the OP is not going to be doing this for a living but just some occassional hobby use now and again. I don't agree with your assertions. 92.29.113.166 (talk) 23:07, 8 December 2010 (UTC)[reply]
An excellent analogy, great job. --Mr.98 (talk) 19:08, 7 December 2010 (UTC)[reply]
I would say, no, "powerful" does not just equal "good". Assembly language is very powerful, but it's the worst choice for 99% of programming tasks. I mean, I am not going to sit here and write "assembly language is not good", following that logic; but it's a poor choice, in almost all situations. Despite the macho BS from many coders about how awesome they are at it. By the way, Nimur's analogy is excellent. Comet Tuttle (talk) 17:49, 7 December 2010 (UTC)[reply]
I believe assembly is not at all powerful - it takes pages of code to do what one line in a higher level language would do. 92.24.176.134 (talk) 19:23, 7 December 2010 (UTC)[reply]
It depends on how you define "powerful". There are things you can do in assembly that you cannot do in higher level languages. As a real-world example, John Carmack (of Id Software) explained that the reason they got high frame rates in their 3D engines was because he went in and tweaked the assembly code after it was compiled as optimal as possible from C/C++. The adjustments made simply couldn't be done in any high level language. -- kainaw 14:40, 8 December 2010 (UTC)[reply]

If you compare the Rexx and the Python (programming language) articles, then Rexx wins. Because 1) it does not have all the difficult to understand clutter that the Python article has, 2) the range of use and number of interpreters is greater for Rexx than Python, 3) the number of links and lists of books are longer for Rexx than Python. Its like me saying "I'd like to wear some blue jeans" and you're saying "No, purple nylon flares are what everyone's wearing now!" If it takes 20% of the learning effort to get 80% of the functionality, then its a good deal. 92.24.176.134 (talk) 19:23, 7 December 2010 (UTC)[reply]

I exhausted my verbosity above, so this will be a short response. I will never try to tell anyone that they should not program in Rexx. I will also never pay anyone to program in Rexx. Nimur (talk) 19:30, 7 December 2010 (UTC)[reply]
Few will: Rexx jobs, Python jobs. --Sean 20:22, 7 December 2010 (UTC)[reply]
It's your life, do what you want with it. You asked for opinions, and you got plenty of them. It's of note, though, that your methodology is flawed. There are far more books on Python than Rexx. The fact that you can probably list every book on Rexx onto a page without it being overly cluttered is actually a sign of how relatively unimportant it is. There are at least 80 books on Python at my university library, some 40 of them published in the last 3 years alone. That's a sign of a pretty healthy language. My university library carries exactly one book devoted to Rexx, and it got it as part of a general online subscription. That's a sign of an irrelevant language. It's your choice if you want to pick the irrelevant pick, but don't be fooled by the articles into thinking Rexx is something that is isn't. --Mr.98 (talk) 21:42, 7 December 2010 (UTC)[reply]
I actually know REXX and would only recommend it if you have to use it in its native environment: proprietary IBM systems. Languages have network effects which overwhelm their inherent power. --Sean 17:57, 8 December 2010 (UTC)[reply]

You could repeat the above criticism for Freebasic. The big attractions of Rexx are that you can do lots of different things with it, and its quick to learn. Clearly programmers do not like it when some languages lower the barriers to entry of programming and would prefer something that takes a lot of time and effort and nerdiness to learn. 92.24.190.135 (talk) 20:00, 10 December 2010 (UTC)[reply]

Windows Mobile 6.5

[edit]

In Windows Mobile 6.1 / 6.5 default email program, can you designate which IMAP folder names to use for "Sent" and "Deleted", so that sent and deleted messages show up in the right folders when you open your email from your computer? Right now, if your servers doesn't use those same names, you will either end up with a new folder with that name being created for Sent/Deleted items, or not have those messages at all. Can't you just "tell the program" which of your existing IMAP folders to use for placing Sent/Deleted messages in? Roberto75780 (talk) 03:09, 7 December 2010 (UTC)[reply]

Not with the default client, sorry. WM email was mainly designed to work with Exchange (and in turn Outlook) and that uses the same folder names as on the device. If you're running the IMAP server on a Linux style box I've heard of people using symbolic links with the folder names as workarounds, but I've never personally tried that (I use Exchange). Sorry!  ZX81  talk 03:58, 7 December 2010 (UTC)[reply]

Use cases

[edit]

Explain how use cases can be used in construction of data flow diagrams —Preceding unsigned comment added by 41.204.170.50 (talk) 07:36, 7 December 2010 (UTC)[reply]

Section header added for this question. Comet Tuttle (talk) 07:40, 7 December 2010 (UTC)[reply]
Sounds like a homework question. Try looking at use case, then if you want to ask a specific question, rather than your homework, perhaps people can help you. Shadowjams (talk) 10:19, 7 December 2010 (UTC)[reply]

Is backing up gmail important?

[edit]

I'm a strong believer in backing up the data on my computer, but is backing up something like your gmail messages helpful? I assume Google backs these up itself. ike9898 (talk) 14:17, 7 December 2010 (UTC)[reply]

It all depends on how much you trust Gmail to do it for you. Also consider the possibility that someone hacks your Gmail accounts and deletes them. Not impossible. Probably not likely. But all of these kinds of considerations are a balance between the inconvenience of doing something and the possibility that it might be worthwhile to have done it. --Mr.98 (talk) 14:32, 7 December 2010 (UTC)[reply]

Backups are always good, and with programs like gmail-backup very easy. 82.44.55.25 (talk) 15:07, 7 December 2010 (UTC)[reply]

Is there any Hotmail backup program please? 92.15.11.224 (talk) 15:23, 7 December 2010 (UTC)[reply]
If you need to save emails to disk, my recommendation is to set up a program like Mozilla Thunderbird (which can work with Gmail, Hotmail, and any other POP- or IMAP-capable email system. Then use the Thunderbird Backup to save your settings, and Offline Folders to save your mail to disk. Nimur (talk) 17:58, 7 December 2010 (UTC)[reply]
Would setting up Thunderbird require supplying it with several mysterious numbers, or does it do that sort of thing automatically? Can I use Thunderbird and use Hotmail in the same way as previously? Thanks 92.24.176.134 (talk) 19:29, 7 December 2010 (UTC)[reply]
When I tried Thunderbird a while ago it just asked for the email address, and from that it worked out all the ports and other info to use. If you mean can you still access Hotmail via the web interface after setting up Thunderbird, yes you can. 82.44.55.25 (talk) 19:46, 7 December 2010 (UTC)[reply]
I had difficulty finding this earlier, but here are the official settings for Hotmail's servers. Nimur (talk) 21:48, 7 December 2010 (UTC)[reply]

Nancy Drew games

[edit]

can you till me how to play nancy drew games for xp on my windows 7 64bit —Preceding unsigned comment added by 92.8.25.132 (talk) 15:20, 7 December 2010 (UTC)[reply]

Tell us what happens when you just try to play the game normally. If that doesn't work — and I have not played any of these games — then first install the game on your hard disk, then locate the game folder, which is probably in "C:\Program Files\" and then in its own directory. Find the .exe file — that is, the file that ends in ".exe". If you don't see any, then go to Control Panel -> Folder Options -> View and uncheck "Hide extensions for known file types". Right-click that .exe file and click the Compatibility tab. There you can choose to have Windows 7 run the game in "compatibility mode", where Windows 7 tries as much as possible to pretend that it's Windows 98, or Windows 95, or whatever your game says it should be running under. Comet Tuttle (talk) 17:23, 7 December 2010 (UTC)[reply]
Also worth trying is right clicking on the shortcut or icon and selecting the "Run as Administrator" option. Older games often need permissions to run correctly which Windows 7 disables on normal running of applications as a security feature. Edit - obviously only do this if you are running a genuine legit copy rather than a pirate or crack. Scan the executable with antivirus first! Exxolon (talk) 20:23, 7 December 2010 (UTC)[reply]

can a windows binary do anything in between when you click "allow administrative privileges" or is it not executed at all?

[edit]

So, I know this internet cafe computer was infected, and I made sure the USB I transferred nonbinary files (just text files) onto my laptop with had no autorun (put it in without autorun and checked for any autorun files but there were none). I was trying to navigate into a folder on it when, too late, I clicked on that only LOOKED like a folder (it had the folder icon) but was an executable file! I realized it was executable because Windows told me it needed admin privileges, which naturally I said no to. My question: could the virus have done anything anyway, without admin privileges? Or, does the executable not get run in any way in this situation? (ie windows knows it's an admin type .exe, and asks you first when you double-clicking, without so much as running it in any way). Thanks! 82.234.207.120 (talk) 23:02, 7 December 2010 (UTC)[reply]

Which version of Windows? If you use Vista or Windows 7, the application can not even start to run unless you grant it privileges. This Microsoft TechNet article has this control-flow diagram which explains the situation well: the application terminates does not even launch if you don't grant permission. I'm still investigating whether an application could, say, put all privilege-requiring code in a DLL file; and start running as a normal, unprivileged program, and then load the DLL ... thus, not raise the Elevated Privileges prompt until it starts doing something administrative-y. But so far, that doesn't even seem possible, and if it were, it still doesn't seem like it could breach the UAC security layer. Nimur (talk) 23:27, 7 December 2010 (UTC)[reply]
User Account Control Best Practices says it also depends on your User Account Control settings. Nimur (talk) 23:38, 7 December 2010 (UTC)[reply]
whew, thanks for the quick answer! I feel relieved :). windows 7 by the way. thanks again. 82.234.207.120 (talk) 01:00, 8 December 2010 (UTC)[reply]

Wikileaks insurance file encryption key length

[edit]

There are a number of reliable sources stating that the insurance file by wikileaks is encrypted with a 256 digit key. Are they confusing 256 digit with 256 bit (key size)? Technical literacy isn't improving.Smallman12q (talk) 23:42, 7 December 2010 (UTC)[reply]

We could charitably suppose that they mean binary digits. --Tagishsimon (talk) 23:45, 7 December 2010 (UTC)[reply]
PCMag and The Register both say the file is called insurance.aes256, which certainly strongly suggests it's encrypted with AES in 256 bit mode. Strictly, absent the key to decode it, there's no way to know that it's really AES-256 at all; for all we know it could be encrypted with a different cryptosystem(s) instead, and calling it aes256 could just be intended to misdirect any TLA with a team of mathematicians and a giant compute farm to run it through the wrong cracking infrastructure. -- Finlay McWalterTalk 00:01, 8 December 2010 (UTC)[reply]
It may even be gibberish, an elaborate bluff. APL (talk) 02:28, 8 December 2010 (UTC)[reply]
I feel I should point out that there's no such thing as "a file encrypted with AES-256". The Advanced Encryption Standard only defines a way of encrypting 128-bit blocks, and there are many different (incompatible) ways of building on that to encrypt larger amounts of data. They might have used an encryption product that happens to (somewhat inaccurately) use the .aes256 extension. But I think it's more likely that ".aes256", like "insurance", is there simply to impress the easily impressed. That's not to say it's not a genuine encrypted file. It could be a TrueCrypt container, for example. TrueCrypt offers AES-256 in XTS mode as one of its encryption options. XTS uses two different keys, so there are actually 512 bits of key material used to encrypt the bulk of the data. Those 512 bits are stored at the beginning of the file encrypted with a different 512-bit pair of keys, which are derived from a user-entered passphrase which may be of any length. So even though one could say that the file is encrypted with AES-256 in this case, it's not accurate to say that it's encrypted with a 256-bit (or 256-digit) key. The de facto key (lock) is the passphrase of unknown length. -- BenRG (talk) 04:21, 8 December 2010 (UTC)[reply]
Not to quibble, but I think that the AES standard actually does include 256 bit key implementations... Rinjidel itself was technically only 128... if I remember right. I personally use ROT13 because I think its security level is clear. Shadowjams (talk) 11:24, 8 December 2010 (UTC)[reply]
AES supports key sizes of 128, 192 and 256 bits and the block size is fixed at 128 bits. Rijndael supports other block and key sizes. When I said "128-bit" above I was talking about block size, not key size. -- BenRG (talk) 12:39, 8 December 2010 (UTC)[reply]