Resourceful Code Reuse: Write – Compile – Link – Run

Resourceful Code Reuse: Write – Compile – Link – Run

English | 2021 | ISBN: 978-1680508208 | 110 Pages | EPUB | 10 MB

Reusing well-written, well-debugged, and well-tested code improves productivity, code quality, and software configurability and relieves pressure on software developers. When you organize your code into self-contained modular units, you can use them as building blocks for your future projects and share them with other programmers, if needed. Understand the benefits and downsides of seven code reuse models so you can confidently reuse code at any development stage. Create static and dynamic libraries in C and Python, two of the most popular modern programming languages. Adapt your code for the real world: deploy shared functions remotely and build software that accesses them using remote procedure calls.

Avoid the drawbacks and harness the benefits associated with seven code reuse models. Create static and dynamic libraries in C and Python, deploy shared functions remotely, and build software that makes intelligent use of remote procedure calls. In no time at all, you’ll develop the confidence to reuse code at any stage of real-world development.

This one-stop solution covers the complete build cycle: editing, compiling, linking, and running a ready program. Apply Linux/macOS power software development tools, such as ld, ldd, ranlib, and nm, to construct and explore state-of-the-art function libraries in C that could be linked with application-specific code either permanently or for the duration of execution. Learn why Python has modules for reuse and how they differ from C object files and libraries. Understand the risks and other negative implications of sharing and reuse. As a bonus, distill the dependencies between your project’s components and automate and optimize your build process with the “make” utility.

Whether you are an amateur coder or an experienced developer, become a more productive and resourceful programmer by reusing previously written code.

What You Need:

To compile and run the C examples mentioned in the book, you need a decent C compiler (GCC is the best, but Intel and Microsoft would probably work, too) and a set of C development tools: maker (make), linker (ld), file, strip, ldd, and ranlib. Again, the GNU development toolset works marvels; other toolsets may or may not work. All examples in the book have been tested on a Linux computer but will most likely work on macOS. For the Python examples, a Python-3.x interpreter is all you want. No third-party modules are required.

Homepage