Search found 1000 matches

Author Message

Программист

Post 14-Sep-2021 13:55

[Quote]

Fundamentals of Computer Programming with C# / Изучаем основы программирования с языком C# (C Sharp)
Год издания: 2013
Автор: Svetlin Nakov and Team / Светлин Наков и команда (В проекте приняли участие более 70 человек: авторы, редакторы, переводчики и др.)
Переводчик: Svetlin Nakov and Team
Жанр или тематика: C Sharp, CSharp
Издательство: Faber, Veliko Tarnovo, Bulgaria, 2013
ISBN: 978-954-400-773-7
Язык: Английский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 1122
Описание:
Эта книга создана разработчиками-добровольцами из Болгарии, которые хотят поделиться своими знаниями и навыками в области программирования. Они работали в течение нескольких месяцев (некоторые лет) бесплатно, чтобы помочь сообществу изучать программирование, структуры данных и алгоритмы простым и эффективным способом: с помощью этой книги, презентаций и видеоуроков, прилагаемых к ней.
В написании данной книги приняли участие более 70 человек: авторы, редакторы, переводчики и др.
Почему стоит выбрать нашу книгу по C#?
Наша книга по C# учит точному, алгоритмическому, аналитическому и логическому мышлению. Программирование - это искусство, которое необходимо глубоко освоить. Недостаточно изучить язык C# или API .NET Framework. Недостаточно выучить PHP и MySQL, чтобы кодировать тонны веб-сайтов. Если вы хотите быть хорошим программистом, вы должны обладать глубокими знаниями о структурах данных, алгоритмах, компьютерных архитектурах, операционных системах, базах данных, веб-технологиях и так далее. Язык программирования - это последнее, о чем нужно думать. Хорошие программисты легко пишут на всех языках, и когда они берут хорошую книгу по C#, им требуется мало времени, чтобы его изучить. Есть много книг по C# и много книг о .NET и программировании. Однако наша книга по C# отличается. Это книга о программировании в первую очередь и только потом уже о C#. Это книга не заставляет вас заучивать синтаксис C# без программирования.
Что делает эту книгу уникальной, так это ее содержание. Немногие книги учат качественному программированию, структурам данных и алгоритмам. Наша книга о программировании на C# учит фундаментальным концепциям программирования, которые существенно не изменились за последние 15 лет. Она освещает вечные парадигмы, концепции и знания, которые работают спустя десятилетия после того, как они были придуманы и описаны. Существует множество книг по программированию, в которых описывается синтаксис данного языка программирования, и ничего более. Наша работа над «книгой по программированию» учит концепциям, принципам, методологии решения проблем программирования и высококачественному программному коду. Немногие книги обращают внимание на код. Когда я вижу в книге «Button1» и «Button1_Click», я понимаю, что автор этой книги не является опытным инженером-программистом, и эта книга - следующий дешевый текст в красивой обложке. Не заблуждайтесь, хорошие книги по программированию учат мышлению, рассуждениям и принципам программирования, а не тому, как разместить кнопку в форме и оставить ее имя по умолчанию (например, Button2).
Первые шаги в программировании на C#
Наша книга о программировании на C# начинается с основ программирования: что такое компьютер, что такое компилятор, что такое среда разработки, как работает .NET, как работает C#, что такое переменные, каковы значения переменных, какие литералы есть в C#, какие примитивные типы данных есть в C#, как использовать операторы, различные типы операторов в C#, как мы можем извлекать и вставлять данные в консоль, как организовать логику программирования с помощью условных конструкций в C#, как организовать повторяющееся выполнение программных фрагментов через конструкции цикла, как использовать массивы для хранения строки элементов. Первые шаги в программировании соответствуют первому уровню курса «Основы C#» в Университете Software University (SoftUni), который ведется по этой книге.
Более сложные концепции программирования на C#
После основ программирования, мы обращаем внимание на некоторые сложные концепции: нотацию, рекурсию, объектно-ориентированное программирование на C#, классы и объекты в .NET Framework, обработку исключений на языке C#, обработку текста и изображений, работа с файлами через C# и т. д. Эта часть книги о C# соответствует второму уровню курса «Основы C#» в Software University (SoftUni).
Сложные структуры данных, алгоритмы и имплементации C#
В конце книги C# рассматриваются наиболее сложные концепции основ программирования: структуры данных и имплементации на C# и на платформе .NET. Мы изучим линейные структуры данных и их имплементацию в .NET Framework, структуры списков, связанный список, динамический саморастягивающийся массив, стек, хвост, колоду, деревья, бинарные деревья, сбалансированные деревья, черные и красные деревья, B-деревья (Б-деревья), графы, ориентированные, дезориентированные и взвешенные графы. Мы изучим классические алгоритмы сканирования данных древовидной структуры: поиск в ширину (BFS), поиск в глубину (DFS) и некоторые алгоритмы на графах. Затем мы рассмотрим словарь структур данных, ассоциативный массив и множество и их реализации в .NET. Мы уделяем особое внимание хэш-таблицам и их реализациям, изучаем некоторые алгоритмы хеширования, разрешения коллизий и некоторые особенности с хеш-таблицами в .NET и C #. Мы сравниваем основные структуры данных в программировании и анализируем их эффективность с точки зрения основных операций, таких как поиск, вставка, удаление и т. д. Мы изучим важные концепции объектно-ориентированного программирования, такие как абстракция, инкапсуляция, наследование и полиморфизм. Мы дадим рекомендации по написанию качественного программного кода и по эффективному решению проблем программирования с акцентом на тестирование всех возможных сценариев, исходящих от этих проблем. Эта часть книги о C# соответствует третьему уровню курса «Основы C#» в Университете Software University (SoftUni) - ведущей академии инженеров-программистов.
Это книга о программировании на C#?
Спорный вопрос, в какой степени наша книга по C# является книгой по C#, а в какой - по программированию. По правде говоря, она одновременно научит вас двум вещам: языку C#, его синтаксису, программным конструкциям и объектно-ориентированному программированию. Она также учит вас программированию, концепция и принципам - как мыслить алгоритмически, как решать проблемы, как писать качественный код, придумывать алгоритмы, реализовывать их на C# и как потом их тестировать, чтобы убедиться, что они верны.
Можно прочитать всю эту книгу онлайн бесплатно на сайте автора (на сайте к каждой главе книги прилагаются видео и диаграммы мозговых карт): https://introprogramming.info/english-intro-csharp-book/read-online/chapter-1-int...-to-programming/
Предисловие к данной книге читать онлайн (краткое описание глав, краткая информация об авторах книги): https://introprogramming.info/english-intro-csharp-book/read-online/chapter-preface/

Ссылки на все видео с Youtube к каждой главе книги (взяты с сайта автора) / Youtube video for each chapter of this book:

Chapter 1. Introduction to Programming: https://youtu.be/PGNqqhIkKGQ
Chapter 2. Primitive Types and Variables: https://youtu.be/HtVDL0d6oVw
Chapter 3. Operators and Expressions: https://youtu.be/1gGfaJ3ZDg0?list=PL28CA7A1B33CBEE50
Chapter 4. Console Input and Output: https://youtu.be/ZO5WFLuGnKM
Chapter 5. Conditional Statements: https://youtu.be/7WHhMcIWVf4?list=PL28CA7A1B33CBEE50
Chapter 6. Loops: https://youtu.be/t5nJGsdTWQA
Chapter 7. Arrays: 1 видео: https://youtu.be/WgGevr0BgxE , 2 видео: https://youtu.be/5EuFyvgyNSg?list=PL28CA7A1B33CBEE50
Chapter 8. Numeral Systems: https://youtu.be/vp-POPg6JRc?list=PL28CA7A1B33CBEE50
Chapter 9. Methods: https://youtu.be/EGZ5lVaaYAQ?list=PL28CA7A1B33CBEE50
Chapter 10. Recursion: https://youtu.be/pLqU0XMvohE?list=PL28CA7A1B33CBEE50
Chapter 11. Creating and Using Objects: https://youtu.be/d6_6432NJ4U
Chapter 12. Exception Handling: https://youtu.be/itkB-Xv6O-0?list=PL28CA7A1B33CBEE50
Chapter 13. Strings and Text Processing: https://youtu.be/L2jT0F3s3cw
Chapter 14. Defining Classes: https://youtu.be/_AWfN3ph11c?list=PL28CA7A1B33CBEE50
Chapter 15. Text Files: https://youtu.be/Al_GYP7QNEc?list=PL28CA7A1B33CBEE50
Chapter 16. Linear Data Structures: https://youtu.be/zy1Ps2yPY0Q?list=PL28CA7A1B33CBEE50
Chapter 17. Trees and Graphs: https://youtu.be/CR0ndQ3rzIk?list=PL28CA7A1B33CBEE50
Chapter 18. Dictionaries, Hash-Tables and Sets: https://youtu.be/cIhvaZc40YY
Chapter 19. Data Structures and Algorithm Complexity: https://youtu.be/uqHQtmhXV50
Chapter 20. Object-Oriented Programming Principles: https://youtu.be/DdUSzJ8taMs?list=PL28CA7A1B33CBEE50
Chapter 21. High-Quality Programming Code: 1 видео: https://youtu.be/egTEOSa2e5Y , 2 видео: https://youtu.be/a9b2dFGXOcE
Chapter 22. Lambda Expressions and LINQ: https://youtu.be/-cCB9Lt2hxg
Chapter 23. Methodology of Problem Solving: https://youtu.be/XHGrWJSSb74

Оригинальное описание на английском языке / Original description of this book in English:

C# Book
Lots of people are looking for a good book about C# in English. They want to learn the C# language and start coding. We wrote an original “C# book”, a book about programming and developing the thinking process. It is an excellent starting point for every beginning software engineer and future .NET / C# programmer.
How to Choose a Book about C#?
If you are wondering how to choose a C# book, first answer the question, “Why am I looking for C#?” If the answer is, “I’ve been programming in Java or in PHP for five years and I want to learn C#”, maybe you will need a book about C#, which in brief explains the basic constructions in the language, object-oriented programming (OOP) and some syntax specifics. If you, however, are a beginning programmer and want to learn to code and you are already aware of the C# language, you will need a more serious book about C# programming, as well as a course in C# programming, a textbook in C# programming or video lessons in C# programming. My advice is: First learn to code and then you will easily change languages and technologies.
Why Choose Our C# Book?
There are a lot of C# books (books about the “C sharp” language) and there are a lot of books about .NET and programming. Our C# book is different, though. It is a book about programming and in-between about C#. It’s not a book about C# and in-between about programming. Our C# book teaches accurate, algorithmic, analytical, logical thinking. Programming is an art which must be mastered in depth. It’s not enough to learn the C# language or .NET Framework APIs. It’s not enough to learn PHP and MySQL to code tons of web sites. If you want to be a good programmer, you must possess in-depth knowledge about data structures, algorithms, computer architectures, operational systems, data bases, web technologies, etc. The programming language is the last thing to think about. The good programmers write with ease in all languages and when they take a good C# book, they quickly learn to program with C#.
Book C# Programming
What makes this book unique is its content. Few books teach quality programming, data structures and algorithms. Our book about C# programming teaches fundamental concepts in computer programming, which haven’t changed significantly in the last 15 years. It shows the eternal paradigms, concepts and knowledge which are valid decades after they have been thought up and described. There a lot of books about programming which describe the syntax of a given programming language and nothing more. Our work on a “programming book” teaches concepts, principles, methodology for programming problem solving and high-quality programming code. Few books pay attention to the code. When I see “Button1” and “Button1_Click”, I understand the author is not an experienced software engineer and the book is the next cheap writing in a luxury wrapping. Don’t get misled, the good books about programming teach thinking, reasoning and programming principles and not how to place a button in the form and to leave its name by default (for example Button2).
C# Book
Here is our book about C# programming. It includes basic concepts in programming and fundamental C# elements.
First Steps in Programming with C#
Our book about C# programming starts with the fundamentals of programming: what a computer is, what a compiler is, what a development environment is, how .NET works, how C# works, what variables are, what the variable values are, what C# literals are, what primitive types of data are in C#, how to use operators, different types of operators in C#, how we can take out and insert data in the console, how to organize the programming logics through conditional constructions in C#, how to organize a repetitive execution programming fragments through cycle constructions, how to use arrays for storing a string of elements. The first steps in programming correspond to the first level of the “C# Fundamentals” course at the Software University (SoftUni), which is based on the C# book.
More Complicated Concepts in C# Programming
After the basics of programming, in the C# book we pay attention to some complicated concepts: notation, recursion, object-oriented programming with C#, classes and objects in .NET Framework, exceptions processing in the C# language text and images processing and symbol strings with C#, working with files through C#, etc. This part of the book about C# corresponds to the second level of the “C# Fundamentals” course at the Software University (SoftUni).
Complicated Data Structures and Algorithms and C# Implementations
At the end of the C# book, the most complicated concepts of the basics of programming are reviewed: data structures and implementation with C# and in the .NET platform. We look into linear data structures and their implementation in .NET Framework , list structures, linked list , dynamic self-stretching array, stack, tail, deck, trees, binary trees, balanced trees, black and red trees, B-trees, graphs, oriented, disoriented and weighed graphs. We study the classic algorithms for crawling tree-like structure data: breadth first search (BFS), depth-first search (DFS) and some algorithms on graphs. Then we review the data structure dictionary, associative array and multitude and their implementations in .NET. We pay special attention to the hashtables and their implementations, we study some algorithms for hashing, resolving collisions and some specifics with hashtables in .NET and C#. We compare the basic data structures in programming and analyze their effectiveness in terms of basic operations such as searching, inserting, deleting, etc. We look into important concepts of object-oriented programming such as abstraction, encapsulation, inheritance and polymorphism. We give recommendations for writing quality programming code and for effective programming problem solving with focus on testing all possible scenarios, coming from the problem. This part of the book about C# corresponds to the third level of the “C# Fundamentals” course at the Software University (SoftUni) - the leading academy for Software Engineers.
Book C# Programming
It’s debatable to what extent our C# book is a book about C# and to what extent it is a book about programming. The truth is, it will simultaneously teach you two things: the C# language, its syntax, program constructions and OOP. It will also teach you programming as concepts and principles – how to think algorithmically, how to solve problems, how to write quality code, to come up with algorithms, to implement them in C# and how to test them afterwards in order to be sure they are correct.

