Programming is one of the main components of computer science, however, learning and teaching it contain serious problems. In this paper, we have identified the most important barriers in learning programming and have categorized them into six sections including nature of programming, instructor and instruction method, student and learning method, educational packages, Integrated Development Environments (IDEs), and emotional factors. In this research, opinions of more than 30 instructors and 100 professional programmers are gathered by implementing a web-based application. Opinions of professional programmers are of much importance, for by working on practical projects in the job market and gaining experience, they are now able to overcome challenges in learning programming. In addition, opinions of professors who are in charge of teaching programming, and once have been programming learners themselves are very important and beneficial. In this paper, we have discussed and studied opinions gathered in order to identify problems in teaching and learning programming more precisely, and have presented suitable solutions. Results of this study can be helpful to students, professors, learning development tools, and Integrated Development Environments (IDEs) as well.