During the outbreak of the COVID-19 pandemic, the majority of higher education institutions were faced with the challenge of adopting various online platforms as a means for teaching and learning. This added an additional level of complexity in teaching modules such as programming, which are difficult to teach even in traditional classroom environments. Teaching and learning programming is difficult since the teaching does not only focus on programming, but should also show the students how to solve complex programming problems. Also, many programming students struggle to understand programming since they would typically not put their programming knowledge into practice outside of the learning environment. Online learning adds additional challenges, since the teacher is not available to provide immediate feedback which is one of the critical aspects in programming education. This paper reports on a case which considers brain-compatible principles when creating online programming content for learning programming. Furthermore, it reflects on the use of the Cultural-Historical Activity Theory (CHAT) to delineate the various elements required for teaching and learning programming.