Примеры страниц

Оглавление


Contents:
Contents .............................................................................................. 2
Detailed Table of Contents .................................................................. 5
Preface .............................................................................................. 13
Chapter 1. Introduction to Programming........................................... 69
Chapter 2. Primitive Types and Variables ........................................ 111
Chapter 3. Operators and Expressions ............................................. 139
Chapter 4. Console Input and Output .............................................. 165
Chapter 5. Conditional Statements .................................................. 195
Chapter 6. Loops ............................................................................. 211
Chapter 7. Arrays ............................................................................ 235
Chapter 8. Numeral Systems ........................................................... 265
Chapter 9. Methods ......................................................................... 293
Chapter 10. Recursion ..................................................................... 351
Chapter 11. Creating and Using Objects .......................................... 385
Chapter 12. Exception Handling ...................................................... 415
Chapter 13. Strings and Text Processing ......................................... 457
Chapter 14. Defining Classes ........................................................... 499
Chapter 15. Text Files ...................................................................... 615
Chapter 16. Linear Data Structures ................................................. 641
Chapter 17. Trees and Graphs ......................................................... 681
Chapter 18. Dictionaries, Hash-Tables and Sets .............................. 727
Chapter 19. Data Structures and Algorithm Complexity .................. 769
Chapter 20. Object-Oriented Programming Principles ..................... 807
Chapter 21. High-Quality Programming Code .................................. 853
Chapter 22. Lambda Expressions and LINQ ..................................... 915
Chapter 23. Methodology of Problem Solving .................................. 935
Chapter 24. Sample Programming Exam – Topic #1 ........................ 985
Chapter 25. Sample Programming Exam – Topic #2 ...................... 1041
Chapter 26. Sample Programming Exam – Topic #3 ...................... 1071
Conclusion ..................................................................................... 1119
Detailed Table of Contents:
Contents..............................................................................................2
Detailed Table of Contents ..................................................................5
Preface..............................................................................................13
About the Book ............................................................................................. 13
C# and .NET Framework ................................................................................ 17
How То Read This Book? ................................................................................ 22
Why Are Data Structures and Algorithms Emphasized? ...................................... 25
Do You Really Want to Become a Programmer?................................................. 26
A Look at the Book’s Contents ........................................................................ 29
History: How Did This Book Come to Be? ......................................................... 38
Authors and Contributors ............................................................................... 40
The Book Is Free of Charge! ........................................................................... 53
Reviews ....................................................................................................... 53
License ........................................................................................................ 63
Resources Coming with the Book..................................................................... 65
Chapter 1. Introduction to Programming...........................................69
In This Chapter ............................................................................................. 69
What Does It Mean "To Program"? .................................................................. 69
Stages in Software Development..................................................................... 71
Our First C# Program .................................................................................... 75
The C# Language and the .NET Platform.......................................................... 79
Visual Studio IDE .......................................................................................... 93
Alternatives to Visual Studio ..........................................................................104
Decompiling Code ........................................................................................104
C# in Linux, iOS and Android.........................................................................107
Other .NET Languages ..................................................................................107
Exercises.....................................................................................................108
Solutions and Guidelines ...............................................................................108
Chapter 2. Primitive Types and Variables ........................................111
In This Chapter ............................................................................................111
What Is a Variable? ......................................................................................111
Data Types..................................................................................................111
Variables.....................................................................................................123
Value and Reference Types............................................................................128
Literals .......................................................................................................131
Exercises.....................................................................................................135
Solutions and Guidelines ...............................................................................136
Chapter 3. Operators and Expressions.............................................139
In This Chapter ............................................................................................139
Operators....................................................................................................139
Type Conversion and Casting.........................................................................152
Expressions .................................................................................................158
Exercises.....................................................................................................160
Solutions and Guidelines ...............................................................................161
Chapter 4. Console Input and Output ..............................................165
In This Chapter ............................................................................................165
What Is the Console?....................................................................................165
Standard Input-Output .................................................................................169
Printing to the Console..................................................................................169
Console Input ..............................................................................................183
Console Input and Output – Examples ............................................................190
Exercises.....................................................................................................192
Solutions and Guidelines ...............................................................................193
Chapter 5. Conditional Statements ..................................................195
In This Chapter ............................................................................................195
Comparison Operators and Boolean Expressions ..............................................195
Conditional Statements "if" and "if-else" .........................................................200
Conditional Statement "switch-case"...............................................................206
Exercises.....................................................................................................208
Solutions and Guidelines ...............................................................................209
Chapter 6. Loops .............................................................................211
In This Chapter ............................................................................................211
What Is a "Loop"? ........................................................................................211
While Loops.................................................................................................211
Do-While Loops............................................................................................216
For Loops ....................................................................................................221
Foreach Loops .............................................................................................225
Nested Loops...............................................................................................226
Exercises.....................................................................................................231
Solutions and Guidelines ...............................................................................233
Chapter 7. Arrays ............................................................................235
In This Chapter ............................................................................................235
What Is an "Array"?......................................................................................235
Declaration and Allocation of Memory for Arrays ..............................................235
Access to the Elements of an Array.................................................................238
Reading an Array from the Console ................................................................241
Detailed Table of Contents 7
Printing an Array to the Console.....................................................................243
Iteration through Elements of an Array ...........................................................244
Multidimensional Arrays ................................................................................246
Arrays of Arrays ...........................................................................................253
Exercises.....................................................................................................257
Solutions and Guidelines ...............................................................................259
Chapter 8. Numeral Systems ...........................................................265
In This Chapter ............................................................................................265
History in a Nutshell .....................................................................................265
Numeral Systems .........................................................................................266
Representation of Numbers ...........................................................................276
Exercises.....................................................................................................289
Solutions and Guidelines ...............................................................................290
Chapter 9. Methods .........................................................................293
In This Chapter ............................................................................................293
Subroutines in Programming..........................................................................293
What Is a "Method"?.....................................................................................293
Why to Use Methods? ...................................................................................294
How to Declare, Implement and Invoke a Method? ...........................................295
Declaring Our Own Method............................................................................295
Implementation (Creation) of Own Method ......................................................300
Invoking a Method........................................................................................301
Parameters in Methods .................................................................................303
Returning a Result from a Method ..................................................................328
Best Practices when Using Methods ................................................................345
Exercises.....................................................................................................347
Solutions and Guidelines ...............................................................................348
Chapter 10. Recursion .....................................................................351
In This Chapter ............................................................................................351
What Is Recursion?.......................................................................................351
Example of Recursion ...................................................................................351
Direct and Indirect Recursion.........................................................................352
Bottom of Recursion .....................................................................................352
Creating Recursive Methods...........................................................................352
Recursive Calculation of Factorial ...................................................................353
Recursion or Iteration?..................................................................................355
Simulation of N Nested Loops ........................................................................356
Which is Better: Recursion or Iteration? ..........................................................362
Using Recursion – Conclusions .......................................................................378
Exercises.....................................................................................................378
Solutions and Guidelines ...............................................................................380
Chapter 11. Creating and Using Objects ..........................................385
In This Chapter ............................................................................................385
Classes and Objects......................................................................................385
Classes in C#...............................................................................................387
Creating and Using Objects ...........................................................................390
Namespaces ................................................................................................405
Exercises.....................................................................................................410
Solutions and Guidelines ...............................................................................412
Chapter 12. Exception Handling ......................................................415
In This Chapter ............................................................................................415
What Is an Exception? ..................................................................................415
Exceptions Hierarchy ....................................................................................424
Throwing and Catching Exceptions .................................................................426
The try-finally Construct................................................................................432
IDisposable and the "using" Statement ...........................................................437
Advantages of Using Exceptions .....................................................................439
Best Practices when Using Exceptions .............................................................445
Exercises.....................................................................................................453
Solutions and Guidelines ...............................................................................454
Chapter 13. Strings and Text Processing .........................................457
In This Chapter ............................................................................................457
Strings........................................................................................................457
Strings Operations........................................................................................462
Constructing Strings: the StringBuilder Class ...................................................480
String Formatting.........................................................................................488
Exercises.....................................................................................................491
Solutions and Guidelines ...............................................................................496
Chapter 14. Defining Classes ...........................................................499
In This Chapter ............................................................................................499
Custom Classes............................................................................................499
Usage of Class and Objects............................................................................502
Organizing Classes in Files and Namespaces ....................................................505
Modifiers and Access Levels (Visibility)............................................................508
Declaring Classes .........................................................................................509
The Reserved Word "this"..............................................................................511
Fields..........................................................................................................512
Methods......................................................................................................518
Accessing Non-Static Data of the Class ...........................................................519
Hiding Fields with Local Variables ...................................................................522
Visibility of Fields and Methods.......................................................................524
Constructors................................................................................................531
Properties ...................................................................................................549
Static Classes and Static Members .................................................................559
Structures ...................................................................................................580
Enumerations ..............................................................................................584
Inner Classes (Nested Classes) ......................................................................590
Generics .....................................................................................................594
Exercises.....................................................................................................610
Solutions and Guidelines ...............................................................................613
Chapter 15. Text Files......................................................................615
In This Chapter ............................................................................................615
Streams ......................................................................................................615
Reading from a Text File ...............................................................................620
Writing to a Text File ....................................................................................628
Input / Output Exception Handling .................................................................630
Text Files – More Examples ...........................................................................631
Exercises.....................................................................................................636
Solutions and Guidelines ...............................................................................638
Chapter 16. Linear Data Structures .................................................641
In This Chapter ............................................................................................641
Abstract Data Structures ...............................................................................641
List Data Structures......................................................................................642
Exercises.....................................................................................................676
Solutions and Guidelines ...............................................................................678
Chapter 17. Trees and Graphs .........................................................681
In This Chapter ............................................................................................681
Tree Data Structures ....................................................................................681
Trees ..........................................................................................................681
Graphs........................................................................................................714
Exercises.....................................................................................................722
Solutions and Guidelines ...............................................................................723
Chapter 18. Dictionaries, Hash-Tables and Sets ..............................727
In This Chapter ............................................................................................727
Dictionary Data Structure..............................................................................727
Hash-Tables ................................................................................................735
The "Set" Data Structure...............................................................................760
Exercises.....................................................................................................765
Solutions and Guidelines ...............................................................................767
Chapter 19. Data Structures and Algorithm Complexity ..................769
In This Chapter ............................................................................................769
Why Are Data Structures So Important?..........................................................769
Algorithm Complexity ...................................................................................770
Comparison between Basic Data Structures .....................................................779
When to Use a Particular Data Structure?........................................................779
10 Fundamentals of Computer Programming with C#
Choosing a Data Structure – Examples ...........................................................786
External Libraries with .NET Collections...........................................................801
Exercises.....................................................................................................803
Solutions and Guidelines ...............................................................................804
Chapter 20. Object-Oriented Programming Principles .....................807
In This Chapter ............................................................................................807
Let’s Review: Classes and Objects ..................................................................807
Object-Oriented Programming (OOP) ..............................................................807
Fundamental Principles of OOP.......................................................................808
Inheritance..................................................................................................809
Abstraction..................................................................................................824
Encapsulation ..............................................................................................828
Polymorphism..............................................................................................830
Cohesion and Coupling..................................................................................836
Object-Oriented Modeling (OOM)....................................................................842
UML Notation...............................................................................................844
Design Patterns............................................................................................847
Exercises.....................................................................................................851
Solutions and Guidelines ...............................................................................852
Chapter 21. High-Quality Programming Code ..................................853
In This Chapter ............................................................................................853
Why Is Code Quality Important? ....................................................................853
What Does Quality Programming Code Mean? ..................................................854
Why Should We Write Quality Code?...............................................................854
Identifier Naming .........................................................................................857
Code Formatting ..........................................................................................866
High-Quality Classes.....................................................................................874
High-Quality Methods ...................................................................................878
Proper Use of Variables .................................................................................883
Proper Use of Expressions .............................................................................890
Use of Constants ..........................................................................................891
Proper Use of Control Flow Statements ...........................................................894
Defensive Programming ................................................................................898
Code Documentation ....................................................................................900
Code Refactoring..........................................................................................904
Unit Testing.................................................................................................905
Additional Resources.....................................................................................912
Exercises.....................................................................................................912
Solutions and Guidelines ...............................................................................913
Chapter 22. Lambda Expressions and LINQ .....................................915
In This Chapter ............................................................................................915
Extension Methods .......................................................................................915
Detailed Table of Contents 11
Anonymous Types ........................................................................................918
Lambda Expressions .....................................................................................920
LINQ Queries ...............................................................................................924
Nested LINQ Queries ....................................................................................930
LINQ Performance ........................................................................................930
Exercises.....................................................................................................933
Solutions and Guidelines ...............................................................................933
Chapter 23. Methodology of Problem Solving ..................................935
In This Chapter ............................................................................................935
Basic Principles of Solving Computer Programming Problems .............................935
Use Pen and Paper .......................................................................................936
Generate Ideas and Give Them a Try!.............................................................937
Decompose the Task into Smaller Subtasks .....................................................938
Verify Your Ideas! ........................................................................................941
If a Problem Occurs, Invent a New Idea!.........................................................943
Choose Appropriate Data Structures!..............................................................946
Think about the Efficiency! ............................................................................950
Implement Your Algorithm! ...........................................................................953
Write the Code Step by Step! ........................................................................954
Test Your Solution!.......................................................................................967
General Conclusions .....................................................................................979
Exercises.....................................................................................................980
Solutions and Guidelines ...............................................................................983
Chapter 24. Sample Programming Exam – Topic #1........................985
In This Chapter ............................................................................................985
Problem 1: Extract Text from HTML Document.................................................985
Problem 2: Escape from Labyrinth................................................................1012
Problem 3: Store for Car Parts .....................................................................1026
Exercises...................................................................................................1038
Solutions and Guidelines .............................................................................1040
Chapter 25. Sample Programming Exam – Topic #2......................1041
In This Chapter ..........................................................................................1041
Problem 1: Counting the Uppercase / Lowercase Words in a Text.....................1041
Problem 2: A Matrix of Prime Numbers .........................................................1054
Problem 3: Evaluate an Arithmetic Expression ...............................................1060
Exercises...................................................................................................1069
Solutions and Guidelines .............................................................................1069
Chapter 26. Sample Programming Exam – Topic #3......................1071
In This Chapter ..........................................................................................1071
Problem 1: Spiral Matrix .............................................................................1071
Problem 2: Counting Words in a Text File ......................................................1078
Problem 3: School......................................................................................1099
Exercises...................................................................................................1117
Solutions and Guidelines .............................................................................1118
Conclusion.....................................................................................1119
Did You Solve All Problems? ........................................................................1119
Have You Encountered Difficulties with the Exercises?.....................................1119
How Do You Proceed After Reading the Book?................................................1120
Free Courses at Telerik Software Academy ....................................................1121
Good Luck to Everyone! ..............................................................................1121
Preface

