Wikipedia:Reference desk/Archives/Computing/2008 March 24

Computing desk
< March 23 << Feb | March | Apr >> March 25 >
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.


March 24 edit

What programming languages to learn? edit

I am interested in learning some computer programming, but I'm not sure where to start. I can currently only write XHTML (not a programming language, I know). I'm thinking maybe I should start with easier, more web based markup languages such as JavaScript and CSS and move on to maybe BASIC or C? Well, any help would be appreciated, because I'm lost; I really have no idea what I'm doing! :P --Voyaging (talk) 01:09, 24 March 2008 (UTC)[reply]

Start with something easy like php and powerful not like javascript. Actually Ruby is probably a great place to start.. it's a terrifyingly powerful and flexible scripting language with a rather large following. Try the interactive tutorials.. the application is slick so check it out even if you don't care to try Ruby :D\=< (talk) 02:13, 24 March 2008 (UTC)[reply]
There are enough programming languages out there to spend a lifetime learning. First ask yourself the question: what do I actually want to do? That said, I think something like Python is nice, on a readability level.--Fangz (talk) 02:18, 24 March 2008 (UTC)[reply]
If you learn python you'll never return to the land of the sane :D\=< (talk) 04:43, 24 March 2008 (UTC)[reply]
As far as what I want to do, I simply want to attain knowledge. I just want to have the knowledge of knowing different programming languages. I'm not sure of specifics because of my limited knowledge of the subject, but I'd like to be able to code a variety of programs, so nothing that is limited to a certain type of program would be ideal. In addition, something that could maybe build a foundation for learning other languages, or maybe lead up to learning them would be optimal. Thanks for the help so far! --Voyaging (talk) 05:03, 24 March 2008 (UTC)[reply]
IMO, you won't learn anything worth while unless you actually try to do it. So you need to set yourself a project (eg be the first person to produce a KenKen solver). Probably the easiest to learn, but of least use commercially, is non-visual Basic. Did you know that Excel includes a Basic as a macro language? I wrote my (yet another) sudoku solver in Excel VB. -- SGBailey (talk) 09:15, 24 March 2008 (UTC)[reply]
Aren't you talking about VBA?
I think Java is a good language to learn. -- Meni Rosenfeld (talk) 11:39, 24 March 2008 (UTC)[reply]
VB and Java are both terrible languages to learn for a beginner. You think you're learning a low level language and then miss out entirely on pointers, which makes for absolute fail. Learn an easy, powerful, and slow scripting language first then go for hardcore C so you learn the full spectrum, then you can learn the wussie languages like VB and Java :) :D\=< (talk) 18:58, 24 March 2008 (UTC)[reply]
Why would anyone learning VB or Java think he's learning a low level language? -- Meni Rosenfeld (talk) 23:14, 24 March 2008 (UTC)[reply]
Well, I mean like a "real" language. Java programmers are always like "I am a programmer" and everyone rolls their eyes at them. Nobody's even polite to the VB programmers. :D\=< (talk) 01:36, 27 March 2008 (UTC)[reply]

I'm of the opinion that if you learn any of the C-like languages (C, C++, C#, Java, Perl, PHP, Python, etc.), you can then very rapidly pick up any of the others. Me, I think Perl is a nice language for a beginner; C (or any of the other compiled languages) has a high "minimum required activation energy" for a rank beginner.

I'm also of the opinion that Visual Basic will destroy your mind, polluting it with many ridiculous ideas that will block you from leaning about how programming really works. (NB: I don't have any problems with people learning non-Visual BASIC, though. But BASIC is a language that's quite different from any of the C-like languages that dominate the business nowadays; it owes its basic forms to much older languages and now less-used like Fortran.)

Atlant (talk) 14:12, 24 March 2008 (UTC)[reply]

