{"id":169,"date":"2021-01-15T21:55:56","date_gmt":"2021-01-15T19:55:56","guid":{"rendered":"https:\/\/www.gccdat.be\/main\/?p=169"},"modified":"2021-03-05T23:47:18","modified_gmt":"2021-03-05T21:47:18","slug":"30-year-programming-experience-and-still","status":"publish","type":"post","link":"https:\/\/www.gccdat.be\/main\/2021\/01\/15\/30-year-programming-experience-and-still\/","title":{"rendered":"30+ year programming experience, and still&#8230;"},"content":{"rendered":"\n<p>Creating a programming error still is simple, and AI isn&#8217;t helping me yet.<\/p>\n\n\n\n<p>I develop software for Microsoft Business Central, in a programming language called C\/AL (and in de current version this is changed to AL).<\/p>\n\n\n\n<p>Today in a hurry, bugfixing job, I introduced a new error. The code was more than one page long, and I used a for loop with a local variable _i.<br>And then I nested two for loops&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for _i := 0 to n do begin\n\/\/ ... a bunch of code for the rest of the page\r\n   for _i := 0 to m do begin\r\n       \/\/create a record and insert into the database\r\n       \/\/ and m begin typically begin 1 or 2 and\n       \/\/ n going to 40 or so.\r\n  end\r\nend.<\/code><\/pre>\n\n\n\n<p>The actual code between the 2 loops was more than one page on the monitor. And so I created an infinite loop, for the first time in years. <br>In C\/AL this was inside a transaction, so the table got locked, users complained, and I was able to kill the process. But it had to rollback the transaction. And it already contained +3.5 million records before the message reached us.<\/p>\n\n\n\n<p>And although this is legit coding (or how should the compiler know?), reusing _i in a second inner loop.<br>With all AI stuff currently available, I hope for a compiler warning at least.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a programming error still is simple, and AI isn&#8217;t helping me yet. I develop software for Microsoft Business Central, in a programming language called C\/AL (and in de current version this is changed to AL). Today in a hurry, bugfixing job, I introduced a new error. The code was more than one page long,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3],"tags":[26,29,30],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-development","category-dynamics-nav-business-central","tag-business-central","tag-experienced-developer","tag-infinit-loop"],"_links":{"self":[{"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/posts\/169\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gccdat.be\/main\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}