Unlocking Python (eBook)
937 Seiten
Wiley (Verlag)
978-1-394-28850-2 (ISBN)
A fun and practical guide to learning Python with a special focus on data science, web scraping, and web applications
In Unlocking Python: A Comprehensive Guide for Beginners, veteran software engineer, educator, and author Ryan Mitchell delivers an intuitive, engaging, and practical roadmap to Python programming. The author walks you through the vocabulary, tools, foundational knowledge, and occasional pop-culture references you'll need to hone your skills with this popular programming language.
You'll learn how to install and run Python on your own machine, get up and coding with the language quickly, and best practices for programming both independently and in the workplace. You'll also find:
- Key concepts in computer and data science explained from the ground up
- Advanced Python topics such as logging, unit testing, multiprocessing, and interacting with databases.
- Introductions to some of Python's most popular third-party libraries: Flask, Django, Scrapy, Scikit-Learn, Numpy, and Pandas
- Amusing anecdotes from the trenches of industry
Perfect for tech-savvy professionals at any stage of their careers who are interested in diving into Python programming. Unlocking Python is also a must-read for readers who work in a technical role but are interested in getting more directly involved with programming, as well as non-Python programmers who want to apply their technical skill to a new language.
RYAN MITCHELL is the author of Unlocking Python (Wiley), Web Scraping with Python (O'Reilly), and multiple courses on LinkedIn Learning including Python Essential Training. She holds a master's degree in software engineering from Harvard University Extension School and has worked as principal software engineer and data scientist on the search team at the Gerson Lehrman Group for the last six years.
1
Introduction to Programming
The computer programmer is a creator of universes for which he alone is the lawgiver. No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute authority to arrange a stage or field of battle and to command such unswervingly dutiful actors or troops.
— JOSEPH WEIZENBAUM
The programming book has a curious place in the modern world. With Python documentation, tutorials, and entire courses available online, what is the purpose of long‐form text on the subject?
Similarly, what is the purpose of, say, historian John Keegan's book The First World War when a straightforward timeline of battles is readily available? This question is, obviously (at least, I hope), rhetorical. Books convey the author's point of view, insights, colorful commentary, and perhaps even add a little entertainment to the mix. They present facts, expand on those facts, and bring them to life.
For most people, the concept of “bringing history to life” probably makes more visceral and immediate sense than the concept of “bringing programming to life.” This is unfortunate.
The goal of this book is to teach you to write Python programs, yes, and also to discuss the history, culture, and context of Python, the machines that run it, and the people who write it. The first step to understanding a programming language isn't simply copying that first line of code and hitting the Go button—it's learning what the computer is doing while that first line of code is running.
Whatever your motivations for learning Python, I hope this text can inspire in you the same enthusiasm I have for Python, and programming in general. In some small way, perhaps it can bring it to life.
PROGRAMMING AS A CAREER
“If you could be anyone in King Arthur's court, who would you be?” was the question posed to me one weekend afternoon in the kitchen of my childhood home by my uncle, a software engineer visiting from Massachusetts.
As a teenager, my knowledge of King Arthur was mainly limited to the film Monty Python and the Holy Grail, so even thinking of suitable answers was difficult. There was Lancelot, Galahad, and all the rest of the knights, but none of them seemed especially worth becoming. “King Arthur” himself would have been a fun way to respond, but surely, there must be a more interesting character. What about the Lady of the Lake—the kingmaker herself?
Of course, in some versions, such as the 1963 Disney classic The Sword in the Stone, Arthur becomes king, not by women in ponds distributing swords, but by pulling Excalibur out of a stone. I thought about that movie, too.
And, certain that my answer was cheating somehow, I finally gave my uncle the snarky response: “Merlin.”
This, of course, is the correct answer. Years later, my uncle said that it was because of this answer that he knew my future profession as a programmer was inevitable.
The association between programming and wizardry is a long one. And the association between programmers and snarky responses is even longer.
Programmers shape the world we view through our screens and create new realities seemingly out of thin air. They realize that the boundaries of the virtual world are artificially constructed. They either implement the rules passed down by kings or subvert them as they choose. They perform feats by mastering the arcane languages.
The power of King Arthur depends on external factors: his fame, wealth, political clout, and societal recognition of his authority. The power that Merlin has is intrinsic.
Of course, even if my response had been “King Arthur,” I still would have become a programmer. Software engineers giving single‐question personality tests to teenagers is no basis for career determination, just like yanking a sword out of a rock doesn't make you a king.
Myths About Programmers
Let's be honest: Many aspiring programmers get interested in the field tempted by big paychecks, job security, great benefits, and favorable working conditions. These things are all nice, to be sure. But getting hundreds of thousands of dollars a year from a big‐name company is far more challenging than most programming bootcamps would have you believe. Also very common (but less lauded in the media) are entry‐level programmers working long hours for small companies, nonprofits, and start‐ups whose funding allows them a runway measured in months.
As a programmer you will experience both good times and bad times. Times when you are working from your couch on very easy and enjoyable projects for lots of money. And times when you are, perhaps volunteering (or working for so little in return that it's essentially volunteering), on stressful projects in an office with a long commute and a strict dress code.
So, what really differentiates programmers and nonprogrammers? The people who stick it out and have long, happy careers, and the ones who give up in frustration? I want to address a few industry misconceptions about what's “required” to be a programmer:
- They Are Very Smart I can't blame you if you think that programmers need to be very smart, based on typical media depictions of programmers. Programmers are not required to be geniuses, or even to be particularly nerdy.
For the vast majority of you learning to program, there are going to be certain problems you're not going to understand right away, certain concepts you're just not going to get. And these have nothing to do with some fundamental deficiency in your brain.
Programming is a marathon, not a sprint. Determination and consistency with always be more valuable in programing than genius.
- They Work Very Hard This stereotype is shifting somewhat thanks to an increase in remote work and contract jobs available for programmers. However, there is still a perception that programmers are glued to their computers all day, every day, working insane hours under lots of pressure to fix a bug or add a feature.
There is also the complicating factor that it can be difficult to estimate how much time is required to add a feature or fix a bug. If you are working for a small and/or mismanaged company, you may occasionally find yourself in a situation where a feature is required to be added by a certain deadline; complications arise, ballooning the hours required to add it; and you are the only one who can rescue the project.
But this is not a common situation, and if you find yourself doing this more than once or perhaps twice a year, consider finding new employment. In general, working as a programmer is the same as working anywhere else; in a well‐managed company with good work‐life balance, the hours are about the same as they are for any other profession.
- Programmers do sometimes face pressure at “FAANG” companies: Facebook, Apple, Amazon, Netflix, and Google.1 Depending on your team, company, position, and the current politics and/or economic environment, you may find yourself coasting into an easy retirement or under constant pressure to perform at the threat of losing your job. I have heard many versions of both stories, even from employees within the same company! But, again, a high‐stress job is not a given, even at a large and competitive company while getting a large paycheck.
- They Have Meticulous Attention to Detail If a program is off by even a single character, it will not perform as expected. No typos or errant logic is allowed. Even an insignificant‐seeming bug can bring down a system that people's lives depend on.
Technically, the above is all true. However, it's also a very disingenuous view of the realities of modern programming. For starters, we have software that finds and highlights errors as we write the code (for more information, see Chapter 12, “Writing Cleaner Code”). It's somewhat difficult to make a simple syntax error or to forget a character—the code must still be syntactically valid in order for it to run at all. At the very least, you should probably make sure it runs—not that it produces the correct output but merely runs at all—before it goes anywhere important.
Programs are usually run in various testing environments over many scenarios. New features get multiple stages of testing and review before they go to production. And that's just for the code that doesn't have any lives depending on it!
I know many meticulous, detail‐oriented programmers. But to be honest, I don't know anyone who would describe me similarly.
The great thing about computers is that, when something does go wrong, it will tell you what went wrong and where (at least to some extent). You see an error message, a stack trace, or at least an output that's different than what you were expecting. Nothing blows up, nobody dies, you're just sitting there at your computer with a puzzle to solve and something to fix.
Can extreme conscientiousness be an asset in programming? Absolutely! Is it required? Not at all.
- They Are Good at Math The nice thing about computers is that they do the math for you. If you frequently find yourself struggling with arithmetic, you can rest assured that “mental math” has no bearing on programming aptitude.
However, there is one intersection between programming and...
| Erscheint lt. Verlag | 22.5.2025 |
|---|---|
| Sprache | englisch |
| Themenwelt | Informatik ► Programmiersprachen / -werkzeuge ► Python |
| Schlagworte | beginning python • beginning python guide • is python easy? • is python hard? • Learning Python • learn python • learn python 3e • python 3e guide • python coding • python coding guide • python practice projects • Python programming • Python programming guide |
| ISBN-10 | 1-394-28850-6 / 1394288506 |
| ISBN-13 | 978-1-394-28850-2 / 9781394288502 |
| Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
| Haben Sie eine Frage zum Produkt? |
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich