Wikipedia:Reference desk/Archives/Computing/2014 March 7

= March 7 =

Why are dynamic IPs the rule?
Do telcoms do that so you can't (normally) run a server for free? You'll need to rent a static IP for that. Or do they have more clients than IPs, therefore we have to share the IPs efficiently (and recycle IPs when a user disconnects)? But, what if, all, or many, clients decide to connect? Would that be a kind of overbooking which implies dropping some paying clients, although they have a right to access the network? OsmanRF34 (talk) 00:57, 7 March 2014 (UTC)
 * It's mainly because IP addresses are a scarce resource. If every net access point got a fixed IP address, there wouldn't be enough to go around.  See IPv4 address exhaustion -- the IPv4 scheme only provides about 4.3 billion possible addresses. Looie496 (talk) 15:12, 7 March 2014 (UTC)
 * I agree that IP address exhaustion is one possibility - but I think they are also concerned that the bandwidth required if a lot of people come to visit your site might be too much for them to bear. Note that for almost all domestic internet connections, the upstream bandwidth is vastly smaller than downstream.   Years ago, I paid AT&T extra for a static IP address on my DSL line - and ran my own server from home.  The performance (from the perspective of users of my server) was appalling - so I decided to go with a hosted server from Dreamhost - they charge me about $10 a month and let me do almost anything I want on their machine.  They use Linux and provide shell account access - they don't mind you running CGI programs as well as PHP on their servers and you can host a more-or-less unlimited number of web sites from one account (I have over a dozen right now).   I'm sure there are plenty of other services like that - and with that level of convenience, tying up one of my own computers and eating up the limited bandwidth I have to my home systems just isn't worth the $10/month I'd save by running it from home. SteveBaker (talk) 15:35, 7 March 2014 (UTC)
 * What about the last mile? Is there anyone who'll provide that with a static IP? --Trovatore (talk) 03:09, 8 March 2014 (UTC)
 * It's true that if everyone decided to connect at the same time, it would probably run them out of IP addresses - but there are many, many things in the world that use that principle. If everyone turned on every appliance and light they have in their homes at once, there wouldn't be enough electrical power to accomodate them all.   If everyone decided to drive all of their cars on the freeway system at the same time, it would be a parking lot.  There isn't enough cellphone bandwidth for everyone to make phone calls at the same time.   The world relies on these kinds of statistical effects in a bazillion different ways - and the IP address allocation scheme is no different.
 * Also, even when there is a need for a static IP (eg, for a website), it's common to share them. So, if you 'ping' my website 'sjbaker.org' - and my wife's home business site 'renaissanceminiatures.com' - you'll find that you get the exact same IP address both times (66.33.209.131) - yet pointing your web browser at http://66.33.209.131 gets you an error message.   That's because my service provider places many sites on each physical server - and thereby saves IP addresses. SteveBaker (talk) 15:47, 7 March 2014 (UTC)
 * And if you're wondering how the server knows which web site is meant, it's mandatory for the client to tell it. The HTTP/1.1 protocol mandates the use of the  header, which denotes the intended website name (in this case, either   or  ).  J I P  &#124; Talk 20:14, 7 March 2014 (UTC)
 * When I had DSL, I left it on all of the time. It kept the same IP address until I had to restart or reconnect, then it would change.  The point is that most people probably leave the DSL connected, which takes up an IP address.  Bubba73 You talkin' to me? 19:33, 7 March 2014 (UTC)


 * OsmanRF34 seems to be asking why internet service providers prefer to provide their customers with automatically assigned IP addresses (using DHCP or a similar protocol). Here are some ideas:


 * It's easier for the router or modem to automatically get an IP address. When you use a static IP address, you have to manually enter the IP address information into your equipment. If your equipment is replaced or gets reset to factory defaults, your internet connection won't work until you re-enter the correct IP address settings into your equipment.


 * As their number of customers changes, the ISP may occasionally need to move the customers in an area to a different range of IP addresses. When the customers get IP addresses automatically, the ISP can automatically assign a new IP address when the current assignment expires. If static IPs were used, the ISP would have to spend time contacting the customers before the change date to tell them how to change the IP settings in their equipment. For any customers that didn't change the settings in time, the ISP would get calls to their tech support line, and the ISP's tech support reps would have to guide customers to change the setting.


 * For some other people's answers, you can read Why do ISPs change your IP address? from the question and answer site Super User.--Bavi H (talk) 02:56, 8 March 2014 (UTC)
 * Note that's there's a difference between an ISP supporting DHCP or whatever, and an ISP assigning someone a dynamic IP address. Although the way these terms are used in LAN and in device configs may be a bit confusing (where static IP usually refers to static IP address assignment on the device), when an ISP is said to provide a static IP address, that simply means the ISP is saying the IP is semi permanently assigned to you. Unless they specifically tell you otherwise, you can generally expect to have the IP as long as you have service with the ISP. (Note that this is different from a sticky dynamic IP address where you will frequently keep the same IP if you don't disconnect for too long or perhaps even sometimes if you do, but where the ISP is not telling you they will always provide a certain IP.)
 * It's true it's unlikely an ISP will assign a dynamic address if they don't have someway to automatically assign that IP address to the customer. However there's no reason why an ISP cannot provide a static IP address to a customer while still supporting DHCP or whatever to assign that IP address to the customer when needed. I suspect most SOHO ISPs who provide static IP addresses do this. If a customer has a static IP address, they could turn off DHCP (if that's what's used) and manually set up the router or whatever, but there's no reason that has to be done. (And I wonder if some ISPs, while providing a static IP, don't really officially support static IP address assignment on the device. E.g. they don't tell you how to set it up, and perhaps don't even guarantee the gateway will never change.)
 * Nil Einne (talk) 19:00, 8 March 2014 (UTC)


 * In case of Comcast however, there is another nasty detail. If you ask for a static IP they would say that you have to have a business account which is of course more expensive. --AboutFace 22 (talk) 16:09, 10 March 2014 (UTC)