We learnt Cobol and Pascal as starter languages, then moved onto C and C++. If you are learning purely for interest I would say you want to learn one that is logically structured rather than powerful. You want one that is easy to read rather than flexible. I recall having to spend about 30 minutes talking to an old non-IT based manager explaining how coding is like hand-writing - everyone does it slightly differently. There are 100s of ways to achieve the same goals in most languages, so your best bet is not to try get into understanding the syntax/language in depth but to get a basic understanding of programming as a structure. Things vary from language to language but a good basis in one of the early-years languages (I believe) would bode well for you ever having to learn a more advanced/current language. I still do a bit of programming in FOCUS, which is actually a remarkably easy language to understand (at least at the depth of detail I use it). ny156uk (talk) 14:20, 24 March 2008 (UTC)[reply]
I think you're mad to suggest Perl Atlant :) It's extremely difficult to read example code until you're familiar with it and was written by a notorious obfuscater! I'd agree with Ruby for someone who has a professed interest in web technologies. Voyaging, you probably want to get up and running pretty quickly right? What kind of thing do you want to do? A game, a web-app, or do you want to start on the road to becoming a full-time programmer? BananaFiend (talk) 10:15, 26 March 2008 (UTC)[reply]
Well, you can write shite in any language and you're correct: much of everything that's distributed on the web as "sample code" is shite. But when I write Perl, I try to write it with the same diligence I use when writing C so I'm careful to use appropriate, self-documenting names, lots of comments, and the like. I write it as though I'll have to maintain it for years (which actually is the case ;-) ). So I think you'd find that you can pick up my Perl code, read it, and learn from it. One proof point of this is that my wife, who's a web developer but not a programmer, has been able to pick up, use, and modify Perl that I've written for her web sites.
And because Perl isn't typed and usually has a pretty good idea of what you actually mean to do, I find it's easy for beginners to use. Show them how to write and run "Hello, World!" and they're pretty much off and running.
Atlant (talk) 16:44, 26 March 2008 (UTC)[reply]
I don't really have specifics on what in particular I want to be able to code, but I think a game would be a fun starting point. It doesn't really matter, I just want to get started coding. --Voyaging (talk) 16:52, 26 March 2008 (UTC)[reply]
well, if you're interested in anything with serious graphics, you're going to be dealing with C or one of its derivatives, like C++ or C#. maybe look at some book on graphic programming for windows and start trying to much through that as soon as you can while doing introduction to C# or whatever at the same time, to get through the bottleneck. (just my opinion, my object-oriented language of choice is Excel)Gzuckier (talk) 17:32, 26 March 2008 (UTC)[reply]

If you are planning on doing things with the web in the future (and really, who ain't?), PHP is a great place to start—it's relatively powerful and you can get very satisfying results quickly, in part because you use HTML to build up your interfaces (you aren't stuck with just a console, like most of the other languages given, or building up an interface in a clunky IDE, as with VB and VB.NET). And in my opinion, when we're in the realm of self-teaching, quick, satisfying results are important, lest one find it too much trouble! (I tried to teach myself C++ years ago. After hours of playing with it I could make a console program that could do some basic math. I was not impressed with the result. Never went back.) But as has been said, it doesn't matter so much which one you start with—what matters more is that you have a driving project. Trying to learn a programming language without setting out a goal is like trying to learn a spoken language by using just a dictionary. If you have a goal in mind and are having fun with it the learning will be quite easy and enjoyable. PHP has the added benefit of being widely used on the web so there are LOTS of sites of sample code, examples, other people's implementations, etc., to benefit from. --Captain Ref Desk (talk) 14:22, 24 March 2008 (UTC)[reply]

Python or Ruby. The interactive interpreters are great for beginners experimenting. The way most of us learnt programming went something like Statements --> Routines --> Classes and I still think this is the best way. Python and Ruby will let you write a program that does something without defining a class, but will continue to support you as you write something more structured. Good luck.

I learnt C as my first (programming) language and never felt it was hard or something.. Going Visual might be harder, but that's why world is full of guides and documentation. Though I must admit I'm just a * person-with-no-life, so I haven't bothered to find out what kind of heaven there is behind those Pythons and Perls. If you are planning to learn "just to learn", not to get something done right now, then I would recommend C/C++. --82.141.93.96 (talk) 15:10, 24 March 2008 (UTC)[reply]

Thanks so much for all the help! After reading all your responses, I think I'm going to start with C, then move on to some other languages. From what I've read, many of the current popular languages are based off of C (Perl, PHP, C++) so I think that'd be a good starting place. Now my next question. What resources would you recommend to me for learning the language? Thanks again! --Voyaging (talk) 15:54, 24 March 2008 (UTC)[reply]

They're loosely based on C (if in Perl's case you consider the Kuiper belt to be merely "loose" around the Sun's waist) but C's a tough nut to crack.. if you have windows I strongly advise you to download Visual C++ 2008 (NOT c#) and use that IDE, it's much more beginner friendly than console compilers like ming or gcc. Or just learn php and ruby and use notepad and your web browser. Seriously you're going to be very disappointed with your progress in C, scripting languages are far more powerful and you can do some actually useful things even while learning :D\=< (talk) 19:03, 24 March 2008 (UTC)[reply]

K&R is a good one. Would definitely recommend something printed anyway. Google is indispensible but it really helps to be following a printed course as well.

You also need a project. How about: Write a program to decipher text that has been encoded by a Caesar cipher. The program should use frequency analysis to decode the text (ie without any clues from the user).

but, note that C is a very "special" kind of language, not for everybody or everything.. if i had had to get through C first, i'd never have gotten past it. like learning assembler in the old days. Depends what you want to program. Heck, you might find programming in SQL to be your path to greatness. Gzuckier (talk) 19:05, 24 March 2008 (UTC)[reply]

You want to see the weirdish wikibooks:C Programming/Using a Compiler to get quickly started. That Crimson Editor isn't necessary, I have survived for a long time with just MS Notepad. Otherways Wikibooks isn't (probably) the optimal thing to read. As a general tip I would say you should just dig around and try many guides/tutorials to find the one that suits you best. --212.149.216.233 (talk) 19:18, 24 March 2008 (UTC)[reply]

I'd recommend focusing on learning programming rather than on learning a particular language. Once you know how to program, learning a new language won't be that hard. But just learning a language doesn't automatically mean learning how to program. Learning the language means jumping through the hoops the language puts in your way. Learning to program means being able to see the relationship between the program code and what it does (a relationship that works both ways -- "why is this code doing what it's doing" and "what code would do what I want"). As for choice of language to start with -- I'd say, find a teacher, or text, or whatever, that you're comfortable learning from, and use whatever language they use. (Even if it's a "useless" language -- because (a) it's about learning to program, not just about learning that one language; and (b) you might be surprised what turns out to be "useful;" one obscure language, that I considered even leaving out of my resume, is used extensively where I work now) If you were learning from me, I'd choose C, because that's what I'm most comfortable with. Also, it's a good idea to learn more than one language. Not only because you'd then have one more tool available to you, but because you learn different things from each one. (Many years ago, I "sort of" knew C. Then I tried to learn x86 assembly language. I mostly failed... but at the end I understood "C" a lot better.) -- Why Not A Duck 23:41, 24 March 2008 (UTC)[reply]

This is one of those questions that cannot be answered credibly or reliably over a largely anonymous forum like this. Why Not A Duck states the point quite clearly, so there's not much to add except this.
Most programming languages exist because someone thought they could "fix" an annoying aspect of another language they were already using. From this, you can learn a few things:
  • 1) there is no such thing as a "perfect" programming language to learn;
  • 2) a good sign of "knowing" a programming language is when you understand its limitations relative to other languages, and relative to what it was supposed to "fix";
  • 3) many people either do not realize or disagree with points 1 & 2 above;
  • 4) because of 3), many people stop learning new languages, and become "entrenched";
  • 5) because of 4), this question cannot be answered credibly over an anonymous forum like this;
  • 6) because of 5) you can ignore this post and this thread. NoClutter (talk) 13:12, 25 March 2008 (UTC)[reply]
Don't waste your time with intermediate steps, if your target language is say C++, begin with C++. That's the best advice I can give from my personal experience. --Taraborn (talk) 16:55, 25 March 2008 (UTC)[reply]
If you don't have a project in mind, Python (a non-visual, "high-level" language) is considered pretty versatile, easy for beginners, and teaches good habits. There are a couple beginners' programming books (I wish I could remember titles) available that use Python. Many programmers have started in C and C++, but these are sufficiently "low-level" to get a new user into trouble, especially if that user is self-taught.
I agree with the above-repeated dictum to avoid "visual" languages; these bind you to one company's way of doing things, and Gawd help you if that company is Microsoft. I learned in QBasic (circa 1990), in which it was easy to pick up simple modular structure concepts (loops and such), which was a decent foundation for when I needed to use application scripting languages in WordPerfect 5.1 and FoxPro 2.5, and Unix shell scripting. Grain of salt notice: I never became a "real" programmer (don't wanna), and I've not seen Ruby (recommended elsewhere in this thread) but have heard good things about it. / edg 17:37, 26 March 2008 (UTC)[reply]