Программист

Post 10-Sep-2021 20:55

[Quote]

Learning Perl, 8th Edition
Год издания: 2021
Автор: Schwartz Randal L., foy brian d, Phoenix Tom
Издательство: O'Reilly
ISBN: 978-1-492-09495-1
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 398
Описание: If you're just getting started with Perl, this is the book you want--whether you're a programmer, system administrator, or web hacker. Nicknamed "the Llama" by two generations of users, this best seller closely follows the popular introductory Perl course taught by the authors since 1991. This eighth edition covers recent changes to the language up to version 5.34.
Perl is suitable for almost any task on almost any platform, from short fixes to complete web applications. Learning Perl teaches you the basics and shows you how to write simple, single-file programs--roughly 90% of the Perl programs in use today. And each chapter includes exercises to help you practice what you've just learned. Other books may teach you to program in Perl, but this book will turn you into a Perl programmer.
Topics include:
  • Perl data and variable types
  • Subroutines
  • File operations
  • Regular expressions
  • String manipulation (including Unicode)
  • Lists and sorting
  • Process management
  • Use of third-party modules

Примеры страниц

Оглавление

1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Questions and Answers 1
Is This the Right Book for You? 1
What About the Exercises and Their Answers? 2
What If I’m a Perl Course Instructor? 3
What Does “Perl” Stand For? 4
Why Did Larry Create Perl? 4
Why Didn’t Larry Just Use Some Other Language? 4
Is Perl Easy or Hard? 5
How Did Perl Get to Be So Popular? 6
What’s Happening with Perl Now? 7
What’s Perl Really Good For? 7
What Is Perl Not Good For? 8
How Can I Get Perl? 8
What Is CPAN? 9
Is There Any Kind of Support? 9
What If I Find a Bug in Perl? 10
How Do I Make a Perl Program? 10
A Simple Program 11
What’s Inside That Program? 13
How Do I Compile My Perl Program? 15
A Whirlwind Tour of Perl 15
Exercises 17
2. Scalar Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Numbers 19
All Numbers Have the Same Format Internally 20
Integer Literals 20
Nondecimal Integer Literals 20
Floating-Point Literals 21
Numeric Operators 22
Strings 23
Single-Quoted String Literals 23
Double-Quoted String Literals 24
String Operators 25
Automatic Conversion Between Numbers and Strings 26
Perl’s Built-in Warnings 27
Interpreting Nondecimal Numerals 28
Scalar Variables 29
Choosing Good Variable Names 30
Scalar Assignment 31
Compound Assignment Operators 31
Output with print 32
Interpolation of Scalar Variables into Strings 32
Creating Characters by Code Point 34
Operator Precedence and Associativity 34
Comparison Operators 36
The if Control Structure 37
Boolean Values 37
Getting User Input 38
The chomp Operator 39
The while Control Structure 40
The undef Value 40
The defined Function 41
Exercises 42
3. Lists and Arrays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Accessing Elements of an Array 44
Special Array Indices 45
List Literals 45
The qw Shortcut 46
List Assignment 47
The pop and push Operators 49
The shift and unshift Operators 49
The splice Operator 50
Interpolating Arrays into Strings 51
The foreach Control Structure 52
Perl’s Favorite Default: $_ 53
The reverse Operator 53
The sort Operator 54
The each Operator 54
Scalar and List Context 55
Using List-Producing Expressions in Scalar Context 56
Using Scalar-Producing Expressions in List Context 57
Forcing Scalar Context 58
in List Context 58
Exercises 59
4. Subroutines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Defining a Subroutine 61
Invoking a Subroutine 62
Return Values 62
Arguments 64
Private Variables in Subroutines 66
Variable-Length Parameter Lists 67
A Better &max Routine 67
Empty Parameter Lists 68
Notes on Lexical (my) Variables 69
The use strict Pragma 70
The return Operator 71
Omitting the Ampersand 72
Nonscalar Return Values 74
Persistent, Private Variables 74
Subroutine Signatures 76
Prototypes 78
Exercises 79
5. Input and Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Input from Standard Input 81
Input from the Diamond Operator 83
The Double Diamond 85
The Invocation Arguments 85
Output to Standard Output 86
Formatted Output with printf 89
Arrays and printf 91
Filehandles 91
Opening a Filehandle 93
Binmoding Filehandles 96
Bad Filehandles 96
Closing a Filehandle 97
Fatal Errors with die 97
Warning Messages with warn 99
Automatically die-ing 99
Using Filehandles 100
Changing the Default Output Filehandle 100
Reopening a Standard Filehandle 101
Output with say 101
Filehandles in a Scalar 102
Exercises 104
6. Hashes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
What Is a Hash? 105
Why Use a Hash? 107
Hash Element Access 108
The Hash as a Whole 109
Hash Assignment 110
The Big Arrow 111
Hash Functions 112
The keys and values Functions 112
The each Function 113
Typical Use of a Hash 115
The exists Function 115
The delete Function 115
Hash Element Interpolation 116
The %ENV Hash 116
Exercises 117
7. Regular Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Sequences 119
Practice Some Patterns 121
The Wildcard 123
Quantifiers 125
Grouping in Patterns 129
Alternation 132
Character Classes 134
Character Class Shortcuts 135
Negating the Shortcuts 136
Unicode Properties 136
Anchors 137
Word Anchors 139
Exercises 140
8. Matching with Regular Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Matches with m// 141
Match Modifiers 142
Case-Insensitive Matching with /i 142
Matching Any Character with /s 142
Adding Whitespace with /x 143
Combining Option Modifiers 145
Choosing a Character Interpretation 145
Beginning- and End-of-Line Anchors 147
Other Options 148
The Binding Operator =~ 148
The Match Variables 149
The Persistence of Captures 150
Captures in Alternations 151
Noncapturing Parentheses 153
Named Captures 154
The Automatic Match Variables 156
Precedence 158
Examples of Precedence 159
And There’s More 159
A Pattern Test Program 160
Exercises 160
9. Processing Text with Regular Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Substitutions with s/// 163
Global Replacements with /g 164
Different Delimiters 165
Substitution Modifiers 165
The Binding Operator 165
Nondestructive Substitutions 165
Case Shifting 166
Metaquoting 168
The split Operator 168
The join Function 170
m// in List Context 170
More Powerful Regular Expressions 171
Nongreedy Quantifiers 171
Fancier Word Boundaries 173
Matching Multiple-Line Text 174
Updating Many Files 174
In-Place Editing from the Command Line 177
Exercises 178
10. More Control Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The unless Control Structure 179
The else Clause with unless 180
The until Control Structure 180
Statement Modifiers 181
The Naked Block Control Structure 182
The elsif Clause 183
Autoincrement and Autodecrement 184
The Value of Autoincrement 184
The for Control Structure 185
The Secret Connection Between foreach and for 187
Loop Controls 188
The last Operator 188
The next Operator 189
The redo Operator 190
Labeled Blocks 191
The Conditional Operator 192
Logical Operators 193
The Value of a Short-Circuit Operator 194
The defined-or Operator 195
Control Structures Using Partial-Evaluation Operators 196
Exercises 198
11. Perl Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Finding Modules 199
Installing Modules 200
Using Your Own Directories 201
Using Simple Modules 203
The File::Basename Module 204
Using Only Some Functions from a Module 205
The File::Spec Module 206
Path::Class 207
Databases and DBI 208
Dates and Times 209
Exercises 210
12. File Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
File Test Operators 211
Testing Several Attributes of the Same File 215
Stacked File Test Operators 217
The stat and lstat Functions 218
The localtime Function 219
Bitwise Operators 220
Using Bitstrings 221
Exercises 224
13. Directory Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
The Current Working Directory 225
Changing the Directory 226
Globbing 227
An Alternate Syntax for Globbing 229
Directory Handles 230
Manipulating Files and Directories 232
Removing Files 232
Renaming Files 233
Links and Files 235
Making and Removing Directories 239
Modifying Permissions 241
Changing Ownership 241
Changing Timestamps 242
Exercises 242
14. Strings and Sorting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Finding a Substring with index 245
Manipulating a Substring with substr 247
Formatting Data with sprintf 248
Using sprintf with “Money Numbers” 249
Advanced Sorting 250
Sorting a Hash by Value 254
Sorting by Multiple Keys 255
Exercises 256
15. Process Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
The system Function 257
Avoiding the Shell 260
The Environment Variables 262
The exec Function 263
Using Backquotes to Capture Output 264
Using Backquotes in a List Context 267
External Processes with IPC::System::Simple 268
Processes as Filehandles 269
Getting Down and Dirty with fork 271
Sending and Receiving Signals 272
Exercises 275
16. Some Advanced Perl Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Slices 277
Array Slice 279
Hash Slice 281
Key-Value Slices 282
Trapping Errors 283
Using eval 283
More Advanced Error Handling 287
Picking Items from a List with grep 289
Transforming Items from a List with map 290
Fancier List Utilities 291
Exercises 293
A. Exercise Answers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
B. Beyond the Llama. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
C. A Unicode Primer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
D. Experimental Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

Adel

Post 10-Sep-2021 02:21

[Quote]

По этому торренту ничего не скачивается

Программист

Post 09-Sep-2021 22:10

[Quote]

Code like a Pro in C#
Год издания: 2021
Автор: Rodenburg Jort
Издательство: Manning
ISBN: 9781617298028
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 418
Описание: Code Like a Pro in C# teaches you to how write clean C# code that’s suitable for enterprise applications. In this book, you’ll refactor a legacy codebase by applying modern C# techniques. You’ll explore tools like Entity Framework Core, design techniques like dependency injection, and key practices like testing and clean coding. It’s a perfect path to upgrade your existing C# skills or shift from another OO language into C# and the .NET ecosystem.
In Code Like A Pro in C# you will learn:
Unit testing and test-driven development
Refactor a legacy .NET codebase
Principles of clean code
Essential backend architecture skills
Query and manipulate databases with LINQ and Entity Framework Core

Примеры страниц

Оглавление

PART 1 USING C# AND .NET...........................................1
1 Introducing C# and .NET 3
1.1 Why work in C#? 5
Reason 1: C# is economical 6 ■ Reason 2: C# is maintainable 6
Reason 3: C# is developer friendly and easy to use 7
1.2 Why not work in C#? 7
Operating system development 8 ■ Real-time operating system
embedded development in C# 8 ■ Numerical computing
and C# 9
1.3 Switching to C# 9
1.4 What you will learn in this book 12
1.5 What you will not learn in this book 12
2 .NET and how it compiles 15
2.1 What is the .NET Framework? 16
2.2 What is .NET 5? 17
2.3 How CLI-compliant languages are compiled 19
Step 1: C# code (high-level) 20 ■ Step 2: Common Intermediate
Language (assembly level) 23 ■ Step 3: Native code (processor
level) 29
PART 2 THE EXISTING CODEBASE ...................................33
3 How bad is this code? 35
3.1 Introducing Flying Dutchman Airlines 36
3.2 Pieces of the puzzle: Taking a look at our
requirements 38
Object-relational mapping 38 ■ The GET /flight endpoint:
Retrieving information on all flights 39 ■ The GET /flight/
{flightNumber} endpoint: Getting specific flight information 40
The POST /booking/{flightNumber} endpoint: Booking a flight 41
3.3 Coming to terms with the existing codebase 43
Assessing the existing database schema and its tables 43
The existing codebase: Web service configuration files 44
Considering models and views in the existing codebase 50
4 Manage your unmanaged resources! 58
4.1 The FlightController: Assessing the GET
/flight endpoint 60
The GET /flight endpoint and what it does 60 ■ Method
signature: The meaning of ResponseType and typeof 61
Collecting flight information with collections 63 ■ Connection
strings, or how to give a security engineer a heart attack 64
Using IDisposable to release unmanaged resources 65 ■ Querying
a database with SqlCommand 67
4.2 The FlightController: Assessing GET /flight/
{flightNumber} 70
4.3 The FlightController: POST /flight 73
4.4 The FlightController: DELETE /flight/
{flightNumber} 77
PART 3 THE DATABASE ACCESS LAYER.............................81
5 Setting up a project and database with Entity
Framework Core 83
5.1 Creating a .NET 5 solution and project 84
5.2 Setting up and configuring a web service 88
Configuring a .NET 5 web service 89 ■ Creating and using
HostBuilder 91 ■ Implementing the Startup class 93 ■ Using the
repository/service pattern for our web service architecture 96
5.3 Implementing the database access layer 98
Entity Framework Core and reverse-engineering 98 ■ DbSet and the
Entity Framework Core workflow 100 ■ Configuration methods and
environment variables 102 ■ Setting an environment variable on
Windows 103 ■ Setting an environment variable on macOS 104
Retrieving environment variables at run time in your code 104
PART 4 THE REPOSITORY LAYER ..................................109
6 Test-driven development and dependency injection 111
6.1 Test-driven development 113
6.2 The CreateCustomer method 117
Why you should always validate input arguments 118 ■ Using
“arrange, act, assert” to write unit tests 119 ■ Validating against
invalid characters 120 ■ In-lining test data with the [DataRow]
attribute 123 ■ Object initializers and autogenerated code 123
Constructors, reflection, and asynchronous programming 125
Locks, mutexes, and semaphores 127 ■ Synchronous to
asynchronous execution . . . continued 129 ■ Testing Entity
Framework Core 130 ■ Controlling dependencies with
dependency injection 132
7 Comparing objects 140
7.1 The GetCustomerByName method 141
Question marks: Nullable types and their applications 143
Custom exceptions, LINQ, and extension methods 144
7.2 Congruence: From the Middle Ages to C# 149
Creating a “comparer” class using EqualityComparer 150
Testing equality by overriding the Equals method 153
Overloading the equality operator 154
8 Stubbing, generics, and coupling 160
8.1 Implementing the Booking repository 161
8.2 Input validation, separation of concerns, and
coupling 164
8.3 Using object initializers 169
8.4 Unit testing with stubs 172
8.5 Programming with generics 176
8.6 Providing default arguments by using optional
parameters 177
8.7 Conditionals, Func, switches, and switch expressions 179
The ternary conditional operator 180 ■ Branching using an array
of functions 181 ■ Switch statements and expressions 181
Querying for pending changes in Entity Framework Core 183
9 Extension methods, streams, and abstract classes 188
9.1 Implementing the Airport repository 189
9.2 Getting an Airport out of the database by its ID 190
9.3 Validating the AirportID input parameter 192
9.4 Output streams and being specifically abstract 194
9.5 Querying the database for an Airport object 199
9.6 Implementing the Flight repository 206
The IsPositive extension method and “magic numbers” 208
Getting a flight out of the database 214
PART 5 THE SERVICE LAYER.........................................219
10 Reflection and mocks 221
10.1 The repository/service pattern revisited 222
What is the use of a service class? 223
10.2 Implementing the CustomerService 225
Setting up for success: Creating skeleton classes 225 ■ How to
delete your own code 227
10.3 Implementing the BookingService 229
Unit testing across architectural layers 234 ■ The difference
between a stub and a mock 235 ■ Mocking a class with the
Moq library 236 ■ Calling a repository from a service 243
11 Runtime type checking revisited and error handling 248
11.1 Validating input parameters of a service layer
method 249
Runtime type checks with the is and as operators 253 ■ Type
checking with the is operator 253 ■ Type checking with the as
operator 255 ■ What did we do in section 11.1? 255
11.2 Cleaning up the BookingServiceTests class 256
11.3 Foreign key constraints in service classes 258
Calling the Flight repository from a service class 259
12 Using IAsyncEnumerable and yield return 273
12.1 Do we need an AirportService class? 274
12.2 Implementing the FlightService class 276
Getting information on a specific flight from the FlightRepository 276
Combining two data streams into a view 280 ■ Using the yield return
keywords with try-catch code blocks 288 ■ Implementing
GetFlightByFlightNumber 292
PART 6 THE CONTROLLER LAYER.................................301
13 Middleware, HTTP routing, and HTTP responses 303
13.1 The controller class within the repository/service
pattern 304
13.2 Determining what controllers to implement 306
13.3 Implementing the FlightController 308
Returning HTTP responses with the IActionResult interface
(GetFlights) 309 ■ Injecting dependencies into a controller using
middleware 312 ■ Implementing the GET /Flight/
{FlightNumber} endpoint 320
13.4 Routing HTTP requests to controllers and methods 324
14 JSON serialization/deserialization and custom
model binding 332
14.1 Implementing the BookingController class 333
Introduction to data deserialization 335 ■ Using the [FromBody]
attribute to deserialize incoming HTTP data 339 ■ Using a
custom model binder and method attribute for model binding 340
Implementing the CreateBooking endpoint method logic 343
14.2 Acceptance testing and Swagger middleware 349
Manual acceptance testing with an OpenAPI specification 349
Generating an OpenAPI specification at runtime 354
14.3 The end of the road 360
appendix A Exercise answers 363
appendix B Clean code checklist 371
appendix C Installation guides 373
appendix D OpenAPI FlyTomorrow 377
appendix E Reading list 380
index 385

Программист

Post 08-Sep-2021 23:10

[Quote]

GIS Algorithms. Theory and Applications for Geographic Information Science & Technology / Алгоритмы ГИС. Теория и применение геоинформационных систем и технологий
Год издания: 2021
Автор: Ningchuan Xiao / Нинчуань Сяо
Переводчик: Слинкин А.А.
Издательство: ДМК-Пресс
ISBN: 978-5-97060-908-8
Язык: Русский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 328
Описание:
Географические информационные системы (ГИС) приобретают все большее значение, помогая нам понять сложную социальную, экономическую и природную динамику в ситуациях, где ключевую роль играют пространственные компоненты. Однако фундаментальные алгоритмы, применяемые в ГИС, трудны для понимания и преподавания, отчасти из-за отсутствия логически последовательного изложения. Настоящая книга – попытка решить эту проблему за счет сочетания строгого формализованного языка с практическими примерами и упражнениями.
Автор выделяет три основных направления в ГИС:
• геометрические алгоритмы;
• индексирование пространственных данных;
• пространственный анализ и моделирование.
Теоретический материал подкрепляется кодом на популярном языке программирования Python. Благодаря развернутому описанию многих упоминаемых алгоритмов эта книга может стать новым учебником для студентов, изучающих этот сложный и важный раздел географии.

Примеры страниц

Мои остальные раздачи -

Программист

Post 07-Sep-2021 22:10

[Quote]

Get Programming with Scala
Год издания: 2021
Автор: Sfregola Daniela
Издательство: Manning
ISBN: 9781617295270
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 560
Описание: Get Programming with Scala is a fast-paced introduction to the Scala language, covering both Scala 2 and Scala 3. You’ll learn through lessons, quizzes, and hands-on projects that bring your new skills to life. Clear explanations make Scala’s features and abstractions easy to understand. As you go, you’ll learn to write familiar object-oriented code in Scala and also discover the possibilities of functional programming.
In Get Programming in Scala you will learn:
Object-oriented principles in Scala
Express program designs in functions
Use types to enforce program requirements
Use abstractions to avoid code duplication
Write meaningful tests and recognize code smells
Доп. информация: https://github.com/DanielaSfregola/get-programming-with-scala

Примеры страниц

Оглавление