Somewhat off-topic, but I had an account with the Australian Unwired ISP and my IP remained unchanged from August 2009 until Unwired was taken over by OPTUS and then shut down end 28 February 2013. Minimum of 3.5 years. I have no idea how/ why this occured, but if it was the same for all customers, IIRC that would be about 50,000 static IPs. Rather slow (256 KB service), but only A$30/month for 15 Gb (split on/off peak). 220  of  Borg 10:09, 11 March 2014 (UTC)

GCC: same function copy for inlined and non-inlined calls
In theory, if function A contains a true tail call to function B, then it should be possible to inline it and also make non-inline calls and function pointers refer to that same copy of B (assuming a NOP slide can be used to satisfy alignment requirements, and assuming we're not trying to do so for any other call to B or for a call from B to A). Is it possible to instruct GCC to do this for a particular call? Neon Merlin  05:57, 7 March 2014 (UTC)


 * gcc has a switch to optimize sibling and tail recursive calls -foptimize-sibling-calls, but I don't know about inlining. --Mark viking (talk) 07:14, 7 March 2014 (UTC)


 * I doubt it because I think there would be no benefit to it. The main benefit of inlining is that it exposes site-specific optimization opportunities, but that obviously doesn't apply if the inlined copy is exported. It would eliminate a jump, but unconditional jumps are pretty cheap, and NOP slides aren't free either. It would probably complicate linkers, debuggers, and other tools that can otherwise treat each function as an independent entity. -- BenRG (talk) 09:25, 7 March 2014 (UTC)

Product key system
Hi,

I'm looking to create an add in for Microsoft Excel, which I would ultimately sell online with users buying licences for each user (similar things are done for other add ins, google will show you these - I'm not looking for any legal advice on this). I'm looking to implement a simple product key system whereby a user buys the product keys and then uses that to activate the generic software installation (probably an .msi). Each installation would be bound to a user. I am basically assuming that this will get bypassed by hackers in no time, I just need a simple system that will be enough for the average user not too bypass easily. This would be a single one time activation, without any DRM nonsesne. How are these implemented? What about product keys that work for say 1000 uses? Any advice would be good, google just brings up a load of people troubleshooting lost product keys! 80.254.147.164 (talk) 09:12, 7 March 2014 (UTC)


 * With online-only activation systems like Steam, the "product key" is just a long unique random number. When the user "redeems" the code (submits it to the server) the server marks the code as used (or for a multi-seat key, decrements the "activations left" counter). Then the server sends something back to the installer - either just an "okay to proceed" message, or some or all of the actual code of the product being activated. This is still DRM, and it's still much easier to do a bad job that inadvertently screws over your legitimate users and makes for support headaches for you than it is to do a decent job balancing your needs and theirs. Once you think of all the ways an adversary can attack this system (massive guessing operations to search for valid keys, DoS the activation server, stealing keys from customers or your support line by social engineering or hacking) even without simply removing the checking from a single valid copy and distributing that, you'll find this simple-seeming system has lots of potential for problems.  That's one reason so many people use an existing marketplace like the Windows Store or Steam - so they don't have to worry (so much) about that stuff themselves. -- Finlay McWalterჷTalk 09:52, 7 March 2014 (UTC)


 * I oversimplified an important point there: Steam et al lets a legitimate user reinstall but prevents a key being reused be someone else (it does this by binding a key to an account). So they have to manage accounts and not just keys online. And adversaries are always trying to compromise steam accounts. -- Finlay McWalterჷTalk 09:59, 7 March 2014 (UTC)


 * Would the install routine be able to access the internet to validate the key?--Phil Holmes (talk) 14:30, 7 March 2014 (UTC)
 * Yes - although I could do it either way. I'm guessing each has its pitfalls. I'd rather go with the more reliable option so that no legitimate users are inconvinienced rather than making it impossible to crack (which is impossible!) 80.254.147.164 (talk) 16:02, 7 March 2014 (UTC)
 * So a relatively simple system would be to generate a long, fixed length, random key, and both supply it to your customer and store it on a web-connected server. The customer inputs the key, the install routine sends it to the server which returns success if it finds it in its list of keys, or fail if it doesn't.--Phil Holmes (talk) 12:01, 8 March 2014 (UTC)

