Wikipedia:Reference desk/Archives/Computing/2011 January 7

= January 7 =

Compiling applications for NT4 MIPS?
So, I have Windows NT 4.0 running on a MIPS Magnum R4000. Now as you might know (and as the article says), there are very few applications for NT4 MIPS, so I have internet connectivity but no web browser to begin with (except IE2, which doesn't really work). Now, I do have Visual C++ 4.0 - I wonder if that could become any useful in compiling applications? Or is it not worth bothering? -- Prince Kassad (talk) 02:49, 7 January 2011 (UTC)
 * What is your objective? C and C++ code will compile for MIPS, but the architecture is sufficiently different that any reasonable application (like anything with a GUI) will be non-trivial to port.  *nix has great support for MIPS, and your workstation in particular can run BSD and Linux.  But what is your objective?  A low-end $25 consumer digital camera has a more powerful MIPS core, probably with more RAM, higher-resolution LCD, and more modern peripheral buses than your Magnum; so if you're looking at hacking up some MIPS code, you might refocus your effort.  If your goal is hobbyist recreation of the historical platform, it'd be a bit out of place to port modern software to the Magnum.  Maybe you could port Android to it - there's a free documentary/webinar available through the MIPS website to train you up on that.  Nimur (talk) 03:56, 7 January 2011 (UTC)


 * I'm not sure if Visual C++ had cross-compilers. Do you have a native MIPS version?  The Windows APIs have changed a lot since NT 4.0...  Lots of GUI apps indeed will be hard to recompile even if you have a working cross-compiler, so I generally agree with Nimur's recommendation to drop NT and try out something more modern (NetBSD in particular is a great OS that supports a dizzying array of platforms).  But if you insist, the usual route I've gone when working with odd platforms is to first get a modern compiler and toolchain (e.g. gcc and friends) running, then from there try to build apps.  Assuming that can get a MIPS cross-compiler, you should be able to cross-compile a small compiler, then use that to bootstrap gcc (which might require a couple other things like a shell, lex/yacc, etc.  See the MinGW project for a ready-made set of packages you can start fiddling with.  The MinGW folks might still have some people around with some knowledge about cross-compiling for MIPS, so their user groups may be a good help.  Once you have the basic MinGW pieces in place, you can start compiling bigger packages like X11, and from there, Firefox and other tools that you're accustomed to using.  If just using the machine is your goal, though, it's probably easier to use something like NetBSD where they've already gone through all the trouble of building you a userland.  Then all you need to do is download and build the things you need.  —Preceding unsigned comment added by 128.12.174.253 (talk) 03:44, 8 January 2011 (UTC)

Is this spam/a virus?
I got an email without a heading from someone I trust. I don't think she ever sends emails without a heading, and even more puzzling is that all it contains is a URL. Apparently the website is from France; I can provide the URL if needed. I don't see why someone would send and email with nothing but a URL; is it some kind of spam or is it a website with a virus/worm/whatever?  Kayau  Voting  IS   evil HI AGAIN 05:49, 7 January 2011 (UTC)


 * Yes, it is. I get such emails, too.  I suggest you reply back to them to let them know their computer is infected, and likely everyone in their address book is now getting SPAM. StuRat (talk) 05:56, 7 January 2011 (UTC)


 * Thanks, I have.  Kayau  Voting  IS   evil HI AGAIN 06:20, 7 January 2011 (UTC)


 * Note that it is incredibly easy to forge the From: address of an email. This is rather common with spam messages. There is a possibility that the email did not come from her computer at all, but was instead sent from some other computer with a forged from: address. -- 174.21.250.227 (talk) 16:54, 7 January 2011 (UTC)
 * It could also have been that her email was hacked, so in that case you might want her to get her to change her password after disinfecting/removing the malware or virus. Chevy  monte  carlo  19:47, 7 January 2011 (UTC)
 * Sorry if I'm pointing out the obvious, but the advice from 174.21.250.227 implies that it is important to write a separate email to your friend, and not to reply to the email directly. That reply might go to the originator of the spamming scheme, and provide them with your email address. A follow-up question to the other refdeskers: might there be additional damage done by replying to such an email, like malware installation on your computer? --NorwegianBluetalk 10:23, 8 January 2011 (UTC)
 * Phew... I replied the email, and she said she did not send it. So (fortunately) it was not what 174 said. Thanks, everyone.  Kayau  Voting  IS   evil HI AGAIN 13:39, 8 January 2011 (UTC)
 * I don't think you understood what I wrote. The From: address on an email is exactly like a return address on a letter. Although most are labeled with the address of the person who sent it, there's not physical or technical prohibition that it *has* to be that way. If you know how to do it, you can substitute any address and any name, and the mail system will accept it without question. If her address was forged by a third party, your friend *wouldn't* have sent it.
 * The email system works like this: Your friend uses the email program on her computer to send a message through her email provider (ISP/Gmail/Hotmail/etc.), which then passes it through the internet, where it is accepted by your email provider, which sends it to the email program on your computer, where you read it. There's only a limited amount of security at any point in that path. At any point in that system, a third party spammer could break in an send a spam message. (1) They could install malware on her machine which sends the message without her. (2) They could hack into her email account, and send the message without her or any of her computers being involved. (3) They could spoof the from: address ("Hi Kayau's email provider, I have a message for Kayau from (friend)" "Okay, stranger who I have never seen before, I will trust that it's from (friend), even though you have no proof it is."), and send the message without her, her computers or her email provider being involved in any way shape or form. Due to the way the email system is set up, this can happen even if you use the same email provider. Mail systems will accept internet-originated messages even if the from: address indicates they should have originated internally. (4) Technically they could do something with your email provider/account/computer, but that's very unlikely. Most spam messages happen by (3). The spammer just inserts a random from: address so people can't track who's really sending the message, and doesn't have anything to do with the person who is supposedly "sending" the message. As you know her, it's likely the spammer is aware of the fact you email each other, so probably has her address book, which means (1) or (2) are more likely than (3) (but (3) is still possible).
 * Finally, the point of forging the From: address is that it hides who sends it. There isn't any secretly encoded "real sender" information, so if you do reply to the message, the reply will go to the account it says on the From: line, not the person who actually sent it. (Caveat, there is also a Reply-to: line, and if set, the reply will go to the Reply-to: address, rather than the From: address. This could be the real sender, but it would somewhat defeat the purpose of forging the From: address.) I can think of no practical situation where replying to an email will harm your computer. (If there are executable attachments, and you run them, that may infect/harm your computer, but most email programs shouldn't open attachments just because you reply.) Replying to spam is usually bad because by replying you inform the recipient that your account is active, but your message will only be sent to the addresses on the To: CC: or BCC: lines. If they're all people you know, the spammer has no way of receiving your message. (Unless he's hacked their computers/accounts, in which case he'll get all their messages, replies or new.) That said, composing a new message is not a bad idea, even in situations where replying is perfectly safe. -- 174.21.250.227 (talk) 17:18, 11 January 2011 (UTC)
 * TLDR of the above; Replying to the email, rather than writing a seperate email is a bad idea. If the reply-to field is set you would just have confirmed that your email account is live, and hence worth more to spammers.  This can mean that your email account will receive more spam.  Nothing bad actually happens on your computer, but it's not a desirable thing anyway.  Taemyr (talk) 08:59, 12 January 2011 (UTC)

