The 21st century petroleum engineer faces new and extraordinary challenges. They must learn to do more with less, solving ever-more-difficult problems with limited resources, in the face of a highly dynamic industry and market. The skillful use of our era's most defining invention---the general-purpose computer---is the most powerful force multiplier an individual engineer can bring to bear. This means embracing computer programming as an engineering discipline and a core competency.
Engineers and other petroleum technical professionals are uniquely well-equipped to learn programming skills, the same way as any other engineering discipline: from the fundamentals. In addition to empowering the individual engineer, programming is also the first step on the path to learning data science, machine learning, AI, and other emergent disciplines at the intersection of engineering, statistics, and computing.
In this course, students will advance their existing programming skills to a more sophisticated level by tackling challenging real-world case studies, in which we'll solve engineering and business problems together by designing and building useful and robust software systems. This is a course about programming as an engineering discipline. Students will learn how to translate business challenges into programming problems, and in turn solve these as engineering problems. This is not a Python language class or a theoretical computer science class, but students will learn some advanced skills in these areas along the way.
This is a practical, goal-oriented class. The overall objective is to teach engineers how to take their software design and development skills to the next level, working the way professional programmers work, primarily through case studies and instructor-led coding sessions. Among other case studies, we'll automate tedious engineering calculations, develop flexible tools for decline-curve analysis, and construct a sophisticated system for probabilistic assessment of project economics.
Content duration: (13:32 hours)
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.