How to change anybody proven techniques
معرفی کتاب «How to change anybody proven techniques» نوشتهٔ Paris Buttfield-Addison، Jonathan Manning و Lieberman, David J، منتشرشده توسط نشر 2011 در سال 2011. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
**What will you learn from this book?** Apple’s new modern programming language, Swift, is slowly becoming the "go to" language for iOS and OS X development. The language will attract existing developers because of its modern features and prototyping tools, and it will attract new developers because of its less-steep learning curve. That said, Swift is deep, and contains many advanced concepts, constructs, and patterns. Developers need a way to learn these new features and understand them in context. Head First is an effective vehicle for this level of teaching, and __Head First Swift__ is no exception. **Why does this book look so different?** Based on the latest research in cognitive science and learning theory, __Head First Swift__ uses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works. Authors of Head First Swift Table of Contents (the real thing) how to use this book: Intro Who is this book for? Who should probably back away from this book? We know what you’re thinking We know what your brain is thinking Metacognition: thinking about thinking Here’s what WE did Here’s what YOU can do to bend your brain into submission Read me The technical review team O’Reilly Online Learning Acknowledgments 1. Introducing Swift: Apps, Systems, and Beyond! Swift is a language for everything The swift evolution of Swift Swift into the future How you’re going to write Swift The path you’ll be taking Getting Playgrounds Downloading and installing Playgrounds on macOS Creating a Playground Using a Playground to code Swift Basic building blocks A Swift example Here’s what you need to build The print function 1 Building a list of ingredients 2 Picking four random ingredients 3 Displaying our random pizza Congrats on your first steps with Swift! Swiftcross Swiftcross Solution 2. Swift by Name: Swift by Nature Building from the blocks Basic operators Operating swiftly with mathematics Express yourself Expressing yourself Names and types: peas in a pod Not all data is numbers These are all types Swift Safety Stringing things along with types Who am I? String interpolation Swiftcross Swiftcross Solution Who am I Solution? 3. Collecting and Controlling: Going Loopy for Data Sorting pizzas Swift collection types Collecting values in an array How big is that array, exactly? Is it empty? Collecting values in a set Collecting values in a dictionary Tuples Everyone needs a good alias Control flow statements if statements switch statements Building a switch statement Start with the switch keyword Range operators More complex switch statements Getting repetitive with loops Building a for loop Building a while loop Building a repeat-while loop Solving the pizza-sorting problem Phew, that’s a lot of Swift! Code Magnets Pool Puzzle BE the Swift Compiler Swiftcross Code Magnets Solution Pool Puzzle Solution BE the Swift Compiler Solution Swiftcross Solution 4. Functions and Enums: Reusing Code on Demand Functions in Swift let you reuse code What can functions do? Built-in functions What can we learn from built-in functions? Improving the situation with a function Writing the body of the function Using functions Functions deal in values Many happy returns (from your functions) But Swift is meant to make things simple... A variable number of parameters Fireside Chats What can you pass to a function? Every function has a type Function types as parameter types Multiple return types Fireside Chats Functions don’t have to stand alone Nested functions Switching with enums Functioncross Functioncross Solution 5. Closures: Fancy, Flexible Functions Meet the humble closure Closures are better with parameters Boiling it all down to something useful The problem The solution Reducing with closures Capturing values from the enclosing scope What came first, the function or the closure? Escaping closures: the contrived example Autoclosures provide flexibility The situation The problem The solution Shorthand argument names Closurecross BE the Swift Compiler Closurecross Solution BE the Swift Compiler Solution 6. Structures, Properties, and Methods: Custom Types and Beyond Let’s make a pizza, in all its glory... A Pizza struct Under the hood... The initializer behaves just like a function Access control and structs Methods inside structures Changing properties using methods Computed properties Creating a property observer Code Magnets Getters and setters for computed properties Implementing a setter Swift Strings are actually structs The case for lazy properties Using lazy properties Structcross Structcross Solution Code Magnets Solution 7. Classes, Actors, and Inheritance: Inheritance Is Always a Thing A struct by any other name (that name: a class) Inheritance and classes Replacing Overriding methods Here’s our Plant class: Here’s our Succulent child class, overriding a method of the parent: Under the hood... Final classes Automatic reference counting Mutability Beware Swift Safety Fireside Chats BE the Swift Compiler Pool Puzzle Classcross Pool Puzzle Solution BE the Swift Compiler Solution Classcross Solution 8. Protocols and Extensions: A Swift Lesson in Protocol The Robot Factory The problem: A solution: Protocol inheritance Mutating methods Protocol types and collections Computed properties in extensions Useful extensions and you Adding an initializer (with an extension) Extending a protocol Useful protocols and you Protocol composition Conforming to Swift’s protocols Sequences Conforming to Sequence and IteratorProtocol: Using your new sequence: Equatable The problem Conforming to Equatable: Implementing == Code Magnets Protocolcross BE the Swift Compiler Code Magnets Solution Protocolcross Solution BE the Swift Compiler Solution 9. Optionals, Unwrapping, Generics, and More: Nothing Optional About It Optionals Exposed Dealing with something that’s missing The problem Why you might need an optional The struct for Josh is good, it represents Josh reasonably well: Josh is named “Josh”, and they’ve consumed 5 coffees. But the struct for Tom doesn’t really represent them. They haven’t really consumed 0 coffees; they don’t drink it at all. Optionals and handling missing data A Person Alex and Tom Unwrapping optionals Unwrapping optionals with guard Using guard let to unwrap an optional: Force unwrapping Swift Safety BE the Swift Compiler Swift Safety Generics Queue requirements A queue with generics Here’s our new Queue type Using your Queue Optionalcross Optionalcross Solution BE the Swift Compiler Solution 10. Getting Started With Swiftui: User Interfaces...Swiftly What’s a UI framework, anyway? Your first SwiftUI UI UI building blocks Making a list, checking it...quite a few times, to get it perfect User interfaces with state Buttons are for pressing Let’s see how far you’ve come Customizing your views with modifiers Using view modifiers: Order matters (sometimes): Create a new SwiftUI Xcode project, for iOS Your Xcode will look something like this Create a new type to store a todo item in Make sure each todo item can be uniquely identified Create a user interface for the app What’s going on in this user interface? Create a user interface for the app, continued, continued Making the List actually list todos Test Drive Implement a way to save the list of todos So, that’s a UI framework? SwiftUIcross Pool Puzzle BE the Swift Compiler SwiftUIcross Solution Pool Puzzle Solution BE the Swift Compiler Solution 11. Putting Swiftui into Practice: Circles, Timers, Buttons—Oh My! What fancy things can be done with a UI framework? Create a new SwiftUI Xcode project, for iOS The Executive Timer UI and features This is what our Executive Timer UI will look like, and do: And this is what the UI will look like in the various different states: Creating the basic elements of the app Pieces of the UI Setting up the UI of the Executive Timer Coding the pieces of the UI 1 Coding the gray circle 2 Coding the gray circle 3 Coding the time and buttons Combining the three elements The finishing touches Test Drive Tabbed views for a clean UI 1 Create however many different views you need (to live in tabs) 2 Build a TabView containing your views The resulting tabs If you created three views, and a TabView containing them, you might end up here: Creating a new tabbed ContentView Creating the tabs and the TabView 1 Create an empty TimerSettingsView view 2 Add the second tab to the TabView in the ContentView We’re basically done! The Executive Timer now has tabs: Running your new tabbed Executive Timer SwiftUIcross SwiftUIcross Solution 12. Apps, web, and Beyond: Putting It All Together A journey must end... A recipe for a welcome screen Step by step assembly of the welcome screen Smash Share the state It’s time for our old friend... Here’s a type that represents the score of a game: Here’s some views that use our class: Building an app with multiple views that share state Here’s the first view of our hypothetical app: Here’s the second view of our hypothetical app: Building a two-view score tracker Here’s what we’ll need to do: The ObservableObject The first view The second view The first view, again A fancy AsyncImage Like this: We do this: Meet Vapor, the Swift web framework 1 You can make a new Vapor project with the following command: 2 Change into the Vapor project’s directory with this command: 3 Then run this to open the new Vapor project in Xcode: Sending data over the web with Vapor 1 Create a new closure, with a dynamic parameter: 2 Add a guard let to unwrap the optional parameter: 3 Return what you need to return 4 Visit your new URL SwiftUIcross SwiftUIcross SwiftUIcross Solution Index What will you learn from this book?Swift is best known as Apple's programming language of choice for developing apps on iOS, iPadOS, macOS, watchOS, and tvOS. But it's far more versatile than that. Open source Swift is also gaining ground as a language for systems programming and server-side code, and it runs on Linux and Windows. So where do you start? With Head First Swift, you'll explore from the ground up: from collecting and controlling data to reusing code, producing custom data types, and structuring programs and user interfaces with SwiftUI by building safe, protocol-driven code. With Swift under your belt, you'll be ready to build everything from mobile and web apps to games, frameworks, command-line tools, and beyond.What's so special about this book?If you've read a Head First book, you know what to expect--a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. With this book, you'll learn Swift through a multisensory experience that engages your mind rather than a text-heavy approach that puts you to sleep. What will you learn from this book? Swift is best known as Apple's programming language of choice for developing apps on iOS, iPadOS, macOS, watchOS, and tvOS. But it's far more versatile than that. Open source Swift is also gaining ground as a language for systems programming and server-side code, and it runs on Linux and Windows. So where do you start? With Head First Swift , you'll explore from the ground from collecting and controlling data to reusing code, producing custom data types, and structuring programs and user interfaces with SwiftUI by building safe, protocol-driven code. With Swift under your belt, you'll be ready to build everything from mobile and web apps to games, frameworks, command-line tools, and beyond. What's so special about this book? If you've read a Head First book, you know what to expect--a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. With this book, you'll learn Swift through a multisensory experience that engages your mind rather than a text-heavy approach that puts you to sleep. Head First Swift Swift is a programming language you can rely on. A language you can present to the family. Safe, reliable, speedy, friendly, easy to talk to, it's the language of choice for Apple's platforms-iOS, macOS, watchOS, and tvOS. But open source Swift also runs on Linux as well as the server, and it's gaining ground in scientific computing and web apps. Swift for Windows is even in the works. You can build everything from mobile apps to games, web apps, frameworks, and beyond. So jump in and get started! What's so special about this book? If you've read a Head First book, you know what to expect-a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. With this book, you'll learn Swift through a multisensory experience that engages your mind rather than a text-heavy approach that puts you to sleep "Apple's new modern programming language, Swift, is slowly becoming the "go to" language for iOS and OS X development. The language will attract existing developers because of its modern features and prototyping tools, and it will attract new developers because of its less-steep learning curve. That said, Swift is deep, and contains many advanced concepts, constructs, and patterns."-- From publisher's description
دانلود کتاب How to change anybody proven techniques