Hands-On Software Engineering with Python
eBook - ePub

Hands-On Software Engineering with Python

Move beyond basic programming and construct reliable and efficient software with complex code

  1. 736 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Software Engineering with Python

Move beyond basic programming and construct reliable and efficient software with complex code

About this book

Explore various verticals in software engineering through high-end systems using Python

Key Features

  • Master the tools and techniques used in software engineering
  • Evaluates available database options and selects one for the final Central Office system-components
  • Experience the iterations software go through and craft enterprise-grade systems

Book Description

Software Engineering is about more than just writing code—it includes a host of soft skills that apply to almost any development effort, no matter what the language, development methodology, or scope of the project. Being a senior developer all but requires awareness of how those skills, along with their expected technical counterparts, mesh together through a project's life cycle. This book walks you through that discovery by going over the entire life cycle of a multi-tier system and its related software projects. You'll see what happens before any development takes place, and what impact the decisions and designs made at each step have on the development process. The development of the entire project, over the course of several iterations based on real-world Agile iterations, will be executed, sometimes starting from nothing, in one of the fastest growing languages in the world—Python. Application of practices in Python will be laid out, along with a number of Python-specific capabilities that are often overlooked. Finally, the book will implement a high-performance computing solution, from first principles through complete foundation.

What you will learn

  • Understand what happens over the course of a system's life (SDLC)
  • Establish what to expect from the pre-development life cycle steps
  • Find out how the development-specific phases of the SDLC affect development
  • Uncover what a real-world development process might be like, in an Agile way
  • Find out how to do more than just write the code
  • Identify the existence of project-independent best practices and how to use them
  • Find out how to design and implement a high-performance computing process

Who this book is for

Hands-On Software Engineering with Python is for you if you are a developer having basic understanding of programming and its paradigms and want to skill up as a senior programmer. It is assumed that you have basic Python knowledge.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Hands-On Software Engineering with Python by Brian Allbee in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Development Tools and Best Practices

Before starting on the actual development of hms_sys, there are several decisions that need to be made. In a real-world scenario, some (maybe all) of these decisions might be made at a policy level, either by the development team or maybe by management above the team. Some, such as the IDE/code editor program, might be an individual decision by each individual team member; so long as there are no conflicts between different developers' choices, or any issues raised as a result, there's nothing wrong with that. On the other hand, having some consistency isn't a bad thing either; that way, every team member knows what to expect when they're working on code that someone else on the team has touched.
These choices fall into two main categories selection of development tools and what best practices (and standards) will be in play, specifically the following:
  • Integrated Development Environment options
  • Source Control Management options
  • Code and development process standards, including organization of Python code into packages
  • Setting up and using of Python virtual environments

Development tools

The two most important tool-oriented decisions that need to be considered are, not surprisingly, centered around creating, editing, and managing the code through the development life cycle.

Integrated Development Environment (IDE) options

