Wikipedia:Reference desk/Archives/Computing/2015 February 14
Computing desk | ||
---|---|---|
< February 13 | << Jan | February | Mar >> | February 15 > |
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. |
February 14
editLinux distro differences
editI've been playing with a couple Linux distributions, just to see if I can learn a little bit about Linux in general, and I'm trying to get my head around the various components of the system, and understand the differences between distros. I have Ubuntu 12.04 LTS and Debian 7.8. Both claim (in System Monitor) that they are using GNOME 3.4.2, but there are significant differences between the desktop appearances, and I'm curious as to why, and whether I can change either or both.
- Ubuntu shows the "Dash" on the left of the screen (as seen in GNOME Shell) but Debian does not. Instead Debian looks like it's in classic mode, with "Applications Places" at the top. Why are they different? Is there some configuration option somewhere the controls this?
- Ubuntu has the close/minimize/maximize buttons on all of the windows on the top left, whereas Debian has them on the top right. Is this a configuration item, or are they running different programs (presumably each being vaguely akin to Windows Explorer), and if so exactly which program is responsible?
- If - for example - I wanted to keep the Debian box but it turns out that some part of the display is a different program (eg included in Ubuntu but not Debian), can I just apt-get and install the relevant component, assuming I know which one it is? (I did apt-get KDE Plasma and can now switch between KDE and GNOME on the Debian box.)
I'm quite technically knowledgeable about Microsoft Windows, and have a little experience with the Linux console, but virtually none with the Linux GUIs. Both of these Linux installations are in virtual machines and have no real data in them. Consequently I'm happy to experiment - it doesn't matter if I break them. Mitch Ames (talk) 13:09, 14 February 2015 (UTC)
- Your question is really about Human factors and ergonomics. Linux and Windows are totally different OS's. You will not learn anything about Linux by studying the GUI's . Read: Linux is not windows--Aspro (talk) 13:46, 14 February 2015 (UTC)
- No, my questions are really about a couple of specific differences between the GUIs in Linux distros, and which components or configurations make them look different. Neither of the two things you linked to seem to answer those questions. Mitch Ames (talk) 01:56, 15 February 2015 (UTC)
- You are seeing the difference between Gnome and Gnome Classic. You can swap at login by clicking on the Gnome icon in the login box, although you might have to apt-get the desktop you want in the unlikely event it isn't on the menu. There is also a configuration editor under Applications/Sundry you can play with. Gnome and KDE are the popular heavy-duty front-ends, but there are several lightweight window managers you might like to google and play with. Puppy is a good platform for this, as it will run off a cd/flashdrive with a small footprint on your HD to save stuff and speed the boot. A good guide (recommended by Linux from scratch) is xwinman's page. Fiddlersmouth (talk) 13:53, 14 February 2015 (UTC)
> You are seeing the difference between Gnome and Gnome Classic
- Debian allows me to login with either GNOME or GNOME Classic but both look the same (to my untrained eye) - specifically, neither has the "Dash" on the left side of the screen. (As previously mentioned, I can also use KDE Plasma - which does look radically different - so I'm confident that I've found the button that changes the look-and-feel.)
- Are GNOME and GNOME Classic separate "programs/packages", or the same program run with different options? Once I've logged in, is there a way (other than what the screen looks like) of determining which is running, and/or what options were used to start it. Is there a specific process that I could check for in System Monitor, or a specific Property of that process?
- (This harks back to my earlier question - why do Ubuntu and Debian look different, when both say thay have GNOME 3.4.2. What, precisely, is different?)
> There is also a configuration editor under Applications/Sundry you can play with
- Could you be more specific? I can't find Applications/Sundry. Can this configuration editor be invoked from the console? What console command would invoke it?
> Gnome and KDE are the popular heavy-duty front-ends, but there are several lightweight window managers you might like to google and play with
- According to http://xwinman.org/, Window managers and Desktops are different things. Which is responsible for the 2 bullet-pointed differences I described in my original post (Dash on the left vs Application, Places on the top; and close/min/max buttons on the left or right)?
- Mitch Ames (talk) 03:47, 15 February 2015 (UTC)
Background worker threads
editI'm working on an application in C# with various tasks that take a long time, and I'm using the Windows BackgroundWorker component, as described in this MSDN article. However, I have several time-consuming tasks, and I'm not sure what the best procedure is. Should I create a separate BackgroundWorker for each task, and check the IsBusy flag on all of them before starting the thread, or just have one BackgroundWorker, with a parameter to tell it what task to perform? The second option seems simpler, but is it good practice? Logical coupling is generally to be avoided. I don't need to run more than one of the tasks at the same time. (User:Tevildo, not logged in). 195.89.37.174 (talk) 15:42, 14 February 2015 (UTC)
- We are now in the year of our Lord 2015 AD. Why, Oh! Why, do you want to still program in C# ? That was a rhetorical question So you don't have to reply. C# is proprietary. So you should expect to pay for such support and not get it free from here.--Aspro (talk) 17:13, 14 February 2015 (UTC)
- Some cats have employers, who dictate what software they're allowed to use, and whether or not they're allowed to log in to Wikipedia. Would that it were different. 195.89.37.174 (talk) 18:56, 14 February 2015 (UTC)
- And, more seriously, my question is about good practice, and not a support request. The code is working, but there are many thousands of examples of code that works but which does not represent good practice, many of which I've written myself. I'm attempting not to increase that number still further. 195.89.37.174 (talk) 19:01, 14 February 2015 (UTC)
- You've probably done this, but first consider if you need to use threads (i.e., memory sharing is required) or whether you can get by with background tasks. Tasks are simpler and easier to debug. MSDN is a good general resource for best practices; here are pages to Create and register a background task and for Guidelines for background tasks. --Mark viking (talk) 20:01, 14 February 2015 (UTC)
- Thanks for the link, but the application needs to run on Windows 7 (and XP), and the IBackgroundTask interface is only supported in Windows 8. Tevildo (talk) 10:09, 15 February 2015 (UTC)
Besides guessing passwords, or breaking cryptography, what problems can only be dealt with brute force search?
editWhat real-life problems are only solved by brute force methods? Are there problems that we understand so little that no other approach is feasible? Senteni (talk) 23:45, 14 February 2015 (UTC)
- It will depend what is considered real-life and brute force. List of distributed computing projects has problems where a lot of force is certainly used. Some of them have real-life implications. PrimeHunter (talk) 01:42, 15 February 2015 (UTC)
- Human Genome Project comes to mind, but depends on what is meant by "search". —IP=71.20.250.51 (talk) 02:19, 15 February 2015 (UTC)
- Do you mean finding the most-optimal solution, or a near-optiomal solution? For the former, most NP-Hard problems can only be brute forced to find the optiomal solution. However, for the traveling salesman problem and scheduling students (or lectures) in universityies a near-optional solution can be found by iterarative improvement. LongHairedFop (talk) 11:04, 15 February 2015 (UTC)
- It's not what we traditionally think of as computing, but one could say that a lot of astronmy questions are solved by brute force: just keep on lookin' 'til you find what you are looking for. —Noah 16:06, 15 February 2015 (UTC)
- That link isn't the best example. Pluto may be a planet, but it's not the Planet X that Lowell had predicted and Tombaugh was searching for, because that planet doesn't exist. --70.49.169.244 (talk) 17:25, 15 February 2015 (UTC)
- There's the hill climbing local maxima problem. One way to avoid this and find the absolute maximum is to do a lot of sampling first, then maximize from each of those points. If you sample enough points, you should get onto the main peak with at least one of those sample points, and find the absolute maximum from there. StuRat (talk) 16:13, 15 February 2015 (UTC)
- Protein folding seems to require brute force to figure out how a given protein is folded. StuRat (talk) 16:22, 15 February 2015 (UTC)
- Sorting is still rather brute force, where you can't just look at each item once and put it in the right spot, except for some special cases of the data, like with a bin sort where you have only a few unique types of items, such as sorting students by student grades. StuRat (talk) 16:31, 15 February 2015 (UTC)
- A search is completely brute force, if the list you are searching isn't sorted, so you must do a full sequential search. (If the list is sorted, then an elegant binary search pattern can be used.) StuRat (talk) 16:33, 15 February 2015 (UTC)
- So, I went to this summit on cybersecurity, and on Thursday night there was a panel discussion about how to think about security. You can watch the panel of experts recorded/webcast discussion. Google's "Cyber Security Princess" talks about an instructive analogy: how would you "hack" a vending machine? Among the options, there are brute force attacks - you can smash the machine with a sledgehammer; you can attack the owner with a weapon, ... and so on. These are incredibly effective methods to break security, but they entail certain specific consequences and side-effects. Among the most serious side-effects are:
- brute force attacks are not very covert
- brute force attacks invite retaliation in equal measure
- brute force attacks may be more costly than other breaches that can accomplish the same goal.
- The take-away is that cyber-security is a subset of security in general, and if one ever forgets this when designing a technology security policy, one is susceptible to security flaws in side-channels that weren't even considered.
- Nimur (talk) 18:30, 15 February 2015 (UTC)
Technically, any of the problems that are analogous to the "Travelling salesman problem"...NP-hard problems in general. There are lots of them...packing some number of irregularly shaped objects into a box, for example. SteveBaker (talk) 19:41, 16 February 2015 (UTC)