Wikipedia:Reference desk/Archives/Computing/2007 December 20

From Wikipedia, the free encyclopedia
Computing desk
< December 19 << Nov | December | Jan >> December 21 >
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 20[edit]

Suggestion for Wikipedia software.[edit]

After much frustrated searches, I have struggled to find a decent source of career/study path information. I think that wikipedia has a very thorough source which many students would find helpful in there quest. After asking around, I have encountered that this is a common problem shared by many people at this stage of their life. Therefore with the links and sources that are available to the user, i believe that a more user-friendly interface would be extremely useful to address this dilemma. —Preceding unsigned comment added by 90.196.138.99 (talk) 00:10, 20 December 2007 (UTC)[reply]

Umm...what are you exactly proposing to change? If you'd like to make a proposal, go to Wikipedia:Village pump (proposals). If you would like help choosing a career path, you might want to ask a counselor to help. bibliomaniac15 00:14, 20 December 2007 (UTC)[reply]
It appears to be a complaint that Wikipedia's search function is not very thorough. That is a well known problem and there is a reason for it. If the search was improved, the whole site would slow down and become sluggish to the point of barely being usable. That is why most people use Google with site:wikipedia.org in the search query. -- kainaw 01:06, 20 December 2007 (UTC)[reply]
That's sort of a lame explanation, if I say so. I don't think there's a rigorous reason why Wikipedia could never in fact have a better search engine. Ten bucks says the guys from Google could come up with a solution. --24.147.86.187 (talk) 01:10, 20 December 2007 (UTC)[reply]
Sure - they have an easy solution. Purchase a few thousand extra servers. Create an index of all the popular search terms for every page on Wikipedia. Have the search function use the search indexes on the new servers instead of the unindexed Wikipedia database. Note: Purchasing more servers and placing them in more locations (even weird ones like Moncks Corner, SC) is the Google solution to their own search problem. -- kainaw 01:13, 20 December 2007 (UTC)[reply]
Wikipedia could "partner" with google to use their algorithms and servers in exchange for a "powered by google" logo. Mozilla already makes millions from their partnerships --ffroth 03:14, 20 December 2007 (UTC)[reply]
Wouldn't this be contradictory to the non-profit status of the Wikimedia Organization? bibliomaniac15 03:16, 20 December 2007 (UTC)[reply]
Also, it is unnecessary. If the Wikipedia search doesn't turn up anything interesting, you just select Google from the drop list of search engines and click search again. Google is used to search Wikipedia for whatever you are looking for. -- kainaw 03:20, 20 December 2007 (UTC)[reply]
Being non-profit doesn't mean you can't take in money, it just restricts what you can do with it. Mozilla is non-profit as well. --24.147.86.187 (talk) 14:11, 20 December 2007 (UTC)[reply]

hardware or software?[edit]

I just got an iPhone and can already see some of the shortcomings. I was wondering, of these things, which could be updated by new software or it would require new hardware.

  1. Horizontal or vertical picture in all programs
  2. some keys are missing on the keyboard
  3. uses the edge network, not 3G
  4. regular earphones aren't usable, only headphone+microphone
  5. camera doesn't capture video, just takes pictures
  6. after a while safari just saves the URL of the page you are at, not the actual stuff you have entered into text fields and whatnot

thanks for any insight schyler (talk) 01:18, 20 December 2007 (UTC)[reply]

