{"id":152,"date":"2017-06-27T18:35:56","date_gmt":"2017-06-27T18:35:56","guid":{"rendered":"http:\/\/cppdepend.com\/wordpress\/?p=152"},"modified":"2018-02-02T18:28:48","modified_gmt":"2018-02-02T18:28:48","slug":"how-it-was-the-c-source-code-25-years-ago","status":"publish","type":"post","link":"https:\/\/cppdepend.com\/blog\/how-it-was-the-c-source-code-25-years-ago\/","title":{"rendered":"How it was the C source code 25 years ago?"},"content":{"rendered":"<p>C is one of the most popular language around all the world, it was initially developed by Dennis Ritchie between 1969 and 1973 at AT&amp;T Bell Labs. Many thousands of projects was developed using C since then. It\u2019s used for all kinds of needs, we can enumerate OS, embedded applications, gaming development, image processing, word processing and database engines.<\/p>\n<p>It\u2019s interesting to discover the evolution of a language, and how it evolved over years of feedbacks from developers and end users. We will go back 25 years ago to discover how some C projects were implemented.<!--more--><span id=\"more-633\"><\/span><\/p>\n<p><strong>Back to 1990 the begining of Microsoft Word<\/strong><\/p>\n<p>The\u00a0developers\u00a0of\u00a0\u00a0these days\u00a0remember\u00a0this was a time when a typical personal computer might have an 8 Mhz processor, 1 megabyte of memory, a 20 megabyte hard disk, and a floppy disk drive. It was a big challenge to develop a word processing application.<\/p>\n<p>Microsoft released \u00a0the \u201cMicrosoft Word 1.1\u2033 source code \u00a0in the \u00a0<a href=\"http:\/\/www.computerhistory.org\/atchm\/microsoft-word-for-windows-1-1a-source-code\/\">Copmuter History Museum.<\/a>\u00a0It is worth to take a look to its source code, even if it was implemented 25 years ago, we can learn very interesting techniques from it.<\/p>\n<p>Here\u2019s a code snippet from its source code:<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-638\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c22.png\" alt=\"c22\" width=\"770\" height=\"308\" \/><\/a><\/p>\n<p>As we can observe \u00a0the function was declared in K&amp;R style. \u00a0All the functions use the same style.<\/p>\n<p>When exploring many \u201cMicrosoft Word 1.1\u2033 source files\u00a0and comparing them to recently created C projects, we can be surprised that the techniques used in \u00a0these projects not differ a lot from the \u201cMicrosoft Word 1.1\u2033 implementation ones.<\/p>\n<p>Let\u2019s take as example\u00a0 the following source code:<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-637\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c11.png\" alt=\"c1\" width=\"679\" height=\"422\" \/><\/a><\/p>\n<p>It seems that this code is from a C project created recently in GitHub. No sign that\u2019s a code from 25 years ago.<\/p>\n<p><strong>1994 was the year of the first release version of Linux<\/strong><\/p>\n<p>On 14 March 1994, Linux 1.0.0 was released, but the development was started\u00a0in 1991, thanks to Linus Trovalds and all the other contributors. The source code of this first version is available <a href=\"https:\/\/www.kernel.org\/pub\/linux\/kernel\/v1.0\/\">here<\/a>.<\/p>\n<p>Here\u2019s a snippet code from the sched.c source file:<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c23.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-639\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/c23.png\" alt=\"c23\" width=\"705\" height=\"430\" \/><\/a><\/p>\n<p>When exploring the source files of Linux kernel version 1 and all the newest ones, the very surprising remark is the fact \u00a0they are very similar, no big changes in the style or the techniques used. From the beginning the code was simple, clean and basic.<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>After a brief trip in the past of some C source code projects, they are very few implementation techniques changes \u00a0between them and the new C projects \u00a0ones.<\/p>\n<p>The power of C is its stability over years, it remains basic, no advanced mechanism was introduced\u00a0to the language, the code still simple to understand and maintain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C is one of the most popular language around all the world, it was initially developed by Dennis Ritchie between 1969 and 1973 at AT&amp;T Bell Labs. Many thousands of projects was developed using C since then. It\u2019s used for all kinds of needs, we can enumerate OS, embedded applications, gaming development, image processing, word &hellip; <a href=\"https:\/\/cppdepend.com\/blog\/how-it-was-the-c-source-code-25-years-ago\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How it was the C source code 25 years ago?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-c"],"_links":{"self":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":3,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}