<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Volodymyr Obrizan: personal website - 14</title><link href="https://obrizan.com/" rel="alternate"></link><link href="https://obrizan.com/feeds/14.atom.xml" rel="self"></link><id>https://obrizan.com/</id><updated>2026-08-14T10:41:43+03:00</updated><entry><title>My code review model: LGTM-5.6</title><link href="https://obrizan.com/blog/lgtm-5-6/" rel="alternate"></link><published>2026-08-14T10:41:43+03:00</published><updated>2026-08-14T10:41:43+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2026-08-14:/blog/lgtm-5-6/</id><content type="html">&lt;p&gt;I trained my very own LLM for code review.&lt;/p&gt;
&lt;p&gt;Called it LGTM-5.6.&lt;/p&gt;
&lt;p&gt;It has just one token: &lt;code&gt;LGTM&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For any input, it responds with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;LGTM
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On code review quality benchmarks, it's no worse than 80% of senior developers. :)&lt;/p&gt;</content><category term="14"></category></entry><entry><title>Creative Plans</title><link href="https://obrizan.com/blog/creative-plans/" rel="alternate"></link><published>2017-04-14T07:36:00+03:00</published><updated>2017-04-14T07:36:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2017-04-14:/blog/creative-plans/</id><summary type="html">&lt;p&gt;I taught at the Kharkiv National University of Radio Electronics from 2008 to 2016. When I was a student, I didn’t think I would become a lecturer and educator. Closer to graduation I realized that: a) I liked helping other students figure things out; b) in some things I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I taught at the Kharkiv National University of Radio Electronics from 2008 to 2016. When I was a student, I didn’t think I would become a lecturer and educator. Closer to graduation I realized that: a) I liked helping other students figure things out; b) in some things I was smart, and in certain things the smartest. Later I realized that I could actually create some new, unique knowledge that no one before me had recorded, but that was already much later than my student days. &lt;/p&gt;
&lt;p&gt;And where else do you work as a lecturer if not at a university? Teaching at a university is very easy. You don’t have to sell yourself. You just have to show up in the classroom at a certain time, and the students will be led in by the hand. Whether you’re a good teacher or a bad one, on September first you are guaranteed to have new students. Thus, I took the path of least resistance. &lt;/p&gt;
&lt;p&gt;I can’t say that I had any noticeable effect on the lives of Kharkiv residents or the whole country. Kharkiv has 1.5 million people, and over 8 years I taught, well, maybe 200 people. And if you count only the worthwhile ones, maybe 30–40 people.&lt;/p&gt;
&lt;p&gt;Universities are that kind of classic thing that develops very slowly. A few percent a year. And KhNURE is generally developing with a negative coefficient. For a person as talented as me, that is a total dead end. I wrote several posts about this:&lt;/p&gt;
&lt;p&gt;http://obrizan.livejournal.com/tag/университет&lt;/p&gt;
&lt;p&gt;After leaving the university, I independently gave a master class on programming iPhone applications (http://mass.education). Once was enough to understand that I no longer want to give lectures in the standard university format. A lot of time gets spent, and only 5 people are learning. &lt;/p&gt;
&lt;p&gt;The solution is to teach people over the internet. My current creative plans:&lt;/p&gt;
&lt;p&gt;— in 2017, teach 1,000 people over the internet;&lt;br&gt;
— in 2018, teach 10,000 people over the internet;&lt;br&gt;
— in 2019, teach 100,000 people over the internet. &lt;/p&gt;
&lt;p&gt;But I’m not sure about 2019. Maybe more than a hundred thousand. I still haven’t learned how to look three years ahead; it’s all foggy there.&lt;/p&gt;</content><category term="14"></category></entry><entry><title>The Internet Makes Kids Dumber</title><link href="https://obrizan.com/blog/the-internet-makes-kids-dumber/" rel="alternate"></link><published>2016-09-14T23:25:00+03:00</published><updated>2016-09-14T23:25:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2016-09-14:/blog/the-internet-makes-kids-dumber/</id><summary type="html">&lt;p&gt;It’s funny to watch how, in the chase for instant results, people degrade into complete morons. Here’s a popular public page teaching kids to sight-read:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/livejournal/2016/09/14/ot-interneta-deti-tupeyut/37067-original-c94f3484b0ebdec9.png"&gt;&lt;/p&gt;
&lt;p&gt;By the way, not everyone will be able to perform it correctly anyway: the note durations aren’t indicated here, and that matters …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It’s funny to watch how, in the chase for instant results, people degrade into complete morons. Here’s a popular public page teaching kids to sight-read:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/livejournal/2016/09/14/ot-interneta-deti-tupeyut/37067-original-c94f3484b0ebdec9.png"&gt;&lt;/p&gt;
&lt;p&gt;By the way, not everyone will be able to perform it correctly anyway: the note durations aren’t indicated here, and that matters. If Beethoven had written down his works like this, they would have reached our day in an unrecognizable form.&lt;/p&gt;
&lt;p&gt;Because it’s obviously easier to poke at little numbers with your finger like a moron than to spend a year studying at music school so you can read this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/livejournal/2016/09/14/ot-interneta-deti-tupeyut/37410-1000-2e73a131c0baa641.png"&gt;&lt;/p&gt;
&lt;p&gt;And while we’re at it, here’s one about combining the pleasant with the useful: “How to get smarter lying on the couch?”&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/livejournal/2016/09/14/ot-interneta-deti-tupeyut/37157-original-b09b832a2d771809.png"&gt;&lt;/p&gt;
&lt;p&gt;By the way, which one? :)&lt;/p&gt;</content><category term="14"></category></entry><entry><title>Lame Student Excuses</title><link href="https://obrizan.com/blog/lame-student-excuses/" rel="alternate"></link><published>2015-11-14T22:43:00+02:00</published><updated>2015-11-14T22:43:00+02:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2015-11-14:/blog/lame-student-excuses/</id><summary type="html">&lt;p&gt;What surprises me most are lame student excuses. Here’s a real conversation with a student who skipped all the labs. I edited it so you can’t tell from the context who it is. Spelling is the author’s own.&lt;/p&gt;
&lt;p&gt;— Good evening. i understand that i attended your course …&lt;/p&gt;</summary><content type="html">&lt;p&gt;What surprises me most are lame student excuses. Here’s a real conversation with a student who skipped all the labs. I edited it so you can’t tell from the context who it is. Spelling is the author’s own.&lt;/p&gt;
&lt;p&gt;— Good evening. i understand that i attended your course poorly and was far from a diligent student, but there were good reasons for that. I worked a lot and couldn’t devote time to uni. I don’t have credit for the course ***, is it possible to resolve this problem?&lt;br&gt;
— Do the labs, then come defend them.&lt;br&gt;
— if i could do labs, i wouldn’t be working at ***, i’d be doing part-time programming. But since I need money, I work there. &lt;br&gt;
— How many hours a week do you work?&lt;br&gt;
— shifts are 10–11 hours for night ones, day ones are 9, i work 5 days a week&lt;br&gt;
— So you still have time to study?&lt;br&gt;
— more like time to sleep than to study&lt;br&gt;
— There are 168 hours in a week. Of those, 55 hours go to work. 56 to proper sleep. You still have 57 hours to do my labs.&lt;/p&gt;
&lt;p&gt;After that the conversation moved into the “yeah, and I don’t have those 57 hours either” territory. The course had 5 lab assignments, 4 academic hours each. That is, at most 20 hours were needed to do them. A “smart guy” can do my labs in two days. And there really were people who did the whole course in three days. &lt;/p&gt;
&lt;p&gt;Needless to say, this student did nothing. &lt;/p&gt;
&lt;p&gt;Unfortunately, KhNURE has rotted so much that, without having credit for my course, without lifting a finger, he received a bachelor’s degree in computer engineering.&lt;/p&gt;
&lt;p&gt;Needless to say, employers in Kharkiv don’t look at diplomas at all.&lt;/p&gt;</content><category term="14"></category></entry><entry><title>The Most Important Guideline</title><link href="https://obrizan.com/blog/the-most-important-guideline/" rel="alternate"></link><published>2012-10-14T20:21:00+03:00</published><updated>2012-10-14T20:21:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2012-10-14:/blog/the-most-important-guideline/</id><summary type="html">&lt;p&gt;The most important guideline when writing code is to separate method implementations with several blank lines and a comment line. Despite modern IDEs’ capabilities for searching and structuring source code, visual orientation still plays an important role.&lt;/p&gt;
&lt;p&gt;Consider the example below. There is an implementation of a class in Objective-C …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The most important guideline when writing code is to separate method implementations with several blank lines and a comment line. Despite modern IDEs’ capabilities for searching and structuring source code, visual orientation still plays an important role.&lt;/p&gt;
&lt;p&gt;Consider the example below. There is an implementation of a class in Objective-C. The methods are separated by just one line. Also, separation by one line occurs not only between methods, but also between logical blocks of code inside methods. The length of a method name cannot serve as a good marker for the start of a new method. For example, the method name stopProgressAnimating is shorter than any line of the previous method, loadCommentsFailure. There is nothing for the eye to latch onto.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2012/10/14/samyi-glavnyi-gaidlain/samyi-glavnyi-gaidlain-01.png"&gt;&lt;/p&gt;
&lt;p&gt;The very same code, but the methods are separated by blank lines and a comment. Now the space between the end of one method and the beginning of the next forms a uniform pattern that repeats constantly. Such a pattern is easy to spot even when scrolling quickly.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2012/10/14/samyi-glavnyi-gaidlain/samyi-glavnyi-gaidlain-02.png"&gt;&lt;/p&gt;</content><category term="14"></category><category term="programming"></category><category term="basics"></category><category term="interface"></category><category term="screenshot"></category></entry><entry><title>Because I Couldn’t Before</title><link href="https://obrizan.com/blog/because-i-couldnt-before/" rel="alternate"></link><published>2011-02-14T22:17:00+02:00</published><updated>2011-02-14T22:17:00+02:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2011-02-14:/blog/because-i-couldnt-before/</id><summary type="html">&lt;p&gt;&lt;nobr&gt;13-day&lt;/nobr&gt; trip along the route Kharkiv-Kyiv-Katowice-Beauvais-Paris-Grenoble-Paris-Beauvais-Katowice-Krakow-Warsaw-Katowice-Auschwitz-Katowice-Bielsko-Biała-Szczyrk-Bielsko-Biała-Katowice-Kyiv-Kharkiv has successfully wrapped up. The memorable places have been seen, the postcards have been sent, the Olympic ski slopes have been tested out.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_3551" src="https://obrizan.com/images/blogger/2011/02/14/potomu-chto-ranshe-ne-smog/img-3551-3.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Photo, video, and letter reports will be created and published later.&lt;/p&gt;
&lt;p&gt;In the last few days before departure I managed to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;nobr&gt;13-day&lt;/nobr&gt; trip along the route Kharkiv-Kyiv-Katowice-Beauvais-Paris-Grenoble-Paris-Beauvais-Katowice-Krakow-Warsaw-Katowice-Auschwitz-Katowice-Bielsko-Biała-Szczyrk-Bielsko-Biała-Katowice-Kyiv-Kharkiv has successfully wrapped up. The memorable places have been seen, the postcards have been sent, the Olympic ski slopes have been tested out.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_3551" src="https://obrizan.com/images/blogger/2011/02/14/potomu-chto-ranshe-ne-smog/img-3551-3.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Photo, video, and letter reports will be created and published later.&lt;/p&gt;
&lt;p&gt;In the last few days before departure I managed to get hold of Jiří Toman’s book “How to Improve Yourself,” which was discussed in the previous post about the book &lt;a href="https://obrizan.com/blog/review-of-jiri-tomans-book-the-art-of-speaking/"&gt;“The Art of Speaking”&lt;/a&gt;. I quickly leafed through it — another &lt;nobr&gt;300-page&lt;/nobr&gt; holy crap. I am immediately starting to read it.&lt;/p&gt;</content><category term="14"></category><category term="travel"></category><category term="photos"></category></entry><entry><title>An error in the portmone.com.ua interface</title><link href="https://obrizan.com/blog/an-error-in-the-portmone-com-ua-interface/" rel="alternate"></link><published>2010-12-14T15:07:00+02:00</published><updated>2010-12-14T15:07:00+02:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2010-12-14:/blog/an-error-in-the-portmone-com-ua-interface/</id><summary type="html">&lt;p&gt;The scenario is this: when you start entering the CVV2, a virtual PIN-code keyboard pops up, while the window size doesn’t change, and 2/3 of the keyboard isn’t visible. I wonder how many users won’t figure out that they need to scroll the window? Or is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The scenario is this: when you start entering the CVV2, a virtual PIN-code keyboard pops up, while the window size doesn’t change, and 2/3 of the keyboard isn’t visible. I wonder how many users won’t figure out that they need to scroll the window? Or is everyone who has plastic smart?&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2010/12/14/oshibka-v-interfeise-portmone-com-ua/oshibka-v-interfeise-portmone-com-ua-01.png"&gt;&lt;/p&gt;
&lt;p&gt;When I saw this, I got scared: “Can it really know that my PIN consists of the digits 9, 0, 6, and 5”?&lt;/p&gt;</content><category term="14"></category><category term="interface"></category><category term="error"></category><category term="screenshot"></category></entry><entry><title>Death Toll</title><link href="https://obrizan.com/blog/death-toll/" rel="alternate"></link><published>2010-10-14T23:09:00+03:00</published><updated>2010-10-14T23:09:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2010-10-14:/blog/death-toll/</id><summary type="html">&lt;p&gt;As a result of &lt;a href="http://podrobnosti.ua/accidents/2010/10/14/722938.html"&gt;the traffic accident in Marhanets on October 12, 44 people were killed&lt;/a&gt;, when the driver of an overcrowded bus drove onto a railroad crossing. The only thing history teaches is that it teaches nothing. The next day near Kyiv, &lt;a href="http://podrobnosti.ua/accidents/2010/10/13/722925.html"&gt;an ambulance driver drove onto a closed …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;As a result of &lt;a href="http://podrobnosti.ua/accidents/2010/10/14/722938.html"&gt;the traffic accident in Marhanets on October 12, 44 people were killed&lt;/a&gt;, when the driver of an overcrowded bus drove onto a railroad crossing. The only thing history teaches is that it teaches nothing. The next day near Kyiv, &lt;a href="http://podrobnosti.ua/accidents/2010/10/13/722925.html"&gt;an ambulance driver drove onto a closed crossing&lt;/a&gt; and was hit by a train. 2 people were killed (including a pregnant woman).&lt;/p&gt;
&lt;p&gt;And in general, on the &lt;nobr&gt;13th&lt;/nobr&gt;, there were 658 traffic accidents in Ukraine, with 22 killed and 124 injured (source: &lt;a href="http://www.sai.gov.ua/dtp.shtml"&gt;State Traffic Inspectorate of the Ministry of Internal Affairs&lt;/a&gt;). In 2009, 5,300 people were killed in traffic accidents in Ukraine (&lt;a href="http://automir.in.ua/newsm.php?id=1978"&gt;source&lt;/a&gt;). That is, 15 deaths a day. But few people know about this, because they don’t talk about it on the evening news.&lt;/p&gt;</content><category term="14"></category></entry><entry><title>Aligning Numeric Data in Tables</title><link href="https://obrizan.com/blog/aligning-numeric-data-in-tables/" rel="alternate"></link><published>2010-10-14T14:56:00+03:00</published><updated>2010-10-14T14:56:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2010-10-14:/blog/aligning-numeric-data-in-tables/</id><summary type="html">&lt;p&gt;I’ve been using Microsoft Outlook for a long time, but only now noticed this little detail. The “Received” and “Size” columns aren’t aligned by place value. With dates and times it’s not so bad, but with size it’s a complete mess.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2010/10/14/vyravnivanie-chislovyh-dannyh-v-tablitsah/vyravnivanie-chislovyh-dannyh-v-tablitsah-01.png"&gt;&lt;/p&gt;
&lt;p&gt;Do the designers at Microsoft …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I’ve been using Microsoft Outlook for a long time, but only now noticed this little detail. The “Received” and “Size” columns aren’t aligned by place value. With dates and times it’s not so bad, but with size it’s a complete mess.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2010/10/14/vyravnivanie-chislovyh-dannyh-v-tablitsah/vyravnivanie-chislovyh-dannyh-v-tablitsah-01.png"&gt;&lt;/p&gt;
&lt;p&gt;Do the designers at Microsoft really not know that numeric data needs to be aligned so the place values line up?&lt;/p&gt;
&lt;p&gt;So how are things in your favorite email client? I’m all worked up now: what’s it like over there on Linux?&lt;/p&gt;</content><category term="14"></category><category term="design"></category><category term="Outlook"></category><category term="error"></category><category term="screenshot"></category></entry><entry><title>Error Messages in clang</title><link href="https://obrizan.com/blog/error-messages-in-clang/" rel="alternate"></link><published>2010-08-14T14:51:00+03:00</published><updated>2010-08-14T14:51:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2010-08-14:/blog/error-messages-in-clang/</id><summary type="html">&lt;p&gt;One of the requirements for clang — the new C++ compiler — was to provide the user with detailed information about errors. Let’s look at a small example.&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;[]&lt;span style="font-family: consolas; color: blue; font-size: 9pt"&gt;double&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt; UniversalGravitation(&lt;span style="color: blue"&gt;double&lt;/span&gt; G, &lt;span style="color: blue"&gt;double&lt;/span&gt; mass1, &lt;span style="color: blue"&gt;double&lt;/span&gt; mass2, &lt;span style="color: blue"&gt;double&lt;/span&gt; distance)&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;{&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;/span&gt;    &lt;span style="color: blue"&gt;double&lt;/span&gt; F = G * ((mass1 * mass2)/(distance * dsitance));&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;/span&gt;    &lt;span style="color: blue"&gt;return&lt;/span&gt; F;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There’s a typo …&lt;/p&gt;</summary><content type="html">&lt;p&gt;One of the requirements for clang — the new C++ compiler — was to provide the user with detailed information about errors. Let’s look at a small example.&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;[]&lt;span style="font-family: consolas; color: blue; font-size: 9pt"&gt;double&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt; UniversalGravitation(&lt;span style="color: blue"&gt;double&lt;/span&gt; G, &lt;span style="color: blue"&gt;double&lt;/span&gt; mass1, &lt;span style="color: blue"&gt;double&lt;/span&gt; mass2, &lt;span style="color: blue"&gt;double&lt;/span&gt; distance)&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;{&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;/span&gt;    &lt;span style="color: blue"&gt;double&lt;/span&gt; F = G * ((mass1 * mass2)/(distance * dsitance));&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;&lt;span style="mso-tab-count: 1"&gt;&lt;/span&gt;    &lt;span style="color: blue"&gt;return&lt;/span&gt; F;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt; mso-ansi-language: en-us" lang="EN-US"&gt;
 &lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9pt"&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There’s a typo in the identifier here. So what will clang show us?&lt;/p&gt;
&lt;p&gt;&lt;img alt="consoleoutput" src="https://obrizan.com/images/blogger/2010/08/14/soobscheniya-ob-oshibkah-v-clang/consoleoutput-2.png"&gt;&lt;/p&gt;
&lt;p&gt;First, it thoughtfully underlines the spot in the long expression: exactly which identifier it considers unfamiliar. Second, it politely suggests a possible fix. Let’s remember what similar messages look like in Microsoft Visual Studio 2010. (Though Visual Studio 2010 does deserve some praise: it highlights this type of error while you’re still editing.)&lt;/p&gt;
&lt;p&gt;&lt;img alt="consoleoutputvs2010" src="https://obrizan.com/images/blogger/2010/08/14/soobscheniya-ob-oshibkah-v-clang/consoleoutputvs2010-2.png"&gt;&lt;/p&gt;
&lt;p&gt;gcc shows something like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;Consolas&amp;quot;&amp;gt;/tmp/webcompile/_13952_0.cc: In function &amp;#39;double UniversalGravitation(double, double, double, double)&amp;#39;: /tmp/webcompile/_13952_0.cc:3: error: &amp;#39;dsitance&amp;#39; was not declared in this scope&amp;lt;/font&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can read about other capabilities of the clang compiler’s diagnostic mechanism in the documentation: &lt;a href="http://clang.llvm.org/diagnostics.html"&gt;Expressive Diagnostics&lt;/a&gt;. The cases where it finds errors in unexpanded macros or in typedefs are very interesting.&lt;/p&gt;
&lt;p&gt;I’m already waiting for compilers in the future to fix errors themselves. And then write code themselves, too.&lt;/p&gt;</content><category term="14"></category><category term="compiler"></category><category term="clang"></category><category term="error"></category><category term="screenshot"></category></entry><entry><title>A Patent on High-Level Synthesis</title><link href="https://obrizan.com/blog/a-patent-on-high-level-synthesis/" rel="alternate"></link><published>2009-09-14T17:41:00+03:00</published><updated>2009-09-14T17:41:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2009-09-14:/blog/a-patent-on-high-level-synthesis/</id><summary type="html">&lt;p&gt;Last week I was preparing a lecture about the &lt;a href="http://ru.wikipedia.org/wiki/SystemC"&gt;SystemC&lt;/a&gt; language and came across an article by Stephen A. Edwards, “&lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MDT.2006.134"&gt;The Challenges of Synthesizing Hardware from C-Like Languages&lt;/a&gt;,” about various C-like languages used for describing hardware. Among the various languages and tools there was a link to U.S. patent …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last week I was preparing a lecture about the &lt;a href="http://ru.wikipedia.org/wiki/SystemC"&gt;SystemC&lt;/a&gt; language and came across an article by Stephen A. Edwards, “&lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MDT.2006.134"&gt;The Challenges of Synthesizing Hardware from C-Like Languages&lt;/a&gt;,” about various C-like languages used for describing hardware. Among the various languages and tools there was a link to U.S. patent &lt;a href="http://www.google.com/patents/about?id=BM4GAAAAEBAJ&amp;amp;dq=6226776"&gt;No. 6 226 776&lt;/a&gt; on synthesizing C into hardware, which now supposedly belongs to Synopsys. The author of the article describes the patent as “claiming broad support for the ANSI C language”: support for pointers, recursion, and dynamic memory allocation is mentioned.&lt;/p&gt;
&lt;p&gt;I got interested in this patent. About 85 pages out of the total 108 are examples in C and their corresponding synthesis results in Verilog. Another 14 pages are a verbal description of all the examples. And the last four pages are devoted to describing the claims of the invention. The models are mostly presented as finite-state machines, much less often as data-flow models. There was no method as such for converting C into a finite-state machine. I noticed one example in which one function called two others.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;`&lt;font size="2" face="Courier New" color="black"&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; sum1 (&lt;font color="#0000ff"&gt;int&lt;/font&gt; n)
{
    &lt;font color="#0000ff"&gt;int&lt;/font&gt; i, sum = 0;
    &lt;font color="#0000ff"&gt;for&lt;/font&gt; (i = 0; i &amp;lt; n; i++)
        sum += i;
    &lt;font color="#0000ff"&gt;return&lt;/font&gt; sum;
}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; sum2 (&lt;font color="#0000ff"&gt;int&lt;/font&gt; array[], &lt;font color="#0000ff"&gt;int&lt;/font&gt; size)
{
    &lt;font color="#0000ff"&gt;int&lt;/font&gt; i, sum = 0;
    &lt;font color="#0000ff"&gt;for&lt;/font&gt; (i = 0; i &amp;lt; size; i++)
        sum += array[i];
    &lt;font color="#0000ff"&gt;return&lt;/font&gt; sum;
}&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; f1()
{
    &lt;font color="#0000ff"&gt;int&lt;/font&gt; i;
    &lt;font color="#0000ff"&gt;int&lt;/font&gt; array[10];
    &lt;font color="#0000ff"&gt;int&lt;/font&gt; size = &lt;font color="#0000ff"&gt;sizeof&lt;/font&gt;(array)/&lt;font color="#0000ff"&gt;sizeof&lt;/font&gt;(&lt;em&gt;array);
    &lt;font color="#0000ff"&gt;for&lt;/font&gt; (i = 0; i &amp;lt; size; i++)
        array[i] = i * 2;
    &lt;font color="#0000ff"&gt;return&lt;/font&gt; sum1(size) + sum2(array, size);
}
&lt;/font&gt;
&lt;font size="1" color="gray"&gt;&lt;/em&gt; This source code was highlighted with &lt;a href="http://virtser.net/blog/post/source-code-highlighter.aspx"&gt;&lt;font size="1" color="gray"&gt;Source Code Highlighter&lt;/font&gt;&lt;/a&gt;.&lt;/font&gt;`&lt;/p&gt;
&lt;p&gt;Before reading on, think about it: how many states does the machine need to execute this algorithm? At first it seemed to me, too, that it shouldn’t be many. But in the proposed synthesis variant, executing this algorithm requires 16 states of the machine. Since my C++ to VHDL compiler is not yet capable of compiling such code, I decided to draw the flowchart of the algorithm by hand.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2009/09/14/patent-na-vysokourovnevyi-sintez/example.png"&gt;&lt;/p&gt;
&lt;p&gt;All the functions have already been inlined, and it is assumed that the variables are initialized on the reset signal. Thus, this machine ends up with only seven states (see S. I. Baranov, Synthesis of Digital Machines).&lt;/p&gt;
&lt;p&gt;What I can’t figure out is this: over there in 2001, did they not know what we had known back in 1974?&lt;/p&gt;</content><category term="14"></category><category term="CAD"></category><category term="basics"></category></entry><entry><title>C++ Was Invented in the USSR</title><link href="https://obrizan.com/blog/c-plus-plus-was-invented-in-the-ussr/" rel="alternate"></link><published>2009-05-14T08:00:00+03:00</published><updated>2009-05-14T08:00:00+03:00</updated><author><name>Volodymyr Obrizan</name></author><id>tag:obrizan.com,2009-05-14:/blog/c-plus-plus-was-invented-in-the-ussr/</id><content type="html">&lt;p&gt;Evidence has been found that the C++ language was invented in the USSR. The figure below shows a fragment of the secret documentation for the control system of a strategic nuclear incubator.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://obrizan.com/images/blogger/2009/05/14/c-pridumali-v-sssr/c-in-the-ussr.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Thanks to Roma Prikhodchenko for the find. :)&lt;/p&gt;</content><category term="14"></category><category term="fun"></category></entry></feed>