Probably all could be fixed by a homebrew firmware. Which is why people like custom firmware so much, and why the DMCA exemption committee granted an exemption to the DMCA for cell phone mods (though it has expired and wasn't renewed) --ffroth 03:12, 20 December 2007 (UTC)[reply]
They are going to release a 3G version next year sometime--droptone (talk) 13:09, 20 December 2007 (UTC)[reply]

Can I use avast! and ClamWin on the same computer?[edit]

They might make the computer unstable or the antivirus might fight wit each other. Jet (talk) 04:01, 20 December 2007 (UTC) [1][reply]

Note: I asked this question on Yahoo! Answers and I place the text into the public domain.

Gotta love yahoo answers. "they will fight and crash your pc. you can run as many spyware tools at a time you like. they play good together" --ffroth 09:00, 20 December 2007 (UTC)[reply]

It is not a good idea nor is it better security to run two anti-virus programs. Even running one forces a huge performance hit and only adds a very small layer of security; adding more only increases the performance hit without increasing the security. If you want security against viruses in Windows, 1. don't run as administrator, 2. don't execute sketchy code. --24.147.86.187 (talk) 00:22, 21 December 2007 (UTC)[reply]

If you run them in real-time scanning / resident mode at the same time (which ClamWin doesn't have, AFAIK), you'll notice a performance hit. Otherwise, there won't be an issue, beyond the normal performance hit from a virus scanner. But yeah, avoiding sketchy executables is the best security you can get. -- Consumed Crustacean (talk) 05:22, 21 December 2007 (UTC)[reply]

I think I am going away from the question with this. However, sometimes, there are some problems in applications in pre-vista OSes (including XP) have some problems in running without root privileges. Not that Vista is perfect, though.

regards, Kushalt 01:04, 21 December 2007 (UTC)[reply]

Understanding problem[edit]

sir, i could not understand this line Bi-directional language support is available for Arabic, Hebrew and Hindi message content. @ page en.wikipedia.org/wiki/Windows_Live_Hotmail at para Features -->Additional information --> Languages please help -Matt59.94.128.238 (talk) 04:14, 20 December 2007 (UTC)[reply]

see Bi-directional text --tcsetattr (talk / contribs) 05:18, 20 December 2007 (UTC)[reply]

AceText alternative for Linux[edit]

Hi, does anyone know of a software with capabilities similar to those of JGSoft's AceText that will run on Linux? Thanks. -- Meni Rosenfeld (talk) 11:38, 20 December 2007 (UTC)[reply]

I seriously doubt that there is a single program that does that. There is an advanced clipboard utility (klipper), note-taking tool (jots), multi-pane text editor (kate), and many word processors. They just aren't all encompassed in one tool. -- kainaw 13:29, 20 December 2007 (UTC)[reply]
Thanks. Does any of those allow organizing notes in a hierarchical structure, and accessing them with features similar to "AceType" and "SequencePaste"?
In any case - the features I have mentioned have to do with AceText, while minimized, performing some action when I press some keyboard combination. Is it possible to make this work if I run AceText on Wine or on virtualization software (while working on an application on the host system)? -- Meni Rosenfeld (talk) 19:17, 20 December 2007 (UTC)[reply]
Treepad does. The advantage of that is that you can share the data files between Linux and Windows computers. The problem is that Treepad is not FOSS. -- kainaw 13:04, 21 December 2007 (UTC)[reply]
Not being FOSS I can deal with, the problem is that it apparently lacks some features I require. This is certainly something to consider if all else fails, though - thanks. -- Meni Rosenfeld (talk) 15:11, 21 December 2007 (UTC)[reply]

DNS Privacy[edit]

Hello, I recently discovered that a friend blogger of mine, who got his dommain registered by OVH, got his name written in clear as an answer to a whois request.

His blogging activity being pollitical in nature and not exactly an appology of the work of his own political border (it can become -verry- critical) and the security of his job depends from nearly exclusively on two principle "Loyalty" and "STFU". So you may understand that uppon learning his vulnerability, he was a bit worried.

We are allready trying to see with the registrar if he is able to "mask" his records. If that's not the case, do you guys got any solution ? I'm a complete noob with dommain handling, so I would need your help on this one. - Esurnir (talk) 11:47, 20 December 2007 (UTC)[reply]

I'm not an expert, but from my experience with registrars, they all offer a service to mask personal details in a WHOIS request, for a price around 10$ / yr. 132.77.4.129 (talk) 12:58, 20 December 2007 (UTC)[reply]
You can just plain spoof the WHOIS information, but this is considered a violation of many terms of service agreements yet I don't think there is much enforcement of the requirement for "true" information. But I suppose the masked record service offered by the registrar would give you legit information (say some PO Box owned by the company).--droptone (talk) 13:12, 20 December 2007 (UTC)[reply]
It's illegal to spoof whois information, and he'll lose his domain name (opening it to attack by a target of his blogging?) if ICANN ever finds out. If you can get a 3rd party to agree to act as your official contact (which technically means they -taking your responsibility as a domain registrant- have to be sitting next to a phone 24/7, though nobody actually does this) then you can use them as your whois information. Several companies offer this service for a few bucks a month- a guy I knew online did this because he was only 15, so he registered his domain in the name of one of these contact-forwarding companies. I forget its name though. --ffroth 19:44, 21 December 2007 (UTC)[reply]

Freeware solution for accepting 48-bit scans from an image scanner?[edit]

I have a scanner capable of outputting 48-bit (i.e. 16 bits/channel) color scans. However, none of the several image editing programs I have seem to be able to accept 48-bit scans directly from the scanner (including two that have limited support for 16-bit-per-channel images). Images imported into the editors via TWAIN would appear as 8-bit-per-channel.

Is there a freeware solution for accepting 48-bit scans from a scanner and saving the scans in a format that preserve the bit depth?

(Update) The problem is solved. Turns out that my set-up was already capable of transferring 48-bit images, just that additional configuration was needed. —Preceding unsigned comment added by 71.175.23.249 (talk) 13:47, 20 December 2007 (UTC)[reply]

There is a version of GIMP called CinePaint that was forked off of the main GIMP branch several years ago specifically in order to add deep-pixel editing. It's been used in a bunch of movies (Harry Potter for example!) so it's pretty reliable. It's free - but it's missing quite a few of the newer GIMP features. It's maintained by a bunch of movie studios. SteveBaker (talk) 17:14, 20 December 2007 (UTC)[reply]

Laptop Charger[edit]

Mine recently broke and I'm finding it very difficult to get a replacement. I've rang the shop where i bought who referred me to another shop. Although they did sell chargers they could not provide one suitable for my laptop. (mine is 18.5v, while they only did round figures, i.e. 17v, 18v, 19v etc...) They told me to go to the manufacturer. I couldn't find anything on the website and when i rang them they basically told me to go back to the original retailer.

SO I'm coming here for help. The Laptop is a Compaq Presario V5245eu and the charger has an output of 18.5v and 3.5amps. I'm in Ireland so a European/UK power source. If anyone knows where i could get a replacement charger I'd greatly appreciate it —Preceding unsigned comment added by 213.202.183.77 (talk) 14:08, 20 December 2007 (UTC)[reply]

LaptopsAndSpares.com is a UK online store that sells, well, laptops and spares. In fact, they have the very charger you're looking for, here. ›mysid () 15:12, 20 December 2007 (UTC)[reply]

Thanks a million, that was proving so hard to find. 213.202.183.77 (talk) 15:18, 20 December 2007 (UTC)[reply]

I left my laptop (HP Pavilion) charger 200 miles away - an ended up needing a replacement in a hurry. I had the same problem. You can get a generic charger BUT make sure it provides enough current or it'll overheat and burn out in a hurry! Set it to 18v and see if your battery charges. If it does, be happy. If it doesn't, kick it up to 19v and you'll be fine. But I'm VERY serious about needing to source enough current. I'd try to find one that can source at least 50% more current than the laptop demands (if you run one of those cheapie chargers for a long time near to it's current limit, it'll get very hot). Oh - also, be VERY careful - some of those cheap chargers have fine print telling you that they only produce the rated amount of current at the lower voltage ranges...watch out for that! SteveBaker (talk) 17:10, 20 December 2007 (UTC)[reply]

Pedagogical cfront[edit]

I'm currently helping my co-workers, who are all long-time C programmers, to become more comfortable in C++. I would love to have a book/document/tool that shows (in C) what the compiler is doing under the covers for various C++ constructs. I don't want a real C++ -> C compiler, as that will have a lot of obscure implementation details in the output. I just want to show them the moral equivalents, as in:

Here's how constructors and destructors work. The following C++ code:
 class Thing { /* ... */ };
 void func() {
   Thing first_thing_on_stack;
   Thing second_thing_on_stack;
   // do stuff ...
 }
will compile to something like the following C code:
 struct Thing { /* ... */ };

 void func() {
    struct Thing first_thing_on_stack;
    struct Thing second_thing_on_stack;

    // constructors called in order of
    // object definition
    Thing_CONSTRUCTOR(&first_thing_on_stack);
    Thing_CONSTRUCTOR(&second_thing_on_stack);

    // do stuff ...

    // destructors called in reverse order of
    // object definition
    Thing_DESTRUCTOR(&second_thing_on_stack);
    Thing_DESTRUCTOR(&first_thing_on_stack);
 }
 

Is anyone aware of such a thing? Thanks! --Sean 14:24, 20 December 2007 (UTC)[reply]

When C++ was first designed, the first implementation was the AT&T C++ translator called "Cfront" that "compiled" your C++ code into C - which you could then compile into machine code in the usual way. This did exactly what you're asking for here - and that's exactly how I got to grips with the transition from C to C++. However, with modern C++, there is often no easy way to express what's going on in C terms and the AT&T translator must have long ago ceased to be maintained. However, if you care - you could download the sources for Cfront from here and compile it yourself. It won't accept all of the latest C++ features - but for the basics, it should be OK. SteveBaker (talk) 17:03, 20 December 2007 (UTC)[reply]
I'm far from convinced that this is a good pedagogical idea. You don't want to explain object-oriented programming in terms of procedural programming, you want to understand it on its own terms. Donald Hosek (talk) 18:32, 20 December 2007 (UTC)[reply]
That's true - but Sean is in the position of having a lot of C programmers who work close to the hardware who need to be eased rather gently into C++. Whilst it's true that OOPS is best taught from the ground up, people who care a lot about performance and the details of what's going on do gain a benefit from seeing what goes on 'under the hood'. After all, our CPU's are procedural things - knowing how OOPS maps onto procedural is valuable when clock cycles and bytes count. This isn't an alternative to teaching OOPS - it's a way to get people like this to actually use it in their day to day jobs. I certainly found it valuable. Things like knowing when OOPS will allocate memory behind your back and when it won't - how to avoid static initialisations when programs are running out of ROM memory...what happens if you transmit a class object over a network or load and save it to disk as a chunk of raw binary...those are things that are rarely mentioned in C++ books, but they matter a great deal to people working close to the bare metal! This isn't the only thing you need to do to teach people - but it's a valuable tool for people who know enough to be dangerous! SteveBaker (talk) 21:36, 20 December 2007 (UTC)[reply]
What Steve says really is the crux of it. Starting out with "OOP is great because ..." is going to be as appealing to them as "Programming in Haskell is great because ...". It may be true, but it just won't sell. What I can do is show them how C++ is "like C, but more convenient and no slower" by showing them things like RAII on mutexes, which are easier, safer, and no slower than remembering to do the unlock yourself. --Sean 12:30, 21 December 2007 (UTC)[reply]

COPY vs XCOPY[edit]

If I read the articles correctly, then the COPY command is used for individual files and XCOPY for multiple files at a time, is that correct? So let's say I have a folder called folder and within it I have a file, file.txt and another folder, subfolder. If I wanted to copy folder and everything in it (which includes file.txt and subfolder), I would use the XCOPY command? When I tried this prior to posting, I typed xcopy folder C:\Documents and it said 1 file copied. But what happened to subfolder? I thought it would copy that also. Is there a command or line switch that allows one to copy subfolders as well as files? Sorry if this is an easy question, I'm not very experienced this. Thanks! 63.28.159.41 (talk) 22:43, 20 December 2007 (UTC)[reply]

You need to learn the switches. Type the command
xcopy /? | more
and it will tell you what switches to use. I believe you want to use the switch /E which makes it copy directories and subdirectories.--Dacium (talk) 23:49, 20 December 2007 (UTC)[reply]
This is the third or fourth question on the Windows command shell recently, so I just wanted to mention that trying to do anything non-trivial with it is *guaranteed* to make you cry. If you're trying to do any scripting, you might think about installing something like the Cygwin Unix-like environment for Windows, or using something like Perl or Python. Nobody deserves code like "if %ERRORLEVEL% NEQ 0 goto failed". --Sean 12:35, 21 December 2007 (UTC)[reply]

Make executable from Python code[edit]

Hi everyone,

I decided to learn a bit of programming, so I just got started with Python (seemed the best choice to start off with, though maybe a bit high level).

I'm starting to get the hang of it, but there's one thing I can't really get my head round : how can I create a Windows Executable from a Python code ?

I searched a bit on google and stumbled upon py2exe. I found it very unintuitive but I managed to make an executable, only to notice I need some DLLs to run it (obviously I have those DLLs, but people who haven't got Python installed won't).

Ideally I would like to distribute the executable to people that haven't got any Python installation. How is that possible (making an installer with the DLL files isn't really a solution) ?

I'm sure the answer must be quite simple (I don't see why it would be that hard) but I just haven't managed to find any information...

