The reliance on science and technology by both countries and corporate entities is increasingly evident as the evolving trend of digitization not only pervades every facet of life but also assumes a dominant role. Correspondingly, the significance of producing competent computer science and information technology (IT) graduates becomes highly imperative. Already, in most developed and developing countries, there has been an increasing demand for these competencies such as network engineers, programmers, and other IT-related specialists. Although these competencies are equally valuable, programming skills constitute the core of the strength of every other IT-related competence. Nevertheless, programming is reported in the literature to be one of the most difficult courses to students. Moreover, the level of performance in programming is said to be significantly low with an attendant high rate of students' dropout. There is a concerted research effort toward addressing the challenge of poor academic performance by attempting to answer the question of what factors affect academic performance in general. However, there is scanty literature on the factors that affect the ability to understand the concept of programming in specific. This paper, therefore, reports a case study investigation of students' perception of the effect of cognitive factors as the determinant of success in computer programming. The findings showed that performance in introductory programming is impacted by a range of interrelated cognitive factors including self-efficacy and the love for technology.