Unit 0
HELLO SCALA! 1
Lesson 1 Why Scala? 3
Why Scala? 3
Scala and the JVM 5
Scala’s key features 7
Summary 9
Lesson 2 The Scala environment 10
The REPL installation 10
The REPL commands 12
The REPL code evaluation 13
Other development tools 16
Summary 16
Lesson 3 Scala Build Tool (sbt) 18
Why sbt? 18
sbt installation 19
sbt commands 20
Your first sbt project 21
sbt project structure 23
Summary 27
Unit 1
THE BASICS 29
Lesson 4 Values and variables 31
Values 32
Variables 34
Summary 36
Answers to quick checks 37
Lesson 5 Conditional constructs and loops 38
If-else construct 39
While loop 41
For loop 42
Summary 43
Answers to quick checks 44
Lesson 6 Function as the most fundamental block of code 45
Functions 46
Summary 51
Answers to quick checks 51
Lesson 7 Classes and subclasses to represent the world 52
Class 53
Subclass 56
Abstract class 58
Summary 60
Answers to quick checks 60
Lesson 8 The vending machine 62
Setting up the vending machine 63
Possible improvements to our solution 68
Summary 69
Unit 2
OBJECT-ORIENTED FUNDAMENTALS 71
Lesson 9 Import and create packages 73
Import an existing package 74
Create a package 76
Summary 78
Answers to quick checks 78
Lesson 10 Scope your code with access modifiers 79
Public, the default access modifier 80
Private 81
Protected 82
Which access level to use? 83
Summary 84
Answers to quick checks 84
Lesson 11 Singleton objects 86
Object 87
Executable object 89
Companion object 91
The apply method 92
Summary 95
Answers to quick checks 95
Lesson 12 Traits as interfaces 97
Defining traits 98
Extending traits 99
Sealed traits 102
Enumeration in Scala 3 103
Summary 104
Answers to quick checks 105
Lesson 13 What time is it? 106
What time is it? 106
Possible improvements to our solution 110
Summary 111
Unit 3
HTTP SERVER 113
Lesson 14 Pattern matching 115
If-else construct vs. pattern matching 116
Sealed pattern matching 119
Summary 121
Answers to quick checks 121
Lesson 15 Anonymous functions 123
Function vs. anonymous function 124
Concise notation for anonymous functions 126
Summary 128
Answers to quick checks 129
Lesson 16 Partial functions 130
Partial functions 131
Use case: Exception handling 134
Summary 136
Answers to quick checks 137
Lesson 17 HTTP API with http4s 138
An overview of http4s 139
A ping server using http4s 140
Summary 145
Answers to quick checks 145
Lesson 18 The time HTTP server 147
What time is it? 147
Possible improvements to our solution 153
Summary 154
Unit 4
IMMUTABLE DATA AND STRUCTURES 155
Lesson 19 Case classes to structure your data 157
Case class 158
Pattern matching and case classes 163
Case object 164
Summary 165
Answers to quick checks 165
Lesson 20 Higher order functions 166
Functions as parameters 167
Functions as return values 169
Summary 170
Answers to quick checks 171
Lesson 21 What is purity? 172
A definition of purity 173
Differentiating between pure and impure functions 175
Summary 177
Answers to quick checks 177
Lesson 22 Option 179
Why Option? 180
Creating an Option 180
Pattern matching on Option 185
Summary 186
Answers to quick checks 186
Lesson 23 Working with Option: map and flatMap 187
Transforming an Option 188
Summary 194
Answers to quick checks 195
Lesson 24 Working with Option: For-comprehension 196
For-comprehension on Option 197
Other operations on Option 201
Summary 202
Answers to quick checks 203
Lesson 25 Tuple and unapply 204
Tuples 205
Implementing the unapply method 209
Summary 212
Answers to quick checks 212
Lesson 26 Rock, Paper, Scissors, Lizard, Spock! 213
Implementing Rock, Paper, Scissors, Lizard, Spock! 214
Possible improvements to our solution 223
Summary 224
Unit 5
LIST 225
Lesson 27 List 227
Creating a list 228
Adding elements to a list 232
Pattern matching on a list 233
Summary 235
Answers to quick checks 236
Lesson 28 Working with List: map and flatMap 237
The map, flatten, and flatMap operations 238
For-comprehension 241
Summary 242
Answers to quick checks 243
Lesson 29 Working with List: Properties 244
Size of a list 245
Properties of the elements in a list 247
Summary 250
Answers to quick checks 250
Lesson 30 Working with List: Element selection 251
Selecting an element by its position 252
Finding an element with given features 253
Picking the minimum or maximum item 254
Summary 258
Answers to quick checks 258
Lesson 31 Working with List: Filtering 259
Dropping and taking elements 260
Filtering Items of a list 262
Removing duplicates 264
Summary 265
Answers to quick checks 265
Lesson 32 Working with List: Sorting and other operations 267
Sorting elements 268
Converting a list to a string 270
Sum elements of numerical sequences 272
Grouping elements by feature 273
Summary 275
Answers to quick checks 276
Lesson 33 The movies dataset 278
Download the base project 280
Parsing a movie entity 281
Printing query results 283
Querying the movie data set 284
Summary 289
Unit 6
OTHER COLLECTIONS AND ERROR HANDLING 291
Lesson 34 Set 293
Creating a set 294
Adding and removing elements 295
The map, flatten, and flatMap operations 296
For-comprehension 299
Summary 301
Answers to quick checks 301
Lesson 35 Working with Set 303
The Union, Intersection, and Difference operations 304
Other operations on Set 307
Summary 308
Answers to quick checks 308
Lesson 36 Map 309
Creating Map 310
Adding and removing elements 312
Merge and remove multiple entries 314
The map and flatMap operations 315
For-comprehension 318
Summary 319
Answers to quick checks 319
Lesson 37 Working with Map 322
Retrieving a value for a given key 323
Getting all keys and values 325
Other operations on Map 326
Summary 327
Answers to quick checks 328
Lesson 38 Either 329
Why Either? 330
Creating an Either 331
Pattern matching on Either 333
The map and flatMap operations 333
For-comprehension 337
Summary 338
Answers to quick checks 339
Lesson 39 Working with Either 341
Retrieving an Either value 342
Properties of an Either value 343
Summary 345
Answers to quick checks 346
Lesson 40 Error handling with Try 347
Creating a Try 348
Pattern matching on Try 352
The map, flatten, and flatMap operations 353
For-comprehension 356
Other operations on Try 357
Summary 358
Answers to quick checks 359
Lesson 41 The library application 361
Download the base project 362
Parsing a book entity 363
The business logic layer 367
Let’s give it a try! 372
Possible improvements to our solution 374
Summary 375
Unit 7
CONCURRENCY 377
Lesson 42 Implicit and type classes 379
Implicit parameters and values 380
Implicit resolution 385
Type classes 388
Summary 390
Answers to quick checks 391
Lesson 43 Future 393
Why Future? 394
Creating an instance of Future 395
Processing Future on completion 398
Summary 400
Answers to quick checks 400
Lesson 44 Working with Future: map and flatMap 402
The map, flatten, and flatMap operations 403
Summary 409
Answers to quick checks 410
Lesson 45 Working with Future: For-comprehension
and other operations 411
For-comprehension 412
Retrieving the first Future to complete 416
Summary 420
Answers to quick checks 421
Lesson 46 Database queries with Quill 423
Project setup 424
Connecting to the PostgreSQL server 428
Executing queries 429
Running generated queries 431
Summary 435
Answers to quick checks 435
Lesson 47 The quiz application: Part 1 438
Download the base project 439
Health check queries 441
Category queries 442
Question and answer queries 443
Let’s give it a try! 446
Summary 450
Unit 8
JSON (DE)SERIALIZATION 451
Lesson 48 JSON (de)serialization with circe 453
Project setup 454
JSON serialization: From instance to JSON 455
JSON deserialization: From JSON to instance 458
Summary 461
Answers to quick checks 462
Lesson 49 Lazy evaluation 463
By-name parameters 464
Lazy values 466
Summary 470
Answers to quick checks 470
Lesson 50 The IO type 472
Why IO? 473
Project setup 475
Synchronous side effect 476
Asynchronous side effect 478
Summary 481
Answers to quick checks 482
Lesson 51 Working with the IO type 484
The map and flatMap operations 485
For-comprehension 488
Parallel execution 489
Summary 492
Answers to quick checks 492
Lesson 52 Testing with ScalaTest 494
Project setup 495
Your first test 495
Asynchronous testing 498
Summary 500
Answers to quick checks 501
Lesson 53 The quiz application: Part 2 504
Download the base project 505
Generic endpoints 506
Displaying the available categories 508
Creating a quiz 510
Answering a quiz 513
The HTTP server 516
Writing tests 518
Let’s give it a try! 521
Summary 523
Index 525

Программист

Post 07-Sep-2021 20:50

[Quote]

Professional C# and .NET, 2021 Edition
Год издания: 2022
Автор: Nagel Christian
Издательство: Wiley
ISBN: 978-1-119-79720-3
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 1011
Описание: Get the latest coverage of the newest features in C#9 and .NET 5
In Professional C# and .NET: 2021 Edition, Microsoft MVP for Visual Studio and Development Technologies and veteran developer, Christian Nagel, delivers a comprehensive tour of the new features and capabilities of C#9 and .NET 5.
Experienced programmers making the transition to C# will benefit from the author’s in-depth explorations to create Web- and Windows applications using ASP.NET Core, Blazor, and WinUI using modern application patterns and new features offered by .NET including Microservices deployed to Docker images, GRPC, localization, asynchronous streaming, and much more.
The book also offers:
Discussions of the extension of .NET to non-Microsoft platforms like OSX and Linux
Explanations of the newest features in C#9, including support for record types, and enhanced support for tuples, pattern matching, and nullable reference types
Integrating .NET applications with Microsoft Azure services such as Azure App Configuration, Azure Key Vault, Azure Functions, the Azure Active Directory, and others
Downloadable code examples from wrox.com and github.com with online updates for C# 10 and .NET 6
Perfect for programmers with a background in C#, Visual Basic, Java, or C/C++, Professional C# and .NET: 2021 Edition will also earn a place in the libraries of software architects seeking an up-to-date and fulsome treatment of the latest C# and .NET releases.

Примеры страниц

Оглавление