PS. I'm not using any fancy modules or anything so no worries there (basically just math and cmath).

Thanks. -- Xedi (talk) 23:09, 20 December 2007 (UTC)[reply]


The problem is that Python isn't a compiled language - it's interpreted. This is to say, it isn't translated into machine code - so there isn't a direct way to make a EXE file and in order to run it, you NEED the Python interpreter. The tool that you used isn't familiar to me - but I'd bet good money that it puts your Python code into the EXE file along with a teeny-tiny machine code section that pulls in the Python interpreter as a DLL - then passes the Python code to it. Hence, your EXE file still needs the Python interpreter - although now it's a DLL instead of being an EXE. There isn't an easy way for them to fix this. They could put the Python interpreter into your EXE file as well as the Python code - but now your three line Python program is about a 3 megabyte EXE file because every program you write contains the entire Python interpreter...which I guess is why they don't do that.
This is one of the problems with interpreted languages like Python - and, sadly, you're kinda stuck with it. To be honest, if you aren't already a programmer, Python is a poor choice as your first language. IMHO, you should start off with Java...although that also has problems with making EXE files - for the exact same reason as Python does. To make lean, mean EXE files, you need to write in C++.
SteveBaker (talk) 02:00, 21 December 2007 (UTC)[reply]
Ok, thanks.
But may I ask why Python isn't a great choice for a first programming language ? I agree with the Python philosophy more than any other programming language I know of and the language as a whole seems much more intuitive. Granted, it may be at a too high level to really understand many of the things that are going on underneath, but well... What reasons would you give to explain that ?
Thanks -- Xedi (talk) 04:21, 21 December 2007 (UTC)[reply]
  • There's nothing wrong with Python as a first language. The hard part of programming, the part that beginners (and non-beginners!) struggle with, is learning how to think about the problem at hand, break it down into digestible parts, and solve those parts with code. It doesn't really matter what language you're learning that with, as long as it's "composable" (so that you at least have a chance of learning the Fundamental Law of Software: "Don't Repeat Yourself"). --Sean 12:42, 21 December 2007 (UTC)[reply]