A word of warning about both PHP and JavaScript: there is a lot of bad example code out there. These two languages, perhaps because they are easy to pick up and get results with quickly, tend to attract more than their fair share of bad voodoo programmers. That's not to say there aren't good programmers as well, or that the languages have anything wrong with them, but as a complete beginner you may not be able to differentiate between good and bad examples and will easily pick up a lot of bad habits. 81.187.153.189 (talk) 01:23, 27 March 2008 (UTC)[reply]

This is very good advice. Most of my PHP is just terrible; it's such an inefficent language that there's really no point in trying to optimize (except your db connections/queries) and except for the largest applications it's unlikely that you'll ever work with someone else on the same code. Combine that with how easy it is to read through to tell what it does and how short scripts usually are, and you have a recipe for commentless, sloppy disaster! :D\=< (talk) 01:34, 27 March 2008 (UTC)[reply]

What about game programming ? edit

Thanks so much to everyone for the help! Hmm, how about this. Say my end goal was to be able to code a game (and not just an Atari game, one that at least has a bit of depth). I know that's not an easy goal by any means, but say that was my ultimate goal. What would be the best way to start? Thanks again for all the help! --Voyaging (talk) 01:54, 27 March 2008 (UTC)[reply]

You might want to look at alice [1]. It's gaining some attention and publicity according to O'Reilly publishing which tracks that kind of thing in order to know what books to sell. NoClutter (talk) 03:21, 27 March 2008 (UTC)[reply]

Sound Problems edit

I'm on an HP Compaq tc4400 laptop computer (well, tablet pc). All of a sudden when I try to play a video from the internet or a song from iTunes, I hear the video/song for 4 seconds and then silence from then on. Can someone tell me what's causing this problem, and what I can do to fix it? Thanks in advance. ~EdGl 02:07, 24 March 2008 (UTC)[reply]

Just to make things clear, is it the Windows XP tablet edition Windows XP Tablet PC Edition? Kushal 11:54, 24 March 2008 (UTC) Kushal 12:55, 24 March 2008 (UTC)[reply]

Sorry, forgot to mention it's using windows vista, I believe enterprise edition. ~EdGl 13:08, 24 March 2008 (UTC)[reply]
Yay, it seems to be working now! Weird, as I didn't do anyting, not even restart. Well, sorry for taking up RD space.. carry on.. ~EdGl 13:37, 24 March 2008 (UTC)[reply]

Don't worry about it. I wonder what went wrong in the first place. Glad it is working. Kushal 19:17, 24 March 2008 (UTC)[reply]

Periodic patterns in bittorrent download rates edit

I'm not sure if it happens in general as well, but I notice that often, the download speed curve of a bittorrent transfer shows a strong periodic pattern. The download rate goes down, and then comes back up, and then goes down again, with a period of about 30 seconds.

Is there any explanation for this behaviour? Or is it just me?--Fangz (talk) 02:21, 24 March 2008 (UTC)[reply]

What client do you use? I use Azureus, and I see that a lot. I'd would guess it's a swarm behavior—one client disconnects from me (down), a new one connects optimistically uploading (up), then decides I don't deserve that rate (down again)—but I notice my upload rate often changes in the same way, matching my download rate for the entire cycle. Can't imagine one most likely cause. Might be just the way the client calculates rates. / edg 03:25, 24 March 2008 (UTC)[reply]
This happens when the following two conditions are met:
  1. the torrent has only one seeder
  2. the seeder uses superseeding
See Super-seeding for a basic explanation. Morana (talk) 08:27, 24 March 2008 (UTC)[reply]
I can definitely confirm that this is happening when there is more than one seed.--84.71.41.235 (talk) 14:50, 24 March 2008 (UTC)[reply]
You're probably not making enough connections.. I typically connect to 50 or so peers per torrent, and don't get most of my pieces from any one peer in particular so except for fascinating swarm-wide fluctuations due to weird seeder behavior or something which is always possible I guess, I have mostly stable down speeds. Make more connections and make sure something upstream isn't load balancing you :D\=< (talk) 18:55, 24 March 2008 (UTC)[reply]

