Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Share excellent open source code

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "sharing excellent open source code". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Apollo 11 guidance program

Apollo 11 was the first successful mission to land a man on the moon. The Apollo guidance computer (AGC), which has only 4 KB of physical memory, provides support for spacecraft control. AGC's software is written in AGC assembly language and stored in a special read-only memory called rope memory. Some time ago, scanned copies of the source code were scanned and uploaded to Internet. Since then, several modules have been converted to text files and then uploaded to the Github repository.

The Apollo engineering team has made great efforts to achieve such amazing results by writing many lines of code in assembly language. In the 1960s, programming was more difficult than it is now. Because at that time, the programming language had a lower level of abstraction. In addition, programmers must write super-optimized code to use hardware effectively.

Hammer of Thor III Arena

Quake III Arena is a first-person shooter developed by id Software. It was developed in the 1990s, when the 3D game industry was just beginning to use the id Tech 3 game engine for development. At that time, hardware resources were very limited. Therefore, game developers must write carefully optimized code to render graphical elements. Many game programming calculations need the concept of vector normalization, which puts forward the requirement of inverse square root calculation. As mentioned earlier, developers must choose the most efficient algorithms for these tasks related to computer graphics. As a result, the Quake III Arena team uses a very clever method for fast inverse square root calculations, as shown below, using bit-level calculations.

The level of optimization used in this code and the entire code written to implement such an excellent computer game in the 1990s is obviously surprising. Today, game developers usually do not deal with this level of computing because physical functions are already implemented by the game engine.

GNU compiler collection

The C programming language is like the father of modern computing because it is very close to hardware by providing a good human-readable level of abstraction. Indeed, the GNU C compiler has been started. In other words, it is written in the C programming language using the compiler bootstrap concept. I noticed that I saw the longest C source file in the code base of the GNU compiler collection on Github (there could be longer C source files than this, but this is what I see).

Google Chrome

Popular Web browsers, such as Google Chrome,Microsoft Edge and Opera, are based on the Chromium open source project, which has two main dependencies: the Blink rendering engine, a branch of the WebCore library developed by the Webkit team, and the v8 JavaScript engine, developed by the Chromium project team. There is no doubt that the Chromium code base is very large and has many third-party modules, such as gRPC and Skia. However, the Chromium team constructed all the components in a good way. They wisely separated the logic related to the user interface from the internal functional logic to achieve very good maintainability factors throughout the project.

In addition, this code base contains the source code for Chromium Android and iOS applications. Building large-scale cross-platform applications can be a bit complicated. However, Chromium has an impressive separation of platform-specific code from Linux,Windows and Mac.

Git

Today, Git helps almost every software development team manage coding history and versions. Git was originally made by Linus Torvalds, the founder of the Linux kernel. Indeed, Git's code base contains an amazing piece of work, which is the source file for Gitk. Gitk is a GUI application that helps us navigate submissions visually. We can use the following CLI command to check the difference between the two commits.

$git diff

However, because it is a visual tool, Gitk allows us to see changes so quickly. The entire source code of Gitk is just a file. It is written in the Tcl scripting language using the Tk UI toolkit (an extension of Tcl). They have done an excellent job by implementing the entire GUI application in a single source file and by choosing a dynamic programming language to speed up GUI application development.

That's all for sharing excellent open source code. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report