Part I, “The C# Language”:
➤➤Chapter 1, “.NET Applications and Tools,” covers what you need to know to create .NET applications.
You learn about the .NET CLI and create a Hello World application using C# 9 top-level statements.
➤➤ Chapter 2, “Core C#,” dives into core C# features and gives you details on top-level statements and
information on declaration of variables and data types. The chapter covers target- typed new expressions,
explains nullable reference types, and defines a program flow that includes the new switch expressions.
➤➤ Chapter 3, “Classes, Records, Structs, and Tuples,” gives you information to create reference or value
types, create and use tuples, and make use of the C# 9 enhancement to create and use records.
➤➤ Chapter 4, “Object-Oriented Programming in C#,” goes into details of object-oriented techniques with
C# and demonstrates all the C# keywords for object orientation. It also covers using inheritance with
C# 9 records.
➤➤ Chapter 5, “Operators and Casts,” explains the C# operators, and you also learn how to overload
standard operators for custom types.
➤➤ Chapter 6, “Arrays,” doesn’t stop with simple arrays; you learn using multidimensional and jagged
arrays, use the Span type to access arrays, and use the new index and range operators to access arrays.
➤➤ Chapter 7, “Delegates, Lambdas, and Events,” covers .NET pointers to methods, lambda expressions
with closures, and .NET events.
➤➤ Chapter 8, “Collections,” dives into the different kind of collections, such as lists, queues, stacks, dictio-
naries, and immutable collections. The chapter also gives you the information you need to decide which
collection to use in what scenario.
➤➤ Chapter 9, “Language Integrated Query,” gives you the C# language integrated query features to
query data from your collections. You also learn how to use multiple CPU cores with a query and
what’s behind expression trees that are used when you use LINQ to access your database with Entity
Framework Core.
➤➤ Chapter 10, “Errors and Exceptions,” covers how you should deal with errors, throw and catch excep-
tions, and filter exceptions when catching them.
➤➤ Chapter 11, “Tasks and Asynchronous Programming,” shows the C# keywords async and await in
action— not only with the task-based async pattern but also with async streams, which is a new feature
since C# 8.
➤➤ Chapter 12, “Reflection, Metadata, and Source Generators,” covers using and reading attributes with
C#. The attributes will not just be read using reflection, but you’ll also see the functionality of source
generators that allow creating source code during compile time.
➤➤ Chapter 13, “Managed and Unmanaged Memory,” is the last chapter of Part I, which not only shows
using the IDisposable interface with the using statement and the new using declaration but also
demonstrates using the Span type with managed and unmanaged memory. You can read about using
Platform Invoke both with Windows and with Linux environments.
Part II, “Libraries”:
➤➤ Chapter 14, “Libraries, Assemblies, Packages, and NuGet,” explains the differences between assemblies
and NuGet packages. In this chapter, you learn how to create NuGet packages and are introduced to a
new C# feature, module initializers, which allow you to run initial code in a library.
➤➤ Chapter 15, “Dependency Injection and Configuration,” gives detail about how the Host class is used to
configure a dependency injection container and the built-in options to retrieve configuration information
from a .NET application with different configuration providers, including Azure App Configuration and
user secrets.
➤➤ Chapter 16, “Diagnostics and Metrics,” continues using the Host class to configure logging options.
You also learn about reading metric information that’s offered from some NET providers, using Visual
Studio App Center, and extending logging for distributed tracing with OpenTelemetry.
➤➤ Chapter 17, “Parallel Programming,” covers myriad features available with .NET for parallelization and
synchronization. Chapter 11 shows the core functionality of the Task class. In Chapter 17, more of the
Task class is shown, such as forming task hierarchies and using value tasks. The chapter goes into issues
of parallel programming such as race conditions and deadlocks, and for synchronization, you learn
about different features available with the lock keyword, the Monitor, SpinLock, Mutex, Semaphore
classes, and more.
➤➤ Chapter 18, “Files and Streams,” not only covers reading and writing from the file system with new
stream APIs that allow using the Span type but also covers the new .NET JSON serializer with classes in
the System.Text.Json namespace.
➤➤ In Chapter 19, “Networking,” you learn about foundational classes for network programming, such
as the Socket class and how to create applications using TCP and UDP. You also use the HttpClient
factory pattern to create HttpClient objects with automatic retries if transient errors occur.
➤➤ Chapter 20, “Security,” gives you information about cryptography classes for encrypting data, explains
how to use the new Microsoft.Identity platform for user authentication, and provides information
on web security and what you need to be aware of with encoding issues as well as cross-site request
forgery attacks.
➤➤ Chapter 21, “Entity Framework Core,” covers reading and writing data from a database—including
the many features offered from EF Core, such as shadow properties, global query filters, many-to-many
relations, and what metric information is now offered by EF Core—and reading and writing to Azure
Cosmos DB with EF Core.
➤➤ In Chapter 22, “Localization,” you learn to localize applications using techniques that are important
both for Windows and web applications.
➤➤ Chapter 23, “Tests,” covers creating unit tests, analyzing code coverage with the .NET CLI, using a
mocking library when creating unit tests, and what features are offered by ASP.NET Core to create
integration tests.
Part III, “Web Applications and Services”:
➤➤ Chapter 24, “ASP.NET Core,” gives you the foundation of ASP.NET Core. Based on the dependency
injection container you learned about in Part II, this chapter shows how ASP.NET Core makes use of
middleware to add functionality to every HTTP request and define routes with ASP.NET Core end-
point routing.
➤➤ Chapter 25, “Services,” dives into creating microservices using different technologies such as ASP.NET
Core as well as using Azure Functions and gRPC for binary communication.
➤➤ Chapter 26, “Razor Pages and MVC,” is about interacting with users with ASP.NET Core technologies.
It covers Razor pages, Razor views, and functionality such as tag helpers and view components.
➤➤ Chapter 27, “Blazor,” is about the newest enhancement of ASP.NET Core with Razor components,
which allows you to implement C# code running either on the server or in the client using WebAssembly.
You learn about the differences between Blazor Server and Blazor WebAssembly, what the restrictions
are with these technologies, and the built-in components available.
➤➤ Chapter 28, “SignalR,” covers the real-time functionality available with ASP.NET Core to send
information to a group of clients and how you can use C# async streams with SignalR.
Part IV, “Apps”:
➤➤ Chapter 29, “Windows Apps,” gives you foundational information on XAML, including dependency
properties and attached properties. You learn how to create custom markup extensions and about the
control categories available with WinUI, including advanced techniques such as adaptive triggers and
deferred loading.
➤➤ Chapter 30, “Patterns with XAML Apps,” gives you the information you need to use the MVVM
pattern and how you can share as much code as possible between different XAML-based technologies
such as WinUI, WPF, and .NET MAUI.
➤➤ Chapter 31, “Styling Windows Apps,” explains XAML shapes and geometry elements, dives into styles
and control templates, gives you information on creating animations, and explains how you can use the
Visual State Manager with your XAML-based applications.
Доп. информация: https://github.com/ProfessionalCSharp/ProfessionalCSharp2021

Программист

Post 31-Aug-2021 22:00

[Quote]

Reactive Programming with RxJava / Реактивное программирование с применением RxJava
Год издания: 2017
Автор: Tomasz Nurkiewicz, Ben Christensen / Томаш Нуркевич, Бен Кристенсен
Жанр или тематика: Компьютерая литература
Издательство: ДМК Пресс
ISBN: 978-5-97060-496-0
Язык: Русский
Формат: DjVu
Качество: Отсканированные страницы + слой распознанного текста
Интерактивное оглавление: Да
Количество страниц: 359
Описание: В наши дни, когда программы асинхронны, а быстрая реакция - важнейшее свойство, реактивное программирование поможет писать более надежный, лучше масштабируемый и быстрее работающий код. Благодаря этой книге программист на Java узнает о реактивном подходе к задачам и научится создавать программы, вобравшие в себя лучшие черты этой новой и весьма перспективной парадигмы. Данная книга содержит глубокое и подробное изложение концепций и принципов использования реактивного программирования вообще и Rxjava в частности.
Книга может использоваться как для последовательного изучения предмета, так и в качестве справочника по библиотеке.

Примеры страниц

Оглавление

Предисловие
Вступление
Глава 1. Реактивное программирование с применением RxJava
Глава 2. Реактивные расширения
Глава 3. Операторы и преобразования
Глава 4. Применение реактивного программирования в существующих приложениях
Глава 5. Реактивность сверху донизу
Глава 6. Управление потоком и противодавление
Глава 7. Тестирование и отладка
Глава 8. Практические примеры
Глава 9. Направления будущего развития

Программист

Post 29-Aug-2021 05:00

[Quote]

Cloud Native Architectures: Design high-availability and cost-effective applications for the cloud / Облачные архитектуры: разработка устойчивых и экономичных облачных приложений
Год издания: 2022
Автор: Tom Laszewski, Kamal Arora , Erik Farr / Том Лащевски, Камаль Арора, Эрик Фарр
Переводчик: Павлов А.
Издательство: Питер
ISBN: 978-5-4461-1588-4
Серия: Библиотека программиста
Язык: Русский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 320
Описание:
Облачные вычисления — это, пожалуй, наиболее революционная разработка в IT со времен виртуализации. Облачно-ориентированные архитектуры обеспечивают большую гибкость по сравнению с системами предыдущего поколения. В этой книге продемонстрированы три важнейших аспекта развертывания современных cloud native архитектур: организационное преобразование, модернизация развертывания, паттерны облачного проектирования.
Книга начинается с краткого знакомства с облачно-ориентированными архитектурами — на примерах объясняется, какие черты им присущи, а какие нет. Вы узнаете, как организуется внедрение и разработка облачных архитектур с применением микросервисов и бессерверных вычислений как основ проектирования. Далее вы изучите такие столпы облачно-ориентированного проектирования, как масштабируемость, оптимизация издержек, безопасность и способы достижения безупречной эксплуатационной надежности. В заключительных главах будет рассказано о различных общедоступных архитектурах cloud native, — от AWS и Azure до Google Cloud Platform.
Прочитав эту книгу, вы освоите приемы, необходимые для перехода на облачно-ориентированные архитектуры с учетом требований вашего бизнеса. Вы также узнаете о перспективных тенденциях в сфере облачных сервисов и векторах развития облачных провайдеров.

Примеры страниц

Мои остальные раздачи -

Программист

Post 24-Aug-2021 11:30

[Quote]

Concepts of Programming Languages, 12th Edition
Год издания: 2019
Автор: Sebesta Robert W.
Издательство: Pearson
ISBN: 978-0-13-499718-6
Язык: Английский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 784
Описание: Concepts of Computer Programming Languages, 12th Edition introduces readers to the fundamental concepts of computer programming languages and provides them with the tools necessary to evaluate contemporary and future languages. Through a critical analysis of design issues of various program languages, the text teaches readers the essential differences between computing with specific languages, while the in-depth discussion of programming language structures also prepares them to study compiler design. The 12th Edition includes new material on contemporary languages like Swift and Python, replacing discussions of outdated languages.
Companion Website: https://media.pearsoncmg.com/ph/esm/ecs_sebesta_concepts_12/cw/

Примеры страниц

Оглавление