javascript help edit

I don't know Javascript but would like to do something very simple.

I want to present a block of text with some words in red, and when you click a red word you can change it with a dialog that pops up. At the end you submit the whole thing via post.

Is this possible? could I get some help writing it? Thank you.79.122.35.198 (talk) 14:49, 24 March 2008 (UTC)[reply]

Here's a very simple implementation of such a thing:
<html>
<head>
<script language="javascript">
function get_word(id) {
	var existing = document.getElementById("word"+id).innerHTML;
	var newword = prompt('Replace "'+existing+'" with:');
	if(newword.length>0) {
		document.getElementById("word"+id).innerHTML = newword;
		var nextword = document.getElementById("word"+(id+1));
		if(nextword != null) get_word(id+1);
	}
}

function submit_text() {
	document.submit_form.submit_data.value = ReplaceTags(document.getElementById("text_to_submit").innerHTML);
	document.submit_form.submit();
}

var regExp = /<\/?[^>]+>/gi;
function ReplaceTags(xStr){
	xStr = xStr.replace(regExp,"");
	return xStr;
}
     
</script>
<style> 
<!--
.word { 
	color: red;
}
a.button {
	border: 1px solid gray;
	padding: 5px;
	text-decoration: none;
	color: black;
	background-color: silver;
}
a.button:hover {
	background-color: gray;
	color: white;
}

