The document discusses several design patterns including decorator, composite, specification, and builder patterns. It provides examples of implementing a simple string decorator to add split and length methods. It also shows a composite pattern example using neurons and layers. The specification pattern is demonstrated for flexible filtering of product objects. Finally, fluent and Groovy-style builders are explored for constructing HTML elements in a cleaner way.
На протяжении всего существования C++ тема компайл-тайм рефлексии поднимается постоянно, но, к сожалению, до сих пор Стандарт языка не дает достаточных возможностей для извлечения и манипулирования компайл-тайм информацией. Большое количество библиотек и препроцессоров было придумано для того, чтобы решить эту проблему, начиная от простых макросов и заканчивая Qt-moc или ODB. В докладе Антон расскажет о том, как на эту проблему смотрит Комитет по Стандартизации: какие решения были предложены, и какое стало доминирующим.
Fuzzing is a software testing technique that involves providing invalid, unexpected, or random data to the inputs of a computer program. The presentation covers types of fuzzers and describes how they work. We will write and run a real fuzzer. Also it shows how fuzzers can guess correct CRC checksums, help with regression testing and find logical bugs in programs. Finally, it summarizes fuzzing usage at Google.
модели акторов в с++ миф или реальностьcorehard_by
В настоящее время многие разрабатываемые решения носят характер сложных или распределенных систем. Для построения таких систем часто используются Erlang, Elixir или Akka + family language of JVM. Благодаря чему они так хороши? В Erlang, Elixir и Akkk применяется модель акторов на уровне языка или библиотеки как базовый подход. Почему же С++ разработчики должны быть обделены? Рассмотрим применение модели акторов на примере задачи из продакшена. Поговорим о сложностях, которые встречаются при применении модели акторов. В процессе обсудим "подводные камни", которые можно встретить в той или иной реализации модели акторов.
Дмитрий Демчук. Кроссплатформенный краш-репортSergey Platonov
Доклад будет посвящен возможностям библиотеки Google Breakpad по созданию краш-репорта. Посмотрим как это работает изнутри.
На примерах будут рассмотрены способы интеграции библиотеки на разных платформах Windows, Linux, Max OS.
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
The talk will look at limitations of compilers when creating fast code and how to make more effective use of both the underlying micro-architecture of modern CPU's and how algorithmic optimizations may have surprising effects on the generated code. We shall discuss several specific CPU architecture features and their pros and cons in relation to creating fast C++ code. We then expand with several algorithmic techniques, not usually well-documented, for making faster, compiler friendly, C++.
Note that we shall not discuss caching and related issues here as they are well documented elsewhere.
Multithreading with modern C++ is hard. Undefined variables, Deadlocks, Livelocks, Race Conditions, Spurious Wakeups, the Double Checked Locking Pattern, etc. And at the base is the new Memory-Modell which make the life not easier. The story of things which can go wrong is very long. In this talk I give you a tour through the things which can go wrong and show how you can avoid them.
Со времён С++98 стандартные контейнеры и идиома RAII позволяли избегать использования оператора delete,
что делало код более безопасным. С приходом С++11 и умных указателей отпала необходимость использовать оператор new, что позволило практически полностью переложить управление памятью на плечи компилятора. В
докладе объясняется идеология управления памятью и ресурсами в современном С++.
На протяжении всего существования C++ тема компайл-тайм рефлексии поднимается постоянно, но, к сожалению, до сих пор Стандарт языка не дает достаточных возможностей для извлечения и манипулирования компайл-тайм информацией. Большое количество библиотек и препроцессоров было придумано для того, чтобы решить эту проблему, начиная от простых макросов и заканчивая Qt-moc или ODB. В докладе Антон расскажет о том, как на эту проблему смотрит Комитет по Стандартизации: какие решения были предложены, и какое стало доминирующим.
Fuzzing is a software testing technique that involves providing invalid, unexpected, or random data to the inputs of a computer program. The presentation covers types of fuzzers and describes how they work. We will write and run a real fuzzer. Also it shows how fuzzers can guess correct CRC checksums, help with regression testing and find logical bugs in programs. Finally, it summarizes fuzzing usage at Google.
модели акторов в с++ миф или реальностьcorehard_by
В настоящее время многие разрабатываемые решения носят характер сложных или распределенных систем. Для построения таких систем часто используются Erlang, Elixir или Akka + family language of JVM. Благодаря чему они так хороши? В Erlang, Elixir и Akkk применяется модель акторов на уровне языка или библиотеки как базовый подход. Почему же С++ разработчики должны быть обделены? Рассмотрим применение модели акторов на примере задачи из продакшена. Поговорим о сложностях, которые встречаются при применении модели акторов. В процессе обсудим "подводные камни", которые можно встретить в той или иной реализации модели акторов.
Дмитрий Демчук. Кроссплатформенный краш-репортSergey Platonov
Доклад будет посвящен возможностям библиотеки Google Breakpad по созданию краш-репорта. Посмотрим как это работает изнутри.
На примерах будут рассмотрены способы интеграции библиотеки на разных платформах Windows, Linux, Max OS.
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
The talk will look at limitations of compilers when creating fast code and how to make more effective use of both the underlying micro-architecture of modern CPU's and how algorithmic optimizations may have surprising effects on the generated code. We shall discuss several specific CPU architecture features and their pros and cons in relation to creating fast C++ code. We then expand with several algorithmic techniques, not usually well-documented, for making faster, compiler friendly, C++.
Note that we shall not discuss caching and related issues here as they are well documented elsewhere.
Multithreading with modern C++ is hard. Undefined variables, Deadlocks, Livelocks, Race Conditions, Spurious Wakeups, the Double Checked Locking Pattern, etc. And at the base is the new Memory-Modell which make the life not easier. The story of things which can go wrong is very long. In this talk I give you a tour through the things which can go wrong and show how you can avoid them.
Со времён С++98 стандартные контейнеры и идиома RAII позволяли избегать использования оператора delete,
что делало код более безопасным. С приходом С++11 и умных указателей отпала необходимость использовать оператор new, что позволило практически полностью переложить управление памятью на плечи компилятора. В
докладе объясняется идеология управления памятью и ресурсами в современном С++.
Gor Nishanov, C++ Coroutines – a negative overhead abstractionSergey Platonov
C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.
Oxygine 2 d objects,events,debug and resourcescorehard_by
Доклад будет посвящен созданию/удалению и взаимодействию игровых объектах, о стандартных и кастомизированных смартпоинтерах. Какими вещами пользоваться чтобы получить debug информацию о том что происходит в игре. Будут приведены примеры шаблонов игрового проектирования. Несколько слов о интересных редакторах игровых ресурсов: MapEditor.com, Astralax.ru
••• Learn how to safely manage memory with smart pointers! •••
In this presentation you will learn:
▸ the dangers of using raw pointers for dynamic memory
▸ the difference between unique_ptr, shared_ptr, weak_ptr
▸ how to use factories to increase safety and performance
▸ when raw pointers are still needed
2018 cosup-delete unused python code safely - englishJen Yee Hong
The talk is about doing cleanup and refactor for legacy Python code base in a safer way. I introduced several existing tools for this task and demonstrated how (surprisingly) Python ast module can also help in this case.
中文摘要:
不管是 open source 專案還是工作上,經過長時間開發累積,source code 內可能會殘留許多不再需要的 code,造成維護以及 refactor 的困難,也造成新手 trace code 時的障礙。
對 C/C++ 這類編譯式語言來說,開啟編譯器最佳化能自動清除 dead code,但對於 Python 這類動態語言,則沒有公認完美的方法。
本議程分享一些相關經驗,佐以利用 Python AST 的簡易自製工具,討論如何從較複雜的 python source tree 中,安全的清除不再需要的 code。
Code: https://github.com/PCMan/python-find-unused-func
(5) cpp abstractions essential_operatorsNico Ludwig
- The Copy-Operator=
- The "Rule of Three"
- Lvalues and C++11 Rvalues
- (C++11: The "Rule of Five")
- Equality Operators
- Comparison Operators and Equivalence
- Non-Member Function Operators and Friends
- The Output Operator
While software engineers can disagree on almost any concept of programming best-practice, the necessity of writing unit tests remains undisputed. With the advent of concurrent applications and the ongoing deprecation of the one-thread-per-request model, unit tests do however miss an increasing fraction of programming errors such as race conditions or dead-locking code. But is it even possible to write tests that revise such errors? In the end, a good unit test is characterized by a determined execution path what effectively prevents the use of concurrency within a single test. However, there are tools and programming principles that allow for unit tests of concurrent code. This talk reviews typical mistakes made when concurrent code is tested and introduces Thread Weaver, a test suite for writing valid unit tests that uncover concurrency-related programming errors.
Design Patterns - Compiler Case Study - Hands-on ExamplesGanesh Samarthyam
This presentation takes a case-study based approach to design patterns. A purposefully simplified example of expression trees is used to explain how different design patterns can be used in practice. Examples are in C#, but is relevant for anyone who is from object oriented background.
Basic c++ 11/14 for python programmersJen Yee Hong
A short list of some common python programming patterns and their C++ equivalents. This can help programmers learn C++ in a more efficient way if he or she already knows Python.
Part of this material is used for internal training of Appier Inc, one of the leading artificial intelligence company in Asia.
Thank Appier Inc. for allowing me to share this.
Использование юнит-тестов для повышения качества разработкиvictor-yastrebov
В докладе рассмотрены подходы к созданию надежных юнит-тестов, которые просты в поддержке и модернизации, а также принципы создания кода пригодного для покрытия автотестами. Приведены два способа внедрения зависимости: с использованием конструктора тестируемого объекта, а также с использованием подхода "выделить и переопределить". Каждый из способов разобран на примере, демонстрирующем особенности его реализации и применения. Приведен ряд практических советов, нацеленных на создание надежных юнит-тестов. Использование на практике приведенных подходов и принципов позволяет упростить процесс поддержки и модификации существующего кода, а также дает уверенность в надежности работы добавляемого нового функционала. В конечном итоге это приводит к повышению качества разрабатываемого продукта.
Gor Nishanov, C++ Coroutines – a negative overhead abstractionSergey Platonov
C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.
Oxygine 2 d objects,events,debug and resourcescorehard_by
Доклад будет посвящен созданию/удалению и взаимодействию игровых объектах, о стандартных и кастомизированных смартпоинтерах. Какими вещами пользоваться чтобы получить debug информацию о том что происходит в игре. Будут приведены примеры шаблонов игрового проектирования. Несколько слов о интересных редакторах игровых ресурсов: MapEditor.com, Astralax.ru
••• Learn how to safely manage memory with smart pointers! •••
In this presentation you will learn:
▸ the dangers of using raw pointers for dynamic memory
▸ the difference between unique_ptr, shared_ptr, weak_ptr
▸ how to use factories to increase safety and performance
▸ when raw pointers are still needed
2018 cosup-delete unused python code safely - englishJen Yee Hong
The talk is about doing cleanup and refactor for legacy Python code base in a safer way. I introduced several existing tools for this task and demonstrated how (surprisingly) Python ast module can also help in this case.
中文摘要:
不管是 open source 專案還是工作上,經過長時間開發累積,source code 內可能會殘留許多不再需要的 code,造成維護以及 refactor 的困難,也造成新手 trace code 時的障礙。
對 C/C++ 這類編譯式語言來說,開啟編譯器最佳化能自動清除 dead code,但對於 Python 這類動態語言,則沒有公認完美的方法。
本議程分享一些相關經驗,佐以利用 Python AST 的簡易自製工具,討論如何從較複雜的 python source tree 中,安全的清除不再需要的 code。
Code: https://github.com/PCMan/python-find-unused-func
(5) cpp abstractions essential_operatorsNico Ludwig
- The Copy-Operator=
- The "Rule of Three"
- Lvalues and C++11 Rvalues
- (C++11: The "Rule of Five")
- Equality Operators
- Comparison Operators and Equivalence
- Non-Member Function Operators and Friends
- The Output Operator
While software engineers can disagree on almost any concept of programming best-practice, the necessity of writing unit tests remains undisputed. With the advent of concurrent applications and the ongoing deprecation of the one-thread-per-request model, unit tests do however miss an increasing fraction of programming errors such as race conditions or dead-locking code. But is it even possible to write tests that revise such errors? In the end, a good unit test is characterized by a determined execution path what effectively prevents the use of concurrency within a single test. However, there are tools and programming principles that allow for unit tests of concurrent code. This talk reviews typical mistakes made when concurrent code is tested and introduces Thread Weaver, a test suite for writing valid unit tests that uncover concurrency-related programming errors.
Design Patterns - Compiler Case Study - Hands-on ExamplesGanesh Samarthyam
This presentation takes a case-study based approach to design patterns. A purposefully simplified example of expression trees is used to explain how different design patterns can be used in practice. Examples are in C#, but is relevant for anyone who is from object oriented background.
Basic c++ 11/14 for python programmersJen Yee Hong
A short list of some common python programming patterns and their C++ equivalents. This can help programmers learn C++ in a more efficient way if he or she already knows Python.
Part of this material is used for internal training of Appier Inc, one of the leading artificial intelligence company in Asia.
Thank Appier Inc. for allowing me to share this.
Использование юнит-тестов для повышения качества разработкиvictor-yastrebov
В докладе рассмотрены подходы к созданию надежных юнит-тестов, которые просты в поддержке и модернизации, а также принципы создания кода пригодного для покрытия автотестами. Приведены два способа внедрения зависимости: с использованием конструктора тестируемого объекта, а также с использованием подхода "выделить и переопределить". Каждый из способов разобран на примере, демонстрирующем особенности его реализации и применения. Приведен ряд практических советов, нацеленных на создание надежных юнит-тестов. Использование на практике приведенных подходов и принципов позволяет упростить процесс поддержки и модификации существующего кода, а также дает уверенность в надежности работы добавляемого нового функционала. В конечном итоге это приводит к повышению качества разрабатываемого продукта.
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Platonov Sergey
Кто-то верно подметил, что разработчики статических анализатора часто сталкиваются с "проблемой айсберга". Им сложно объяснить разработчикам, почему сложно написать и развивать статические анализаторы кода. Дело в том, что сторонние наблюдатели видят только вершину всего процесса, так как им доступен для изучения только простой интерфейс, который предоставляют анализаторы для взаимодействия с миром. Это ведь не графический редактор с сотнями кнопок и рычажков. В результате и возникает ощущение, что раз прост интерфейс взаимодействия, то и прост продукт. На самом деле статические анализаторы кода — это сложные программы, в которых живут и взаимодействуют разнообразнейшие методы поиска дефектов. В них реализуется множество экспертные системы, выдающие заключения о коде на основе как точных, так и эмпирических алгоритмах. В парном докладе, основатели анализатора PVS-Studio расскажут о том, как незаметно потратить 10 лет, чтобы написать хороший анализатор. Дьявол кроется в деталях!
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловSergey Platonov
В докладе перед нами откроется великолепный мир велосипедов и устаревших технологий, которые люди продолжают переносить в новые проекты и повсеместно использовать. Мы поговорим о:
Copy-On-Write
разработке без оглядки на готовые решения и к чему это приводит
force inline
оптимизациях, которые отлично себя показывают на бенчмарках и плохо себя ведут в реальной жизни
бездумно отключаемых оптимизациях компилятора
тонкостях стандартной библиотеки для повседневного использования
супер качественном велосипедостроении
Фитнес для вашего кода: как держать его в формеIlia Shishkov
C++ Россия 2017
Во время моего выступления мы поговорим о принципе "Minimize coupling, maximize cohesion". Обсудим, что это такое и что значат эти непонятные слова. Кроме того на приближенном к реальности примере мы рассмотрим, как, применяя указанный принцип, можно держать ваш код в форме, чтобы он был готов ко всем неожиданностям, которые подстерегают ваш проект в течение его жизни.
Василий Сорокин, Простой REST сервер на Qt с рефлексиейSergey Platonov
Библиотека Qt имеет довольно мощную систему рефлексии. На примере простого в использовании класса, позволяющего с помощью наследования быстро построить REST сервер под ваши нужды, я покажу как элегантно ее можно задействовать в реальной жизни. В заключительной части, покажу еще один пример когда рефлексия Qt помогает красиво протестировать испускание сигналов классом.
Доклад вводит в рассмотрение универсальный адаптер, позволяющий обернуть любой класс с целью добавления новых свойств, отсутствующих в оригинальном классе. Получаемые классы могут иметь в точности такой же интерфейс, как и первоначальные, что позволяет прозрачно заменять их и оборачивать любое количество раз.
Это позволяет добавлять необходимые свойства объектам, не переписывая его с нуля. Предложенная обобщенная концепция будет последовательно введена и проиллюстрирована простыми, но интересными примерами.
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptSergey Platonov
Шаблоны — мощный инструмент, добавляющий в язык новые возможности, а программистам в команде — новые проблемы. Доклад покажет, как тщательно продуманный шаблонный код может не усложнить, а упростить жизнь и дать надёжную абстракцию межпроцессных межъязыковых асинхронных вызовов функций. С помощью шаблонов можно:
адаптировать Promise/A+ из Javascript для C++
автоматически проверять и раскладывать динамический массив аргументов на статичные аргументы функции
сделать аналог std::bind для weak_ptr.
Эти вещи будут показаны на примере взаимных вызовов между C++ и Javascript в одном приложении с помощью CEF3.
Догнать и перегнать boost::lexical_castRoman Orlov
Разбор нестандартной реализации преобразования целого числа в строку без использования циклов и рекурсивных вызовов времени исполнения - только рекурсия на этапе компиляции
В своих прошлых докладах (http://cpp-russia.ru/?p=198, и http://cpp-russia.ru/?page_id=1239) я рассказывал о C++ без исключений, как с эти жить, как работать. Этот доклад является продолжением этой серии. Я рекомендую освежить в памяти предыдущие доклады, чтобы наша работа была более продуктивной. Мы обсудим механизмы создания, копирования и перемещения объектов, механизмы аллокации и деаллокации памяти, а также обработку ошибок и исключений. Также мы обсудим проблемы и неудобства, которые испытывает программист, когда пишет код без исключений. В конце, я попытаюсь показать, как можно проектировать структуры данных, контейнеры для удобной работы в средах с исключениями и без исключений.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
Presentation with a brief history of C, C++ and their ancestors along with an introduction to latest version C++11 and futures such as C++17. The presentation covers applications that use C++, C++11 compilers such as LLVM/Clang, some of the new language features in C++11 and C++17 and examples of modern idioms such as the new form compressions, initializer lists, lambdas, compile time type identification, improved memory management and improved standard library (threads, math, random, chrono, etc). (less == more) || (more == more)
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
C Tutorial, Clanguage,
C Programming Tutorial
C - Home
C - Overview
C - Environment Setup
C - Program Structure
C - Basic Syntax
C - Data Types
C - Variables
C - Constants
C - Storage Classes
C - Operators
C - Decision Making
C - Loops
C - Functions
C - Scope Rules
C - Arrays
C - Pointers
C - Strings
C - Structures
C - Unions
C - Bit Fields
C - Typedef
C - Input & Output
C - File I/O
C - Preprocessors
C - Header Files
C - Type Casting
C - Error Handling
C - Recursion
C - Variable Arguments
C - Memory Management
C - Command Line Arguments
Similar to Дмитрий Нестерук, Паттерны проектирования в XXI веке (20)
Антон Бикинеев, Writing good std::future< C++ >Sergey Platonov
В докладе Антон расскажет о грядущих мажорных изменениях языка, которые, не войдя в Стандарт 17-го года и оставшись в Technical Specifications, будут ждать своего мержа в 20-м, а также быть уже реализованными в некоторых компиляторах. Осветятся также минорные, уже одобренные фичи следующего Стандарта, как языковые, так и библиотечные. Антон расскажет об их целях, покажет методы использования, а также осветит некоторые гайдлайны и трики.
Павел Филонов, Разделяй и управляй вместе с Conan.ioSergey Platonov
Несмотря на солидный возраст С++, одной из больших проблем, возникающих при разработке с его использованием, до сих пор является управление зависимостям. Особенно остро этот вопрос возникает при наличии нескольких различных целевых платформ. В докладе будет рассмотрено, как менеджер пакетов Conan.io позволяет решить проблему управления зависимостями и, как следствие, значительно улучшить скорость разработки на C++ и повысить модульность разрабатываемых систем.
Григорий Демченко, Асинхронность и неблокирующая синхронизацияSergey Platonov
Практика показывает, что использование подхода, основанного на колбеках для асинхронного программирования обычно не является удобным и подвержено различным ошибкам. Для упрощения написания и поддержки сложных асинхронных программ можно использовать несколько иной подход: использовать сопрограммы для переключения контекста на время ожидания события. Такой подход позволяет реализовать интересные неблокирующие примитивы, включая неблокирующее сетевое взаимодействие, неблокирующие мьютексы, а также удобное переключение между различными пулами потоков для разнесения выполнения задач, которые требуют различные ресурсы.
Хочется чего-то новенького, необычного? Тогда добро пожаловать в мир чудеc C++17:
if constexpr (auto& [number, ok] = variable; ok)
return "Hi"
else
return number + 42;
Вы услышите о новом стандарте C++, обнаружите для себя новые полезные классы, функции и возможности языка. Для каждой новинки я приведу примеры использования, расскажу о нюансах и подводных камнях.
А ещё вы узнаете о том, как проходят заседания комитета по стандартизации C++ и сможете задать интересующие вас вопросы связанные с нововведениями С++17 и С++Next.
Павел Беликов, Как избежать ошибок, используя современный C++Sergey Platonov
Одной из проблем C++ является большое количество конструкций, поведение которых не определено или просто неожиданно для программиста. С такими ошибками мы часто сталкиваемся при разработке статического анализатора кода. Но, как известно, лучше всего находить ошибки ещё на этапе компиляции. На этом докладе мы поговорим о том, какие техники из современного C++ позволяют писать не только более простой и выразительный, но и безопасный код. Вы увидите ошибки в коде различных Open Source проектов и узнаете, как можно их избежать, используя новые стандарты
Тестирование графического интерфейса пользователя является одним из основных видов тестирования графических приложений. В докладе будут рассмотрены задачи и особенности такого тестирования.
Далее будут рассмотрены плюсы и минусы использования стандартной Qt библиотеки QTest, и представлен проект QSpec, как альтернатива QTest. Также будут представлены примеры использования QSpec и дальнейшие планы по развитию этого проекта.
Адрес проекта: https://github.com/ugeneunipro/QSpec
Не так давно Гор Нишанов представил свой доклад: C++ Coroutines a negative overhead abstraction. В этом докладе Гор упомянул, что предложенный дизайн корутин позволяет их использовать практически в любых окружениях, в том числе и с "бедным" C++ рантаймом.
Я решил попробовать запустить корутины в следующих окружениях: обычное приложение, драйвер ОС Windows, EFI приложение. Только в одном из этих окружений есть полноценный C++ рантайм и поддержка исключений, в остальных ничего этого нет. Более того, EFI приложение вообще выполняется до старта ОС.
Я хочу рассказать о том, как мне удалось запустить корутины в этих окружениях, поговорим о том, какие проблемы существуют в асинхронном системном программировании и как их можно обойти.
Илья Шишков, Принципы создания тестируемого кодаSergey Platonov
В докладе рассмотрено зачем нужно покрывать код автотестами и почему многие этого до сих пор не делают. Что такое хорошие юнит-тесты и какую пользу они дают помимо собственно тестирования. Три принципа организации кода, упрощающие создание юнит-тестов: закон Деметры, внедрение зависимости и принцип единой ответственности. Каждый принцип разобран на примере, демонстрирующем его применение и получаемые при этом преимущества.
Антон Наумович, Система автоматической крэш-аналитики своими средствамиSergey Platonov
В докладе будет рассмотрена система контроля качества с помощью снятия и анализа крэшдамп-файлов (применительно в первую очередь к системе Windows). Будет представлена архитектура и инструментарий для организации автоматического сбора и анализа крэшдамп-файлов, снимаемых в момент возникновения проблем в приложениях (падения, зависания, превышение потребления ресурсов – памяти, файловых дескрипторов и т.д.)
Андрей Карпов, Приватные байки от разработчиков анализатора кодаSergey Platonov
Доклад о редких нестандартных расширениях языка С++, про которые никто не знает, но которые надо поддерживать в анализаторе кода.
О магии Visual C++ с файлом stdafx.h, когда проект компилируется, хотя не должен. О том как зародился viva64 (предшественник PVS-Studio) для поиска 64-битных проблем. Как и почему исчез анализ кода, который одно время существовал в компиляторе Intel C++.
Юрий Ефимочев, Компилируемые в реальном времени DSL для С++ Sergey Platonov
В последнее время в промышленной разработке ПО особую популярность обретают Domain-Specific Lanugages (DSL). Они драматически упрощают разработку и дают возможность “программировать” не только программистам, но и пользователям прикладных программ.
В своем докладе я расскажу об опыте использования DSL применительно к С++, причем упор будет сделан на производительность кода DSL, и его мгновенную “встраиваемость” в запущенную программу путем компиляции DSL-кода в нативный код с помощью инструментария LLVM.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Accelerate Enterprise Software Engineering with Platformless
Дмитрий Нестерук, Паттерны проектирования в XXI веке
1. Design Paterns in the
XXI Century
Dmitri Nesteruk
dmitrinesteruk@gmail.com
@dnesteruk
2. What’s In This Talk?
• Examples of patterns and approaches in OOP design
• Simple decorator
• Composite
• Specification pattern/OCP
• Fluent and Groovy-style builders
• Maybe monad
4. STL String Complaints
• Making a string is easy
string s{“hello world”};
• Getting its constituent parts is not
vector<strings> words;
boost::split(words, s, boost::is_any_of(“ “));
• Instead I would prefer
auto parts = s.split(“ “);
• It should work with “hello world”
• Maybe some other goodies, e.g.
• Hide size()
• Have length() as a property, not a function
9. String Wrapper Usage
String s{ "hello world" };
cout << "string has " <<
s.length << " characters" << endl;
auto words = s.split(" ");
for (auto& word : words)
cout << word << endl;
10. Decorator Summary
• Aggregate objects
• Can aggregate more than one
• E.g., string and formatting
• Replicate the APIs you want (e.g., length)
• Miss out on the APIs you don’t need
• Add your own features :)
15. State Space Explosition
• void connect_to(Neuron& other)
{
out.push_back(&other);
other.in.push_back(this);
}
• Unfortunately, we need 4 functions
• Neuron to Neuron
• Neuron to NeuronLayer
• NeuronLayer to Neuron
• NeuronLayer to NeuronLayer
16. One Function Solution?
• Simple: treat Neuron as NeuronLayer of size 1
• Not strictly correct
• Does not take into account other concepts (e.g., NeuronRing)
• Better: expose a single Neuron in an iterable fashion
• Other programming languages have interfaces for iteration
• E.g., C# IEnumerable<T>
• yield keyword
• C++ does duck typing
• Expects begin/end pair
• One function solution not possible, but…
22. Open-Closed Principle
• Open for extension, closed for modification
• Bad: jumping into old code to change a stable, functioning system
• Good: making things generic enough to be externally extensible
• Example: product filtering
23. Scenario
enum class Color { Red, Green, Blue };
enum class Size {Small, Medium, Large };
struct Product
{
std::string name;
Color color;
Size size;
};
24. Filtering Products
struct ProductFilter
{
typedef std::vector<Product*> Items;
static Items by_color(Items items, Color color)
{
Items result;
for (auto& i : items)
if (i->color == color)
result.push_back(i);
return result;
}
}
27. Violating OCP
• Keep having to rewrite existing code
• Assumes it is even possible (i.e. you have access to source code)
• Not flexible enough (what about other criteria?)
• Filtering by X or Y or X&Y requires 3 functions
• More complexity -> state space explosion
• Specification pattern to the rescue!
32. Filtering on 2..N criteria
• How to filter by size and color?
• We don’t want a SizeAndColorSpecification
• State space explosion
• Create combinators
• A specification which combines two other specifications
• E.g., AndSpecification
34. Filtering by Size AND Color
ProductFilter pf;
ColorSpecification green(Color::Green);
SizeSpecification big(Size::Large);
AndSpecification<Product> green_and_big{ big, green };
auto big_green_things = pf.filter(all, green_and_big);
for (auto& x : big_green_things)
std::cout << x->name << " is big and green" << std::endl;
35. Specification Summary
• Simple filtering solution is
• Too difficult to maintain, violates OCP
• Not flexible enough
• Abstract away the specification interface
• bool is_satisfied_by(T something)
• Abstract away the idea of filtering
• Input items + specification set of filtered items
• Create combinators (e.g., AndSpecification) for combining multiple
specifications
37. Scenario
• Consider the construction of structured data
• E.g., an HTML web page
• Stuctured and formalized
• Rules (e.g., P cannot contain another P)
• Can we provide an API for building these?
38. Building a Simple HTML List
// <ul><li>hello</li><li>world</li></ul>
string words[] = { "hello", "world" };
ostringstream oss;
oss << "<ul>";
for (auto w : words)
oss << " <li>" << w << "</li>";
oss << "</ul>";
printf(oss.str().c_str());
45. Groovy-Style Builders
• Express the structure of the HTML in code
• No visible function calls
• UL {
LI {“hello”},
LI {“world”}
}
• Possible in C++ using uniform initialization
50. Facet Builders
• An HTML element has different facets
• Attributes, inner elements, CSS definitions, etc.
• A Person class might have different facets
• Address
• Employment information
• Thus, an object might necessitate several builders
51. Personal/Work Information
class Person
{
// address
std::string street_address, post_code, city;
// employment
std::string company_name, position;
int annual_income = 0;
Person() {} // private!
}
54. Person Builder Facet Functions
PersonAddressBuilder PersonBuilder::lives()
{
return PersonAddressBuilder{ person };
}
PersonJobBuilder PersonBuilder::works()
{
return PersonJobBuilder{ person };
}
55. Person Address Builder
class PersonAddressBuilder : public PersonBuilder
{
typedef PersonAddressBuilder Self;
public:
explicit PersonAddressBuilder(Person& person)
: PersonBuilder{ person } { }
Self& at(std::string street_address)
{
person.street_address = street_address;
return *this;
}
Self& with_postcode(std::string post_code);
Self& in(std::string city);
};
56. Person Job Builder
class PersonJobBuilder : public PersonBuilder
{
typedef PersonJobBuilder Self;
public:
explicit PersonJobBuilder(Person& person)
: PersonBuilder{ person } { }
Self& at(std::string company_name);
Self& as_a(std::string position);
Self& earning(int annual_income);
};
57. Back to Person
class Person
{
// fields
public:
static PersonBuilder create();
friend class PersonBuilder;
friend class PersonAddressBuilder;
friend class PersonJobBuilder;
};
58. Final Person Builder Usage
Person p = Person::create()
.lives().at("123 London Road")
.with_postcode("SW1 1GB")
.in("London")
.works().at("PragmaSoft")
.as_a("Consultant")
.earning(10e6);
60. Presence or Absence
• Different ways of expressing absence of value
• Default-initialized value
• string s; // there is no ‘null string’
• Null value
• Address* address;
• Not-yet-initialized smart pointer
• shared_ptr<Address> address
• Idiomatic
• boost::optional
61. Monads
• Design patterns in functional programming
• First-class function support
• Related concepts
• Algebraic data types
• Pattern matching
• Implementable to some degree in C++
• Functional objects/lambdas
63. Print House Name, If Any
void print_house_name(Person* p)
{
if (p != nullptr &&
p->address != nullptr &&
p->address->house_name != nullptr)
{
cout << p->address->house_name << endl;
}
}
64. Maybe Monad
• Encapsulate the ‘drill down’ aspect of code
• Construct a Maybe<T> which keeps context
• Context: pointer to evaluated element
• person -> address -> name
• While context is non-null, we drill down
• If context is nullptr, propagation does not happen
• All instrumented using lambdas
65. Maybe<T>
template <typename T>
struct Maybe {
T* context;
Maybe(T *context) : context(context) { }
}
// but, given Person* p, we cannot make a ‘new Maybe(p)’
template <typename T> Maybe<T> maybe(T* context)
{
return Maybe<T>(context);
}
66. Usage So Far
void print_house_name(Person* p)
{
maybe(p). // now drill down :)
}
68. What is ???
• In case of failure, we need to return Maybe<U>
• But the type of U should be the return type of evaluator
• But evaluator returns U* and we need U
• Therefore…
• return Maybe<
typename remove_pointer<
decltype(evaluator(context))
>::type>(nullptr);
70. Usage So Far
void print_house_name(Person* p)
{
maybe(p) // now drill down :)
.With([](auto x) { return x->address; })
.With([](auto x) { return x->house_name; })
. // print here (if context is not null)
}
71. Maybe::Do
template <typename TFunc>
auto Do(TFunc action)
{
// if context is OK, perform action on it
if (context != nullptr) action(context);
// no context transition, so...
return *this;
}
72. How It Works
• print_house_name(nullptr)
• Context is null from the outset and continues to be null
• Nothing happens in the entire evaluation chain
• Person p; print_house_name(&p);
• Context is Person, but since Address is null, it becomes null henceforth
• Person p;
p->Address = new Address;
p->Address->HouseName = “My Castle”;
print_house_name(&p);
• Everything works and we get our printout
73. Maybe Monad Summary
• Example is not specific to nullptr
• E.g., replace pointers with boost::optional
• Default-initialized types are harder
• If s.length() == 0, has it been initialized?
• Monads are difficult due to lack of functional support
• [](auto x) { return f(x); } instead of
x => f(x) as in C#
• No implicits (e.g. Kotlin’s ‘it’)
74. That’s It!
• Questions?
• Design Patterns in C++ courses on Pluralsight
• dmitrinesteruk@gmail.com
• @dnesteruk