Wikipedia:Reference desk/Archives/Computing/2015 April 20
Computing desk | ||
---|---|---|
< April 19 | << Mar | April | May >> | April 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. |
April 20
[edit]Point cloud library for Java
[edit]Is there a point cloud library out there for Java? I found Point Cloud Library, which is great, but it's in C++ and have no foreign language bindings. WinterWall (talk) 10:38, 20 April 2015 (UTC)
- This [1] says that glob3 [2] is an "open-source project to create a "3D GIS multiplatform framework", in Java, possibly built on top of WorldWind, which will support both aerial and terrestrial point clouds." The GIS bits may be overkill, but they might not get in your way too much... SemanticMantis (talk) 14:40, 20 April 2015 (UTC)
Are home routers absolutely safe nowadays?
[edit]Back to the times where WEP was the norm for home routers, it became common wisdom at a time that they were unsafe. and, that an attacker could often easily crack a wireless home network by just running a script. Has WPA2 solved all the security problems? Is my home network unassailable, if I have a long password and WPS disabled? --Llaanngg (talk) 18:33, 20 April 2015 (UTC)
- As I understand it, it's not completely uncrackable, if someone has the necessary knowledge, tools, motivation, and time. That said, I don't lose any sleep over the security of my WPA2-enabled network. Its passphrase isn't very long or complicated — it's something I can keep in my head, and it can be easily entered by a visitor wanting to go online using their smartphone — but you won't find it in a dictionary or on any web page and a brute-force attack would require billions of tries. And I have disabled unnecessary things that might be exploited for access, such as remote management of the router. If somebody wants in that badly, let them come in. They'll find there's nothing here that was worth that much effort. ―Mandruss ☎ 18:40, 20 April 2015 (UTC)
- "Has WPA2 solved all the security problems"? Well no but what you have to keep in mind is... who is going to waste their time in braking into Llaanngg's router. If you have really commercially confidential information that would make this effort worthwhile, then get in an expert. If you still feel paranoid then employ someone like me. I will do it for half the price of the self proclaimed experts and and provide you with really good security – as can many, many others.--Aspro (talk) 19:36, 20 April 2015 (UTC)
- The engineers who developped a router «have not reinvented the wheel». They also are using ressources like IP stacks and furter stuff, sometimes copying the builtin unkown bugs. Some did not disable the default password of the WEB interface or WLAN. More often users allow remote management or did not change the adminstrator password for WEB configuration interface. Doing so, you will be hacked. --Hans Haase (有问题吗) 20:15, 20 April 2015 (UTC)
Laptop power
[edit]My laptop, when using WiFi heavily, gets 2+ hours on a battery charge. Which would result in a longer battery life: (1) leaving it connected to wall power all the time, (2) disconnecting when it's 100% charged and reconnecting when I get the battery-critical alert, or (3) something in between? ―Mandruss ☎ 20:57, 20 April 2015 (UTC)
- Before we go any further. Do you need bluetooth and have your disabled it. Other thing is the screen brightness. Third: Do you mean “Battery life” or “Battery lifespan” I.E. the time before it is completely US and needs replacing.?--Aspro (talk) 22:31, 20 April 2015 (UTC)
- @Aspro: I currently have no need for Bluetooth. Bluetooth Settings: Allow Bluetooth devices to find this computer:unchecked. Allow Bluetooth devices to connect to this computer:checked. Alert me when a new Bluetooth device wants to connect:checked. Two devices are listed under "Bluetooth Radios" in Device Manager and both are enabled.
- Screen brightness: the slider is centered in the scale.
- Given your two choices, I meant lifespan. I'm not concerned with life, as I'm almost always within reach of wall power. That is, unless more frequent discharge cycles means shorter lifespan; in that case I'm also concerned with life. ―Mandruss ☎ 00:16, 21 April 2015 (UTC)
- A third solution, which I'm not necessarily sure is better, is to leave the laptop connected to wall power with the battery removed, and only insert the battery when you need to work away from the wall. MChesterMC (talk) 08:21, 21 April 2015 (UTC)
- A one-second power outage would mean a hard crash. I'm pretty sure that's not better. It's one of the reasons I buy laptops despite working almost exclusively at home, in one spot, within reach of wall power; they effectively have a built-in UPS. ―Mandruss ☎ 09:21, 21 April 2015 (UTC)
- A third solution, which I'm not necessarily sure is better, is to leave the laptop connected to wall power with the battery removed, and only insert the battery when you need to work away from the wall. MChesterMC (talk) 08:21, 21 April 2015 (UTC)
- Given your two choices, I meant lifespan. I'm not concerned with life, as I'm almost always within reach of wall power. That is, unless more frequent discharge cycles means shorter lifespan; in that case I'm also concerned with life. ―Mandruss ☎ 00:16, 21 April 2015 (UTC)
- Right. Now that you have explained that, I can direct you to [http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries How to Prolong Lithium-based Batteries]. If you suffer from brown-outs (and suffer an economic loss because you don't 'save' often enough), then it makes senses to have two battery pack (claim the cost back on your tax returns). Even a nakered stand-by battery will serve as your UPS long enough to save, shut down and swap over to the better battery. Use the link (above). Keep the batteries charged above 50% at all times for more cycles and lifespan. Alternatively, work from a coffee-bar in Europe. We don't have day-time brown-outs here, as power suppliers are regulated by law to supply power. --Aspro (talk) 14:17, 21 April 2015 (UTC)
- Well it depends on how bad a hard crash is to you. Anyway, it's probably better to disconnect the laptop after charging. It's not unsafe to leave it connected, but it's generally not good for the lifespan, as most laptops are fairly aggressive at keeping the battery toppped up and you don't actually want the battery to be at maximum charge all the time. Actually you probably don't want the battery to be at maximum charge ever, if you're solely worried about life span. It would be better to disconnect the laptop well before 100% (or see if you can adjust maximum voltage/charge state). That said, you don't want to fully discharge it either. Ideally you want to do something like charge to 75% (or say 4V or 3.9V or something), discharge to 40-50% then charge again to 80%. Nil Einne (talk) 17:52, 21 April 2015 (UTC)
I have not read any of the above comments and I'll read it tomorrow, right now I'm sleepy. In order to help you with your problem, 1) Don't keep too many windows open, unless you are recharging, when it goes to full it will give longer battery power even though your windows are open 2) Don't play games without plugging it to charge 3) Stop charging it when it is full 4) don't put it to sleep/hibernate. -- Mr. Prophet (talk) 18:52, 22 April 2015 (UTC)
What's wrong with copy-and-paste programmers?
[edit]Why is "copy-and-paste programmer"" such a disparaging slur? Excluding the cases where you are infringing the licenses of other developers, aren't you supposed to re-use elements, and not re-invent wheels? Isn't using code elements without getting into all details, simply a way of abstraction? --Senteni (talk) 23:21, 20 April 2015 (UTC)
- This doesn't answer your question, but here is an article: Copy and paste programming. Bubba73 You talkin' to me? 23:28, 20 April 2015 (UTC)
- It's the implication that's pejorative, it's not exactly literal. Vespine (talk) 00:05, 21 April 2015 (UTC)
- I agree that the first step to writing a program should be "what programs have I or others written which do similar things, and can we copy and modify those ?". Of course, if a large number of programs all need to do similar things, then perhaps writing libraries to do those things makes more sense. StuRat (talk) 04:27, 21 April 2015 (UTC)
- Copy-and-paste programming, as I understand it, is the opposite of reuse: it means making n copies of a piece of code instead of encapsulating it in a function that is called n times. Here's an example. Even when the copying is across different source files by different authors, it amounts to forking the code instead of using it as a library, which is usually a bad idea. (Not always.) -- BenRG (talk) 07:38, 21 April 2015 (UTC)
- The issue here is what it means to be a "copy and paste" programmer. It does not mean that you reuse code that others have written. It means that when you need to do something, you copy and paste a snippet of code from someone else, not understanding what it really does, and then you hope your code compiles. It is seen less in compiled languages, such as C/C++, and more in scripted languages, such as Ruby and PHP. The problem is that the "programmer" doesn't know what the code does. If there is a bug, the programmer is at a complete loss and simply copies some random snippet of code from somewhere else and pastes it in somewhere to see if that fixes the problem. I taught introduction to C++ for four years. It is amazing how disgusting the code can be when students appear to randomly copy and paste snippets of code from the Internet. Sometimes they don't even check to see if they are copying code in the language that they are using. Then, on the day the program is due, they come to me and say that they can't make the code compile. A good programmer does reuse code - usually libraries, objects, or functions. A copy and paste programmer likely has no concept of the difference between an object and a function. 209.149.115.29 (talk) 16:59, 22 April 2015 (UTC)