--/>
</style>
</head>
<body>
<form method="POST" name="submit_form">
<input type="hidden" name="submit_data" value="">
<p id="text_to_submit">
This is my <a href="#" onclick="get_word(0); return false;" id="word0" class="word">sample text</a>.
You can <a href="#" onclick="get_word(1); return false;" id="word1" class="word">replace words</a>
by clicking on them.
It is <a href="#" onclick="get_word(2); return false;" id="word2" class="word">wonderful</a>.
</p>
<a href="#" onclick="submit_text();" class="button">SUBMIT</a>
</form>
</body>
</html>
The javascript handles the changing of the words and the submission of the final data. The CSS stylesheet handles the red links (and making the last A HREF look like a box. You don't need to do it that way, but I find them easier to deal with than actual submit buttons, which are hard to style). The HTML sets up the whole form. It should be pretty straightforward how it works but feel free to ask if you want it spelled out more clearly.
This doesn't filter out the A HREF tags when you submit it. You can do that in Javascript though personally I'd do it on the server-side, and how you are going to want to do that depends on what you are specifically using the result data for. But otherwise it should work in a way like you want it to. --Captain Ref Desk (talk) 14:16, 24 March 2008 (UTC)[reply]
If you want your form to actually do something when you post it, you'll need to do something on the server side also. So far this is all on the client. Friday (talk) 14:17, 24 March 2008 (UTC)[reply]
That's right. My little example above presupposes you'll have a destination script read to make sense of that data. That will need to be written in another language (like PHP, for example). (As you can see, even a simple web interface requires a lot of different languages and technologies dancing in sync -- in your little example we've got a markup language, a scripting language, and a stylesheet, and we'll still need a server-side script to top it off!) --Captain Ref Desk (talk) 14:25, 24 March 2008 (UTC)[reply]
Thank you SOOOOOOOO much!!!!! It's wonderful, and much more than I could have done :)
One thing though... It works in Opera, which is what I use, but NEITHER firefox NOR internet explorer? How come?
Additionally, how could I change the javascript so that I don't land on a new page (in this case "false") every time I change a word, having to click back? I'd like the current page to be rewritten each time a change is made, and finally, the submit should submit the raw data, without special regard to where markup had been (though I could filter that out server side like you mentioned)... Thank you again!!! 79.122.35.198 (talk) 14:49, 24 March 2008 (UTC)[reply]
Oh, I had done it slightly wrong (worked fine in Safari, didn't test it in anything else!). Now it should work fine no matter what (at least, it does in Firefox). The false bit was an artifact of that. I've updated the code above. --Captain Ref Desk (talk) 15:45, 24 March 2008 (UTC)[reply]
Update: I added a little function (borrowed from here) that strips out the HTML tags before submitting the text. Enjoy. --Captain Ref Desk (talk) 15:49, 24 March 2008 (UTC)[reply]
Wow, thanks man!!! Works like a charm now -- in all browsers :)... 1 quick question though... is there a way to save time by having the next one automatically selected (with the default text being whatever it is currently set to) until the first time I press escape (or cancel) instead of ok (or changing the text)? Thank you!!!  :)
Not sure I understand how that one would work with the current implementation. Maybe you could spell out a little more how it might work? --Captain Ref Desk (talk) 16:42, 24 March 2008 (UTC)[reply]
Well, if I understand your code correctly (and it's hit and miss, because as I mentioned I don't know javascript :) ) then each word in your markup has a number, 0, 1, 2, 3, 4, 5 so if you've just clicked on 2, then you will proceed to 3 and 4 and 5 unless you stop the process by cancelling the dialog box at some point. If you just press enter you go on to the next one. In order for this to work maybe instead of "undefined" being the default texts it could be the actual text to replace? so it looks like " if(newword.length>0) document.getElementById("word"+id).innerHTML = newword;" could be changecd to have another effect: calling the same function on "word"+id+1 ... though I could get it wrong. Looking at your code, I also don't understand why there is a hidden input field that is blank. What's the purpose of that?
p.s. Thank you again!!! :)
Oh, OK, yes, that's easy enough. I've updated it above -- it will now by default go to the next word (unless there is no next word) and prompt you to replace that as well, unless you hit cancel.
The hidden input field is what passes on the results to the server -- the value gets filled in from the paragraph with the id "text_to_submit" with the function "submit_text" before it is submitted. To submit FORM data it has to be in an INPUT field; the easiest way to do that in this case is to use a hidden INPUT field. --Captain Ref Desk (talk) 21:54, 24 March 2008 (UTC)[reply]
Wow, Perfect! Thanks so much :) I can do the rest server-side...but actually, one of my "words" is a date, and I could make a little calendar server side, but is there any way to have the dialog that comes up for that one have a calendar, in html, or is that too complicated? Thank you either way!! You've been very helpful :) :)
It would be much more complicated to have a little HTML dialog box pop up—my implementation just uses Javascript's built-in "prompt" command. It's not impossible to do the sort of thing you are asking (you'd hide the box on an invisible DIV or something like that; airlines use this sort of thing all the time in letting you select which days your flight will be) but it'd take a lot more coding than is used above. (You'd have to write a custom "prompt" command, basically.) --Captain Ref Desk (talk) 13:48, 25 March 2008 (UTC)[reply]
Okay, well thank you then! :) It'll have to stay what it is, which is really very very good and I'd like to thak you again for all your help :)
Shoulda used jQuery. NoClutter (talk) 03:00, 27 March 2008 (UTC)[reply]

ENUM: order vs preference edit

In ENUM (.e164.arpa) DNS entries, which should be incremented - order or preference? For example, if I have one record:

IN NAPTR  100 10 "u" "E2U+email:mailto" "!^.*$!mailto:[removed]!" .

with order=100 / priority=10, and want to add record for my website (E2U+web:http), which one should I change? The website where I manage my .e164.arpa entry auto-suggests [order=100 priority=11] for new entry. Should I use that or [order=101 priority=10]? --grawity talk / PGP 14:21, 24 March 2008 (UTC)[reply]


ENUM providers edit

As far as I know, there are four main ENUM domains: e164.arpa, e164.org, e164.info and enum.org. Which one is best to use? (I have an .e164.arpa) --grawity talk / PGP 14:25, 24 March 2008 (UTC)[reply]

Texting through AIM 6 edit

Here's the deal: I would like to be able to text a person through the text function in AIM 6. Both I and this person have an AIM account; I currently live in Italy and he lives in England. I added his phone number where it says so {add phone number}, using +44 before his number and I tried to send the text.

Two messages from AIM appeared. The first one: </insert phone number here> is currently offline.Your buddy may be able to receive offline IMs the next time they sign on. Do you still want to send this IM?