That's true - but that's totally independent of language choice - so we can factor that out from our advice about which language to learn first. Python is really very weird compared to most other languages - learning "weird" first and then trying to adapt to "normal" later is tough. If you learn Python, for example, you'll not understand the need to declare variables or the importance of 'type safety' in most languages - the syntax of Python is utterly at varience with almost every other language. Transitioning from Python to Java/C++/PHP/JavaScript/C#/whatever will be tough. On the other hand, if you start off with Java - then you'll find it easy to pick up C++/PHP/JavaScript/C# and only moderately difficult to get into Python. Since there are many things that Python simply can't do (eg web programming, high performance stuff, etc). Python's niche is in being the scripting language for other applications - and that's not a good place to start learning! I just think you'd be better off learning Java first. Most US schools that teach programming teach Java - I'm not aware of any schools anywhere that teach Python as their first language. There are REALLY good reasons for that. I'm not saying that Python is a bad language or anything - for what it's intended for, it's great - it's just not the language you should learn first. SteveBaker (talk) 13:55, 21 December 2007 (UTC)[reply]
While I agree with you, there is another factor to the problem. That is that if you're just learning programming for fun, java is probably going to scare you off. If you're a student and you can give your programming education some full time attention, you can bite through the difficulty of java and learn about important things like object oriented programming. If you're just playing around a bit on the odd saturday afternoon, you want something that will get you positive feedback quickly, otherwise you'll get discouraged and do something else. Especially important in this regard is the speed with which you can do simple graphics. In java, this is a royal pain, even if you understand the OO-model completely, and pretty much impossible if you're just learning. In python, it's relatively easy (though no as easy as it used to be in BASIC). For this reason I would suggest python for the casual hobby programmer, even if it will make the step to more strict and safe languages a bit more difficult, at least you'll get some foothold quickly. And let's face it, people that start out with the idea of learning "a bit of programming" probably won't end up being responsible for flight control system, or bussiness logic. The most that's going to come out of that is a 2D game. It doesn't matter much if you don't know about type safety when that's all you're doing. risk (talk) 15:43, 22 December 2007 (UTC)[reply]
SteveBaker, your opinion that Python is a bad first language is not one to inflict on people who are learning to program. MIT disagrees with you, for example, moving its introductory programming courses to Python (from Scheme; they've never been in a compiled language), exactly because it's considered by many to be a good and useful first language. Declaring variables and type safety are not hugely important concepts, and can be picked up for a language that requires them once you know how to program. rspeer / ɹəədsɹ 16:36, 22 December 2007 (UTC)[reply]
As far as I can tell, py2exe puts together any files that you need (dlls included), right into the 'dist' directory. Not sure what the issue is there. Just distribute the entire contents of the directory, not just the exe file. -- Consumed Crustacean (talk) 05:18, 21 December 2007 (UTC)[reply]