
Coding All-in-One For Dummies
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Adding some coding know-how to your skills can help launch a new career or bolster an old one. Coding All-in-One For Dummies offers an ideal starting place for learning the languages that make technology go. This edition gets you started with a helpful explanation of how coding works and how it's applied in the real-world before setting you on a path toward writing code for web building, mobile application development, and data analysis. Add coding to your skillset for your existing career, or begin the exciting transition into life as a professional developer--Dummies makes it easy.
* Learn coding basics and how to apply them
* Analyze data and automate routine tasks on the job
* Get the foundation you need to launch a career as a coder
* Add HTML, JavaScript, and Python know-how to your resume
This book serves up insight on the basics of coding, designed to be easy to follow, even if you've never written a line of code in your life. You can do this.
More details
Other editions
Additional editions

Person
Content
Book 1: Getting Started with Coding 5
Chapter 1: What Is Coding? 7
Chapter 2: Programming for the Web 19
Chapter 3: Becoming a Programmer 33
Book 2: Basic Web Coding 43
Chapter 1: Exploring Basic HTML 45
Chapter 2: Getting More Out of HTML 63
Chapter 3: Getting Stylish with CSS 79
Chapter 4: Next Steps with CSS 101
Chapter 5: Responsive Layouts with Flexbox 123
Chapter 6: Styling with Bootstrap 143
Book 3: Advanced Web Coding 159
Chapter 1: What Is JavaScript? 161
Chapter 2: Writing Your First JavaScript Program 173
Chapter 3: Working with Variables 193
Chapter 4: Understanding Arrays 211
Chapter 5: Working with Operators, Expressions, and Statements 225
Chapter 6: Getting into the Flow with Loops and Branches 241
Chapter 7: Getting Functional 255
Chapter 8: Making and Using Objects 275
Chapter 9: Controlling the Browser with the Window Object 291
Chapter 10: Manipulating Documents with the DOM 307
Chapter 11: Using Events in JavaScript 327
Chapter 12: Integrating Input and Output 339
Chapter 13: Understanding Callbacks and Closures 355
Chapter 14: Embracing AJAX and JSON 367
Book 4: Creating Mobile Apps 383
Chapter 1: What Is Flutter? 385
Chapter 2: Setting Up Your Computer for Mobile App Development. 401
Chapter 3: "Hello" from Flutter 433
Chapter 4: Hello Again 469
Chapter 5: Making Things Happen 495
Chapter 6: Laying Things Out 527
Chapter 7: Interacting with the User 567
Chapter 8: Navigation, Lists, and Other Goodies 605
Chapter 9: Moving Right Along 653
Book 5: Getting Started with Python 675
Chapter 1: Wrapping Your Head around Python 677
Chapter 2: Installing a Python Distribution 689
Chapter 3: Working with Real Data 707
Book 6: Data Analysis with Python 729
Chapter 1: Conditioning Your Data 731
Chapter 2: Shaping Data 759
Chapter 3: Getting a Crash Course in MatPlotLib 779
Chapter 4: Visualizing the Data 795
Book 7: Career Building with Coding 813
Chapter 1: Exploring Coding Career Paths 815
Chapter 2: Exploring Undergraduate and Graduate Degrees 829
Chapter 3: Training on the Job 843
Chapter 4: Coding Career Myths 853
Index 861
Chapter 1
What Is Coding?
IN THIS CHAPTER
Seeing what code is and what it can do
Touring your first program using code
Understanding programming languages used to write code
"A million dollars isn't cool, you know what's cool? A billion dollars."
- SEAN PARKER, THE SOCIAL NETWORK
Every week the newspapers report on another technology company that has raised capital or sold for millions of dollars. Sometimes, in the case of companies like Zoom, Coinbase, and Squarespace, the amount in the headline is for billions of dollars. These articles may pique your curiosity, and you may want to see how code is used to build the applications that experience these financial outcomes. Alternatively, your interests may lie closer to work. Perhaps you work in an industry in decline or in a function that technology is rapidly changing. Whether you are thinking about switching to a new career or improving your current career, understanding computer programming or "coding" can help with your professional development. Finally, your interest may be more personal - perhaps you have an idea, a burning desire to create something, a website or an app, to solve a problem you have experienced, and you know reading and writing code is the first step to building your solution. Whatever your motivation, this book will shed light on coding and programmers, and help you think of both not as mysterious and complex but approachable and something you can do yourself.
In this chapter, you will understand what code is, what industries are affected by computer software, the different types of programming languages used to write code, and take a tour of a web app built with code.
Defining What Code Is
Computer code is not a cryptic activity reserved for geniuses and oracles. In fact, in a few minutes you will be writing some computer code yourself! Most computer code performs a range of tasks in our lives from the mundane to the extraordinary. Code runs our traffic lights and pedestrian signals, the elevators in our buildings, the cell phone towers that transmit our phone signals, and the space ships headed for outer space. We also interact with code on a more personal level, on our phones and computers, and usually to check email or the weather.
Following instructions
Computer code is a set of statements, like sentences in English, and each statement directs the computer to perform a single step or instruction. Each of these steps is very precise, and followed to the letter. For example, if you are in a restaurant and ask a waiter to direct you to the restroom, they might say, "head to the back, and try the middle door." To a computer, these directions are so vague as to be unusable. Instead, if the waiter gave instructions to you as if you were a computer program they might say, "From this table, walk northeast for 40 paces. Then turn right 90 degrees, walk 5 paces, turn left 90 degrees, and walk 5 paces. Open the door directly in front of you, and enter the restroom." Figure 1-1 shows lines of code from the popular game, Pong. Do not worry about trying to understand what every single line does, or feel intimated. You will soon be reading and writing your own code.
FIGURE 1-1: Computer code from the game Pong.
One rough way to measure a program's complexity is to count its statements or lines of code. Basic applications like the Pong game have 5,000 lines of code, while more complex applications like Facebook currently have over 10 million lines of code. Whether few or many lines of code, the computer follows each instruction exactly and effortlessly, never tiring like the waiter might when asked for the 100th time for the location of the restroom.
Be careful of only using lines of code as a measure for a program's complexity. Just like when writing in English, 100 well written lines of code can perform the same functionality as 1,000 poorly written lines of code.
Writing code with some Angry Birds
If you have never written code before, now is your chance to try! Go to https://hourofcode.com/us/learn and under the "Beginners" heading, scroll down (or use the search box) to find the "Write Your First Computer Program" link with the Angry Birds icon, as shown in Figure 1-2. This tutorial is meant for those with no previous computer programming experience, and it introduces the basic building blocks used by all computer programs. The most important take-away from the tutorial is to understand that computer programs use code to literally and exactly tell the computer to execute a set of instructions.
© John Wiley & Sons
FIGURE 1-2: Write your first computer program with a game-like tutorial using Angry Birds.
The Hour of Code is an annual program dedicated to elevating the profile of computer science during one week in December. In the past, President Obama, Bill Gates, basketball player Stephen Curry, singer Shakira, and even your humble author of this book have supported and encouraged people from the United States and around the world to participate.
Understanding What Coding Can Do for You
Coding can be used to perform tasks and solve problems that you experience every day. The "everyday" situations in which programs or apps can provide assistance continues to grow at an exponential pace, but this was not always the case. The rise of web applications, Internet connectivity, and mobile phones have inserted software programs into daily life and lowered the barrier for you to become a creator, solving personal and professional problems with code.
Eating the world with software
In 2011, Marc Andreessen, creator of one of the first web browsers, Netscape Navigator, and now a venture capitalist, noted that "software is eating the world." He predicted that software companies would disrupt existing companies at a rapid pace. Traditionally, code powered software used on desktops and laptops. The software had to first be installed, and then you had to supply data to the program. Three trends have dramatically increased the use of code in everyday life:
- Web-based software: This software operates in the browser without requiring installation. For example, if you wanted to check your email, you previously had to install an email client either by downloading the software or from a CD-ROM. Sometimes, issues arose when the software was not available for your operating system, or conflicted with your operating system version. Hotmail, a web-based email client, rose to popularity, in part, because it allowed users visiting
www.hotmail.comto instantly check their email without worrying about installation or software compatibility. Web applications increased consumer appetite to try more applications, and developers in turn were incentivized to write more applications. - Internet broadband connectivity: Broadband connectivity has increased, providing a fast Internet connection to more people in the last few years than in the previous decade. Today, more than two billion people can access web-based software, up from approximately 50 million only a decade ago.
- Mobile phones: Today's smartphones bring programs with you wherever you go and help supply data to programs. Many software programs became more useful when accessed on-the-go than when limited to a desktop computer. For instance, use of maps applications greatly increased thanks to mobile phones because users need directions the most when lost, not just when planning a trip at home on the computer. In addition, mobile phones are equipped with sensors that measure and supply data to programs like orientation, acceleration, and current location through GPS. Now instead of having to input all the data to programs yourself, mobile devices can help. For instance, a fitness application like Runkeeper does not require you to input start and end times to keep track of your runs. You can press start at the beginning of your run, and the phone will automatically track your distance, speed, and time.
The combination of these trends have created software companies that have upended incumbents in almost every industry, especially ones typically immune to technology. Some notable examples include:
- Airbnb: Airbnb is a peer-to-peer lodging company that owns no rooms, yet books more nights than the Hilton and Intercontinental, the largest hotel chains in the world. (See Figure 1-3.)
- Uber: Uber is a car transportation company that owns no vehicles, books more trips, and has more drivers in the largest 200 cities than any other car or taxi service.
- Groupon: Groupon, the daily deals company, generated almost $1 billion after just two years in business, growing faster than any other company in history, let alone any other traditional direct marketing company.
© John Wiley & Sons
FIGURE 1-3: Airbnb booked 5 million nights after 3.5 years, and its next 5 million nights 6 months later.
Coding on the job
Coding can be useful in the workplace as well. Outside the technology sector, coding in the workplace is common for some professions like financial traders, economists, and scientists....
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.