What would you learn after you learned how to program?
After you went through your programming 101, learning the syntax, how to use the libraries, etc, what would you learn? I thought that UML is nice (and relatively simple, at its most basic level), but what do programmers how want to improve their skills would need to know? (specially in the field of mathematics). —Preceding unsigned comment added by 77.231.17.82 (talk) 10:33, 7 January 2011 (UTC)


 * You need to learn about the hardware. If you don't have a firm grasp on the hardware, you will go off and write bad code.  As an example, assume you just finished officer school in the military.  Now, you're off to war.  You could sit in your office and hand out orders without ever taking time to see what kind of troops you are ordering around.  It would obviously be better to first find out what the unit is designed to do and what the troops' specialities are.  Within a computer, you are ordering around all the components.  So, it is a good idea to get to know what those are, how they work, and how to get the best effectiveness out of them.  Since you are considering math-related work, you will want to know the ALU very well.  I also suggest studying discrete mathematics and computer algorithms (P/NP algorithms) so you don't go off and try to reinvent work others have done over and over and over - such as coming up with yet another radix sort. --  k a i n a w &trade; 15:28, 7 January 2011 (UTC)


 * Well, I think there are a set of things. The single most important thing a programmer needs to learn is how to work together productively with other people, but it's hard to find a class that teaches that.  I would say the second thing, beyond even a knowledge of hardware, is a knowledge of project-management tools, including version control systems such as SVN and Git as well as organizational tools such as GNU autotools.  In the math realm, numerical methods are very helpful, besides the things that Kainaw mentioned. Looie496 (talk) 17:25, 7 January 2011 (UTC)


 * It depends very much about what you want to do. But for challenging work, algorithmics and basic complexity theory are very important - the first both to show you what methods are available, but also which techniques have been used to tackle hard stuff before, and the second to understand why you should care about good algorithms and data structures. --Stephan Schulz (talk) 17:35, 7 January 2011 (UTC)


 * re: "how to work together" classes... Every university that I've taught at has at least 2 semesters of required software project courses. They have different names from campus to campus, but the concept is the same.  Start with the waterfall method and go through all the other popular methods of software development.  Teach project management tools.  Have students work in groups to complete a complex project (usually over the course of two semesters). --  k a i n a w &trade; 19:36, 7 January 2011 (UTC)


 * computer theory is an important next step. Other than that, CS programs in four year colleges are also usually heavy on the math. Calculus and Discrete math are usually covered. A Computer Architecture class and/or an Assembly Language class are probably in there too.
 * Students at four year schools tend to specialize somewhat within their degree. Students may have the choice of taking a certain number of credits in areas like databases, robotics, computer graphics, human-machine interaction, artificial intelligence, machine learning, etc.
 * IS all this strictly necessary? No. I'm sure there are people who make a good living having learned everything they needed "on the job", or from a "Learn iPhone programming in 30 days" type book.
 * One last note, while learning syntax is easy, I don't think that there is an "after you learned how to use the libraries". Any real world programming will require using a lot of different libraries from different vendors. Learning the libraries that "come with" your language of choice is only the beginning. APL (talk) 17:36, 7 January 2011 (UTC)