When I pressed yes, the second one: </insert phone number here> is unable to receive offline IMs.

I tried when he was offline, and then when he was online too, with the same messages appearing. I asked him to check, and it says he can accept offline IMs from buddies on his list.

Help, please?

By the way, it seems that when this person from England tries to call my mobile, even if he adds the 0039 to my number, it still says I'm unavailable. But he managed to send me a text to that same number, adding +39.

Again, help, please?

My guess would be that the SMS service in AIM uses a gateway rented from a particular network in each country to deliver the messages, and that the combination of this gateway and the international delivery is not covered by their agreement (I don't know about Italy, but in the UK SMS is big business, so I'm sure there's money involved somewhere here...)
Not sure what the deal is with being able to text but not call, although you imply that he used different numbers (0039... vs +39...); as far as I know, the +39... form is the correct one for both calls and texts from a mobile, although I would expect the 0039... to work just as well. - IMSoP (talk) 19:33, 24 March 2008 (UTC)[reply]

Can someone explain memory allocation in c? edit

Gurbinder Singh

The details depend on the implementation, but the general idea is that each process gets a certain amount of memory (it can ask for more if necessary), which it usually divides up into two pieces: a "stack" which it will use to remember things that are only needed for the current computation, and a "heap" which it will use to remember things that need a longer lifetime, or that need to change ownership, etc. The stack is generally nicer to use, since it's very fast to allocate and deallocate and the programmer doesn't have to remember to free things from it, but it can't be used in cases where the memory must outlive the current routine. Programs that can do more than one thing at a time will typically have more than one stack. Using stack memory is "automatic" in that just the right amount gets allocated when you call a function, and magically freed when that function returns. Using heap memory is done manually with malloc() and free(). As you might expect, it's a lot easier to get stack memory management right than it is to get heap memory management right. --Sean 19:49, 24 March 2008 (UTC)[reply]
There's quite a bit of information on the malloc page, and at wikibooks:C Programming/Memory management. --h2g2bob (talk) 20:26, 24 March 2008 (UTC)[reply]

Sensor networks edit

what are sensor networks? <spam removed>

Don't advertise on wikipedia. And if you're really concerned, just wear a tinfoil hat :D\=< (talk) 20:05, 24 March 2008 (UTC)[reply]
Try looking at sensor network. Your spam link removed. --h2g2bob (talk) 20:09, 24 March 2008 (UTC)[reply]

open office and Dragon NaturallySpeaking compatible ? edit

is it possible to use open office and the sofware Dragon Naturally Speaking (speach recogniton) and if yes, what have I to do.

Thanks to Google -- [2] -- I got link to OpenOffice.org forum and Ubuntu forums.

Could you tell us which operating system you use and what version of NaturallySpeaking you have? Kushal 17:23, 25 March 2008 (UTC)[reply]

picture help edit

How do I get a picture out of this seemingly random mess of letters:

<a href="http://icanhascheezburger.com/2007/12/31/funny-pictures-here-in-england-we-speak-the-queens-english/"><img src="http://icanhascheezburger.wordpress.com/files/2007/12/funny-pictures-british-cat.jpg" alt="funny pictures" /></a>
see more <a href="http://icanhascheezburger.com">crazy cat pics</a>

the place I want to put it uses [IMG] codes, but nothing I've tried with them and this has worked so far.

The actual image location is written between the quotes of <img src="[location]">, but here I guess you'll have to put
[img]http://icanhascheezburger.files.wordpress.com/2007/12/funny-pictures-british-cat.jpg[/img]
because the actual image file redirects there.  ARTYOM  20:44, 24 March 2008 (UTC)[reply]
The image isn't redirecting anywhere for me what :D\=< (talk) 22:06, 24 March 2008 (UTC)[reply]
If you want to get the image URL the easiest thing to do is the right click on the image and click "open image in new window" or "open image in new tab." 216.120.217.233 (talk) 23:35, 24 March 2008 (UTC)[reply]
Or Copy image location :D\=< (talk) 00:11, 25 March 2008 (UTC)[reply]

power in programming languages? edit

In the excellent discussion above about programming languages for beginners, editors make several references to the relative power of different programming languages. What does this mean? I have basic familiarity with several languages, but this power concept is alien to me. --Allen (talk) 23:42, 24 March 2008 (UTC)[reply]

Scripting languages are powerful in the sense that you can do a lot with little code. The characteristic of higher-level languages is that you have to write less code to perform the same task. There are advantages to different languages for different tasks, but there are also clear comparisons. Ruby is higher level than C, and both are much higher level than assembly, which takes half a dozen lines just to perform arithmetic on something in memory. However, with assembly code you exercise a far finer level of control over your program. Asm can be some of the most optimized code you'll ever see. There are a few different aspects of "power".. some languages are extremely concise but ridiculously difficult to code in.. Ruby is object-oriented overkill and is terrrrrrifyingly powerful, especially with strings and arrays/dictionaries.. symbols are nice too :D\=< (talk) 00:00, 25 March 2008 (UTC)[reply]
There's also power in the sense of access to lower level facilities - directly messing about arbitrarily with your computer's memory for example, rather than delegating this to a virtual machine or an interpreter. In this sense C is more powerful than Python, say. --90.208.22.136 (talk) 14:13, 25 March 2008 (UTC)[reply]
Interesting. Thanks for the responses. So it sounds like "powerful" can be synonymous with either "high-level" or "low-level", depending on the context. No wonder I was confused. --Allen (talk) 14:15, 25 March 2008 (UTC)[reply]
Broad generalizations follow: a "low-level programming language" give the user programmer enough control to get a new user into trouble, especially if that user is self-taught. A high-level programming language is usually simpler. Power is an ambiguous term here since both have their advantages. / edg 17:37, 26 March 2008 (UTC)[reply]
Another meaning of "power" might be "productivity". In that case, higher-level is usually going to be better. You want to muck around with memory? Well, for certain things that's useful, but if you're writing end-user applications and you're messing with memory, you've probably gone astray somewhere. I've never in my life seen a business requirement expressed in terms of computer memory. You're generally going to produce useful functionality faster in a language that lets you say things like "present the order_entry form" than in a language where you're saying things like "copy the value from register 42 to memory location 12345." Of course, if you're writing a compiler or a device driver, there's probably no avoiding the low-level details. Friday (talk) 17:51, 26 March 2008 (UTC)[reply]
At the same time, the early hackers wrote everything in assembly (or machine code directly o_o) and did some astounding things with the hardware of the day.. a lot of their algorithms are still in use today. Yeah it's not exactly time-efficient to program that way, but there's no way to optimize a program to its maximum without writing it in assembly. Of course, with multiple cores and instruction pipelining on modern microprocessors, it's ridiculously difficult, but I just can't bear to see asm bashed ;_; :D\=< (talk) 01:28, 27 March 2008 (UTC)[reply]

Photoshop help urgently needed. edit

I'm trying to edit this .psd image with the horizontal type tool in RGB color mode (8 bits/channel) and I can't seem to make the text show up. Every time I type something, no matter the color or the character font I use, the text doesn't show up; only the name of the layer changes. In example: I type "hello", and the name of the layer changes to "hello", but the image remains seemingly unmodified. I have tried almost everything, it's driving me crazy. Here's a screenshot of what I'm trying to do. As you can probably tell, I'm pretty much a newbie in Photoshop. Could anyone of you guys help me on this one please? Any ideas or tips? —Coat of Arms (talk) 23:57, 24 March 2008 (UTC)[reply]

Can you provide a screenshot with Layers info visible? --antilivedT | C | G 01:54, 25 March 2008 (UTC)[reply]
Sure, here it is. The characteristics of the first layer are here, if you also would like to see them. —Coat of Arms (talk) 02:38, 25 March 2008 (UTC)[reply]
You don't have a text layer, only the white base layer and your picture over that. I think you have to be using the text tool and click and drag a box on the canvas before you can start typing, or else your typing will just rename the current layer (the picture) :D\=< (talk) 03:17, 25 March 2008 (UTC)[reply]
I had that problem once. It drove me crazy. The solution, however, turned out to be simple: try to make the text canvas bigger (by dragging the little squares on its edges), because Photoshop doesn't show the text if the letters are too big to fit in the canvas. Hope that helps!  ARTYOM  10:16, 25 March 2008 (UTC)[reply]