It's certainly possible to write and edit code without using a full-blown Integrated Development Environment (IDE). Ultimately, anything that can read and write text files of arbitrary types or with arbitrary file extensions is technically usable. Many IDEs, though, provide additional, development-centric capabilities that can save time and effort—sometimes a lot of time and effort. The trade-off is, generally, that the more features and functionality that any given IDE provides, the less lightweight it is, and the more complicated it can become. Finding one that every member of a development team can agree on can be difficult, or even painful there are downsides to most of them, and there may not be a single, obvious right choice. It's very subjective.
In looking at code editing and management tools, only real IDEs will be examined. As noted, text editors can be used to write code, and there are a fair few of them out there that recognize various language formats, including Python. However good they are (and there are some that are very good), if they don't provide at least one of the following functional capabilities, they won't be considered. It's just a matter of time until something in this list is needed and not available, and at a minimum, that eventuality will be distracting, and at worst, it could be a critical issue (though that seems unlikely). The feature set criteria are as follows:
  • Large-project support: A large project, for the purposes of discussion, involves the development of two or more distinct, installable Python packages that have different environmental requirements. An example might include a business_objects class library that's used by two separate packages such as an online_store and back_office that provide different functionality for different users. The best-case scenario for this would include the following :
    • Support for different Python interpreters (possibly as individual virtual environments) in different package projects
    • The ability to have and manage interproject references (in this example, the online_store and back_office packages would be able to have useful references to the business_objects library)
    • Less important, but still highly useful, would be the ability to have multiple projects open and editable at the same time, so that as changes in one package project require corresponding changes in another, there's little or no context change needed by the developer making those changes
  • Refactoring support: Given a long enough period of time, it's inevitable that changes to a system's code without changing how it behaves from an external perspective is going to be necessary. That's a textbook definition of refactoring. Refactoring efforts tend to require, at a minimum, the ability to find and replace entity names in the code across multiple files, possibly across multiple libraries. At the more complex end of the range, refactoring can include the creation of new classes or members of classes to move functionality into a different location in the code, while maintaining the interface of the code.
  • Language exploration: The ability to examine code that's used by, but not a part of, a project is helpful, at least occasionally. This is more useful than it might sound, unless you are lucky enough to possess an eidetic memory, and thus never have to look up function signatures, module members and so on.
  • Code execution: The ability to actually run the code being worked on is immensely helpful during development. Having to drop out of an editor into a terminal in order to run code, to test changes to it, is a context change, and those are tedious at the least, and can actually be disruptive to the process under the right circumstances.
These items will be rated on the following scale, from best to worst:
  • Superb
  • Great
  • Good
  • Fair
  • Mediocre
  • Poor
  • Terrible
These are the author's opinion, obviously, so take these with an appropriately sized grain of salt. Your personal views on any or all of these, or your needs for any or all of them, may be substantially different.
Many IDEs have various bells and whistles functionality that helps, perhaps substantially, with the processes of writing or managing code, but isn't something that's really critical. Examples of these include the following:
  • The ability to navigate to where a code entity is defined from someplace where it's being used
  • Code completion and autosuggestion, which allows the developer to quickly and easily select from a list of entities based on the first few characters of an entity name that they've started typing
  • Code coloration and presentation, which provides an easy-to-understand visual indication of what a given block of code is – comments, class, function and variable names, that sort of thing
These will also be rated on the same scale, but since they aren't critical functionality, they are presented merely as additional information items.
All of the following IDEs are available across all the major operating systems – Windows, Macintosh, and Linux (and probably most UNIX systems, for that matter) – so that, an important criteria for evaluating the IDE part of a development toolkit is moot across the three discussed.

IDLE

IDLE is a simple IDE, written in Python and using the Tkinter GUI, which means that it should run on pretty much anything that Python can run on. It is often, but not always, part of a default Python installation but even when it's not included by default, it's easily installed and doesn't require much of anything in the way of external dependencies or other languages runtime environments.
  • Large-project support: Poor
  • Refactoring support: Poor
  • Language exploration: Good
  • Code execution: Good
  • Bells and whistles: Fair
Out of the box, IDLE doesn't provide any project management tools, though there may be plugins that provide some of this capability. Even so, unless there are also plugins available that allow for more than one file to be open at a time without requiring each to be in a separate window, working with code across multiple files will eventually be tedious, at best, and perhaps imprac...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Programming versus Software Engineering
  7. The Software Development Life Cycle
  8. System Modeling
  9. Methodologies, Paradigms, and Practices
  10. The hms_sys System Project
  11. Development Tools and Best Practices
  12. Setting Up Projects and Processes
  13. Creating Business Objects
  14. Testing Business Objects
  15. Thinking About Business Object Data Persistence
  16. Data Persistence and BaseDataObject
  17. Persisting Object Data to Files
  18. Persisting Data to a Database
  19. Testing Data Persistence
  20. Anatomy of a Service
  21. The Artisan Gateway Service
  22. Handling Service Transactions
  23. Testing and Deploying Services
  24. Multiprocessing and HPC in Python
  25. Other Books You May Enjoy