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

= December 20 =

Suggestion for Wikipedia software.
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)


 * Umm...what are you exactly proposing to change? If you'd like to make a proposal, go to Village pump (proposals). If you would like help choosing a career path, you might want to ask a counselor to help.  bibliomaniac 1  5  00:14, 20 December 2007 (UTC)


 * 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. --  k a i n a w &trade; 01:06, 20 December 2007 (UTC)
 * 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)


 * 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. --  k a i n a w &trade; 01:13, 20 December 2007 (UTC)
 * 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)


 * Wouldn't this be contradictory to the non-profit status of the Wikimedia Organization?  bibliomaniac 1  5  03:16, 20 December 2007 (UTC)


 * 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. --  k a i n a w &trade; 03:20, 20 December 2007 (UTC)


 * 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)

hardware or software?
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)
 * 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)


 * They are going to release a 3G version next year sometime--droptone (talk) 13:09, 20 December 2007 (UTC)

Can I use avast! and ClamWin on the same computer?
They might make the computer unstable or the antivirus might fight wit each other. Jet (talk) 04:01, 20 December 2007 (UTC) command is used for individual files and  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  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)


 * 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)


 * 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 " ".  --Sean 12:35, 21 December 2007 (UTC)

Make executable from Python code
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)


 * 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)


 * 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)
 * 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)
 * 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)
 * 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)
 * 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.  r speer  / ɹəəds ɹ  16:36, 22 December 2007 (UTC)
 * 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)