scieee Science in your language
[en] (orig)

The role of thinking in programming

Author: Teodosiev, Teodosi
Publisher: Zenodo
DOI: 10.5281/zenodo.17690957
Source: https://zenodo.org/records/17690957/files/2025-the_role_of_thinking_in_programming.pdf
1
Ma hema ical and So wa e Enginee ing, Vol. 11, No. 1-2 (2025), 1-4
Va εpsilon L d, h p:// a epsilon.com
DOI 10.5281/zenodo.17690957
The ole o hinking in p og amming
Teodosi Teodosie
Facul y o Ma hema ics and In o ma ics, Uni e si y o Shumen, Bulga ia
Abs ac
This pape explo es he bidi ec ional ela ionship be ween hinking and
p og amming. I discusses he ole o hinking in p og amming educa ion and
examines whe he p og amming can os e highe -o de hinking skills. A en ion is
gi en o ce ain challenges in p og amming educa ion ha con lic wi h he
p inciples o cons uc i e hinking.
Keywo ds: hinking, lea ning, p og amming, AI, Cha GPT.
1 In oduc ion
The inspi a ion o his wo k came om my desi e o es Cha GPT wi h a
p oblem o iginally published abou 30 yea s ago in PC Magazine Bulga ia by my
eache and colleague, Assoc. P o . Dimi a Dob e (in memo iam) [1]
The p oblem is simple: en e wo in ege s and display he ela ionship be ween
hem (>, =, o <). To make he ask mo e in e es ing, se e al s ic cons ain s a e
imposed on he con ol s uc u es allowed. Six e sions we e conside ed: using
only selec ion s a emen s, only loops, a ays and loops, a ays and assignmen ,
a ays only, o a single algeb aic exp ession.
AI (Cha GPT) managed o sol e he p oblem bu equi ed guiding ques ions. This
led me o a key e lec ion: mus we de elop logical and cons uc i e hinking o
ully le e age AI’s po en ial and o e alua e he co ec ness o i s answe s?
Wi h he g owing in luence o AI, many young people end o ely on i ins ead o
engaging in independen easoning — a e all, AI seems able o answe any
ques ion.
2 Examples
Mo i a ed by he p e ious ask, I decided o es AI on wo simple p oblems ha I
ha e long used in my In oduc ion o P og amming cou se o demons a e o
s uden s he impo ance o ca e ul algo i hmic easoning.
2
The i s ask is o compu e he a i hme ic mean o all in ege s in he in e al [a, b].
When p esen ed o s uden s, abou 90% (based on my obse a ions) immedia ely
begin coding based solely on he de ini ion o a i hme ic mean. The
implemen a ion equi es a loop o calcula e he sum and coun o he numbe s.
This ask illus a es Dijks a’s well-known idea ha “...my main conce n in
eaching compu ing science was o ain s uden s o hink i s and no o ush in o
coding...” [2]. Beginne s mus spend su icien ime easoning on pape be o e
si ing a a compu e .
BgGPT’s ini ial solu ion used a loop o compu e he sum — he s anda d app oach.
When p omp ed o an al e na i e, i p oduced a solu ion based on he a i hme ic
p og ession o mula, and a e u he p omp ing, he simples bu less common
e sion: (a + b) / 2.0.
The second ask is o e alua e a polynomial a a gi en poin , p o ided i s
coe icien s. Simila pa e ns eme ged: BgGPT i s p oduced a s anda d
loop-based C++ solu ion using pow(x, i) wi h a ec o o coe icien s, ollowed by
a ay and dynamic-memo y e sions. Only when I sugges ed using Ho ne ’s
me hod did i gene a e he op imal and mos e icien solu ion.
Wi h well-s uc u ed and a ge ed p omp s, we can guide AI owa d op imal
solu ions — bu o do so, we ou sel es mus possess sound knowledge and c i ical
hinking skills.
3 Thinking
In daily li e, echnology inc easingly educes he need o us o hink o know
hings independen ly. Ye in p o essional p ac ice, knowledge and skills emain
essen ial. “Lea ning o hink can be conside ed he main objec i e o educa ion”
[3], and his is especially ue in p og amming.
P og amming and hinking a e in e dependen p ocesses. Educa ion should each
s uden s how o hink c i ically and cons uc i ely — e en when using AI. Logical
and cons uc i e hinking a e undamen al in p og amming educa ion.
In he lea ning p ocess, sol ing a p oblem is no an end in i sel bu a means
owa d de eloping p oblem-sol ing s a egies. The p ocess is mo e impo an han
he inal answe . Lea ning p og amming equi es men al e o , concen a ion,
logic, and imagina ion. Algo i hmic hinking is a key skill o e e y p og amme .
P og amming demands a pa icula s yle o hinking — he abili y o ep esen
algo i hms in a p og amming language clea ly and e ec i ely. Many di icul ies
s em om unclea ask modeling o an inabili y o conside all ele an ac o s —
in sho , om unclea hinking. The e o e, he de elopmen o clea and s uc u ed
hinking mus be a cen al goal in p og amming educa ion.
Challenging, cons ain -based asks encou age c ea i e p oblem-sol ing and
nons anda d easoning. An in e se ela ionship can be obse ed be ween he le el
o cogni i e e o and he le el o p og amming p o iciency — highe le els o
hinking can compensa e o less echnical expe ience. In oduc o y p og amming
should hus emphasize algo i hmic easoning, which elies on logic and
ma hema ical discipline.
3
Some esea che s a gue he opposi e — ha p og amming i sel enhances hinking.
As s a ed in [3], bo h p og amming and cons uc i e hinking in ol e a leas ou
co e skills: (a) p oblem decomposi ion; (b) pa e n ecogni ion; (c) abs ac ion;
and (d) algo i hmic easoning.
S e e Jobs’ amous quo e — “E e yone should lea n o p og am because i
eaches you how o hink” — u he suppo s his link. P og amming educa ion
can os e cons uc i e and highe -o de hinking. Cons uc i e hinking is a
c ucial skill o he 21s cen u y, and p og amming p o ides a na u al means o
de eloping i by engaging lea ne s in abs ac ion, sequencing, pa allelism, and
debugging [4].
4 P og amming Educa ion
As Wi h [5] w o e: “Conside ing ou own subjec , he ield o compu ing and
p og amming, an academic ins i u ion’s ul ima e goal mus be much wide han
he mas e y o a language. I mus be no hing less han he a o designing
a i ac s o sol e in ica e p oblems. Some call i he a o cons uc i e hinking.”
Ano he impo an aspec is assessmen . In he pas wo decades, es ing has
become he dominan me hod o e alua ing s uden lea ning. Mul iple-choice es s
a e o en p aised o hei s anda diza ion, objec i i y, au oma ion, and b oad
co e age. Howe e , hey a e no wi hou d awbacks — pa icula ly in disciplines
like ma hema ics and in o ma ics, which a e inhe en ly cons uc i e. Such es s
o en measu e guessing abili y a he han ue unde s anding.
Acco ding o Wi h’s ision, and based on o he challenges such as modeling,
algo i hm design, and gene al academic p epa a ion, mul iple-choice es ing is no
sui able o assessing cons uc i e hinking. These es s may e i y syn ax and
seman ics ( o mal aspec s) bu ail o e alua e algo i hmic design and c ea i e
easoning ( he essence o p og amming).
In ecen yea s, many ins uc o s ha e elied on eady-made code examples, o en
discussing hem di ec ly in class. While his can imp o e e iciency and educe
e o s, i isks concealing he hough p ocess behind p og am design. When code
is p esen ed wi hou showing he easoning s eps, s uden s lose he oppo uni y o
de elop hei own analy ical hinking.
5 Conclusion
When sma phones became widesp ead abou hi y yea s ago, hey we e quickly
adop ed by young people — o en eplacing basic men al a i hme ic wi h
calcula o s. As a esul , many s uden s oday s uggle o pe o m simple
calcula ions men ally. A simila isk may accompany he ise o AI: inc easing
dependence on echnology a he expense o independen hough .
Wi h AI’s apid de elopmen , mo e and mo e young people u n o i o answe s
ins ead o hinking o hemsel es. Ye , as Dijks a eminded us decades ago:
Think i s ! [2]
4
Acknowledgemen s
This wo k is pa ially suppo ed by he Scien i ic Fund "Scien i ic Resea ch" a
he Uni e si y o Shumen, Bulga ia – Con ac № RD-08-75-31.01.2025.
Re e ences
[1] Dob e , D., Conce i piccoli i uosi pe compu e i ussioso, PC Magazine
Bulga ia, Ap il, 1996, 104-107.
[2] Dijks a E, “Why is so wa e so expensi e?” An explana ion o he ha dwa e
designe ,1982, h ps://www.cs.u exas.edu/~EWD/ewd06xx/EWD648.PDF.
[3] He mida, J. (2024). Is lea ning compu e p og amming associa ed wi h
de eloping hinking skills? UNESCO In e na ional Bu eau o Educa ion –
IBE Blog h ps://www.ibe.unesco.o g
[4] Belma , H., Rome o, M., & de Beni o, B. (2022). Re iew on he eaching o
p og amming and compu a ional hinking. F on ie s in Compu e Science, 4,
883377. h ps://doi.o g/10.3389/ comp.2022.883377
[5] Wi h N, Compu ing Science Educa ion: The Road no Taken, ITiCSE
Con e ence, Aa hus, Denma k, 2002,
h p://www.so wa eschule.ch/download/wi hcompu ing_educa ion.pd
Copy igh © 2025 Teodosi Teodosie . This is an open access a icle
dis ibu ed unde he C ea i e Commons A ibu ion License, which pe mi s
un es ic ed use, dis ibu ion, and ep oduc ion in any medium, p o ided he
o iginal wo k is p ope ly ci ed.