Chapter 1 Preliminaries 1
1.1 Reasons for Studying Concepts of Programming Languages ..............2
1.2 Programming Domains .........................................................................5
1.3 Language Evaluation Criteria ...............................................................7
1.4 Influences on Language Design .........................................................17
1.5 Language Categories ...........................................................................20
1.6 Language Design Trade-Offs ..............................................................21
1.7 Implementation Methods ....................................................................22
1.8 Programming Environments ..............................................................29
Summary • Review Questions • Problem Set ...............................................30
Chapter 2 Evolution of the Major Programming Languages 33
2.1 Zuse’s Plankalkül .................................................................................36
2.2 Pseudocodes .........................................................................................37
2.3 The IBM 704 and Fortran ..................................................................40
2.4 Functional Programming: Lisp ...........................................................45
2.5 The First Step Toward Sophistication: ALGOL 60 ...........................50
2.6 Computerizing Business Records: COBOL .......................................56
2.7 The Beginnings of Timesharing: Basic ...............................................61
Interview: ALAN COOPER—User Design and Language Design .........64
2.8 Everything for Everybody: PL/I .........................................................66
2.9 Two Early Dynamic Languages: APL and SNOBOL ........................69
2.10 The Beginnings of Data Abstraction: SIMULA 67 ...........................70
2.11 Orthogonal Design: ALGOL 68 ........................................................71
2.12 Some Early Descendants of the ALGOLs ..........................................73
2.13 Programming Based on Logic: Prolog ...............................................77
2.14 History’s Largest Design Effort: Ada ..................................................79
2.15 Object-Oriented Programming: Smalltalk .........................................83
2.16 Combining Imperative and Object-Oriented Features: C++ .............85
2.17 An Imperative-Based Object-Oriented Language: Java .....................89
2.18 Scripting Languages ............................................................................92
2.19 The Flagship .NET Language: C# .....................................................98
2.20 Markup-Programming Hybrid Languages .......................................100
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................102
Chapter 3 Describing Syntax and Semantics 109
3.1 Introduction .......................................................................................110
3.2 The General Problem of Describing Syntax ....................................111
3.3 Formal Methods of Describing Syntax .............................................113
3.4 Attribute Grammars ..........................................................................128
History Note .............................................................................................128
3.5 Describing the Meanings of Programs: Dynamic Semantics ...........134
History Note .............................................................................................142
Summary • Bibliographic Notes • Review Questions • Problem Set ........155
Chapter 4 Lexical and Syntax Analysis 161
4.1 Introduction .......................................................................................162
4.2 Lexical Analysis ..................................................................................163
4.3 The Parsing Problem ........................................................................171
4.4 Recursive-Descent Parsing................................................................175
4.5 Bottom-Up Parsing ...........................................................................183
Summary • Review Questions • Problem Set •
Programming Exercises ...............................................................................191
Chapter 5 Names, Bindings, and Scopes 197
5.1 Introduction .......................................................................................198
5.2 Names ................................................................................................199
History Note .............................................................................................199
5.3 Variables .............................................................................................200
5.4 The Concept of Binding ...................................................................203
5.5 Scope ..................................................................................................211
5.6 Scope and Lifetime ............................................................................222
5.7 Referencing Environments ...............................................................223
5.8 Named Constants ..............................................................................224
Summary • Review Questions • Problem Set •
Programming Exercises ...............................................................................227
Chapter 6 Data Types 235
6.1 Introduction .......................................................................................236
6.2 Primitive Data Types .........................................................................238
6.3 Character String Types ......................................................................242
History Note .............................................................................................243
6.4 Enumeration Types ...........................................................................247
6.5 Array Types ........................................................................................250
History Note .............................................................................................251
History Note .............................................................................................251
6.6 Associative Arrays ..............................................................................261
6.7 Record Types .....................................................................................263
6.8 Tuple Types........................................................................................266
6.9 List Types ...........................................................................................268
6.10 Union Types ......................................................................................270
6.11 Pointer and Reference Types ............................................................273
History Note .............................................................................................276
6.12 Optional Types ..................................................................................285
6.13 Type Checking ...................................................................................286
6.14 Strong Typing ....................................................................................287
6.15 Type Equivalence ...............................................................................288
6.16 Theory and Data Types .....................................................................292
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................294
Chapter 7 Expressions and Assignment Statements 301
7.1 Introduction .......................................................................................302
7.2 Arithmetic Expressions ......................................................................302
7.3 Overloaded Operators .......................................................................311
7.4 Type Conversions ..............................................................................313
History Note .............................................................................................315
7.5 Relational and Boolean Expressions .................................................316
History Note .............................................................................................316
7.6 Short-Circuit Evaluation ...................................................................318
7.7 Assignment Statements .....................................................................319
History Note .............................................................................................323
7.8 Mixed-Mode Assignment ..................................................................324
Summary • Review Questions • Problem Set • Programming Exercises ....324
Chapter 8 Statement-Level Control Structures 329
8.1 Introduction .......................................................................................330
8.2 Selection Statements .........................................................................332
8.3 Iterative Statements ...........................................................................343
8.4 Unconditional Branching ..................................................................355
History Note .............................................................................................356
8.5 Guarded Commands .........................................................................356
8.6 Conclusions .......................................................................................359
Summary • Review Questions • Problem Set • Programming Exercises ....360
Chapter 9 Subprograms 365
9.1 Introduction .......................................................................................366
9.2 Fundamentals of Subprograms .........................................................366
9.3 Design Issues for Subprograms .........................................................374
9.4 Local Referencing Environments .....................................................375
9.5 Parameter-Passing Methods..............................................................376
History Note .............................................................................................384
9.6 Parameters That Are Subprograms ..................................................392
History Note .............................................................................................394
9.7 Calling Subprograms Indirectly ........................................................394
9.8 Design Issues for Functions ..............................................................396
9.9 Overloaded Subprograms ..................................................................397
9.10 Generic Subprograms........................................................................398
9.11 User-Defined Overloaded Operators ...............................................404
9.12 Closures .............................................................................................405
9.13 Coroutines .........................................................................................407
Summary • Review Questions • Problem Set • Programming Exercises .....410
Chapter 10 Implementing Subprograms 417
10.1 The General Semantics of Calls and Returns...................................418
10.2 Implementing “Simple” Subprograms ..............................................419
10.3 Implementing Subprograms with Stack-Dynamic
Local Variables...................................................................................421
10.4 Nested Subprograms .........................................................................429
10.5 Blocks .................................................................................................436
10.6 Implementing Dynamic Scoping ......................................................437
Summary • Review Questions • Problem Set • Programming Exercises .....441
Chapter 11 Abstract Data Types and Encapsulation Constructs 447
11.1 The Concept of Abstraction .............................................................448
11.2 Introduction to Data Abstraction......................................................449
11.3 Design Issues for Abstract Data Types .............................................452
11.4 Language Examples ...........................................................................453
Interview: BJARNE STROUSTRUP—C++: Its Birth,
Its Ubiquitousness, and Common Criticisms .....................................454
11.5 Parameterized Abstract Data Types ..................................................466
11.6 Encapsulation Constructs..................................................................471
11.7 Naming Encapsulations ....................................................................474
Summary • Review Questions • Problem Set • Programming Exercises .....478
Chapter 12 Support for Object-Oriented Programming 483
12.1 Introduction .......................................................................................484
12.2 Object-Oriented Programming ........................................................485
12.3 Design Issues for Object-Oriented Languages .................................489
12.4 Support for Object-Oriented Programming in
Specific Languages ............................................................................494
Interview: BJARNE STROUSTRUP—On Paradigms
and Better Programming ....................................................................498
12.5 Implementation of Object-Oriented Constructs ..............................519
12.6 Reflection ..........................................................................................522
Summary • Review Questions • Problem Set • Programming Exercises .....528
Chapter 13 Concurrency 533
13.1 Introduction .......................................................................................534
13.2 Introduction to Subprogram-Level Concurrency ............................539
13.3 Semaphores ........................................................................................544
13.4 Monitors ............................................................................................549
13.5 Message Passing ................................................................................551
13.6 Ada Support for Concurrency ...........................................................552
13.7 Java Threads ......................................................................................560
13.8 C# Threads ........................................................................................570
13.9 Concurrency in Functional Languages .............................................575
13.10 Statement-Level Concurrency ..........................................................578
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................580
Chapter 14 Exception Handling and Event Handling 587
14.1 Introduction to Exception Handling ................................................588
History Note .............................................................................................592
14.2 Exception Handling in C++ ..............................................................594
14.3 Exception Handling in Java ...............................................................598
14.4 Exception Handling in Python and Ruby .........................................605
14.5 Introduction to Event Handling .......................................................608
14.6 Event Handling with Java .................................................................609
14.7 Event Handling in C# .......................................................................613
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................616
Chapter 15 Functional Programming Languages 623
15.1 Introduction .......................................................................................624
15.2 Mathematical Functions ....................................................................625
15.3 Fundamentals of Functional Programming Languages ...................628
15.4 The First Functional Programming Language: Lisp .......................629
15.5 An Introduction to Scheme ...............................................................633
15.6 Common Lisp ....................................................................................651
15.7 ML .....................................................................................................653
15.8 Haskell ...............................................................................................658
15.9 F# .......................................................................................................663
15.10 Support for Functional Programming in Primarily
Imperative Languages .......................................................................666
15.11 A Comparison of Functional and Imperative Languages .................669
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................671
Chapter 16 Logic Programming Languages 679
16.1 Introduction .......................................................................................680
16.2 A Brief Introduction to Predicate Calculus ......................................680
16.3 Predicate Calculus and Proving Theorems ......................................684
16.4 An Overview of Logic Programming................................................686
16.5 The Origins of Prolog .......................................................................688
16.6 The Basic Elements of Prolog ..........................................................688
16.7 Deficiencies of Prolog .......................................................................703
16.8 Applications of Logic Programming .................................................709
Summary • Bibliographic Notes • Review Questions • Problem Set •
Programming Exercises ...............................................................................710
Bibliography ............................................................................715
Index ......................................................................................725

Программист

Post 24-Aug-2021 03:55

[Quote]

Software Engineering at Google: Lessons Learned from Programming Over Time / Делай как в Google. Разработка программного обеспечения
Год издания: 2021
Автор: Titus Winters, Tom Manshreck, Hyrum Wright / Титус Винтерс, Том Маншрек, Хайрам Райт
Переводчик: А. Киселев
Издательство: Питер
ISBN: 978-5-4461-1774-1
Серия: Бестселлеры O’Reilly
Язык: Русский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 544
Описание:
Современные программисты должны не только эффективно программировать, но и знать надлежащие инженерные практики, позволяющие сделать кодовую базу стабильной и качественной.
В чем же разница между программированием и программной инженерией? Как разработчик может управлять живой кодовой базой, которая развивается и реагирует на меняющиеся требования на всем протяжении своего существования?
Основываясь на опыте Google, инженеры-программисты Титус Винтерс и Хайрам Райт вместе с Томом Маншреком делают откровенный и проницательный анализ того, как ведущие мировые практики создают и поддерживают ПО. Речь идет об уникальной инженерной культуре, процессах и инструментах Google, а также о том, как эти аспекты влияют на эффективность разработки.
Вы изучите фундаментальные принципы, которые компании разработчиков ПО должны учитывать при проектировании, разработке архитектуры, написании и сопровождении кода.

Примеры страниц

Мои остальные раздачи -

Программист

Post 21-Aug-2021 15:00

[Quote]

Hands-on Rust: Effective Learning through 2D Game Development and Play
Год издания: 2021
Автор: Wolverson Herbert
Издательство: The Pragmatic Programmers
ISBN: 978-1680508161
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 332
Описание: Rust is an exciting programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters. With Rust, you have a shiny new playground where your game ideas can flourish.
Each chapter in this book presents hands-on, practical projects that take you on a journey from “Hello, World” to building a full dungeon crawler game. Start by setting up Rust and getting comfortable with your development environment. Learn the language basics with practical examples as you make your own version of Flappy Bird. Discover what it takes to randomly generate dungeons and populate them with monsters as you build a complete dungeon crawl game. Run game systems concurrently for high-performance and fast game-play, while retaining the ability to debug your program. Unleash your creativity with magical items, tougher monsters, and intricate dungeon design. Add layered graphics and polish your game with style.

Примеры страниц

Оглавление

Part I — Getting Started with Rust
1. Rust and Your Development Environment . . . . . . 3
Installing Rust 3
Installing and Configuring Your Development Environment 7
Managing Projects with Cargo 8
Creating Your First Rust Program 10
Using Cargo to Build, Check, or Run Your Project 13
Formatting Your Code 14
Finding Common Mistakes with Clippy 14
Package Management with Cargo 17
Wrap-Up 18
2. First Steps with Rust . . . . . . . . . . 19
Creating a New Project 19
Capturing User Input 20
Moving Input to a Function 24
Trimming Input 25
Storing Strings in an Array 26
Grouping Data with Structs 29
Storing a Variable Amount of Data with Vectors 34
Categorizing with Enumerations 38
Wrap-Up 43
3. Build Your First Game with Rust . . . . . . . . 45
Understanding the Game Loop 45
Creating Different Game Modes 53
Adding the Player 57
Creating Obstacles and Keeping Score 62
Wrap-Up 68
Part II — Building a Dungeon Crawler
4. Design a Dungeon Crawler . . . . . . . . . 71
Adding Headings to Your Design Document 71
Wrap-Up 73
5. Build a Dungeon Crawler . . . . . . . . . 75
Dividing Your Code Into Modules 75
Organizing Your Imports With a Prelude 78
Storing the Dungeon Map 79
Adding the Adventurer 84
Building a Dungeon 88
Graphics, Camera, Action 94
Wrap-Up 102
6. Compose Dungeon Denizens . . . . . . . . 103
Understanding Terminology 103
Composing Entities 105
Installing and Using Legion 106
Composing the Player 108
Managing Complexity with Systems 110
Adding Monsters 122
Collision Detection 124
Wrap-Up 126
7. Take Turns with the Monsters . . . . . . . . 127
Making Monsters Wander Randomly 127
Moving Entites in a Turn-Based Game 130
Sending Messages of Intent 135
Wrap-Up 140
8. Health and Melee Combat . . . . . . . . . 141
Giving Entities Hit Points 141
Adding a Heads-up Display 142
Implementing Combat 151
Waiting as a Strategy 159
Wrap-Up 160
9. Victory and Defeat . . . . . . . . . . . 161
Building a Smarter Monster 162
Implementing a Game Over Screen 173
Finding the Amulet of Yala 177
Wrap-Up 184
10. Fields of View . . . . . . . . . . . . 185
Defining an Entity’s Field of View 186
Limiting Monsters’ Fields of View 196
Adding Spatial Memory 198
Wrap-Up 202
11. More Interesting Dungeons . . . . . . . . . 203
Creating Traits 204
Creating Cellular Automata Maps 211
Creating Drunkard’s Walk Maps 218
Prefabricating Map Sections 225
Wrap-Up 230
12. Map Themes . . . . . . . . . . . . 231
Theming Your Dungeon 231
Rendering with Themes 234
Unleashing Your Imagination 238
Wrap-Up 239
13. Inventory and Power-Ups . . . . . . . . . 241
Designing Items 241
Managing Inventory 244
Wrap-Up 255
14. Deeper Dungeons . . . . . . . . . . . 257
Adding Stairs to the Map 257
Tracking Game Level 261
Displaying the Current Level on the HUD 267
Wrap-Up 267
15. Combat Systems and Loot . . . . . . . . . 269
Designing Data-Driven Dungeons 270
Extending the Combat System 280
Adding More Swords 285
Wrap-Up 286
16. Final Steps and Finishing Touches . . . . . . . 287
Packaging Your Game for Distribution 287
Making the Dungeon Crawler Your Own 289
Additional Content 290
Wrap-Up 290
Part III — Additional Resources
A1. ASCII/Codepage 437 Chart . . . . . . . . . 295
A2. Short Game Design Documents . . . . . . . . 297
Make a Note of Every Idea 297
Why You Need a Design Document 298
Design Document Headings 299
You Aren’t Gonna Need It 301
Wrap-Up 303
A3. Rust Cheat Sheet . . . . . . . . . . . 305
Bibliography . . . . . . . . . . . . 307
Index . . . . . . . . . . . . . . 309

