Practical Python Programming for Engineers is an intermediate-level course designed to equip petroleum engineers and technical professionals with advanced programming skills. This course approaches programming as an engineering discipline focused on solving real-world engineering and business problems using software design. Students will engage in hands-on case studies, learning professional programming tools and techniques including command-line usage, version control, and robust software development practices. By the end of the course, participants will understand how to transform business challenges into actionable programming tasks and develop reliable, reusable code. The course emphasizes practical application over theoretical computer science, aiming to cultivate both the art and science of software engineering in the context of engineering tasks.Read more...
Who Should Take This Course
• Intermediate learners in computing
• Petroleum and technical professionals
• Those seeking practical software skills
• Engineers with basic programming experience
What You Will Learn
• Write reliable, maintainable code
• Use command-line tools proficiently
• Manage project versions effectively
• Apply software engineering to business problems
Why This Course Works
• Work like professional programmers
• Solve engineering problems with software
• Prepare for advanced computing disciplines
• Enhance programming as an engineering skill
In this chapter, we'll open by discussing the course objectives.
We'll then learn about the pragmatics of programming, exploring useful tools like text editors, version-control systems, and command-line shells.
Finally, we'll introduce the Python programming language, then walk through the process of installing the Python interpreter in a live-coding session which culminates in the (in)famous "hello world" program.
In this chapter, we'll quickly review the semantics of the Python language, using an "abstract machine" model to build our intuitions.
Then, we'll discuss the ongoing and long-running "software crisis", and consider how we might take an engineering approach to programming, using tools like type systems and automated testing.
In this chapter, we'll (re-)introduce a key skill of engineering - and of software design.
We'll apply the technique of functional decomposition to a case study about volumetric estimation of petroleum reserves, and build our first "real-world" Python program.
Along the way, we'll also cover some Python paraphernalia including error handling, input and output, lazy evaluation, "code sandwiches", and how to parse CSV files without pandas or any other kind of bear.
This chapter introduces the concept of "data-driven design" through a case study about using Monte Carlo simulation for economic modeling.
In data-driven design, we move repetitive program logic from code into data structures, simplifying our programs.
Along the way, we'll discuss some of Python's various data structures, learn about trees, pass the coding interview, and work out how to accommodate it all in a static type system.
There's no denying it: Python is slow. For various reasons, we're stuck with the language, but not stuck with the speed!
In this chapter, we'll learn why Python is slow, why it matters for engineering and technical applications, and introduce the NumPy library and other tools for getting more speed out of Python.
Along the way, we'll also learn a very little bit about how modern computers actually work, a subject Python takes great efforts to obscure.
We've arrived at the core of Python: object-oriented programming.
But what on earth does "object-oriented" actually mean - and do any two programmers agree about it?
In this chapter, we'll explore the separation of interface from implementation through a case study about petroleum decline curve analysis.
We'll learn how - properly applied - object-oriented techniques can make our programs more flexible and future-proof.
Along the way we'll also complain, a lot, about Python.
If you're reading this description, you've either made it through six fairly heavy chapters, or skipped ahead to the end to see what happens.
Either way, we salute you!
In this chapter, we'll conclude the course by summarizing what we've learned and provide some hints for next steps in the world of Python programming.
We'll also examine programming beyond Python through a survey of several languages with very different semantics.
Along the way, we'll beat dead memes into the ground, insult the memory of Galileo, and understand the true value of Python by considering a bucket of mussels.