In most accredited university degree programs in computer science, the basic introductory course involves a class in each of the following areas: Beyond those classes, specialized fields of computer science, computer engineering, or software design can be pursued. Most reputable computer science programs also require extensive math training, in calculus, linear algebra, and often in differential equations. Here's a semester-by-semester breakdown from my undergraduate alma mater, North Carolina State University's computer science core curriculum. You can read a "blurb" / paragraph course overview for each of the required classes. These requirements are comparable to almost any other major university program for a Bachelor of Science in Computer Science. But you don't have to pursue "computer science" - maybe you learned to program so that you could become a mathematician, a physicist, an engineer, an economist, or any other type of career or academic track, you might follow a different route. If you like applied math, I highly recommend at least one or two solid classes in numerical methods, in addition to basic algorithms. Bear in mind that you will need to know some fairly advanced calculus in order to program a computer to compute even simple calculus correctly; the same goes for all other disciplines of mathematics. As a rule, programmers must be better at the mathematics than the machine, because they are giving instructions to the machine. Nimur (talk) 19:45, 7 January 2011 (UTC)
 * Computer programming basics:
 * a language primer ("Programming 101")
 * an advanced language course, ("Programming 201")
 * an algorithms and/or data structures course ("Programming 301")
 * Computer science basics
 * discrete mathematics and computer-theory course
 * elementary computer architecture
 * Software engineering fundamentals
 * operating systems concepts


 * May I recommend Knuth's The Art of Computer Programming? It taught me all sorts of useful and interesting things, especially mathematical stuff, that my BSc in CS missed out. Marnanel (talk) 15:20, 8 January 2011 (UTC)

Task manager
If I go to the task manager on my computer, it gives to bar graphs, one for CPU usage, in percent, and the other is "PF Usage", measured in megabytes. anyone know what "PF" is? Something to do with RAM? --  T H F S W  (T · C · E) 19:44, 7 January 2011 (UTC)


 * Page file. Nimur (talk) 19:47, 7 January 2011 (UTC)


 * Thanks. How do I tell how much RAM my computer is using? --  T H F S W  (T · C · E) 19:57, 7 January 2011 (UTC)


 * Due to caching, the answer to that will likely be "all that is available". There is no benefit in having unused RAM.  So, modern operating systems keep as much stuff in RAM as possible to avoid pulling it off the hard drive or recalculating it again in the future. --  k a i n a w &trade; 20:01, 7 January 2011 (UTC)


 * So in other words, almost all your RAM is being used at once, and the "overflow" is put on the page file? --  T H F S W  (T · C · E) 21:37, 7 January 2011 (UTC)


 * Yep. Of course, if your computer isn't doing much, the RAM may not be 100% in use, and the paging space will be empty. StuRat (talk) 22:17, 7 January 2011 (UTC)
 * On Windows, there is a special operating system file on disk, pagefile.sys, which is usually invisible. Certain portions of that file are mapped to RAM; the job of the Windows operating system's memory manager is to decide which portions, and when to swap them out.  The value reported in Task Manager for "size" of the page file is not necessarily the size of the file-on-disk.   (That's managed dynamically by this system setting, and varies between a minimum and maximum file-size).  Task Manager is really reporting the total number of bytes that user-space programs have allocated.  Those bytes may reside in RAM or on the disk in the pagefile.sys file; or in both places, with a caching policy managed by Windows.  This Microsoft TechNet blog gives a good overview of the whole process.  Nimur (talk) 22:36, 7 January 2011 (UTC)