How to NOT become a root user? Are administrators root?

Question: I installed Ubuntu on my PC. To log in, I use the username and password I created during installation. Does this mean I am a root user? If yes, then how do I become non-root? It looks like non-root user is more secure than admin user.
Comment: You are confusing _root_ with _administrator_, two different things.
Comment: Related: [RootSudo (in the Ubuntu wiki)](https://help.ubuntu.com/community/RootSudo)
Comment: Windows 7 does not make this distinction clear, which really bothers and confuses me. The equivalent of running as root in Windows is to "Run as Administrator." But of course, if you're logged in as an administrator, you're already running everything as administrator by definition. Really poor terminology choice.
Comment: @KrisHarper **It isn't *by definition*** (or even true) that users must run programs as themselves. In Ubuntu, administrators (who aren't root) can run programs as root with `sudo`. More generally, an administrator (or otherwise authorized user) X can run `command...` as Y with `sudo -u Y command...`. In Windows Vista and later, with [UAC](http://en.wikipedia.org/wiki/User_Account_Control) on, users with administrative powers *run programs without them*, except when they explicitly authorize a program inherit their abilities. *Run as Administrator* appears when UAC's on (or for limited users).
Comment: @EliahKagan Of course you are correct. Under the hood users are issued a low-level security token and can request a higher level one when needed. I was speaking semantically from a user-experience standpoint though. If I administrate a computer, and am using it, I am literally running programs as an administrator. My point was that it's a poor terminology choice because it breaks the abstraction between the physical administrator (myself) and the digital one (a specific user account). I find it to be bad UX, even though the technically proficient will understand what is going on.
Answer: You are an administrator, but not root. The root user can do anything. Administrators can perform actions as root, but ordinarily what administrators do is not done by root. That way, you have full control over your own system, but only when you choose to use it.
Ubuntu asks for your password when you try to do stuff as root, to make sure it's really you.
User Accounts: Human, and Otherwise
Real human users have user accounts to represent them. You created one such account when you installed Ubuntu. But not all user accounts represent real human users.
Real human users are granted (and denied) abilities through their user accounts. They must use their user accounts to use the system; therefore, their user accounts' abilities and limitations apply to them.
User accounts are also used to codify sets of abilities and limitations. Some user accounts--most, actually, unless you have many human users of the machine--exist so that certain programs or commands can be run with their identity, an identity with the right abilities and limitations for the job.
For example, the www-data user exists so that if you run a web server, it owns the data the server make accessible. No real human user has to be empowered to make unchecked changes to those data, and the web server doesn't have to be empowered to perform any action unnecessary for serving the web. Consequently, both the web data and the rest of the system are more secure against accidental or intentional breakage, than if the web server were run by some human user who would have all the powers of the web server (and whose powers the web server would possess).
The Most Important Non-Human User Account
The superuser, whose username is root, is a non-human user account with a very specific combination of abilities and limitations: all abilities, and no limitations.
root's allowed to do anything. There are still things root cannot do because the system itself cannot perform or make sense out of them. So root cannot kill a process that is in uninterruptible sleep, or make a rock too heavy to move, then move it.
Many important system processes, like init, run as root, and root is used for performing administrative tasks.
Can I log in as root?
It's possible to configure the root account so it's possible to log in with a password, but this is not enabled by default in Ubuntu. Instead, you can think of root as being like www-data, lp, nobody, and other non-human accounts. (Run cat /etc/passwd or getent passwd to see them all.)
Human users log in with their own user accounts, and then if some task is to be performed with another user account, they cause that task to be performed with that identity, without actually having logged in as that user.
It's possible to configure the other non-human users, like www-data, so one can log in as them, too. That's quite rare, though, whereas in some other Unix-like OSes it's common to log in as root in a terminal. The risks of running a whole graphical interface as root, combined with how many graphical programs are not designed to run as root and may not work properly, mean that you should never attempt to get a root-owned desktop session.
Please note that while logging in as root is disabled by default in Ubuntu, there are ways to get a root shell without authenticating as root, which produce a similar effect: the most common are sudo -s or -i, recovery mode and similar techniques. (Don't worry if you don't know what those things are.) This is not actually logging in: in recovery mode, you become root before any login would occur; with the sudo-based methods, you're just running a shell as root.
Administrators
In Ubuntu, administrators are the users who can do whatever they want as root, when they choose to do so.

System Settings > User Accounts. "Eliah Kagan" is an administrator, so he can do stuff as root, but he is not root.
I'm an administrator on my Ubuntu system. When I run programs, ordinarily they run as ek ("Eliah Kagan" is the full name that corresponds to the ek username.)
When I run AbiWord or LibreOffice, it runs as ek. When I run Firefox, Chromium, Empathy, or Pidgin, it runs as ek. The programs that run to provide the desktop interface run as ek.
However, I am an administrator, so if I need to perform an administrative task, I can do so.
sudo
On the command line, I would ordinarily use sudo to run a command as root:
sudo command...
This will prompt me for my password. (Not root's password; root does not have one.)

Because I am an administrator, I can perform actions as root. In the default configuration, I must enter my password to do this.
Users who are not administrators cannot perform actions as root, even by putting in their password. sudo commands will fail if the user running them is not an administrator.

Because administrators are perfectly ordinary users except for the ability to perform actions as root, running a command requiring root privileges will still fail, except when the command is run as root.

Screenshot illustrating the need to use sudo to perform administrative tasks. (Based on "Sandwich" by Randall Munroe.)
sudo, Graphically
Graphical programs can run as root through graphical frontends for sudo, such as gksu/gksudo and kdesudo. For example, to run GParted as root I could run gksudo gparted. Then I would be prompted graphically for my password.

Since I'm prompted graphically, there doesn't have to be a terminal. This is one of the ways administrative tools are run as root.
Polkit
Polkit (once known as PolicyKit) is another way for administrators to do things as root. A program accesses a service that performs the action. Sometimes, the action is running a whole program; sometimes the action is more limited.
These days, many graphical system administration utilities are set up to use polkit by default, rather than to use sudo.
One example of such a utility is the Software Center. It takes full advantage of polkit, requiring the user to put in their password only when they want to do something that requires root privileges. (This is possible with sudo-based authentication also, but it is harder and uglier to accomplish.)
In the Software Center, I can find and read about an application; then I'm asked for my password when I want to install it.

How polkit Is Different
Any graphical program can be run as root with gksudo and other graphical sudo frontends. (The program might not work very well, depending on whether or not it's designed to be used as root. But the command to start the program will be executed as root.)
While polkit is now more common than sudo GUI frontends as the way applications on Ubuntu perform actions as root behind the scenes, polki will only run a graphical application as root if there is a configuration file allowing it and indicating what actions may be performed.
Polkit, Non-Graphically
pkexec is the command used to run a program with polkit.
Like sudo, pkexec can run non-graphical commands. (And it does not require a configuration file defining the command's capabilities--it simply runs the command as root.)
pkexec command...
pkexec prompts for a password graphically, even if it is run from a Terminal (this is one of the ways its behavior is more similar to gksudo than to running straight sudo).
(If there is no GUI--for example, if you're logged in from a virtual console or text-only SSH session, or the GUI is not functioning properly--then pkexec will degrade gracefully and prompt for your password on the command line.)

Once authentication is performed successfully, the command runs in the terminal.

Running Commands as Other Users Besides root
root is special because it gets to do anything that can be done. But it's a user account like any account, and the ways of running commands as root with sudo (directly or with a graphical frontend) or polkit can be modified slightly to run a command as any other user:
sudo -u username command...
gksudo -u username command...
pkexec --user username command...
What? You just type sudo first? How is that security?!
Running commands with sudo is sort of like invoking papal infalliblity.
When you run a command with sudo [invoke papal infallibility], Ubuntu [Catholic folks] tries hard to make sure you're really you [really the Pope].
Yes, I know papal infallibility (even when normative) is declarative; the parallel is not perfect.
Trying to do something as root with sudo (or polkit) is a big deal--Ubuntu is not just going to let that slide by like all the other times you run a program.
You are prompted for your password. (Then, that you have done so is remembered for a short time, so you don't have to constantly enter your password as you administer your system.)
Besides reminding you to be careful, this safeguards against two scenarios:

Someone uses your computer (or mobile device), maybe under the guise of checking their email or some similar innocuous purpose. Here, it's still possible for them to do some harm--for example, they could modify or delete your documents. However, they cannot administer the system, since they cannot put in your password.
Programs that aren't supposed to administer the system cannot do so, unless you enter your password. For example, if your web browser is compromised by a security bug and runs malicious code, it still cannot perform administrative tasks. It cannot create and delete users, modify programs installed as root (which includes anything installed by the package manager, such as LibreOffice), or alter the system at a deep level.

I've heard of su. What's that? Can I use that?
su authenticates as another user, and runs a command (or starts an interactive shell). It's possible to limit who is permitted to use su, but su authenticates with the target account's password, not the password of the user running.
For example, su username -c 'command...' runs command... as username, just like sudo -u username command....
But when you run a command as username with sudo, you enter your password. When you run a command as username with su, you enter username's password.
Since su performs authentication for the target user, with su you can only run commands as users whose accounts are enabled.
The root account (like www-data and nobody) is disabled by default. There is no password that will work to log in as root. So you cannot use su to run commands as root.
You can use su to run commands as another user who can log in (which typically includes all the user accounts on your system that represent human beings).
When logged in as a guest, you cannot use su at all.
Combining su and sudo
Someone who is not an administrator can even use su to run sudo as an administrator. (This is OK though, as they need the administrator's password to run commands as the administrator.) That is, a limited user can use su to run sudo to run a command as root. This can look like:
su username -c 'sudo command...'
(Running graphical programs this way requires special care.)
Wouldn't su be a more secure way to run commands as root?
Probably not.
What if a user shouldn't be allowed to act as root?
Make them a limited user instead of an administrator.
What if a program running as an administrator tries to sudo to root?
Unless you have reconfigured sudo to let it succeed without a password, it will fail.
Can't a program that shouldn't be run as root piggyback on a recent sudo command, so no password is required?
This would be very unlikely to succeed. These days, most operating systems (including Ubuntu) have sudo configured by default so that its timestamps apply only in a specific context.
For example, if I run sudo ... in one Terminal tab and authenticate successfully, sudo in another tab (or run by an unrelated GUI program, or that I run from a virtual console or SSH session) will still prompt for a password. Even if it's run immediately afterwards.
Doesn't a program running as user X have access to user X's password?
No.
If a malicious program is able to run as an administrator, can't it "listen in" to what's being typed when the administrator authenticates with sudo or polkit?
Potentially, yes. But then it could "listen in" to a password typed in for su.
If I tell someone my password—
Don't tell people your password.
What if someone has to know my password to do something on my behalf, but I don't want to let them administer the system?
Ideally, they should have a separate user account that lets them do what they need to do. For example, can share files between accounts, allowing multiple user to write to them, while still denying access to other users.
However, in a situation where a less-trusted person may be permitted to share your account, it should be a limited user account. You could make a separate account for this purpose (which makes sense--if it's an account for you and someone else who you want to have different capabilities, it should be a different account).
So, would the most secure thing be to disallow both sudo and su and make people log in as root, manually?
No, because there are serious disadvantages associated with letting people log in as root at all. Whenever possible, the smallest number of actions as possible should be undertaken as root. Even most acts relating directly to administering a system (e.g., looking at what users are configured, and reading logs) usually don't require root privileges.
Also, just as potentially a malicious program could watch what someone types when they run sudo or su, or create a fake sudo/su password prompt, potentially a malicious program could create a fake login screen, too.
What makes a user an administrator?
Group membership.
In Ubuntu 12.04 and later, administrators are members of the group called sudo.
In Ubuntu 11.10 and earlier, administrators are members of the group called admin.
When an Ubuntu system before 12.04 is upgraded to 12.04 or later, the admin group is kept for backward compatibility (and continues to confer administrative power to users in it), but the sudo group is used as well.
Limited User Accounts
Can I use a limited user account instead of an administrator account?
If you like, sure. Create a limited user account in System Settings > User Accounts, and log in as that user.
Can I make my administrator account a limited user account?
Yes, just remove it from the sudo and admin groups (see above).
But you should make sure there is at least one other administrator account, so you can administer your system. If there is not, then you'd have to boot to recovery mode or a live CD and make some user an administrator again. (This is similar to resetting a lost administrator password.)
Graphical tools for administering users and groups will usually keep you from creating a system with no administrators, or at least warn you. Command line tools typically will not (trusting that you know what you're doing).
Comment: @FirstNameLastName It seems to me a better analogy is: administrators are like Bruce Wayne, and `root` like Batman. The difference is entirely a matter of constructed identity. Bruce Wayne can become Batman whenever he wants and do almost anything, but he will always be Bruce Wayne under the mask. Still, Batman is more who he really is--the Bruce Wayne persona is a contrivance that shields him from the consequences of being Batman. By presenting as Wayne in everyday life, he can often protect himself and his loved ones from his own mistakes, flaws in the system, and the malware of Gotham City.
Comment: @EliahKagan-another dumb one :) I will make an analogy - Root is like a parent and any user is like a child. Elder children (admins) have more privileges. A child(user) can never be THE Parent(Root). The 12 year old child can do non-dangerous things in the house (OS/Ubuntu) like use the fridge and stuff. He is not allowed to touch the money in safe. But, the 18 year old (admin) can, using 'sudo' or permission of parent to access that money. But, both are not allowed to touch the gun in another safe. Only root(parent) can do that. Makes sense ?
Comment: @FirstNameLastName Administrator accounts represent real human users who, in the real world, have all the power. Admins can "make `root` do anything" with `sudo` and PolicyKit. An admin could even enable the `root` account and log in. If you abstract a user account as a combination of [mechanistic](http://en.wikipedia.org/wiki/Automaton) and conscious actions, human users have both and non-human users including `root` act purely mechanistically. If you understand how it all works, then if your analogy reinforces that, great! But I don't think it really captures the root-admin relationship.
Answer: No such thing as a dumb question ;)
I hope this clarifies things a bit:
In Ubuntu, two different types of user accounts may be made: standard accounts and administrator accounts. The difference between the two: a standard account is not allowed to make any important changes to your system by attaining root access, whereas an administrator account may use their password to make changes as the root user. The Root user itself is one of the many users that the system has created and that you do not normally see or notice, and you can't login as it (by default, anyway). If you are logged into an administrator type account, you can become this Root user with the sudo command in a terminal, and you are able to type in your password in order to install software, make system changes, etc. If you are logged in as a standard user, you are unable to do any of that.
Comment: If the admin can become root by just running a command, can someone else/hacker run it remotely and become root user ?
Comment: @FirstNameLastName They need to already be logged in remotely as one of the other users to be able to run `sudo`
Comment: @FirstNameLastName also sudo asks for an accountname and password before giving root access.
Comment: @Destrictor - yes it does. in fact, that is what confused me. I am inside a admin account and put the admin password to login to root. when the password and username is the same for admin and root, why have two accounts ?
Comment: @FirstNameLastName the main reason you need to enter the password when using sudo is for logging. This is mainly for security reasons (something happened and your IT department is finding out who/what/where)
Comment: @Destrictor if one had an administrator account and one was up to no good, one could use sudo to do mischief and use sudo again to alter the logs.  This could be countered by logging to a WORM drive.
Answer: In All Linux systems To do any changes to the system we need to be authenticated as root user and as well as to apply all changes we need to be root user.
Normal users cant apply the changes system wide.This is the advantage with Linux as compare with the windows.
If any attack done then that will stem up to only that area in Linux/Unix system because to attack or to modify remaining areas It need root permissions but in Windows if one place got attacked means the whole system will get affected.
That's why only in many questions if any user placed for no prompt for root password, then we will warn him as this is not recommended under security circumstances and leave choice upto them.
If you want to turn into a root user ,sudo can help you.
sudo -i

If you would like launch application as root user then you can sudo .
sudo <app_name>

It always a Better to run the system as non-root user.
Answer: The account created during installation is an administrator account.
In Ubuntu, root account has no password and as a consequence, you can not login as the root user. There are ways to circumvent this, but this is the default setting.
An Administrator account in Ubuntu means that the user is added to the group sudo, which makes the account eligible to gain previleges temporarily using the sudo command. PolicyKit can request privilege escalation by prompting 'Administrator' password. (You need to select a administrator user, and give that account's password.)
To confirm that these are true:

Open a terminal and attempt to update software package index. apt-get update is the command used to do it and this requires to be run as root. It works only when you either login as root, or execute it as root by using privilege escalations. An administrator can run sudo apt-get update by authenticating to the sudo mechanism which allows commands to be run as any user. A standard user will not be allowed to do this.

Open User accounts from System Settings and attempt to add a new user. The protection mechanism used there is the PolicyKit. Administrators will be allowed to authenticate and escalate privileges but standard users will be blocked. It requires an 'administrator' password to proceed.

Here is how you check if your account is administrator or not:

Open User accounts from System settings.
Select your user account in the left column.
You should see Administrator under the account name in both panes for administrator accounts and Standard for normal users.
Answer: No.
the user you log in to Ubuntu with, is not the admin user
(the admin user in Linux terminology is called root)
Comment: This is misleading at best. The non-root user created during installation *is* an administrator. Not root, but an administrator (meaning, mainly, that they can perform actions as `root` with `sudo` and PolicyKit).
Comment: @Izkata [No, *administrator* has a specific meaning in Ubuntu.](http://i.stack.imgur.com/YxZw5.png) It's simply *entirely incorrect* to say that the user account created during installation is not an administrator. As for allowing specific commands to run as `root` with `sudo`, that's irrelevant. Administrators can run *any* command as `root` with `sudo`. By default, no others can run any commands as `root` (or any other user) with `sudo`. Also, `sudo` is just one mechanism to perform actions as root--what people tend to think is `sudo` is actually often PolicyKit, these days.
Comment: @EliahKagan - ok, then what is the difference between administrator and root accounts ? I am new to linux and also to computer science, so please bear with me.
Comment: @EliahKagan Not really, that's just trying to apply Windows terminology to linux.  `sudo` access can be limited by what program you're trying to run as root, which makes it a lot fuzzier.
Comment: @FirstNameLastName There is a user that is actually named "root" (usually; I've heard it can be changed, but I don't know how).  It has access to everything.


How can I know the rules if people are always arguing here?

Question: I'm hanging around and find there is a lot of quarrel here, people debate different views about Stack Overflow, or if my question here is proper and so on. This kind of debate people have here confuse new users like myself, who are looking for guidance and clear rules.how to choose the answers for a newbie if there is a big difference in them?
Comment: With some difficulty...
Comment: @dmckee people say:follow your heart~
Answer: As I said in the comments, this has been discussed. The main reason for not having another meta site to discuss this meta site (so, a meta-meta site) is that then we would need another meta layer to discuss that site, a meta-meta-meta site. And that would go on forever...
If you, as a new user, are confused about what is the "right" way to behave on Stack Overflow or Meta, I understand your frustration. The problem is, many times there is no "right" way, people just think differently, and can disagree about pretty much everything. You get used to it after participating on Meta for a while, but until then... well, don't expect a final answer on everything, listen to the different opinions, and stick to the one you agree the most with. Also, try looking at questions tagged faq, their content tends to be more consensual (questions only get tagged faq after some discussion).
Comment: oh ,thanks ,I think I should delete the "meta meta" words ,that isn't the main matter but cause lots of misunderstanding.
Comment: @Winnie sort of. Heart *and* brains. Make an informed decision, but *your* decision.
Comment: it's very interesting but you mis my idea,
Comment: @Winnie I hope the new paragraph I just added is more helpful.
Comment: yes thanks for your answer ,so the answer is ,when you don't know which is right,go with your heart,am I right?
Comment: maybe use brain sometime.:).why my question Duplicate:
What about meta-meta Stack Overflow,I can't find the same part,are their same?
Comment: @Winnie You question looked like a feature-request for a Meta-Meta, so they closed it. I edited the question trying to make (what I believe is) your point more clear, let's see if it gets reopened. Please edit further if you think you can make it more clear too.
Answer: Meta is the right place to discuss meta things about Meta.  Questions about Meta on meta can be tagged meta.
See also meta-meta-meta.
See also semantic satiation.
Comment: New users that do not understand what's going on should be encouraged to read more and ask carefully crafted questions to help them understand if reading didn't help.  It sounds like you're asking about a specific incident.  Perhaps you should be asking about that incident instead of being so general about it.
Comment: and what I ask in here still has not a very clear answer.people who answered debate themself ,then how should a newuser choose?
Comment: like my question shoule I cover a old question with a new question by edit it ,there says you can delete it if you really care a bout the rep here ,but another says not to delete a question as stock-in-trade.I feel this is a discuss
Comment: (define (meta) (meta))???
Comment: @TinaCGHoehr no ,meta-beta just one of my imagine.my point is how to choose the different answers if the answer has argue with each other
Answer: If the quarrels are polite but energetic then you couldn't really ask for more, unless nobody actually answers your question.  If the quarreling turns rude and personal then flag the comments as being inappropriate.


Most useful features of VIM that aren't standard in a IDE

Question: I'm considering whether I should start using VIM again instead of an IDE. What are the most useful features of VIM that aren't standard in an IDE?
Comment: Which IDE do you use?  Many IDEs have VIM plugins so you can edit as if you were using VIM.
Comment: @Brian: Surely they didn't emulate all of the advanced features?
Comment: @Brian R Bondy: None of them even come close to covering all of vim's features. They scratch the surface and don't really do any more
Comment: Or you could be really sensible and start using `emacs` instead. ;-)
Comment: Probably not all but the ones I've used are great for VS.  There are at least 2 of them.  http://www.viemu.com/  and http://github.com/jaredpar/VsVim
Comment: :! sudo apt-get install emacs vim- (sorry, I actually prefer Vim over Emacs these days, but couldn't resist)
Comment: @Daenyth: Close enough for my needs, but ya I don't doubt they are missing a lot.
Comment: http://www.viemu.com/a-why-vi-vim.html might be interesting.
Answer: I don't think its necessarily the advanced features of VIM that make it so powerful. Its the fact that you never have to take your hands off the keyboard to do anything. Finding something in a huge file is as simple as a couple of keystrokes. Opening and closing multiple files in the same window is incredibly fast as well.
While it may not seem intuitive at first, its well worth your time. Even if you don't use it as your standard IDE (I generally use Visual Studio or Eclipse, for example), you'll find your self using VIM to quickly open and edit files because it becomes way faster than waiting for the IDE to load.
Invest the time to learn how to use VIM well and you'll never regret it. I'd say its comparable to learning to touch-type.
Comment: +1 Whilst I am an emacs devotee, the same argument applies.  The modern IDEs are far too "graphical", for *text* editors.
Comment: This  answer is probably the most useful feature for Vim, it is also one of the only. Anything programmed for Vim can easily be applied to IDE's too, it's just text processing after all...
Answer: For me the :global command is a killer app.  It will execute arbitrary vim commands on any line that matches (or does not match) a regex.
Here are some examples:
The default behaviour is to list out every line that matches, so:
:g/TODO:/

will list every line that contains the text "TODO:"
change 'Mickey' to 'Minnie' on any line that also contains the word 'Mouse'
:g/Mouse/ s/Mickey/Minnie/

The commands can have their own range, so this will delete from every line with "TODO:" to the next blank line:
:g/TODO:/ .,/^$/ d
Use :g! to execute on every line that does NOT match the regex, e.g. to replace "emacs" with "vim" except on lines that contain the word "sucks":
:g!/sucks/ s/emacs/vim/

Comment: Great tricks with global command ! I had never thought of using them like that.
Comment: Eclipse supports regex searching of files, either as individual files, projects, or across projects in the same workspace. Regex replace is also supported to some extent, but I believe vim has a much more powerful regex capability.
Answer: I find the ability to delete everything in between a set of paired symbols incredibly useful. For example, quite often, I'll find myself wanting to replace a string in the code. So, di" while the cursor is in the block will delete the string, while keeping the "" intact, and put the cursor in between the two quote characters. da" does the same thing, but deletes the quote characters too.
Comment: Even better, `ci"` deletes, and puts the cursor in insert mode so that you can immediately start writing.
Answer: 'Insertion mode keyword completion'. Ctrl-P and Ctrl-N in insert mode to search through the text to try and complete whatever variable name you are typing. I've never seen this in any other IDE and I really miss it. Code completion in IDE's just isn't the same.
Comment: I disagree completely. Modern IDEs (Visual Studio, Eclipse, …) have a kind of code completion that rivals (and in fact surpasses!) Ctrl-N *easily*. If you haven't seen this in IDEs, look again at the current versions. And Omni-Complete unfortunately doesn't work  properly.
Comment: You also have _proper_ code completion if you want, using omni-complete. `^X^O` omni-completes in insert mode, if you have it enabled. But you're right, I find myself using keyword completion far more than omni-complete.
Comment: @Chinmay: I think you have the meaning of "proper" backwards. Proper code completion completes anything using the principle of locality, even if you are writing text instead of code.
Comment: SlickEdit has a similar feature; and it's very IDE-like
Answer: Another feature I find incredibly useful is the ability to change indentation. :15,30>> indents all lines from 15-30 (inclusive) twice, while :15,30<< de-indents the same lines twice.
Comment: While I love the feature, pretty much every IDE has block indent (and dedent).
Comment: I find `=` to be just as, if not more, useful than `<<` and `>>`.
Answer: the command dd (delete current line).  I use this one so much.
Also, being able to type something like 3dd and delete the next 3 lines is wonderful.  I've never seen this in another editor =D
Comment: @Raoul, we know there's an emacs series of n 3-keys combinations to replicate every vim command - still, 3dd is poetry.
Comment: Netbeans almost has this, ^X with no selection will *cut* the current line.
Comment: @Alan: No, NetBeans has jVi :)
Comment: ^K deletes the line and ^u3^k would delete 3 lines in emacs.  shift-delete does the same in visual studio.
Comment: Alan: dd also *cuts* the current line in that sense that it can be inserted with p later
Comment: Back in the DOS days, ctl-y was "yank" out the current line in pretty much every editor and IDE out there.  Whoever decided to throw away those perfectly good conventions and re-write them to make it "redo" now has me seriously annoyed.  I *still* to this do occasionally hit ctl-y to delete the current line and instead end up with some stuff re-done that I didn't want!  :-)
Comment: There's an emacs command for everything. http://xkcd.com/378/
Comment: The ISPF editor has very similar commands.
Answer: The c command. For example, ci" to change inside quotes. cw to change word. Lots of handy tricks with it.
Answer: The . command. It repeats the last command.
Comment: +1 to this, and to all other macro-related functionality.
Answer: Esc ! } will shove the current paragraph off to a command line filter like fmt or wc or which and return results to the editor.
Answer: Rapid access to the command-line. CTRL+Z or :wqa will get me a command line in less than 1sec without my hand leaving the keyboard.
Comment: +1 That last little bit is the crucial section for pretty much all the benefits: *without my hand leaving the keyboard*
Comment: ... Or `:!/bin/bash`. I use `:!` quite frequently.
Comment: I usually use `:sh`
Answer: That I can use hjkl to move the cursor without having to leave the homerow of the keyboard. I have most programs (such as PDF readers), which let you change keybindings, set to use Vim movement keys for scrolling etc.
Answer: This is rather hard to answer, due somewhat to the vagueness of the question, and somewhat to the fact that IDE's differ, and many provide features that other don't (and the fact that I've just a few of them).
However, what I believe distincts Vim from other editors (yes, even Emacs, on this one) is that it is really a great editor. I've in the passing of time, used many editors, and can honestly say that very few come with such a complete set of features for manipulating text, like Vim does.
My style of manipulating text for example, includes very often use of (line/selection of several lines) duplication, and moving (line/selection of several lines) up and down, for which I've long ago defined quick shortcuts. I miss those features in most IDE's (although I've heard ReSharper for VS has something similar).
Answer: Did you know that there is a vi plugin for eclipse? It costs 15 euro (20ish US$) but it is so worth. No more dd in the middle of a document, and missing all the tiny useful things.
Perhaps a bit off topic but I thought it was worth pointing out.
Answer: Depending on what you language you are programming, stick with the ide, or get the ide that offers the most refactorings that you can find, get resharper for visual studio if you are doing c#, intellij for java, or visual assist for visual studio, max out the refactorings in eclipse or netbeans.
We should be moving from manipulating text to manipulate code, refactoring tools give you that ability. If vim does give you all the features fine, I for one don't really want to deal with a text editor anymore
Comment: This is pretty much nonsense. Yes, refactoring is an important tool, but the code doesn't write itself. A good text editor contributes _far_ more to a programmer's productivity than a good refactoring tool.
Answer: Table Column Select
This doesn't seem to be in the popular IDEs, and if it is they keep it well hidden. This is really handy for testing regex against a column in CSV data file.
Answer: Most IDEs don't allow you to split the screen. I love that feature in VIM.
Comment: Most IDE's don't? I think most actually do so, at least those that I have used.
Comment: Most IDE's handle screen splitting differently than Vim/Emacs. They do it with tabs usually. These are harder/impossible to manipulate with the keyboard (compare having 50 files open in Emacs vs. having 50 files open in Eclipse and you'll quickly see Emacs win).
Comment: Can you give some examples?
Comment: Most IDEs that do have splitscreen don't provide easy methods of navigating/adjusting a-la ``


Why do some denominations not wash feet before taking communion?

Question: Why is it that some denominations follow the ordinance of humility as described in John 13 while others do not? What reason is there for not performing the foot washing ceremony before partaking in the Lord's Supper?
Comment: Differing convictions.  You may as well ask why some Christians watch and/or read Harry Potter when others view it as an introduction to sorcery and witchcraft.  When it comes to foot washing, some believe it's a sign of reverence, some believe it's necessary, others would say that it's "legalistic" to call it necessary.
Comment: Could you give us an example of a denomination that routinely performs foot-washing as part of communion?
Comment: @DJClayworth - I know that the Seventh-Day Adventist Church performs foot-washing as part of communion according to the example set by Christ in John 13. I know of no other denomination that does this though.
Answer: While I am not familiar with any denomination that practices footwashing as part of communion celebrations, I can address an issue that is implicit in the questions.
Descriptive is not the same a prescriptive
In other words, just because the Bible describes some people as doing something that doesn't mean all Christians should always do that too. As an extreme example the Bible tells us of bad things done, even by people described as 'righteous, such as the adultery of King David, and Peter's denial of Jesus. We are not expected to follow their examples. We have to use judgement, and follow Biblical guidelines, as to what is an example to be followed and what is description.
The Lord's Supper itself is not just descriptive. As well as describing what happens, Jesus' command is recorded: "Do this as often as you eat/drink it". No such command is attached to washing the disciples feet. In fact Jesus makes it pretty clear that what he is doing is not actually about feet, but about leadership and humility. Jesus expects leaders to act with humility towards their followers and be their servants. Actual literal footwashing may or may not be involved. Most Christians would say that a leader who carried out literally the act of washing people's feet, but behaved arrogantly towards the people they lead was not carrying out Jesus wishes.
Comment: I understand your point. Jesus did say, "Ye call me Master and Lord: and ye say well; for so I am. If I then, your Lord and Master, have washed your feet; ye also ought to wash one another's feet. For I have given you an example, that ye should do as I have done to you. Verily, verily, I say unto you, The servant is not greater than his lord; neither he that is sent greater than he that sent him." (John 13:13-16 KJV) The command is given with the understanding that humility is to characterise our leadership and interactions with others in addition to love.
Answer:
John 13:14-15  If I then, your Lord and Master, have washed your feet;
  ye also ought to wash one another's feet.   For I have given you an
  example, that ye should do as I have done to you.

Some have speculated that this action in the upper room was in response the the disciples argument (recorded in Luke) about who was to be the greatest in the Kingdom.
The task of washing feet was usually performed by the lowest ranking slave in a household. The task was necessary as anyone who has been in that part of the world prior to extensive use of motorized vehicles knows, donkeys leave manure wherever they go and they are used as the transport of choice in many small villages even today.
What Jesus did was less ceremonial than it was utilitarian. However, it could also have been done as a silent answer to the disciples dispute.
While several denominations have instituted foot washing as a ceremony (with or without communion), I do not think that the words of Jesus are meant to institute a specific ordinance or act symbolic of humility. I think that Jesus is saying that they should be willing to perform acts of service that are useful and necessary for each other without regard for how it would appear.
The "example" of Jesus is not one of ceremony, but of utility.
A parallel today might be if a bishop of a denomination was having a regular church member over to his house for dinner and the person had some dog manure stuck to his shoe. Instead of telling the person to take off his shoe and leave it outside, he asked the man to sit in a chair while he (the bishop) cleaned his shoe for him.
Comment: Interesting, though a deeper meaning is found in John 13:10 for feet washing, "he that is washed needth not save to wash him feet". In some denominations, it is encouraged that you wash the feet of someone you've wronged during communion - now this requires deep humility.


Boiling water to kill weeds?

Question: Last summer I found that boiling water will kill weeds, and kills them quick.  However boiling water takes time and a large individual crabgrass would take a whole pot of boiling water to kill the weed.  My question asks if anyone knows of any other home remedies for weeds.  Spot treatment for crabgrass is all I need.  Small yard.
Comment: @Bryan Hearn I would suggest you get the ground wet before you try to pull out the crab grass. Should come out no problem if the soil is wet in that area.
Comment: Home remedies? Is there a reason you don't want to use a weed killer? You could always use your hands. It's honestly the most effective and innocuous method of permanently removing weeds that I have ever found.
Comment: I don't like putting chemicals in my yard.  Some weeds get the hand but not crabgrass not here in Fort Worth.  Within a week of it first sprouting it's next to impossible to get out with by hand in this clay soil.  I really like the boiling water killing it on contract and was looking for something similar
Comment: You'll likely be advised to try vinegar or salt - this on using vinegar https://www.gardenmyths.com/vinegar-weed-killer-myth/ is worth reading - salt will unfortunately make the soil toxic and kill nearby plants too. I think you're stuck with boiling water, frankly, if you can't dig it out.
Comment: You might try household vinegar.
Comment: Much less  work and energy for the same affect  would be use of a propane burner. Depending on economics flame weeding is done in agriculture
Answer: Instead of trying to kill the weeds as is, you could think of them as future fertilizer. Get some cardboard or newspaper, lay it on top, and start "lasagna gardening" by putting compost on top of that. You'll be able to plant in it come spring. One thing I've learned from weeds is that you can try to go down to their level, but you end up opening up the soil for weed seeds that are embedded in the ground.
Dealing with problems can be that way in life. You can choose to dwell on the problem or see it as a path to build something preferable. BTW, since the cardboard will suppress weeds below it, the new weeds sprouting in your garden will be easier to pull!
Answer: If you want to boil water for nearly free you can get a solar  cooker that does this. And then get free hot water that you can use to keep killing those unwanted plants forever.
A small hand held butane torch might also work but the weeds grow up again.

Boiling water to kill weeds?


Are there any differences between "update" and "upgrade"?

Question: Are there any differences between "update" and "upgrade"?
Answer: If you're talking about software, there is, imo, even though the two do overlap. (A lot depends on the context: I'm assuming a general one below.)
Usually, when you update a software, you apply patches and additional bits and pieces that the seller provides you for free, in theory to keep your copy in line with the official version (which is likely more stable, more secure and may even provide you with some new / better options, functionalities.)
On the other hand, when you upgrade a software, you usually buy / pay extra for a version unavailable for free. Of course, an upgrade serves as an update as well (in most cases.)
An example: say you have an antivirus program that you did not pay for (it being made legally available for free), but which has a commercial version as well: You usually update its database (to keep you safe from newer threats) - but if you upgrade it, it means you pay for an advanced version that gives you extended protection: not just via an updated database but also through extended capabilities (like email-scanning, link-scanning etc that were unavailable in the free version, no matter how up to date your database was.)
(Again, a real lot depends on the context.)
Comment: +1: This is my understanding as well.
Comment: This seems to be Apple's understanding as well: http://support.apple.com/kb/HT1444
Answer: To update means to bring someone or something up to date, whereas to upgrade means to raise or improve something to a higher standard. The difference between these two is particularly apparent in the world of computers: an update is not always and improvement!
Comment: Of course an upgrade is not always an improvement either... ;)
Comment: In the case of software I'm not even sure upgrades are an improvement, but good answer still.
Answer: To update means to make something more modern or up to date; it also means to give to somebody the latest (or up to date) information.
To upgrade means to take something to a higher standard/level; it also means to raise somebody to a higher grade or rank.
Looking in the Corpus of Contemporary American for phrases containing update or upgrade, I get the following data:

                    Instances
computer update     1
computer upgrade(s) 12
hardware update     2
hardware upgrade(s) 11
software update(s)  30
software upgrade(s) 31

The sentences containing hardware update are both referring to a software tool.

The Hardware Update Wizard will search for an updated driver on your local drives as well as on Microsoft's Windows Update site, and it will install the driver if it finds one.

Select the option in the Hardware Update Wizard that lets you choose the location of the search and select the driver (the wording varies).
Comment: One example not related to computers: "you should update your wardrobe" (to get with the times) vs "you should upgrade your wardrobe" (now that you have been promoted to executive)
Answer: Update is a shortening of "bring up to date" and upgrade means to put at a higher grade (as in to make better).  You can upgrade your your CPU from 2.4 GHz to 3.2 GHz, but your software update can have bugs that break your computer.
Comment: @Marshall , I've re-read it few times but could not find any implied senses you mentioned in your comment
Comment: I agree with your answer in general, but I disagree with the line of logic used in the example. It implies software can be faulty but hardware cannot. That just isn't true. As an example, note that Intel recently recalled millions of chips because they were faulty. I realize this is not central to the question, and I do not mean this as any sort of attack. But as a software engineer and former electrical engineer, for me to read this and not comment seems wrong.
Answer: From most answers:

To update means to make something more
  modern or up to date; it also means to
  give to somebody the latest (or up to
  date) information.

Well, the most "up-to-date" is not synonym of "modern".
One can have the most up-to-date SQL Server 2005 with all latest updates and hotfixes but it is behind, in being modern, after SQL Server 2008 (even not updated).
For example Service Pack 4 for SQL Server 4 was released on December 17, 2010, i.e. three years after release of more modern SQL Server 2008.
Comment: Yes, that's why the definition says "modern *or* up-to-date" - the two words are not exact synonyms (though they're close in meaning), and *update* can be used with either meaning.
Answer: All the above contributions are laudable and basically linked. Hope this scenario simplifies and clarifies the basics.
Updating as explained earlier implies keeping something up to date thus if the functionality of a particular program is to rectify errors from level 1 to say level 3, updating the program implies maintaining or igniting its efficiency to work effectively within the specified levels (level 1to 3).
But to upgrade the program implies increasing its capacity and efficiency to enable it exceed or work beyond the previous lower levels i.e. levels 4, 5 and upwards.
Answer: For example think that there are 10 levels and you are at level 1.
If you update a file it will reach directly to level 10 from level1(up to date)
If you upgrade it from level 1 you can reach only level 2 (i.e. step by step )
Comment: This would be improved if you could show that the definitions of the words define this mode of operation. That is, explain why an upgrade can only be a single step and why you cannot 'upgrade' to the top level directly.


How to deal with a loss of appetite with a toddler?

Question: My son is 16 months old, he is a picky eater and we are dealing with his poor eating habits from the get go (now going to a special clinic). As for now, I'm breastfeeding him 50/50 with real food. Whenever he gets sick he loses his appetite and stops eating! He demands I breastfeed him more, but I don't have enough milk to give him a full meal. It's like we need to work with him from scratch again :(. He refuses to put food in his mouth and that worries me alot! it's been 4 days since he ate something, only milk from me. He also refuses to take milk from a bottle so I can't give him formula. He is not sick anymore. and this time he is more stubborn about not eating.
We are going to his doctor tomorrow morning, but I don't think she can help us.
Comment: Have you tried cups? There's a variety of sippy cups and straw cups designed for young children, so it can be tough to find a "match", but my boys both switched to cups pretty early. (Oldest had a lot of bottled breastmilk, but youngest has never really used bottles. He's been using a sippy cup (with help) since about 6 months old.)
Comment: Also try a variety of teats on bottles. One of ours was very picky and only liked one shape of teat. Worth a try. Also, when weaning, we made a very wide range of puréed foods until we found ones she liked - and temperature and texture were important! Experiment a little.
Answer: Firstly, if you're going to a specialist clinic I would assume that they are going to give far better and tailored advice that "the internet" will be able to, especially from the few details you give in the question.
I think the main problem might be that he (very understandably) prefers breastfeeding to solid food!
Now, obviously you cannot control your child's appetite. But let's look at what you say:

it's been 4 days since he ate something, only milk from me.

The only question then is whether he is underweight. If he is, see a doctor.
If he's not underweight, then he's getting enough calories from your milk and any food he is eating. That's why he doesn't want any more food! Therefore, you have to decide whether

you are OK with this, or
you give him less breast milk.

Obviously, there are well-known benefits to breast feeding. Here's the current UK advice (my emphasis):

How long should I breastfeed for?
Exclusive breastfeeding (with no other food or drink) is recommended for around the first six months of your baby's life. After this, breastfeed alongside other foods for as long as you and your baby wish. This might be into their second year or beyond.

http://www.nhs.uk/conditions/pregnancy-and-baby/pages/breastfeeding-problems.aspx
It sounds like he wishes it! But is it making eating harder? The ideal thing might be to limit the amount of milk he has. If not the easiest way to fix the problem might be to stop breast feeding altogether! Then he could only get calories from solid food.
This is up to you. Obviously. Good luck!
Answer: I really feel for you as have been through the same thing, my son is now 21 and still picky, (sorry) but he has two older sisters and one younger brother of 12 years. The two older ones never had a problem with them but when their brother came along wow was he different.
When he had breakfast, just toddling, he would keep it in his mouth all day, not swallow and like you wouldn't eat for days. We also went to a clinic and because he was not losing weight and was 'on the line' we got no help.  10 years later (yes!) we had another child and I vowed he would not be the same so he ate what we ate I didn't give choices. If he saw his brothers food of dry chicken and bread (woo hoo) I just told him it was not good to eat just that all his life and it was not an option and stuck to my guns and he is a brilliant eater.
What I'm trying to tell you by experience is do not pander to him, he will not starve himself, it won't happen, be strong. I was not, if he didn't eat I would panic in case he starved himself so gave him chicken nuggets and before you know it that's all he was eating. Because you are breastfeeding/bottle he is relying on that and as long as you offer it he is ok with that, why should he try hard food, to much effort.  I breastfed my children but eventually you have to make the changeover (I do know people who breastfeed at 6 but am sure they eat well also).
When I went to the clinic I told them "he eats chicken, bread and chips" but that was ok with them, I said "what about the 5 a day veggies" they said don't worry, he will grow out of it but he didn't. Giving him what he wanted he never asked to try something different, he wouldn't would he?
It's been absolute stress all these years. When he was 16 we referred him for the last time and they told me what do you do when you go to restaurants and I said make sure there is "William food" on the menu, and she said so he has been controlling where you eat for 16 years! and I thought "yes she is right, every time we went out (and it was not often!) we would have to make sure there was chicken on the menu with no sauce or anything! And her advice was go Chinese, Indian or whatever and if he just has ice cream or whatever that's how it should be, he will eventually come round.
Too late advice when they are 16 I might add! Please just dish up the same, someone also told me a child refuses a food maybe 15 times before they just pick it up and eat it!  Be strong, he will not starve, they can be very stubborn, and just testing the boundaries as I might add my 12 year old at the moment, and unfortunately they keep doing this.
Let me just add I'm just a mum not  a doctor, but have had 4 children and they are all still alive even the picky one! Get him checked but I'm sure it's battle of the strongest here!  Also remember there may be something they just don't like, 2nd daughter has never liked peas, and 4th never like mushrooms but hey I can live with that!


Ribbon UI on mobile devices

Question: I am currently developing a windows 10 Universal application, that can run on both mobile and desktop systems. It inherited a large code base and quite big number of features from a WP8.1 app, and alongside W10, new features are coming every month or so.
My current problem that has been the ever increasing number of features that have to be visible to the user. Here's some of the alternatives available:
Hamburger menu
The top left/top right positioning is never going to please everybody. Either left handed users or right handed users have to be sacrificed (shockingly, it is the right handed user that is usually scarified in most hamburger implementations).
It feels like it doesn't really belong on the desktop, as much as Microsoft is pushing it everywhere. It is an extra click that shouldn't be there to get to what you need.
It scales really bad with large amount of commands. If you have like 6+, on mobile you already have to scroll, which again, extra command for the user.
People aren't really used to it, and sometimes won't see it. Many articles on the web describe the problem.
Menu bars
These ones scale nicely on desktop, and somewhat OK on mobile, and it is what the application currently uses. However, at some point, there will inevitably be some nesting of features. There can only be so much to put in a menu.
On mobile, you can only out so much items in the menu until it goes outside the screen.
App / command bars
These are similar to the ribbon, but they support only a limited number of commands, and no easy way to achieve tabs.
They feel alien on desktop.
So here comes the ribbon...
Pros: It is somewhat familiar to most desktop users and will fit nicely there, as many productivity tools are adopting it, including windows explorer.
Provides much more space for upfront presentation of items.
Items are easier to discover and grouped in logical groups.
Can provide contextual commands.
Cons: Eats space on mobile, so there has to be some way of folding it when it is not needed.
Number of visible commands is still somewhat limited on mobile, but it is much bigger than all the other solutions, and, surprisingly, the most space efficient. I can easily manage to fit 12 commands in a 2x6 grid, and I can go as far as 18 with 3x6.
Not really something that you would expect to see on a mobile phone. Some users will be curious about it.
I have yet to see an application actually implement a ribbon on mobile.
Would this kind of UI be appropriate for such devices? Are there other alternatives that would fit well on both types of devices?
Comment: Are all features (menu options) appropriate for all users?
Comment: Yes, the features are exactly the same on both types of devices.
Answer: What about an actual, simple "ribbon"?
I have an app on my phone that does exactly that:

All feature categories are available in this horizontal list, like the tabs in the Windows ribbon tabs. Once you click on one, you get into a deeper level with yet another ribbon of features.
But to be honest I think I'm not able to judge the intuitivity of this concept anymore, because I am already used to it after using it for quite some time.
Answer: You can always go with a responsive design where you have a full ribbon on the desktop and an icon bar on smaller screens. My main concern with the ribbon on mobile devices is making sure your buttons are not so small that users will click the wrong thing accidentally.

Ribbon UI on mobile devices


Can I develop iPhone apps under Windows using an image of OS X?

Question: I want learn iOS development, but I don't have enough money to purchase a Mac.
Is there any way that I could learn iOS development on Windows, perhaps using an image of OS X?
Answer: Have you seen http://www.coronalabs.com/
They have a cross-platform sdk that lets you build for iPHone and Android - it's targeted to game developers.
http://www.buzztouch.com/ is also supposed to be a decent cross-platform development tool


What made Bohr quantise angular momentum and not some other quantity?

Question: Bohr's second postulate in Bohr model of hydrogen atom deals with quantisation of angular momentum. I was wondering, though: why did he quantise angular momentum instead of some other quantity?
Comment: Bohr *didn't* start by quantizing the angular momentum. He started by requiring that there exists discrete orbits and that the energy of photons released met the plank condition. Quantized angular momentum was a *result* he derived in the paper. And yes, most intro textbooks use $L=n\hbar$ as the launching point in discussing the Bohr atom, but it was not Bohr's assumption which was rather simpler. I'll find a reference if I can.
Answer: Bohr postulated that electrons orbit the nucleus in discrete energy levels, and electrons can gain and lose energy by jumping between energy levels, giving off radiation of frequency $\nu$ according to the formula
$$\Delta E = E_2 - E_1 = h\nu$$
where $\nu = \frac{1}{T}$, where $T$ is the period of orbit, as in classical mechanics.
Now during the transition, let $r$ be the average radius and $v$ be the average velocity of the particle.  Making such a simplification allows us to calculate the period of orbit:
$$T = \frac{2\pi r}{v}$$
Therefore,
$$\Delta E = h\nu = \frac{hv}{2\pi r} \tag 1$$
Also, we know the kinetic energy at a particular energy level is given by
\begin{align}
\text{K.E.} & = \frac{mv^2}{2} = \frac{Lv}{2r}, \quad \text{so therefore} \\
-U & = 2KE = \frac{Lv}{r}
\end{align}
Again, taking $r$ and $v$ to be the average radius and velocity during the transition, we get
$$\Delta E = \frac{(L_2 - L_1)v}{r}. \tag 2$$
Equating $(1)$ and $(2)$ gives
$$\frac{(L_2 - L_1)v}{r} = \frac{hv}{2\pi r}.$$
Therefore,
$$L_2 - L_1 = \frac{h}{2\pi} = \hbar$$
Therefore, each energy level differs from the next by an angular momentum of $\hbar$.  It is therefore reasonable to postulate that if the lowest energy level has no angular momentum, then each energy level from then on has an angular momentum of $n\hbar$ where $n$ is an integer.

Below is the modern de-Broglie method:
From the definition of angular momentum,
$L = rp$, where L is angular momentum, r is radius of orbit and p is momentum.
We also know that momentum is related to wavelength of a particle from the de-broglie relation:
$$p = \frac{h}{\lambda}.$$
Combining these gives
$$L = \frac{rh}{\lambda}.$$
Ok, now let us consider an electron orbiting a nucleus.
The circumference of the orbit is $2\pi r$, and because we want the electron to form a standing wave orbit, we require that $\frac{2\pi r}{\lambda}$ be an integer, in order for the wave not to interfere with itself.  That is,
$$\frac{2\pi r}{\lambda} = n,$$
where $n$ is some integer. Now we can substitute our definition of $L$ from above into this equation to give:
$$\frac{2\pi L}{h} = n$$
and re-arranging gives,
$$L = \frac{nh}{2\pi} = n\hbar$$
Therefore, quantising angular momentum allows for the electron wave to not interfere with itself during orbit.
Comment: I don't understand why you are taking the same radius $r$ and velocity $v$ during transitions. Why don't you take radius $r_1$ before transition and radius $r_2$ after transition(and the same in the case of velocity) ?
Answer: As dmckee commented, angular momentum is barely mentioned in Bohr's revolutionary 1913 paper "On the Constitution of Atoms and Molecules" (Philos. Mag. 26 , 1).
Instead, Bohr's bases his argument on Planck's hypothesis that the radiation from a quantum harmonic oscillator "takes place in distinctly separated emissions, the amount of energy radiated out from an atomic vibrator of frequency" $\nu_o$  "in a single emission being equal to" $nh \nu_o$, with $n$ a whole number and $h$ Planck's constant.  (I've changed some of Bohr's notation to conform with modern usage.)
Now a harmonic oscillator has the same frequency no matter what its energy, but not so a hydrogen atom.
After calculating the relation between frequency $\nu_c$ and ionization energy $W$ for a classical closed orbit of semi-major axis $a$, charge $e$, and electron mass $m$:
$$ \nu_c = \frac{1}{\pi} \sqrt{\frac{2}{m}} \frac{W^{3/2}}{e^2} \quad , \quad 2a = \frac{e^2}{W}$$
Bohr offers two approaches:

Consider an electron starting at rest, far from the atom, and ending in a stable closed orbit (itself a bold assertion, since classically there are no such orbits).  Since the starting "frequency" is 0, Bohr splits the difference and postulates that the radiated emission's frequency $\nu_r$ is half the frequency of the end orbit $\nu_c$.  Setting $W=h \nu_c/2$ (the energy radiated away), Bohr derives explicit expressions for the end orbit characteristics.
As an alternative, Bohr considers transitions between two nearly classical orbits of very low frequency, where the start and end orbit frequencies are nearly identical.  This situation is very similar to the harmonic oscillator, so the Planck hypothesis can be applied directly:  the radiation frequency equals the orbit frequency.  The results are consistent with the first approach.

Only then does Bohr note: "While there obviously can be no question of a mechanical foundation of the calculations given in this paper, it is, however, possible to give a very simple interpretation of the result", namely the stable circular orbits have quantized angular momentum $L=n \hbar$.
By 1918, in "On the Quantum Theory of Line-Spectra", Bohr has adopted the technique of adiabatic invariants to demonstrate that the action $I$ of a hydrogen atom is quantized just like the harmonic oscillator: $I=nh$.  He notes that "this condition is equivalent with the simple condition that the angular momentum of the particle round the centre of the field is equal to an entire multiplum of $h/(2 \pi)$.
I think "multiplum" = "multiple".
It took awhile to appreciate the fundamental nature of quantized angular momentum.
Answer: Angular momentum is a conserved quantity (in a closed system) and this is true also for the angular momentum that is carried by the electromagnetic (EM) field.  This conservation is a manifestation of rotational symmetry and the azimuthal part of the EM field emitted must be single valued.  In other words, when rotating the EM field in the azimuthal ($\phi$) direction (perpendicular to the $z$ direction) an integer number $n$ of $2\pi$ (360 degrees) it must have the same value as before the rotation.  This necessary single-valuedness after a rotation of $2n\pi$ can only be realised if the angular momentum attains only integer values $n$, i.e. if the angular momentum is quantized (at the classical level!).
Comment: The angular momentum is not quantised at classical level.
Comment: This is possibly misleading as the question is about Bohr's model, not stationary EM waves.
Comment: welcome to PSE, prof [Bo Thidé](http://en.wikipedia.org/wiki/Bo_Thid%C3%A9)
Comment: he is the author of the [The Electromagnetic Field Theory Textbook](http://www.plasma.uu.se/CED/Book/index.html) available online, thanks prof.
Answer: This is an answer for why there is a constant n involved in the angular momentum classically.
$$F_c=\frac{1}{r}mv^2=k\frac{q^2}{r^2}=F_p$$
$$L=rmv  $$
$$r=k\frac{q^2}{mv^2}=k\frac{q^2}{m(\frac{L}{mr})^2}$$
$$r=\frac{L^2}{kq^2m}$$
$$\frac{1}{2}mv^2=\frac{1}{2}m\omega^2r^2=\frac{1}{2}m\omega^2(\frac{L^2}{kq^2m})^2=\frac{1}{2}k\frac{q^2}{r}$$
$$\omega^2rL^4=mk^3q^6$$
After rearranging
$$r^3v^6=\frac{k^3q^6}{m^3}$$
$$rv^2=\frac{kq^2}{m}$$
This shows that  r must be multiplied by $n^2$ and v must be divided by n.
This implies that L can have n as a variable if we have the mass known. So $L=mr_0v_0n$ where $r_0$ and $v_0$ is when n=1. But why n must be integers it does not say. We have that n=1 can be arbitrary so it can be set to n=1 when we are at the bohr radius.


What is the difference between swing and seam bowling?

Question: I could not understand the difference between these two. What is the difference between swing bowling and seam bowling? How does both differ? Can a swing bowler do seam bowling too?
Answer: Both of these styles of bowling are performed by bowlers who are medium pace or fast bowlers. A swing bowler tries to deceive the batter by getting sideways movement through the air (known as 'swing' in cricket). By contrast, a seam bowler tries to get sideways movement off the pitch by landing the ball right on the seam so that it may deviate one way or the other if it hits an imperfection (such as a crack or lump) on the pitch.
Generally speaking, a swing bowler will try and 'pitch the ball up' landing the ball closer to the batter. This is because it allows more time in the air for swing to occur, and makes the batter more likely to play a straight bat shot (such as a drive) that might cause them to misplay the ball and get out if they don't pick up the swing. On the other hand, a seamer will generally pitch the ball a little shorter in order to hit the pitch harder (i.e. have a more vertical impact) in order to get more out of any deviation off the pitch.
There are certainly some bowlers who can be classed as predominantly swing bowlers and others who are mostly seam bowlers, but most medium and fast bowlers with try and utilise both techniques at different times, depending on the conditions, the batter and the state of the ball at the time.
Comment: The bowlers known for swing bowling is Dale Steyn and for seam bowling Morne Morkwel (at present) and i like to mention one more bowling style that is Fast very Fast bowling which was re-invented by Mitchel Johnson
Comment: I think swing bowling also requires the weather conditions to be aiding the bowler.In a way seam bowlers are more effective than swing bowlers all over the world. This is my personal opinion. Cheers
Answer: Simply put, swing bowling involves making the ball to move while it is travelling in the air and seam bowling is more about movement off the pitch.
To understand seam bowling, imagine a medium pacer who comes in and tries bowling a off or leg spin delivery. Only that he/she is not "spinning" the ball. The irregularity on the cricket ball due to the presence of the threaded seam will do it for the bowler. Hence the name "seam" bowling.
Answer: The movement of the ball in the air is called swing bowling. It can be assisted by weather conditions, if wind is flowing perpendicular to the pitch then in that case swing bowling is quite dangerous
While Seam bowling is the movement of the ball after pitching on the ground (in or out)mostly depend upon the pitch condition ,but  wind also play an important role as if wind is flowing parallel to the pitch it will vary the bounce of the ball.
Answer: Source:- http://qr.ae/7XAqgb

Well I get the answer of the question when I was in class 11th.
  First:- The principle is applicable if their is smooth or turbulent
  flow on both sides of the ball i.e. similar viscosity. There is 2
  principle regarding the swinging of the ball.  If the ball is thrown
  at low speed both sides of the ball have smooth flow. If the ball is
  thrown with high speed, both sides of the ball have turbulent flow.
  There are also speed ranges in which flow may be turbulent or smooth.
  These speeds are given by Reynolds number. A medium pacer uses this
  middle critical region of speed, where the flow may be smooth or
  turbulent, to swing the ball. The rough side of the ball has turbulent
  flow whereas the smooth side of the ball has smooth flow in this
  critical range of speed. Hence, air on the rough side fails to catch
  up with the air on the smooth side creating a low pressure region on
  the rough side. This tends to deviate the ball on the rough side in
  normal swing. Reverse swing can only occur when both sides of the ball
  has turbulent flow.
This is only possible at high speeds. Pakistani bowlers did research
  to achieve these high speeds only and nothing else. Wasim Akram even
  advised Irfan Pathan to achieve high speeds back as always after the
  T20 world cup. Bernoulli principle comes into effect at these high
  speeds and it makes air speed low on the rough side and fast on the
  smooth side. Faster speed on the smooth side leads to air being
  vanished more quickly on the smooth side creating a low pressure
  region as explained by Bernoulli principle. Hence, the reverse swing.
Second:- There is a famous principle in Physics discovered by Daniel
  Bernoulli :
Bernoulli's Principle states that for an ideal fluid (low speed air is
  a good approximation), with no work being performed on the fluid, an
  increase in velocity occurs simultaneously with decrease in pressure
  or a change in the fluid's gravitational potential energy. It is named
  after the Dutch/Swiss mathematician/scientist Daniel Bernoulli, though
  it was previously understood by Leonhard Euler and others.(wikipedia)
  It explains how aircraft wings keep an aircraft flying high up in the
  sky, when common sense tells us that an object heavier than ten
  elephants put together, should drop down like a stone.   But how does
  it help a pace bowler playing cricket?   It helps pace bowlers who
  know the art of swing bowling. A ball bowled (thrown down the length
  of a cricket pitch) at high speed "swings", i.e. moves left or right,
  making it difficult for the batsman to read its trajectory.   To
  understand this, let us look at the cricket ball :
The newball is smooth on all sides to begin with, but after a few
  overs are bowled, the surface becomes rough, thanks to the beating it
  receives from the batsman and the bowler who slams the ball down on
  the rough earth. The swing bowler takes advantage of this condition of
  the ball by applying saliva and rubbing only one side vigorously on a
  piece of cloth (usually his trouser). What results is a ball with a
  surface that is smooth on one side of the seam and rough on the other.
When such a ball is bowled at a high velocity with the seam vertical
  and in the same plane as the moving ball, it moves right if the
  smoother surface is on the right and to the left if the smoother
  surface is on the left, as seen by the bowler.
The reason is as follows. The rough side slows down the air due to
  friction whereas the smoother side allows the air to pass by at a
  greater speed. According to Bernoulli's principle, greater the air
  speed, lesser the pressure. So there is a pressure differential that
  pushes the ball in the direction of the smoother side.
John Lever, an English bowler, once used vaseline from his forehead to
  shine the ball, giving him an unfair advantage over the batsman. He
  was caught by the Indian umpire Reuben who reported the incident to
  the English captain Tony Greig. The Indian captain Bishen Singh Bedi
  complained to the cricketing authorities but the Indian board buried
  the whole matter in an effort to please the English board.
Conclusion:-
        The more the ball become old, the more it become rough and the chance of occurring of  Bernoulli's Principle become more. that`s the
  reason behind your question
Answer: Seam bowling = Movement as a result of deviation due to pitching on the seam on the ball
Swing bowling = Movement as a result of difference in air pressure on heavier and lighter side of the ball, has got nothing to do with seam
Good swing bowlers: Well most people get some sort of swing but to be a paradigm of swing bowling consider Hoggard, Pathan, Rana Naved ...
Examples of seamers who generally find it hard to swing - Harmison, Zaheer, Razzaq, Ntini etc
Most bowlers are a combination of both.
In the past the great swingers were waqar, morrison, kapil
the great seamers were walsh etc.


Grand Canyon in a day

Question: I am planning to visit Grand Canyon during the last week of January, but have only a day to spend there. Any advice on how I can maximize my visit. Also, how is the weather during the time?
Comment: By the way - do the Park. Do not fall for the Skywalk. It's a rip.
Comment: See also [The Great Outdoors SE](http://outdoors.stackexchange.com), where you might get more expert answers on what to do in the Grand Canyon than here (and TGO needs more traffic ;).
Answer: Having recently hiked rim to river and back, I can tell you that hiking in the Canyon has been one of the most transformative events of my life. It's beauty is beyond words.
The most important thing to remember is don't be this guy.  Take your time, and enjoy the beauty.

Staying there, getting there.
Ideally, you would spend the night as near to the rim as possible.  This is actually pretty hard, however, because the nearest real town (Williams) is nearly an hour away.  You have three real options:

There are several hotels on the rim (El Tovar) in Grand Canyon Village, but they are pretty expensive. Additionally, they are usually booked.  Candidly, I found the hotels in Tusayan to be almost as expensive, but there is usually at least some availability there.  Just don't try walk up.
If you don't mind a tent, there is a great campground ($35/night) or, even better, you can camp for free in the National Forest, just 7 miles from the rim.
The least good option is to stay in Williams or Flagstaff, which is still an hour away.  Anything further than this, and the most you will be able to do at the Grand Canyon is look out over the rim.  Not that there is anything wrong with that (Hey, 90% of all visitors never go below the Rim), but you are missing out on so much.

The Rim
Looking out over the Grand Canyon is beautiful.
No matter what I say below, its still worth it.  If you have neither the time nor the fitness to go below the rim, then look for:

The Main Visitor Center, first.  There's a reason they put it there. It's the best view.
Grand View Overlook - take the road that sends you towards Page, and check out that overlook.  It's beautiful.
Desert View Overlook.  Back in the 30's this woman built a tower in the style of what various Indian tribes might have done.  The Tower is neat - decorated all Indian and such - and you get a unique perspective, looking down into the canyon from a right angle.  It's really about the only place you can see the river.

Hiking into the Canyon.
Personally, I think that if you are go to the Grand Canyon but don't actually get into the canyon, you are missing the best part.  They say that walking from rim to river, you actually end up walking through 5 of the world's 7 biomes.  I just think it is the most beautiful thing ever.
Ideally, you would take two days.  You would go down the South Kaibab Trail (which took fat-old me just the better part of a morning), rest at the Colorado River / Phantom Ranch, and then walk back up the Bright Angel Trail the next day.  Then, if you had time, you would drive 5 hours to the North Rim and look back the other direction.
But, you only have a day - so, here are some ideas:
a. If it is winter, you are very fit, and you have a good 10 hours, you could probably do it.  It would be unforgettable.
b. Walk halfway down the South Kaibab (past Oooh-Aah Point and down to the Tonto Trail).  Then, walk back up.  Plan on 2 hours up for every hour down.
c. Somewhere in between a & b is this - take the South Kaibab to the Tonto Trail, about halfway down.  From there, the Tonto Trail will take you back to Bright Angel, for a 15 mile circuit.  It isn't well publicized (or even that well marked) which is a shame, because its a great hike.
d. Bright Angel, make sure you at least go to 3 mile Rest House.  The stops are 1 1/2 mile Rest House, 3 mile Rest House, Indian Gardens, and then Phantom Ranch, which is the river.  These are progressively lower, and I found budgeting 1 hour down and 2 hours up for each worked out about right.  Each stop also makes you descend about 1000', and hence back up the same.
Finally, if you are in Las Vegas, save yourself the drive, spend the $300/per person, and take a helicopter ride into the Canyon.  You won't see the Bright Angle Trail or the Visitor Center, but Havasupai Falls looks beautiful too :)

Note: I'm assuming you are at the South Rim, since the North Rim is closed.  The North Rim is nice, but there is a reason that 90% of the visitors are on the South Rim.  The North Rim will be covered in snow, so you can't go there anyway. In the winter its going to be very, very cold at the rim (near freezing), but the temperature will rise about 40 degrees as you make your way down to the river.  This has the advantage, however, of allowing you to hike the entire day.  From May 1 to September, I was advised not to hike between 10am - 3pm.  They were right!
All in all, the Grand Canyon is amazing.  If it were me, I could stay a week.  At a minimum, you really need 2 days.  But if its a choice between skipping it altogether and doing one day, have fun looking over the rim!
Comment: Depending on your definition of a day and how you plan to experience the canyon, I advise a trip I took a few years ago via the [Grand Canyon Railway](http://www.thetrain.com/). It includes an overnight in Williams Arizona, departs to the Grand Canyon for touring, with an overnight at the canyon and a return trip the following day. The train ride is an entertainment value in itself.
Answer: Given I've heard of snow on the ground there in April, it could be very cold.
However, I'll describe what we did, and you can adapt it based on the conditions when you arrive.
First thing was to enter the park (driving) before sunrise.  This gave us a chance to park, get our gear together, and race down to Mather Point for a spectacular view of sunrise.  Even if it's raining (As it partially was for us) it is still worth it.  Mather point is about a 5 minute run from the car park.  Give yourself time to get there to be at the front - you don't want a bus load of tourists obscuring  your view.  Also it's not just about the moment the sun appears, but about the next 20 minutes or so as shadows move around the canyon.
Next, there's the rim route.  This is a connection of a few bus routes, included in your pass.  Either is good, but we headed west first.  The buses are every 15 minutes and stop to drop people off at several points.  This was perfect - gave you time to get out, read the info about that point, take some photos, enjoy the view, and catch the next bus.
At the end, we took the bus back to the top of the Bright Angel trail - the most famous in the park.  It's steep but manageable - don't try to reach the river though.  It was very hot when we went, so we walked down to the first hut - taking just under two hours (lots of photo stops) and power-walked back up in an hour with only one or two stops.
Then we went east along those lookouts - to the end, and then walked back to the camp, in time to catch the west bus once more to one of the two lookouts for sunset.
Now that was in August, and the days were longer. You may find you need to compress your schedule in winter.
Also be aware of crowds - they'll affect the bus queues.
As for weather, their website has updates you can keep an eye on. For example, their latest one:

As of this update, all park roads are open, but are snow-packed and
  icy in places. Please drive with caution.
Additional snowstorms or freezing conditions may result in future road
  closures that can happen
with little or no advance notice.

Average climate, temperature and conditions can be seen on this site.
Answer: I would say it's probably pretty cold, expect snow (it's high there). Taking a look at the weather channel, I can see the temperature these days is in the 40s (0-10°C) during the day. Maybe the mist can be more of a problem, you can check the day before if you are flexible on your dates. Also check the road conditions (there are currently alerts on the National Park website).
And what else than hiking do you expect to do there? You should plan a half-day or full-day trip, no more. From what I remember the multiple sightseeing points offer different angles on the Canyon, so if you spend little time you will still be able to see the Canyon. At this time of year, many paths will be closed (they are announced on the website). So anyway, it's not sure there will be lots to do.
Also figure how far your hotel will be, since the Grand Canyon is in a quite remote area. It can take several hours from your hotel to the rim.
Answer: Weather etc I don't know - my experience go back to a 13th July in the eighties. I remember that the north rim is ~200 meters higher that south.
Got a room in a Flagstaff motel. First day> Near sunset I went for an helicopter trip, used 3 rolls of slide film. Great!
Second day> Went from Flagstaff to south rim at he beginning of the Bright Angel trail. Hat, light shirt covering arms, water. At 12:00 noon started go down. My own rule: not getting tired. Fantastic views, also helped to put a scale of what I had seen the day before. Further down I went, the hotter.
At the end I did not think about pictures.Then was the ranch, with a water faucet. Time ~~16:30. Went back ~18:30, soon Night. No moon, only stars. Was ok 'cos trail shape \_/.
Later: Wind carrying sand. Came out at car park at 00:00 midnight.
Warning: no more petrol at that time! Back to Flagstaff. Next day> to Vegas airport. Made a small diversion to ghost town of Jérome. That's all folks!
Jean-Paul V. Jéral.

Grand Canyon in a day


What software can I use to Edit PDF online?

Question: I have already built a database and using php I can edit,delete etc... from the database.
I need an app which I can integrate in my app to edit pdf.
I should be in such a way that when I click on the name on the database the file will be opened using the PDF editor automatically such that the user can edit the PDF ( The php and mysql part is okay)(PDF is already on server)
Can you help by suggestion what PDF editor can I use and how to use it or even alternatives to what I want
Also guide me how to integrate and use the app
Thanks
Answer: You can use this site.
it's not fully free but have these features for free members:

Edit PDF Files
Annotate PDF Documents
Fill Out PDF Forms
Create New (Basic) PDF Forms
Password Protect PDF Files
Share Documents Online
View PDF Files
Answer: I always use https://smallpdf.com/ to edit and convert PDFs. I'm not sure whether you can integrate it or not, but this may be the best online editor.


Is it true that the Prophet forbade writing hadiths?

Question: Is it true that the Prophet forbade to write hadiths?
If that so, why are hadith written and consequently there are so many misinterpretations and fake hadiths?
Comment: isn't there hadith like that pass the message because it possible that listener may understand it better than conveyor.
Comment: +1 Good (and controversial) question!
Comment: Asslamalikum
i was just looking for this answer, as iam with a sort of debate with a quranite person. jazaqAllah
Answer: No it is not true - in fact the Prophet (saws) taught his Companions (raa) these hadith formally in circles of knowledge. He spent a lot of time commanding them to convey his words, and he used to quiz the Companions also about what they had learned earlier. There was a group of people whose full-time job was to learn and record - commonly known as As-hab as-Suffah. Some of the famous Companions from this group include Abu Huraira, Jabir b. Abdullah, Mu'adh b. Jabal, Abdullah b. Mas'ud and others.
In their time, the primary way of recording something and propagating it was by memorizing it and oral transmission. Needing to write something down was seen as a weakness - these people had extraordinary memories. Secondly, another method they used to preserve the hadith was by practising them and making them a part of their lives. This is another effective way of preservation and propagation.
Initially, in the early stages of Islam, when the style and pattern of the Qur'an wasn't that clear yet, the writing down of hadith was prohibited so as to prevent them from being mixed with the words of the Qur'an. Later, the Prophet (saws) himself commanded Amr b. al-Aas to write down the hadith he was learning. Other instances of explicit permission and commands to write hadith include the hadith in Jami' at-Tirmidhi about seeking help from "the right hand" - i.e. to preserve knowledge by writing it down. The Prophet (saws) explicitly told Rafi' b. Khadij that he could write down the hadith he was learning and there was no harm in it. Anas (ra) narrated that the Prophet (saws) told them to preserve knowledge by writing it down. And as mentioned earlier, Amr. b. Aas was commanded to write hadith. He asked whether he should write down everything, whether the Prophet (saws) was content or upset, and the Prophet (saws) replied by saying yes, everything, nothing comes out of my lips except it is the truth.
The hadith were written down since the earliest times - they were only compiled later in the times of the Companions and later, the Imams. There is a hadith from Anas (ra) that says that around 60 men would gather to review the ahadith of the Prophet (saws). 'Umar and Abu Musa al-Ash'ari used to review hadith until the early morning. For example, Abdullah b. Amr b. Aas had a compilation of hadith with over 5000 of them called As-Sahifa as-Sadiqa, which the Prophet (saws) himself reviewed. Anas b. Malik had a compilation of over 2000, Jabir b. Abdullah over 1500, Aisha (ra) over 2000, and ibn Abbas and ibn 'Umar over 1500.
The first person to start an official compilation of hadith was Umar b. Abdul Aziz, just a few decades after the Prophet (saws) when he appointed the well-known muhaddith Ibn Shihab Az-Zuhri to oversee this project.
The fact is that the hadith were memorized systematically by the Companions and passed down just as the Qur'an was memorized and passed down.
--
The main source for this answer is notes from a class on hadith studies I took a few years ago. The textual sources for that class were mainly the book by Dr. Mustafa al-Azami on sciences of hadith and Shah Waliullah's book on the history of hadith.
Comment: could you tell me how you know these sahaba you mentioned, Abdullah Ibn Amr Ibn Aws, Anas Ibn Maalik, Jabir ibn Abdullah and Aisha had their own written hadith collections?
Answer: To be completely objective and neutral there is no clear and definite answer to this and here is why:
Abu Sa'id Khudri reported that Allah's Messenger (may peace be upon him) said: Do not take down anything from me, and he who took down anything from me except the Qur'an, he should efface that AND narrate from me, for there is no harm in it and he who attributed any falsehood to me−and Hammam said: I think he also said:" deliberately" −he should in fact find his abode in the Hell−Fire. (Source:  Sahih Muslim Book 42, Number 7147)
Narrated by Zaid ibn Thabit Al-Muttalib ibn Abdullah ibn Hantab said: Zaid ibn Thabit entered upon Mu'awiyah and asked him about a tradition. He ordered a man to write it. Zaid said: The Apostle of Allah (PBUH) ordered us not to write any of his traditions. So he erased it. (Source: Sunan of Abu-Dawud Hadith 3640)
But on the other hand:
I swear by the One in whose hands is the soul of Muhammad: nothing comes out from these two (lips) except truth. So, do write. [Sunan Abu Dâwud; Tabaqât ibn Sa'd; Mustadrik-ul-Hâkim]
Narrated by Warrad Muawiya wrote to Mughira, "Write to me what you heard the Prophet saying after his prayer." So Al-Mughira dictated to me and said, "I heard the Prophet saying after the prayer, 'None has the right to be worshipped but Allah Alone Who has no partner. O Allah! No one can withhold what you give, and none can give what you withhold, and the fortune of a man of means is useless before you (i.e., only good deeds are of value). "(Source: Sahih Bukhari Hadith Volume 8. Number: 612)
Some scholars tried to explain that it was forbidden to write down the hadiths while the Qu'ran wasn't finished, but I find that excuse weak as there is no way someone would confuse the Qu'ran with the hadiths and that Allah protects the Qu'ran and the false Prophet Musaylimah tried and failed to alter the Qu'ran.
People tend to either reject all the hadiths or believe all of them, I think that we can have a middle ground. It's pretty obvious that the hadith collections are far from perfect, even if the Prophet (pbuh) allowed the hadiths the importance and the usage of the hadiths was made-up after his death (you can read about the canonization of the hadiths and the formation of the Islamic jurisprudence).
On top of that, despite the "great" methodology and "preservation" we are still changing the hadiths as sahih or daif to this day.
I follow the hadiths as long as they don't contradict the Qu'ran, as hadiths can be wrong but the Qu'ran cannot. I find it very strange how some scholars are denying any hadith criticism, aren't they afraid to spread lies about the Prophet(pbuh)? To quote Imam Malik:

"The shield of the scholar is, 'I do not know,' so if he neglects it,
  his statement is attacked."

And Allah knows best.
Comment: This answer deserves more than only one upvote, people. huh?
Comment: What is the source for this quotation you attributed to Imam Maalik?
Answer: The Prophet ﷺ forbade writing hadiths earlier on, then he allowed it after. having said that, the main way of passing the traditions of the Prophet ﷺ on to us was verbal. The Prophet ﷺ used to speak slowly and clearly to the extent that 'Ā'isha said that he "used to utter so distinctly that if one intended to count (the words uttered) he would be able to do so" (see Sahih Muslim 55/91), and Anas ibn Mālik said he used to repeat what he said thrice (see Jami' at-Tirmidhi 1/46/3640). This was aimed at allowing those who were authorized to write to do so, and the rest could memorize what he said.
In the first years of revelation, the literate documented the hadiths. The Prophet ﷺ saw that some were mixing the Qur'an (revealed by words) and the hadiths (revealed by meaning only, but the words are of the Prophet's), so he forbade writing hadiths:

عن أبي سعيد الخدري أن رسول الله صلى الله عليه وسلم قال: لاَ تَكْتُبُوا عَنِّي وَمَنْ كَتَبَ عَنِّي غَيْرَ الْقُرْآنِ فَلْيَمْحُهُ وَحَدِّثُوا عَنِّي وَلاَ حَرَجَ وَمَنْ كَذَبَ عَلَىَّ -  قال همام أحسبه قال - مُتَعَمِّدًا فَلْيَتَبَوَّأْ مَقْعَدَهُ مِنَ النَّارِ
Abu Sa'id Khudri reported that Allah's Messenger (ﷺ) said: Do not take down anything from me, and he who took down anything from me except the Qur'an, he should efface that and narrate from me, for there is no harm in it, and he who attributed any falsehood to me — and Hammam said: I think he also said:" deliberately" — he should, in fact, find his abode in the Hell-Fire.
— Sahih Muslim, Book 55, Hadith 92

While the Qur'an continued to be documented on paper, leather, wood, etc., the Islamic scholarship based on the hadiths turned predominantly oral, save for a few exceptions. Later, when it became easy for the companions to decipher the Qur'an from the hadith, the Prophet ﷺ removed the restriction to write:

عن عبد الله بن عمرو قال: كنت أكتب كل شيء أسمعه من رسول الله صلى الله عليه وسلم أريد حفظه فنهتني قريش وقالوا: أتكتب كل شيء تسمعه ورسول الله صلى الله عليه وسلم بشر يتكلم في الغضب والرضا، فأمسكت عن الكتاب، فذكرت ذلك لرسول الله صلى الله عليه وسلم فأومأ بأصبعه إلى فيه فقال: اكْتُبْ فَوَالَّذِي نَفْسِي بِيَدِهِ مَا يَخْرُجُ مِنْهُ إِلاَّ حَقٌّ
Narrated Abdullah ibn Amr ibn al-'As: I used to write everything which I heard from the Messenger of Allah (ﷺ). I intended (by it) to memorise it. The Quraysh prohibited me saying: Do you write everything that you hear from him while the Messenger of Allah (ﷺ) is a human being: he speaks in anger and pleasure? So I stopped writing, and mentioned it to the Messenger of Allah (ﷺ). He signalled with his finger to him mouth and said: Write, by Him in Whose hand my soul lies, only right comes out from it.
— Sunan Abi Dawud, Book 26, Hadith 6

There were specific companions that documented lots of hadiths in writing, e.g., 'Abdullah ibn 'Abbās, 'Abdullah ibn 'Amr, 'Abdullah ibn Mas'ūd, Abu Hurairah, 'Amr ibn al-'Ās, Anas ibn Mālik, Ibn Jandab, Jābir ibn 'Abdullah, and Sa'd ibn 'Ubāda al-Ansāri, among others.
The study of the sanad (chain of narration) and its authentication started during the era of 'Uthmān ibn 'Affān, about 20 years after the death of the Prophet ﷺ, when the need to judge the degree of credibility of a hadith rose as a result of the sectarian split over issues. This laid the foundation of the science of textual criticism of hadith. There was, however, no systematized compilations of the hadiths at the time. The compilation of hadiths as ordered by 'Umar ibn 'Abdul-'Azīz and carried out by Ibn Shihāb az-Zuhri.
It was not until Ar-Rabī' ibn Subaih (Arabic: الربيع بن صبيح) and Sa'īd ibn Abu 'Urūba (Arabic: سعيد بن أبي عروبة), among others, started to systemize and classify compilations by a taxonomy of topics that they adopted. This helped the following generation (e.g., Imam Malik ibn Anas in his Muwatta') to authenticate hadiths and derive rulings based on their classified works. Soon after, compilations were classified in accordance with the need to establish a system jurisprudence teachings (e.g., Malik, Al-Awzā'i, Sufyān ath-Thawri, Ibn Hanbal, Ibn Dinār, Ibn Abu Shaiba, etc.).
Based on the work documented over the preceding century, emerged a number of scholars that applied the conditions for authentication of hadiths to the compilations available at the time, e.g., Mohammad ibn Isma'īl al-Bukhāri, Muslim ibn al-Hajjāj, Abu 'Abdur-Rahmān Ahmad ibn Shu'ayb ibn 'Ali ibn Sīnān ibn Bahr An-Nasā'i, Abu Dawūd Sulaymān ibn al-Ash'ath al-Azdi as-Sijistani, Abu 'Īssa Mohammad ibn 'Īssa at-Tirmidhi, and Abū 'Abdullah Mohammad ibn Yazīd ibn Mājah, among others. From this group, two scholars saw the need to have a tighter application of the methodology already in place to include in a book that what was in it was definitely authentic, albeit that not all authentic was in it. The two scholars, Al-Bukhāri and Muslim, embarked on writing their books more or less at the same time, which later were established as the most authentic Islamic literature after the Qur'an (Sahih Al-Bukhari and Sahih Muslim).
The fabricated hadiths started during the time of 'Uthman by people simply lying and saying that the Prophet ﷺ said so and so to prove their sectarian views. The misinterpretations are more or less the same thing: relying on non-qualified people to explain them. We have books on hadiths interpretation that are reliable, e.g., Fat'h Al-Bari (for Sahih al-Bukhari), and Sharh an-Nawawi (for Sahih Muslim), etc. These are the books that we should rely on for interpretation.
Answer: The Quran tells us to follow only the Quran, Muhammed followed the Quran only, and directed his followers to do the same. Quran 45:6, 6:114
Comment: Salam, just a reminder. Allah commands us "Obey Allah and obey the messenger" many times in the Quran. Please study religion a bit more carefully.