Avoiding Bad Programming Practices in Education and Profession — Initial Considerations
Gespeichert in:
| Titel: | Avoiding Bad Programming Practices in Education and Profession — Initial Considerations |
|---|---|
| Autoren: | Mikac, Matija |
| Quelle: | Acta Polytechnica Hungarica. 22(12):215-246 |
| Verlagsinformationen: | 2025. |
| Publikationsjahr: | 2025 |
| Schlagwörter: | bad programming practices, computer programming, program code readability, program form deficiencies, program formal and functional correctness, influence on performance |
| Beschreibung: | In contemporary computer programming and various presentations thereof in all sorts of media, one can witness the emergence of several bad programming practices such as undermining the abstractness and generality of programs, poor commenting and input/output messaging, bad identifiers, brute-force computations that ignore closed-form results from elementary mathematics, indolence toward computational optimality, and many more. Several of those are also found in the programs produced by the GenAI (Generative Artificial Intelligence) tools, such as the freely available ChatGPT that we used here for comparison. We analyze those bad practices and discuss how to avoid and correct them by providing parallel exemplary programs, which are based on the best algorithms and implemented in C/C++ in a textbook, scholarly way. Drawbacks of bad program code range from hard readability and reusability to significantly and even drastically lower efficiency. This last, very degrading downside of bad programming is shown by measuring the execution times of inferiorly conceived and realized C/C++ functions for a few common programming examples, and by comparing them to the corresponding well-written functions with proper algorithms. The main reasons for bad programming habits and inferior source code quality are low prerequisite knowledge and skills, a weak foundation in mathematics and computer science, and a lack of intellectual and working discipline in both teachers and learners of computer programming. With more and more bad source code examples available on the Web, the future AI-generated programs could comprise considerable amounts of programming code of bad quality and low efficiency, or even code that gives incomplete or wrong results. This will happen unless the AI tools' input sources are supervised by expert. |
| Publikationsart: | Article |
| ISSN: | 1785-8860 |
| DOI: | 10.12700/aph.22.12.2025.12.15 |
| Dokumentencode: | edsair.dris...01492..b09932cd033253e7bbfc67915c33a788 |
| Datenbank: | OpenAIRE |
| FullText | Text: Availability: 0 CustomLinks: – Url: https://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=EBSCO&SrcAuth=EBSCO&DestApp=WOS&ServiceName=TransferToWoS&DestLinkType=GeneralSearchSummary&Func=Links&author=Mikac%20M Name: ISI Category: fullText Text: Nájsť tento článok vo Web of Science Icon: https://imagesrvr.epnet.com/ls/20docs.gif MouseOverText: Nájsť tento článok vo Web of Science |
|---|---|
| Header | DbId: edsair DbLabel: OpenAIRE An: edsair.dris...01492..b09932cd033253e7bbfc67915c33a788 RelevancyScore: 1015 AccessLevel: 3 PubType: Academic Journal PubTypeId: academicJournal PreciseRelevancyScore: 1014.736328125 |
| IllustrationInfo | |
| Items | – Name: Title Label: Title Group: Ti Data: Avoiding Bad Programming Practices in Education and Profession — Initial Considerations – Name: Author Label: Authors Group: Au Data: <searchLink fieldCode="AR" term="%22Mikac%2C+Matija%22">Mikac, Matija</searchLink> – Name: TitleSource Label: Source Group: Src Data: <i>Acta Polytechnica Hungarica</i>. 22(12):215-246 – Name: Publisher Label: Publisher Information Group: PubInfo Data: 2025. – Name: DatePubCY Label: Publication Year Group: Date Data: 2025 – Name: Subject Label: Subject Terms Group: Su Data: <searchLink fieldCode="DE" term="%22bad+programming+practices%22">bad programming practices</searchLink><br /><searchLink fieldCode="DE" term="%22computer+programming%22">computer programming</searchLink><br /><searchLink fieldCode="DE" term="%22program+code+readability%22">program code readability</searchLink><br /><searchLink fieldCode="DE" term="%22program+form+deficiencies%22">program form deficiencies</searchLink><br /><searchLink fieldCode="DE" term="%22program+formal+and+functional+correctness%22">program formal and functional correctness</searchLink><br /><searchLink fieldCode="DE" term="%22influence+on+performance%22">influence on performance</searchLink> – Name: Abstract Label: Description Group: Ab Data: In contemporary computer programming and various presentations thereof in all sorts of media, one can witness the emergence of several bad programming practices such as undermining the abstractness and generality of programs, poor commenting and input/output messaging, bad identifiers, brute-force computations that ignore closed-form results from elementary mathematics, indolence toward computational optimality, and many more. Several of those are also found in the programs produced by the GenAI (Generative Artificial Intelligence) tools, such as the freely available ChatGPT that we used here for comparison. We analyze those bad practices and discuss how to avoid and correct them by providing parallel exemplary programs, which are based on the best algorithms and implemented in C/C++ in a textbook, scholarly way. Drawbacks of bad program code range from hard readability and reusability to significantly and even drastically lower efficiency. This last, very degrading downside of bad programming is shown by measuring the execution times of inferiorly conceived and realized C/C++ functions for a few common programming examples, and by comparing them to the corresponding well-written functions with proper algorithms. The main reasons for bad programming habits and inferior source code quality are low prerequisite knowledge and skills, a weak foundation in mathematics and computer science, and a lack of intellectual and working discipline in both teachers and learners of computer programming. With more and more bad source code examples available on the Web, the future AI-generated programs could comprise considerable amounts of programming code of bad quality and low efficiency, or even code that gives incomplete or wrong results. This will happen unless the AI tools' input sources are supervised by expert. – Name: TypeDocument Label: Document Type Group: TypDoc Data: Article – Name: ISSN Label: ISSN Group: ISSN Data: 1785-8860 – Name: DOI Label: DOI Group: ID Data: 10.12700/aph.22.12.2025.12.15 – Name: AN Label: Accession Number Group: ID Data: edsair.dris...01492..b09932cd033253e7bbfc67915c33a788 |
| PLink | https://erproxy.cvtisr.sk/sfx/access?url=https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=edsair&AN=edsair.dris...01492..b09932cd033253e7bbfc67915c33a788 |
| RecordInfo | BibRecord: BibEntity: Identifiers: – Type: doi Value: 10.12700/aph.22.12.2025.12.15 Languages: – Text: Undetermined PhysicalDescription: Pagination: PageCount: 32 StartPage: 215 Subjects: – SubjectFull: bad programming practices Type: general – SubjectFull: computer programming Type: general – SubjectFull: program code readability Type: general – SubjectFull: program form deficiencies Type: general – SubjectFull: program formal and functional correctness Type: general – SubjectFull: influence on performance Type: general Titles: – TitleFull: Avoiding Bad Programming Practices in Education and Profession — Initial Considerations Type: main BibRelationships: HasContributorRelationships: – PersonEntity: Name: NameFull: Mikac, Matija IsPartOfRelationships: – BibEntity: Dates: – D: 01 M: 01 Type: published Y: 2025 Identifiers: – Type: issn-print Value: 17858860 – Type: issn-locals Value: edsair – Type: issn-locals Value: edsairFT Numbering: – Type: volume Value: 22 – Type: issue Value: 12 Titles: – TitleFull: Acta Polytechnica Hungarica Type: main |
| ResultId | 1 |
Nájsť tento článok vo Web of Science