Microsoft Excel: "No duplicates found"
I'm trying to follow the instructions online for deleting duplicate entries from Excel. I've tried several different methods, but each time I complete all the steps, I get to the same point: Nothing is removed, or it tells me "No duplicates found", or it copies a "stripped" list that contains every cell from the original. There are duplicates; I wrote this test spreadsheet specifically to have duplicates as a test before I attempt it with real spreadsheets. Having just written it, I know 'trailing spaces' or whatever aren't the problem. There are duplicates within columns, there are duplicates within rows, there are duplicates between columns and rows, there are even duplicates on Sheet 2 which I shouldn't even be concerned with. Why can't I get Excel to recognize anything as a duplicate? 50.43.130.15 (talk) 14:54, 7 March 2014 (UTC)
 * I don't know, but I do know that we have a Computing desk, where you're more likely to find an answer. --Dweller (talk) 14:57, 7 March 2014 (UTC)
 * I guess I'll move it over. 50.43.130.15 (talk) 15:01, 7 March 2014 (UTC)
 * Sorry, I should have helped a bit more with that. --Dweller (talk) 15:03, 7 March 2014 (UTC)
 * Which version of Excel are you using? On Excel 2010, it's very simple.  Data ribbon, Remove Duplicates button. --Viennese Waltz 15:12, 7 March 2014 (UTC)
 * 2007, it has a "Remove Duplicates" button, but it keeps claiming "No duplicate values found." Notably, once I copy-pasted everything into the same column it found them, but I'm not sure if this will solve my problem, since I need to (1) Create a sheet containing every customer we've had in 2009, 2010, and 2011 removing repeat names of those who came multiple years, (2) and then remove permanently any customer who showed up in 2012 or 2013 since we don't want to contact them. How I'm going to do that last one I haven't even started thinking of. 50.43.130.15 (talk) 15:38, 7 March 2014 (UTC)

Role of IT Professional in Electric Power Generation
What is role nature of work or duties or job profile of an IT professional in designation like Assistant Manager (IT) in a thermal power generation company.What does a person as permanent employee do in this type of company.What can a computer engineer do in this role here.In this type of company what is the role of Deputy General Manager (IT).Infact what does Information Technology Department of this type of company does.This company operates around five thermal power plants.A computer engineer studies a fair amount of elecrical engineering in his curriculum.Please shed light on this topic.117.194.248.106 (talk) 17:34, 7 March 2014 (UTC)
 * I can't speak to this job specifically, but I can't imagine how different it would be from any other IT manager, ie., managing the IT infrastructure. Given that computers and computer networks are nigh ubiquitous, even in thermal power generators, the work would likely be similar to everywhere else. Mingmingla (talk) 22:37, 7 March 2014 (UTC)

Please elaborate.117.194.235.90 (talk) 06:08, 8 March 2014 (UTC)
 * Please see Information technology management.--Shantavira|feed me 07:44, 8 March 2014 (UTC)