Программист

Post 20-Aug-2021 11:35

[Quote]

Learning Go: An Idiomatic Approach to Real-World Go Programming
Год издания: 2021
Автор: Bodner Jon
Издательство: O’Reilly
ISBN: 978-1492077213
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 360
Описание: Go is rapidly becoming the preferred language for building web services. While there are plenty of tutorials available that teach Go's syntax to developers with experience in other programming languages, tutorials aren't enough. They don't teach Go's idioms, so developers end up recreating patterns that don't make sense in a Go context. This practical guide provides the essential background you need to write clear and idiomatic Go.
No matter your level of experience, you'll learn how to think like a Go developer. Author Jon Bodner introduces the design patterns experienced Go developers have adopted and explores the rationale for using them. You'll also get a preview of Go's upcoming generics support and how it fits into the language.
Learn how to write idiomatic code in Go and design a Go project
Understand the reasons for the design decisions in Go
Set up a Go development environment for a solo developer or team
Learn how and when to use reflection, unsafe, and cgo
Discover how Go's features allow the language to run efficiently
Know which Go features you should use sparingly or not at all

Примеры страниц

Оглавление

Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1. Setting Up Your Go Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Installing the Go Tools 1
The Go Workspace 2
The go Command 3
go run and go build 3
Getting Third-Party Go Tools 5
Formatting Your Code 6
Linting and Vetting 8
Choose Your Tools 9
Visual Studio Code 9
GoLand 10
The Go Playground 11
Makefiles 13
Staying Up to Date 14
Wrapping Up 16
2. Primitive Types and Declarations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Built-in Types 17
The Zero Value 17
Literals 18
Booleans 19
Numeric Types 20
A Taste of Strings and Runes 26
Explicit Type Conversion 26
var Versus := 27
Using const 29
Typed and Untyped Constants 31
Unused Variables 32
Naming Variables and Constants 33
Wrapping Up 34
3. Composite Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Arrays—Too Rigid to Use Directly 35
Slices 37
len 38
append 39
Capacity 39
make 41
Declaring Your Slice 42
Slicing Slices 43
Converting Arrays to Slices 46
copy 46
Strings and Runes and Bytes 48
Maps 51
Reading and Writing a Map 53
The comma ok Idiom 54
Deleting from Maps 54
Using Maps as Sets 55
Structs 56
Anonymous Structs 58
Comparing and Converting Structs 59
Wrapping Up 60
4. Blocks, Shadows, and Control Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Blocks 61
Shadowing Variables 62
Detecting Shadowed Variables 64
if 65
for, Four Ways 67
The Complete for Statement 67
The Condition-Only for Statement 68
The Infinite for Statement 68
break and continue 69
The for-range Statement 71
Labeling Your for Statements 76
Choosing the Right for Statement 77
switch 78
Blank Switches 81
Choosing Between if and switch 83
goto—Yes, goto 83
Wrapping Up 86
5. Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Declaring and Calling Functions 87
Simulating Named and Optional Parameters 88
Variadic Input Parameters and Slices 89
Multiple Return Values 90
Multiple Return Values Are Multiple Values 91
Ignoring Returned Values 91
Named Return Values 92
Blank Returns—Never Use These! 93
Functions Are Values 94
Function Type Declarations 96
Anonymous Functions 96
Closures 97
Passing Functions as Parameters 98
Returning Functions from Functions 99
defer 100
Go Is Call By Value 104
Wrapping Up 106
6. Pointers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
A Quick Pointer Primer 107
Don’t Fear the Pointers 111
Pointers Indicate Mutable Parameters 113
Pointers Are a Last Resort 117
Pointer Passing Performance 118
The Zero Value Versus No Value 118
The Difference Between Maps and Slices 119
Slices as Buffers 122
Reducing the Garbage Collector’s Workload 123
Wrapping Up 127
7. Types, Methods, and Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Types in Go 129
Methods 130
Pointer Receivers and Value Receivers 131
Code Your Methods for nil Instances 133
Methods Are Functions Too 134
Functions Versus Methods 135
Type Declarations Aren’t Inheritance 135
Types Are Executable Documentation 136
iota Is for Enumerations—Sometimes 137
Use Embedding for Composition 139
Embedding Is Not Inheritance 140
A Quick Lesson on Interfaces 141
Interfaces Are Type-Safe Duck Typing 142
Embedding and Interfaces 146
Accept Interfaces, Return Structs 146
Interfaces and nil 147
The Empty Interface Says Nothing 148
Type Assertions and Type Switches 150
Use Type Assertions and Type Switches Sparingly 152
Function Types Are a Bridge to Interfaces 154
Implicit Interfaces Make Dependency Injection Easier 155
Wire 159
Go Isn’t Particularly Object-Oriented (and That’s Great) 159
Wrapping Up 160
8. Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
How to Handle Errors: The Basics 161
Use Strings for Simple Errors 163
Sentinel Errors 163
Errors Are Values 165
Wrapping Errors 168
Is and As 170
Wrapping Errors with defer 173
panic and recover 174
Getting a Stack Trace from an Error 176
Wrapping Up 176
9. Modules, Packages, and Imports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Repositories, Modules, and Packages 177
go.mod 178
Building Packages 178
Imports and Exports 178
Creating and Accessing a Package 179
Naming Packages 181
How to Organize Your Module 182
Overriding a Package’s Name 183
Package Comments and godoc 184
The internal Package 185
The init Function: Avoid if Possible 186
Circular Dependencies 187
Gracefully Renaming and Reorganizing Your API 188
Working with Modules 190
Importing Third-Party Code 190
Working with Versions 192
Minimum Version Selection 194
Updating to Compatible Versions 195
Updating to Incompatible Versions 196
Vendoring 197
pkg.go.dev 198
Additional Information 198
Publishing Your Module 199
Versioning Your Module 199
Module Proxy Servers 200
Specifying a Proxy Server 201
Private Repositories 201
Wrapping Up 202
10. Concurrency in Go. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
When to Use Concurrency 203
Goroutines 205
Channels 206
Reading, Writing, and Buffering 206
for-range and Channels 208
Closing a Channel 208
How Channels Behave 209
select 209
Concurrency Practices and Patterns 212
Keep Your APIs Concurrency-Free 212
Goroutines, for Loops, and Varying Variables 213
Always Clean Up Your Goroutines 214
The Done Channel Pattern 215
Using a Cancel Function to Terminate a Goroutine 216
When to Use Buffered and Unbuffered Channels 216
Backpressure 217
Turning Off a case in a select 219
How to Time Out Code 219
Using WaitGroups 220
Running Code Exactly Once 222
Putting Our Concurrent Tools Together 223
When to Use Mutexes Instead of Channels 227
Atomics—You Probably Don’t Need These 230
Where to Learn More About Concurrency 230
Wrapping Up 231
11. The Standard Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
io and Friends 233
time 238
Monotonic Time 240
Timers and Timeouts 241
encoding/json 241
Use Struct Tags to Add Metadata 241
Unmarshaling and Marshaling 243
JSON, Readers, and Writers 243
Encoding and Decoding JSON Streams 245
Custom JSON Parsing 246
net/http 247
The Client 247
The Server 249
Wrapping Up 253
12. The Context. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
What Is the Context? 255
Cancellation 258
Timers 261
Handling Context Cancellation in Your Own Code 263
Values 265
Wrapping Up 270
13. Writing Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
The Basics of Testing 271
Reporting Test Failures 273
Setting Up and Tearing Down 273
Storing Sample Test Data 275
Caching Test Results 275
Testing Your Public API 276
Use go-cmp to Compare Test Results 277
Table Tests 278
Checking Your Code Coverage 280
Benchmarks 283
Stubs in Go 286
httptest 291
Integration Tests and Build Tags 294
Finding Concurrency Problems with the Race Checker 295
Wrapping Up 297
14. Here There Be Dragons: Reflect, Unsafe, and Cgo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Reflection Lets Us Work with Types at Runtime 300
Types, Kinds, and Values 301
Making New Values 305
Use Reflection to Check If an Interface’s Value Is nil 306
Use Reflection to Write a Data Marshaler 307
Build Functions with Reflection to Automate Repetitive Tasks 312
You Can Build Structs with Reflection, but Don’t 313
Reflection Can’t Make Methods 314
Only Use Reflection If It’s Worthwhile 314
unsafe Is Unsafe 315
Use unsafe to Convert External Binary Data 316
unsafe Strings and Slices 319
unsafe Tools 320
Cgo Is for Integration, Not Performance 321
Wrapping Up 324
15. A Look at the Future: Generics in Go. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Generics Reduce Repetitive Code and Increase Type Safety 325
Introducing Generics in Go 328
Use Type Lists to Specify Operators 332
Generic Functions Abstract Algorithms 333
Type Lists Limit Constants and Implementations 334
Things That Are Left Out 337
Idiomatic Go and Generics 339
Further Futures Unlocked 339
Wrapping Up 340
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

Программист

Post 20-Aug-2021 06:55

[Quote]

Язык программирования Go. Руководство 2016
Год издания: 2016
Автор: Крюков Е.А.
Издательство: Accent Graphics communications
Язык: Русский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Количество страниц: 235
Описание: Go – это язык программирования нового поколения, разрабатываемый в недрах Google изначально для собственных нужд, а ныне поддерживаемый OpenSource-сообществом.
Совмещая простоту и мощность, Go вполне способен заменить С/С++ и JavaScript, как бы это странно ни звучало.
На западе Go уже давно вошёл в оборот, тогда как родные пенаты только приоткрывают двери для голубого суслика.

Примеры страниц

Опубликовано группой

Программист

Post 17-Aug-2021 15:00

[Quote]

Entity Framework Core in Action, 2nd Edition
Год издания: 2021
Автор: Smith Jon P.
Издательство: Manning
ISBN: 9781617298363
Язык: Английский
Формат: PDF/ePub
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 624
Описание: Entity Framework Core in Action, Second Edition teaches you to write flawless database interactions for .NET applications. Following relevant examples from author Jon Smith’s extensive experience, you’ll progress quickly from EF basics to advanced techniques. In addition to the latest EF features, this book addresses performance, security, refactoring, and unit testing. This updated edition also contains new material on NoSQL databases.
what's inside:
  • Configuring EF to define every table and column
  • Updating your schema as your app grows
  • Integrating EF with existing C# application
  • Writing and testing business logic for database access
  • Applying a Domain-Driven Design to EF Core
  • Getting the best performance out of EF Core
about the reader:
For .NET developers familiar with relational databases.
about the author:
Jon P. Smith is a freelance software developer and architect with a special focus on .NET and Azure.

Примеры страниц

Оглавление

PART 1
1 Introduction to Entity Framework Core
2 Querying the database
3 Changing the database content
4 Using EF Core in business logic
5 Using EF Core in ASP.NET Core web applications
6 Tips and techniques for reading and writing with EF Core
PART 2
7 Configuring nonrelational properties
8 Configuring relationships
9 Handling database migrations
10 Configuring advanced features and handling concurrency conflicts
11 Going deeper into the DbContext
PART 3
12 Using entity events to solve business problems
13 Domain-Driven Design and other architectural approaches
14 EF Core performance tuning
15 Master class on performance-tuning database queries
16 Cosmos DB, CQRS, and other database types
17 Unit testing EF Core applications
appendix A A brief introduction to LINQ
 

The time now is: Today 21:53

All times are GMT + 4 Hours