Objective

Learning to program is often described as a route to good jobs, but access to quality computer science education is uneven. The authors point to a digital divide (a gap in access to technology and learning resources) in Sub-Saharan Africa. At the same time, generative AI tools such as ChatGPT, Codey and GitHub Copilot can answer questions, suggest code and give hints. Supporters say this kind of support could make programming easier to learn for students with few resources.

The authors say little is known about how students in lower-resource settings see these tools, and even less about whether students think the tools are fair. They focus on three ideas: equity (fair access to resources and chances), diversity (including many cultural, language and social backgrounds) and inclusion (making all students feel valued). They chose Nigeria, Kenya and South Africa because the countries are at different stages of technology and education development.

The study asked two questions:

  • What motivates students to learn programming, and what are their attitudes and habits toward using generative AI for programming in Kenya, Nigeria and South Africa?
  • How do students from different backgrounds see the effect of AI programming tools on equity, inclusion and diversity in the classroom?

Methods

This was a quantitative survey study. The researchers collected answers from students at one point in time and compared groups. A survey like this can describe what students think and how their answers relate to each other. It cannot show that AI tools cause any change in learning.

Who took part

The authors used purposive sampling, which means they chose students on purpose rather than at random. They contacted universities in the three countries, mostly through computer science and engineering departments. Students had to be enrolled in a programming-related course and know AI tools such as ChatGPT, Codey and GitHub Copilot. In all, 322 students answered: 197 from Nigeria, 80 from Kenya and 45 from South Africa. Most were early in their degrees, with 70 in the second year and 68 in the first year. On programming experience, 123 students reported 3 to 5 years and 102 reported 1 to 3 years.

The questionnaire

The online questionnaire had 34 items in six sections: background details, motivation for programming, attitudes and habits with AI tools, and then equality, diversity and inclusion (six items each). Items used a 5-point scale from 1 (strongly disagree) to 5 (strongly agree). Six experts from Nigeria, South Africa, Kenya, the United Kingdom, the United States and Finland reviewed it. A pilot with 30 students gave reliability values (Cronbach's alpha) from 0.76 to 0.89 for the sections.

Analysis

The team used SPSS software. They reported averages, compared countries with one-way ANOVA, compared educational levels and programming experience with Kruskal-Wallis tests (a test for groups that does not assume normally shaped data), and calculated correlations. Participants gave informed consent. The paper does not name an ethics committee.

Key Findings

Students were positive about programming and about AI tools, but gave lower scores to how well the tools handle diversity and inclusion. Results are self-reported averages on a 1 to 5 scale.

Motivation and attitudes

  • Students saw programming as useful (average 4.47) and interesting (4.31), and said they wanted to learn it (4.36). They rated it as moderately hard to learn (3.15).
  • They found ChatGPT, Codey and GitHub Copilot interesting (4.20). They agreed somewhat that they learn faster with them (3.56) and use them for learning (3.43).
  • Students used the tools for code logic, hints and parts of programs (3.51) a little more than for complete solutions (3.10).
  • Students mostly rejected the idea that they do not need to learn programming because AI can do it (2.32).

Equity, diversity and inclusion

  • Students moderately agreed that the tools promote diverse learning materials (3.58) and that the tools accommodate different learning styles (3.32).
  • The lowest score was for finding content that includes underrepresented groups (2.76). The item about students sharing ideas and the sense of belonging scored 3.12.
  • Fairness of the tools in assessing students regardless of background scored 3.66.
  • Collaboration among students from different cultural backgrounds scored 3.32.

Country differences

The ANOVA found a real difference between countries in attitudes toward AI tools (p = 0.00). South Africa had lower scores and a wider spread of answers. There were no significant differences between countries for motivation, equality, diversity or inclusion.

Educational level and experience

  • Educational level mattered for four items: interest in solving math and logic problems (p = 0.002), difficulty of programming (p = 0.04), the idea that students do not need to program because of AI (p = 0.01), and whether tool content includes underrepresented groups (p = 0.009).
  • Programming experience mattered for using the tools to create logic, hints and code parts (p = 0.014). It did not matter for using them to create complete solutions (p = 0.58).

Links between answers

  • Using the tools for learning went along with using them for code logic and hints (r = 0.752). A correlation (r) runs from 0 to 1, and higher means a stronger link.
  • Finding the tools interesting was linked to thinking they speed up learning (r = 0.538).
  • Using the tools for complete solutions was linked to the belief that programming skill is not needed (r = 0.321).
  • Higher educational level went along with more years of programming (r = 0.385).

Implications

The authors argue that tools should be designed to fit local needs, since attitudes differed by country and by education level. Below, what the authors say is separated from our reading.

Teachers and universities

The authors suggest tailoring how AI tools are introduced to the country and the student level. Students with less experience may need more guidance than advanced students.

Our reading (not the authors' recommendation): The link between using AI for complete solutions and thinking programming skill is not needed (r = 0.321) is a reason to watch how first-year students use these tools. Course tasks could ask students to explain code they received from a tool.

Tool developers

The lowest-rated item was whether tool content includes underrepresented groups (2.76). The authors say tools need culturally relevant and inclusive content, and that tool designers should attend to the data the tools are trained on.

Policymakers

The authors say the findings may apply to other places with limited resources and that AI tools might help narrow the digital divide. The data in this survey cannot show that.

Our reading (not the authors' recommendation): Because students gave only middling scores on equal opportunity and sense of belonging, access to a tool alone should not be treated as a fix for inequity. Schools may also need to look at internet access and device costs, which this survey did not measure.

Researchers

Perception scores are a starting point. Studies that follow what students actually produce, and how well they learn, are needed before firm conclusions.

Limitations

The authors say the study should be extended with qualitative data, which would explain the reasons behind the scores. The paper does not give a longer list of limits, so several are our own reading.

  • The paper does not mention, but students were chosen on purpose, not at random, and had to know the AI tools already. Their views may not match those of other students in these countries.
  • The paper does not mention, but the countries were uneven in size: 197 students from Nigeria and 45 from South Africa. The South Africa result, with lower scores and wider spread, rests on the smallest group.
  • All answers were self-reported opinions. They show what students believe, not whether the tools help learning or are fair in practice.
  • The paper does not mention, but the equity, diversity and inclusion items were developed for this study. They are new and the pilot involved only 30 students from one country.
  • The paper does not mention, but the tests compare many items, and a few p-values just under 0.05 could be chance. Some explanations given for the country differences, such as infrastructure and school policy, were not measured.
  • The survey describes one point in time, so it cannot show changes in views as students gain experience.

Future Directions

The authors suggest several next steps:

  • Add qualitative data, such as interviews, to learn why students gave their ratings, especially the lower scores on inclusion of underrepresented groups.
  • Study how different teaching methods that use AI affect engagement and learning outcomes in varied settings.
  • Continue to explore how educational level and programming experience shape views on equity, diversity and inclusion.

Questions the study leaves open:

  • Why were attitudes toward AI tools lower in South Africa than in Nigeria and Kenya?
  • Do students who rely on AI for complete solutions learn fewer programming basics than other students?
  • Do students with different levels of home internet access use the tools differently?
  • Do the tools actually perform differently for students from different backgrounds, as opposed to what students believe?

The bottom line: Programming students in Nigeria, Kenya and South Africa liked AI coding tools and mostly did not think the tools replace learning to program. They were less sure the tools include underrepresented groups, and their views on equity, diversity and inclusion were moderate and did not differ by country. This evidence comes from one survey of 322 self-selected students, so it shows opinions only. Anyone adopting these tools should ask students about fairness and test what students actually learn from them.