This presentation comes with many additional notes (pdf): http://de.slideshare.net/nicolayludwig/1-c-sharp-introductionbasicsdotnet-38638887
- History
- Bird's Eye View of Features
Alexander Kolb - Flinkspector – Taming the squirrelFlink Forward
http://flink-forward.org/kb_sessions/flinkspector-taming-the-squirrel/
The costs of logic errors in production for streaming applications are higher than for batch processing systems. Depending on the setup, errors cannot be rectified or have already influenced important decisions. The goal of Flinkspector is to improve the test process of Apache Flink streaming applications in order to detect streaming application logic errors early during development. It features dedicated mechanics for test setup, execution, and evaluation. While Flinkspector’s streamlined API keeps testing overhead small. The framework is able to handle non-terminating and parallelized data flows involving windowing. The lightweight integration-tests enabled by Flinkspector allow Flink applications to be included into the continuous integration and deployment process. The talk introduces the core functionality of Flinkspector. In addition, background concepts of the runtime and the evaluation algorithms are presented. https://github.com/ottogroup/flink-spector
In this talk we will make a tour through the most important changes and new features in the language and its standard library, such as enums, single-dispatch generic functions, Tulip, yield from, raise from None, contextlib... And yes, we will talk about Python 3.
GitHub repository with the code of the examples: https://github.com/pablito56/coolest_is_yet_to_come
Reactive programming is a modern and trending technology which allows development of background task easy and managable. This presentation will specically explain use of Rx plug-in in android and ios applications
RxJava & RxSwift
http://reactivex.io/
Understanding reactive programming with microsoft reactive extensionsOleksandr Zhevzhyk
We all want our applications to be responsible, reliable and testable. But event-driven paradigm sometimes could lead us to obscured or, even worse, messy code. Let’s look into the world, where generated data, background tasks and events are stuck together as asynchronous data streams to achieve a better result.
Running automated tests with Sparx Enterprise Architect add-ins, London EA Us...Guillaume Finance
Slides from my presentation at the London's EA User Group 2017.
More details available from the links below.
http://www.umlchannel.com/en/enterprise-architect/item/227-feedback-ea-user-group-london-2017-event-presentations-case-studies-user-stories
https://www.youtube.com/watch?v=S0BSdjWV43w
Apresentado no TDC Florianópolis - 2016.
Palestra voltada aos que ouviram falar sobre RxJava e querem aprender sobre a biblioteca que todos os programadores legais estão comentando.
Lecture on Reactive programming on Android, mDevCamp 2016.
A practical guide to using RxJava on Android. Tips for improving your app architecture with reactive programming. What are the advantages and disadvantages of using RxJava over standard architecture? And how to connect with other popular Android libraries?
Alexander Kolb - Flinkspector – Taming the squirrelFlink Forward
http://flink-forward.org/kb_sessions/flinkspector-taming-the-squirrel/
The costs of logic errors in production for streaming applications are higher than for batch processing systems. Depending on the setup, errors cannot be rectified or have already influenced important decisions. The goal of Flinkspector is to improve the test process of Apache Flink streaming applications in order to detect streaming application logic errors early during development. It features dedicated mechanics for test setup, execution, and evaluation. While Flinkspector’s streamlined API keeps testing overhead small. The framework is able to handle non-terminating and parallelized data flows involving windowing. The lightweight integration-tests enabled by Flinkspector allow Flink applications to be included into the continuous integration and deployment process. The talk introduces the core functionality of Flinkspector. In addition, background concepts of the runtime and the evaluation algorithms are presented. https://github.com/ottogroup/flink-spector
In this talk we will make a tour through the most important changes and new features in the language and its standard library, such as enums, single-dispatch generic functions, Tulip, yield from, raise from None, contextlib... And yes, we will talk about Python 3.
GitHub repository with the code of the examples: https://github.com/pablito56/coolest_is_yet_to_come
Reactive programming is a modern and trending technology which allows development of background task easy and managable. This presentation will specically explain use of Rx plug-in in android and ios applications
RxJava & RxSwift
http://reactivex.io/
Understanding reactive programming with microsoft reactive extensionsOleksandr Zhevzhyk
We all want our applications to be responsible, reliable and testable. But event-driven paradigm sometimes could lead us to obscured or, even worse, messy code. Let’s look into the world, where generated data, background tasks and events are stuck together as asynchronous data streams to achieve a better result.
Running automated tests with Sparx Enterprise Architect add-ins, London EA Us...Guillaume Finance
Slides from my presentation at the London's EA User Group 2017.
More details available from the links below.
http://www.umlchannel.com/en/enterprise-architect/item/227-feedback-ea-user-group-london-2017-event-presentations-case-studies-user-stories
https://www.youtube.com/watch?v=S0BSdjWV43w
Apresentado no TDC Florianópolis - 2016.
Palestra voltada aos que ouviram falar sobre RxJava e querem aprender sobre a biblioteca que todos os programadores legais estão comentando.
Lecture on Reactive programming on Android, mDevCamp 2016.
A practical guide to using RxJava on Android. Tips for improving your app architecture with reactive programming. What are the advantages and disadvantages of using RxJava over standard architecture? And how to connect with other popular Android libraries?
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...Naresha K
Slides from the Functional Conf 2019 presentation - "Eclipse Collections, Java Streams & Vavr - What's in them for Functional Programming". How to leverage Eclipse Collections and Vavr libraries for improved developer experience for functional programming.
Improving code quality with Roslyn analyzersJim Wooley
Slides supporting the Roslyn (C# compiler) workshop. Demos available at https://github.com/jwooley/Analyzers. Labs available at https://github.com/jwooley/RoslynLabs.
Evolving with Java - How to Remain EffectiveNaresha K
Slides from my Java2Days 2020 talk - "Evolving with Java - How to Remain Effective".
Developers find themselves in need to continually update themselves with the rapidly changing technologies to remain relevant and deliver value. However, by keeping a few things in mind and with certain practices, this can be a pleasant experience. In this presentation, I share my experiences learning and evolving with Java in the last 15+ years. The ideas presented are generic enough to be applicable for people using any technology stack. However, the code examples are in Java/ JVM languages.
We start by understanding the importance of gradual improvement. To keep motivated for continuous improvement, in my experience, responsiveness is a vital element. I share my experience of how to increase your responsiveness. To be able to change/ experiment continuously in our code, we need to ensure that we don't break anything. We explore the necessary techniques to achieve safety. Often we mistakenly consider lack of familiarity as complexity. We explore options to come out of this confusion. We then touch upon the impact of learning paradigms and multiple languages available on the JVM. Finally, we touch upon another important aspect of continuous improvement that is unlearning. We conclude the session by summarising the principles.
A practical guide to using RxJava on Android. Tips for improving your app architecture with reactive programming. What are the advantages and disadvantages of using RxJava over standard architecture? And how to connect with other popular Android libraries?
Presented at Droidcon Greece 2016.
cats.effect.IO - Scala Vienna Meetup February 2019Daniel Pfeiffer
These slides were part of my presentation at the February Meetup of the Scala Vienna User Group and give a quick into into cats.effect.IO as an alternative to scala.concurrent.Future.
This talk was delivered at JavaOne 2013, together with Andrzej Grzesik. We mention the new Date APIs, changes to Collections as well as Streams APIs and of course... Lambdas!
Мы поговорим о новых возможностях Open Source фреймворка JDI для Автоматизации UI Тестирования. Архитектор проекта расскажет «всю правду» о своем детище, а мы послушаем, сделаем выводы и, возможно, используем это решение для нашего следующего проекта.
Start developing for the Semantic Web with JAVA. This is an introduction how to tap into your linked data, open linked data and create flexible useful applications.
Swift.berlin, this time kindly hosted by Wooga, invited Crispy's own Christian Weyer to speak about whether Apple's new programming language Swift is ready for primetime use in corporate, production environments. In order to answer that question, Christian ported an existing OS X application to Swift and created a new iOS application from scratch. Watch the video to see his results and the conclusions he drew from these experiences.
Video available at https://vimeo.com/113089291
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...Naresha K
Slides from the Functional Conf 2019 presentation - "Eclipse Collections, Java Streams & Vavr - What's in them for Functional Programming". How to leverage Eclipse Collections and Vavr libraries for improved developer experience for functional programming.
Improving code quality with Roslyn analyzersJim Wooley
Slides supporting the Roslyn (C# compiler) workshop. Demos available at https://github.com/jwooley/Analyzers. Labs available at https://github.com/jwooley/RoslynLabs.
Evolving with Java - How to Remain EffectiveNaresha K
Slides from my Java2Days 2020 talk - "Evolving with Java - How to Remain Effective".
Developers find themselves in need to continually update themselves with the rapidly changing technologies to remain relevant and deliver value. However, by keeping a few things in mind and with certain practices, this can be a pleasant experience. In this presentation, I share my experiences learning and evolving with Java in the last 15+ years. The ideas presented are generic enough to be applicable for people using any technology stack. However, the code examples are in Java/ JVM languages.
We start by understanding the importance of gradual improvement. To keep motivated for continuous improvement, in my experience, responsiveness is a vital element. I share my experience of how to increase your responsiveness. To be able to change/ experiment continuously in our code, we need to ensure that we don't break anything. We explore the necessary techniques to achieve safety. Often we mistakenly consider lack of familiarity as complexity. We explore options to come out of this confusion. We then touch upon the impact of learning paradigms and multiple languages available on the JVM. Finally, we touch upon another important aspect of continuous improvement that is unlearning. We conclude the session by summarising the principles.
A practical guide to using RxJava on Android. Tips for improving your app architecture with reactive programming. What are the advantages and disadvantages of using RxJava over standard architecture? And how to connect with other popular Android libraries?
Presented at Droidcon Greece 2016.
cats.effect.IO - Scala Vienna Meetup February 2019Daniel Pfeiffer
These slides were part of my presentation at the February Meetup of the Scala Vienna User Group and give a quick into into cats.effect.IO as an alternative to scala.concurrent.Future.
This talk was delivered at JavaOne 2013, together with Andrzej Grzesik. We mention the new Date APIs, changes to Collections as well as Streams APIs and of course... Lambdas!
Мы поговорим о новых возможностях Open Source фреймворка JDI для Автоматизации UI Тестирования. Архитектор проекта расскажет «всю правду» о своем детище, а мы послушаем, сделаем выводы и, возможно, используем это решение для нашего следующего проекта.
Start developing for the Semantic Web with JAVA. This is an introduction how to tap into your linked data, open linked data and create flexible useful applications.
Swift.berlin, this time kindly hosted by Wooga, invited Crispy's own Christian Weyer to speak about whether Apple's new programming language Swift is ready for primetime use in corporate, production environments. In order to answer that question, Christian ported an existing OS X application to Swift and created a new iOS application from scratch. Watch the video to see his results and the conclusions he drew from these experiences.
Video available at https://vimeo.com/113089291
This presentation comes with many additional notes (pdf): http://de.slideshare.net/nicolayludwig/2-c-sharp-introductionbasicsparti-38639098
- A Tour through other .Net Programming Languages
- C# Syntax Cornerstones
Hierarchical free monads and software design in fpAlexander Granin
I invented the approach I call "Hierarchical Free Monads". It helps to build applications in Haskell with achieving all the needed code quality requirements. I tested this approach in several real world projects and companies, and it works very well.
Application Security from the Inside - OWASPSqreen
Presentation at the OWASP (Open Web Application Security Project) on how to make apps secure by protecting them from the inside.
Detecting and protecting from
1. SQL injection
2. Cross Site Scripting (XSS)
3. Third party components vulnerabilities
4. Shell injection
etc.
The primary focus of this presentation is approaching the migration of a large, legacy data store into a new schema built with Django. Includes discussion of how to structure a migration script so that it will run efficiently and scale. Learn how to recognize and evaluate trouble spots.
Also discusses some general tips and tricks for working with data and establishing a productive workflow.
Today there are a lot of cloud providers, with a wide range of offers. Web projects usually have continuously changing needs: what worked well yesterday may not be enough today. These two facts became quite obvious for us while migrating a large PHP application from Rackspace to Amazon. In this session I’d like to share this experience highlighting infrastructure and code evolution, migration steps, cost analisys, issues.
Von Gleichungen zu Funktionen
Überblick über ganzrationale Funktionen
Koordinatensysteme für Graphen ganzrationaler Funktionen mit Excels Liniendiagrammen erstellen
Einfache Analyse ganzrationaler Funktionen anhand deren Graphen
Von linearen zu quadratischen Gleichungssystemen
Verschiedene Möglichkeiten quadratische Gleichungssysteme grafisch zu lösen
Koordinatensysteme für quadratische Graphen mit Excels Liniendiagrammen erstellen und Gleichungen damit grafisch lösen
Grafische Interpretation der Lösungen von Normalparabel-Gerade Kombinationen
Diagramme
Einführung linearer Gleichungssysteme mit zwei Unbekannten
Rechnerische und grafische Lösung linearer Gleichungssysteme
Wertetabellen mit Excel erstellen
Koordinatensysteme und lineare Graphen mit Excels Liniendiagrammen erstellen und Gleichungen damit grafisch lösen
Mit großen Tabellen arbeiten
Sortieren und Filtern
Objekte einfügen
Formeln und rechnen mit Excel, insbesondere Zahlen und Textbearbeitung
Relative und absolute Zellbezüge
Funktionen: SUMME(), ANZAHL(), MIN(), MAX(), MITTELWERT(), JETZT(), HEUTE(), ZUFALLSZAHL(), PI() und SUMMEWENN()
Mathematische Probleme in Tabellenform
Geschichtliche Entwicklung
Grundlegende Konzepte und Begriffe in Excel
Selektion, Dateneingabe und Datentypen
Zellformatierung und Inhaltsformatierung
- Vector- and Raster-based Graphics
-- Idea behind Vector- and Raster-based Graphics
-- Crispness
-- Overview of Raster-based Drawing APIs
- Platform independent Graphics and GUIs in the Web Browser
-- Bare HTML Pages
-- Plugins and Problems
-- From rich Content to HTML 5
- Drawing with HTML 5 Canvas
-- Continuous, Event driven and free Drawing
-- Basic Drawing "How does Drawing work with JavaScript?"
-- Interaction with Controls
- Vector- and Raster-based Graphics
-- Idea behind Vector- and Raster-based Graphics
-- Crispness
-- Overview of Raster-based Drawing APIs
- Platform independent Graphics and GUIs in the Web Browser
-- Bare HTML Pages
-- Plugins and Problems
-- From rich Content to HTML 5
- Drawing with HTML 5 Canvas
-- Continuous, Event driven and free Drawing
-- Basic Drawing "How does Drawing work with JavaScript?"
-- Interaction with Controls
- Wires and Bulbs
- Batch Processing
- Terminal and Mainframe
- From the Command-Line to Killer Applications
- Vector Displays and Raster Displays
- Color Displays
- The Mouse and the Takeoff of Interactivity
- The Desktop Metaphor
- Wires and Bulbs
- Batch Processing
- Terminal and Mainframe
- From the Command-Line to Killer Applications
- Vector Displays and Raster Displays
- Color Displays
- The Mouse and the Takeoff of Interactivity
- The Desktop Metaphor
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
2. 2
TOC
● (2) Introduction of C# Basics – Part I
– A Tour through other .Net Programming Languages
– C# Syntax Cornerstones
3. 3
Challenge: Parse an Update Log
● Userstory: "As an administrator I want to know the latest updates on a PC, in order to get a report of that PC's state!"
● It is needed to parse the file "Software Update.log":
2009-04-06 12:43:04 +0200: Installed "GarageBand Update" (5.0.1)
2009-04-06 12:44:34 +0200: Installed "iMovie Update" (8.0.1)
2009-07-30 13:11:28 +0200: Installed "iMovie Update" (8.0.4)
2009-04-06 12:43:31 +0200: Installed "iTunes" (8.1)
…
● How can we solve this problem?
4. 4
Visual Basic 10 (VB 10)
Imports System
Imports System.IO
Imports System.Collections.Generic
Imports System.Text.RegularExpressions
Module Program
Sub Main()
' check arguments from console
If (0 < My.Application.CommandLineArgs.Count) Then
Dim latestUpdates As IDictionary(Of String, String) = New SortedDictionary(Of String, String)
Dim parseRex As Regex = New Regex("[^""]*""(?<appName>[^""]*)""s*((?<versionNo>[^(]*))")
' open and check file, read a line
For Each aLine As String In File.ReadAllLines(My.Application.CommandLineArgs.Item(0))
' parse the line: e.g. 2009-04-06 12:42:58 +0200: Installed "Digital Camera Raw Compatibility Update" (2.5)
Dim match As Match = parseRex.Match(aLine)
If (match.Success) Then
' store the parsed data
Dim appName As String = match.Groups.Item("appName").ToString()
Dim versionNo As String = match.Groups.Item("versionNo").ToString()
If (latestUpdates.ContainsKey(appName)) Then
If (0 < String.CompareOrdinal(versionNo, latestUpdates.Item(appName))) Then
latestUpdates.Item(appName) = versionNo
End If
Else
latestUpdates.Add(appName, versionNo)
End If
End If
Next
' output the collected data to console
For Each item As KeyValuePair(Of String, String) In latestUpdates
Console.WriteLine("App: {0}, Latest Update: {1}", item.Key, item.Value)
Next
End If
End Sub
End Module
5. 5
C++/CLI – Part I
#include "stdafx.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Generic;
using namespace System::Text::RegularExpressions;
int main(array<String^>^ args)
{
// check arguments from console
if (0 < args->Length)
{
IDictionary<String^, String^>^ latestUpdates = gcnew SortedDictionary<String^, String^>();
Regex^ parseRex = gcnew Regex("[^"]*"(?<appName>[^"]*)"s*((?<versionNo>[^(]*))");
// open and check file, read a line
for each (String^ aLine in File::ReadAllLines(args[0]))
{
// parse the line: e.g. 2009-04-06 12:42:58 +0200: Installed "Digital Camera Raw Compatibility Update" (2.5)
Match^ match = parseRex->Match(aLine);
if (match->Success)
{
// store the parsed data
String^ appName = match->Groups["appName"]->ToString();
String^ versionNo = match->Groups["versionNo"]->ToString();
if (latestUpdates->ContainsKey(appName))
{
if (0 < String::CompareOrdinal(versionNo, latestUpdates[appName]))
{
latestUpdates[appName] = versionNo;
}
}
else
6. 6
C++/CLI – Part II
{
latestUpdates->Add(appName, versionNo);
}
}
}
// output the collected data to console
for each (KeyValuePair<String^, String^>^ item in latestUpdates)
{
Console::WriteLine("App: {0}, Latest Update: {1}", item->Key, item->Value);
}
}
}
7. 7
F# 3
#light
open System
open System.IO
open System.Text.RegularExpressions
if 2 >= Environment.GetCommandLineArgs().Length then
let parseRex = new Regex(@"[^""]*""(?<appName>[^""]*)""s*((?<versionNo>[^(]*))")
// open and check file, read the lines, parse and process the data, output the processed data to console
File.ReadLines(Environment.GetCommandLineArgs().GetValue(1).ToString())
|> Seq.map(parseRex.Match)
|> Seq.filter(fun theMatch -> theMatch.Success)
|> Seq.sortBy(fun theMatch -> theMatch.Groups.Item("versionNo").ToString())
|> Seq.map(fun theMatch -> theMatch.Groups.Item("appName").ToString(), theMatch.Groups.Item("versionNo").ToString())
|> dict
|> Seq.sortBy(fun item -> item.Key)
|> Seq.iter(fun item -> printfn "App: %s, Latest Update: %s" item.Key item.Value)
8. 8
C# 5 – Part I
using System;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
public class Program
{
public static void Main(string[] args)
{
// check arguments from console
if (0 < args.Length)
{
IDictionary<string, string> latestUpdates = new SortedDictionary<string, string>();
Regex parseRex = new Regex(@"[^""]*""(?<appName>[^""]*)""s*((?<versionNo>[^(]*))");
// open and check file, read a line
foreach (string aLine in File.ReadAllLines(args[0]))
{
// parse the line: e.g. 2009-04-06 12:42:58 +0200: Installed "Digital Camera Raw Compatibility Update" (2.5)
Match match = parseRex.Match(aLine);
if (match.Success)
{
// store the parsed data
string appName = match.Groups["appName"].ToString();
string versionNo = match.Groups["versionNo"].ToString();
if (latestUpdates.ContainsKey(appName))
{
if (0 < string.CompareOrdinal(versionNo, latestUpdates[appName]))
{
latestUpdates[appName] = versionNo;
}
}
else
9. 9
C# 5 – Part II
{
latestUpdates.Add(appName, versionNo);
}
}
}
// output the collected data to console
foreach (KeyValuePair<string, string> item in latestUpdates)
{
Console.WriteLine("App: {0}, Latest Update: {1}", item.Key, item.Value);
}
}
}
}
11. 11
What is the C# programming language?
● C# is standardized in ECMA-334.
● C# blends features of C++, Java and other popular languages.
– Without C# being based on Java, .Net would not have been a success!
● A CLS compliant language, ECMA and ISO/IEC standard.
● Major platform is Windows (compilers and CLR from MS).
12. 12
C# Core Features
● Multiparadigm language.
● Static typing by default.
● C-style syntax with extensions.
● CTS is the first class type system.
● C# is popular and evolving.
– Relatively short innovation cycles. Learned stuff gets stale early (~two years).
● C# is relatively simple to learn.
– It is basically pointer free. (We could use pointers. The CTS doesn't use pointers.)
– It doesn't use manual memory management, the runtime has a garbage collector.
13. 13
Structure of a C# Console Application
// Program.cs
using System;
namespace ConsoleApplication
{
public class Program
{
// The execution of a program always starts in the method Main().
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
14. 14
Code Snippets
● Hence we'll begin using snippets as code examples, i.e. no Main() etc.!
// Program.cs
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Console.WriteLine("Hello World!");
● In the end no fully runnable program code will be shown in upcoming lectures!
15. 15
C# as a compiled Language
● C# reserves symbols for its grammar, these are called keywords.
● Syntax versus Semantics:
int count = 2;
count = 2;
– Both statements do not mean the same, but the syntax is similar!
– Locals need to be initialized, uninitialized fields have default values.
● Compile time errors versus run time errors:
int zero = 0;
int oddResult = 42/zero;
– Both statements are ok for the compiler.
● But the last one throws a DivisionByZeroException at run time.
16. 16
C# Syntax Cornerstones – Part I – Imperative Elements
if (answerIsOk) {
Console.WriteLine("Result: "+(3 + 4));
}
● Basic elements: expressions, statements, blocks. They can be freely formatted.
– Imperative programming: Statements and blocks are executed sequentially.
– The order of execution of expressions is strictly defined in C#!
● The most elementary statements are variable definitions.
– Variable definitions make variables applicable in the code.
– By default, variables need to be typed on definition, this is called static typing.
● Implicit and dynamic typing is also possible, but we stick to explicit static typing in this course.
● Besides definition, variables can be initialized and assigned to.
– Initialization gives initial values to a variable.
– Assignment sets a variable to a new value.
int age = 19;
age = 25;
double width = 32.8;
17. 17
C# Syntax Cornerstones – Part II – Types
● Primitive types are integrated types, whose objects can be created with literals.
– Simple value integral types: int, long (etc.).
– Simple value float types: float, double (etc.).
– Simple value boolean type: bool.
– Simple value character type: char.
– Reference text type: string. (an alias C# keyword for the .Net type System.String)
– We can create compile time constants (const) of primitive type.
● There exist value types (e.g. int) and reference types (e.g. string).
– Variables of reference type are often simply called references.
● Explicit type conversion:
// Conversion with cast:
int i = (int)2.78;
– Explicit conversions are done with explicit casts or the as operator.
– Explicit conversions can be done safely with checked expressions and contexts.
– The type System.Convert (various types) and the methods ToString()/Parse() (string).
// Conversion with as:
string text = choice as string;
18. 18
C# Syntax Cornerstones – Part III – Identifiers and
Comments
• C# uses case sensitive identifiers, we have to obey common conventions.
– aString is not the same identifier as aStRiNg!
– We've to use a common notation (e.g. camelCase or PascalCase) as convention!
– Language specific characters can be used (e.g. umlauts) as well as the underscore.
– C# keywords mustn't be used as identifiers.
• Comments can be applied everywhere in code. We should exploit comments!
/* commented */ /** commented */ // commented /// commented (triple slash)
• The usage and definition of methods will be discussed later.
– Methods are .Net's pendant of functions/member functions in other languages.
• In the next slides we're going to understand the most important operators in C#.
19. 19
Operator Notations – Arity
● Binary operators
// Addition as binary operator:
int sum = 2 + 3;
● Unary operators
// Increment as unary operator:
int i = 1;
++i; // Increments i (the result is 2).
● Ternary operator
// The conditional operator is the only ternary operator:
int i = 2;
int j = 3;
string answer = (i < j) ? "i less than j" : "i not less than j";
20. 20
Operator Notations – Placement
● Prefix operators
// Negation as prefix operator:
bool succeeded = !failed;
● Postfix operators
// Increment as postfix operator:
int result = item++;
● Infix operators
// Addition as infix operator:
int sum = 2 + 3;
21. 21
Mathematical Operators
● Binary +, - and *, / are known form elementary mathematics.
– Attention: Integer division yields an integer result!
– The result of the division by 0 results in a run time error.
● A DivisionByZeroException will be thrown.
● Unary – and + as sign-operators.
● Somewhat special: ++/-- and %
● Math.Log(), Math.Pow() and other operations in the class Math.
● Bit operations work with integers as arguments and result in integers.
– Operators: ^, |, &, ~, <<, >>
22. 22
Other Operators and Operator Overloading
● Assignment and combined assignment.
– Operators: =, +=, *=, /= etc.
– Operators: &=, |=, ^=, <<=, >>=
● Concatenation of strings with the operators + and +=.
– But: strings are still immutable!
● Important extra operators:
– Operators: [], (), ?:, ??, new, is, as, typeof
– Operators: ., ::
– Operators: *, ->, sizeof
– Operators: =>
int i = 12;
i = i + 2; // (i = 14) Add and assign.
i += 2; // (i = 16) Add-combined assignment.
● C# permits to redefine (overload) operators for user defined types UDT.
23. 23
Logical Operators
● Used to compare values and combine boolean results.
– Comparison: ==, !=, <, >, <=, >=
– Combination: &&, ||, !
– Logical operators return boolean results, not integral results.
● && (logical and) and || (logical or) support short circuit evaluation.
// The mathematic boolean expression a = b and c = b:
// Ok
if (a == b && c == b) { /* pass */ }
// Wrong!
if (a && b == c) { /* pass */ }
● Logical operators are applied in conditional expressions for control structures (branches and loops).
24. 24
Precedence, Associativity and Order of Execution
● Precedence and precedence groups.
– Some operators have the same precedence and make up a precedence group.
– As operator priority in maths, precedence is controllable with parentheses.
● Associativity defines evaluation among expressions of the same precedence.
– Associativity is defined as a "direction".
– Associativity is controllable with parentheses as well.
● The order of execution within expressions is strictly defined in C#.
– The order is from left to right and from inner to outer.
int i = 0;
Console.WriteLine("{0} {1}", i++, i);
// >0 1 → Always this result …
// Never 0 0!
Introductory words:
We write programs to solve problems.
Now let&apos;s inspect a problem that we want to solve...
The user story describes the problem to be solved in everyday language.
Now let&apos;s inspect how we can solve this problem with a program. - We are going to discuss solutions in some high level language (HLL).
What is an HLL?
Allows to express solutions in a more human readable way. Hardware near languages (e.g. assembly) are hardware specific and not standardized, HLLs are in opposite hardware independent and standardized (so is C#).
What is a low level language?
A low level language is a machine near language that works only on one type of machine (assembly), so they are often not portable.
A dialect of the Beginner&apos;s All-purpose Symbolic Instruction Code (BASIC). - The reputation-problem of BASIC programmers: the word &quot;Beginner&quot; in the name of the language!
VB is a proprietary programming language designed by Microsoft.
VB 6 was a very productive language (it provided very good means of integration on the Windows platform) and its success has been continued with VB running on .Net. The VB languages are very popular in the US.
Its relative, VBA, is an approachable language for end-users and is used to automate windows applications like MS Excel.
This approachability is also due to the fact that VB is case-insensitive. - Esp. beginners have often to cope with casing of variable and function names, and exactly this problem is not present in VB.
VB&apos;s code is rather noisy as there exist many keywords.
Typically VB-only programmers step into the &quot;4GL-trap&quot;: &quot;IDE, technology, framework and language is all VB!&quot; - 4GL-developers can&apos;t see a difference here, everything is integrated.
C++/CLI is an ECMA standard (ECMA-372).
C++/CLI is the only &quot;.Net language&quot;, in which native applications can be compiled in Visual Studio.
ECMA: &quot;European Computer Manufacturers Association&quot; in past. But meanwhile only the acronym &quot;ECMA&quot; or &quot;ECMA International&quot; is used to make the international (and no longer european) focus clear.
C++/CLI (Common Language Infrastructure) is Microsoft&apos;s C++ variant (extension with some syntactical stuff) for .Net programming. BeforeC++/CLI was present, there was &quot;Managed C++&quot; for .Net, which is meanwhile deprecated.
For the Windows Runtime (WinRT) there exists another variant of C++, which is primarily targeted to be used with COM to program apps for Windows 8. - It is called C++/CX (Component Extensions). The syntax of C++/CX is similar to the syntax of C++/CLI, but not all syntactic similar idioms are equivalent.
This programming language has a completely different but very compact syntax (in this example), in comparison to the other languages being presented. Often examples in F# are &quot;head blowing&quot; to show the compactest syntax (this was also done deliberately in this example). We can also code F# programs to solve real life problems with well-known control flow constructs (like if-branches and for-loops).
In F# whitespaces are significant (off-side rule), if the #light compiler directive is set. Otherwise a more verbose, but whitespace-agnostic syntax has to be used (featuring keywords like begin and end).
F# is a so-called functional programming language. - Programming constructs don&apos;t work like a bunch of statements, rather do they describe the result of the operation, w/o any side effect.
In F# all symbols (they are even called values) are immutable by default!
F# is also special as is it is very typesafe. For almost all kinds of conversions explicit conversions or casts are required. - On the other hand this is rarely required, as F# has great support for type inference.
Such languages are often used in Artificial Intelligence (AI) and the programming of interpreters and compilers, for what F# provides special tools.
F# is open source.
F# can also be used as scripting language.
With this programming language we&apos;ll deal in this workshop.
Created by Microsoft and mainly by Anders Hejlsberg in 2000. Interestingly Hejlsberg worked for Borland until he went to Microsoft in 1996. At Borland he created Turbo Pascal and Delphi.
C# is an ECMA standard (ECMA-334).
Meanings of the name &quot;C sharp&quot;: a &quot;sharp&quot; kind of the C programming language or C with four pluses.
It&apos;s the main programming language of the &quot;language diverse&quot; .Net platform. - Microsoft does its new stuff first in C#.
Modern multi-paradigm language, a mixture of Java and C++ in syntax.
C-style syntax, simple to use.
Application areas:
All kinds of application systems.
Good acceptance, because there is a good documentation available as well as some height quality IDEs allowing Rapid Application Development (RAD). (RAD was already present in Visual Basic (VB) and Delphi, its success is continuing in C#.)
MS Visual Studio (the Express edition is free)
Borland Developer Studio
#develop (free)
IL is the very low level language specified by the CLI.
This piece of IL was generated from C# 5 code. It was generated in debug mode, which generates nop op-codes, which makes debugging easier and line numbers. The nops have been removed.
IL is a platform independent, object oriented and stack-based assembly language.
Translation:
E.g. a C# compiler will generate IL from a piece of C# code.
Then, as another part of the building procedure, the IL code will be assembled into so-called bytecode. The result is a CLI assembly.
During run time the bytecode will be translated into native machine code (by a JIT compiler of the native runtime) and then it will be executed.
ECMA: &quot;European Computer Manufacturers Association&quot; in past. But meanwhile only the acronym &quot;ECMA&quot; or &quot;ECMA International&quot; is used to make the international (and no longer european) focus clear.
ISO/IEC: International Standards Organization, International Electrotechnical Commission.
There also exists a port to unix-like OS&apos; (Unix/Linux/Mac OS) that is called &quot;Mono&quot;.
Functional, oo and imperative.
But mainly imperative (i.e. from top to bottom).
We can use pointers to memory:
To access Win32 APIs (written in C).
Only in unsafe contexts.
The syntax is similar to C:
Blocks (i.e. {}).
Statements, delimited by semicolons and expressions.
Operators and comments
Imperative execution of a program.
CTS is present for programming.
int, bool and string are present as keywords.
Good acceptance, because there is a good documentation available as well as some IDEs.
MS Visual Studio (the Express edition is free)
#develop (free)
What we called member function in C++ is called method in .Net/C#.
The using directive tells the compiler to use the specified namespace. The types, which are used by the program, are defined in the namespace System and the using directive makes that types (e.g. Console) known to the compiler.
The namespace System contains the core .Net types.
Referenced libraries (i.e. assemblies) must be added into the project.
A type can reside in a namespace that makes the type unique, so that it can be qualified.
The type. All assemblies have to define types in general. Here the class Program defines the type Program.
Types define code that resides in methods.
Methods are functions, which are presented by a type.
The execution of a C# program starts in Main(). I.e. each C# application must provide a Main() method.
An array of strings is passed to Main(); Main() does not return a value to the caller.
What is an array?
What data could be contained in that array?
What data could be returned by Main()?
Main() must be called w/o having an object of the type Program, therefor it is declared as static method.
(Non static methods will be introduced later.)
The code of methods contains statements and expressions.
What&apos;s the difference?
A statement consists of expressions; expressions have a type; statements end with semicolons. There also exist empty statements (a standalone semicolon).
In methods&apos; code typically new objects will be created and methods will be called on them.
In this Main() method a message will be output to the console.
How does console input and output work?
What keywords do you know from any programming languages?
Syntax versus semantics; what&apos;s that?
Grammar/keywords versus their meaning.
In programming errors can occur on different &quot;times&quot;. Can you explain this statement?
The time during programming is often called &quot;design time&quot;.
(In C/C++ there also exits the link time, during which errors can happen.)
In C# multiple variables of the same type can be defined/declared in one statement.
What are primitive types?
The text &quot;Hello World&quot; is not stored like today&apos;s date or the number 42. To work efficiently with data C# offers primitive data types, which are constrained to a specific type of information.
These types are integrated into C# (as keywords), the compiler can directly deal with them, e.g. it knows how to compare them (not for string, as the string&apos;s methods need to be called). Also the CLR has integrated support for primitive types.
What is a literal?
A literal is a value of specific type that can be written out in source code directly.
In a sense a literal is the opposite of a symbol.
The type unsigned int is not CLS compliant =&gt; Do use the type int instead of unsigned int primarily.
Literals? C# does not define octal literals (C/C++ and Java do).
The float datatypes can&apos;t be compared with ordinary operators, because of different accuracies. Use double.Epsilon for comparisons (double.Epsilon &gt; Math.Abs(value1 - value2)). The type double should be used primarily instead of float.
Literals? In C# we can use the D/d suffix for literals of type double (not in C/C++ or Java).
The bool type describes logical values. The expressions used in control structures are of type bool.
Literals?
The type char is an integral type. A string is composed of multiple chars.
Important: string objects are immutable, instead of C++&apos; std::strings, which are modifiable! string-operations create new string objects.
C# knows some escape characters and provides verbatim strings.
strings and chars are unicode based (having a size of 2B).
For us as learners of the C# language the usage of the keywords var and dynamic is forbidden.
Type conversion:
A type conversion from a smaller type to a greater type works implicitly, if the types are &quot;related&quot; (char -&gt; int).
A type conversion from a greater type to a smaller type must be done explicitly, and is only allowed, if the types are &quot;related&quot; (int -&gt; char). This casting must be done explicitly, because there is the chance that data will be lost on that conversion from a greater to a smaller type.
The class Convert provides some methods, with which some conversions of non-related types can be performed.
The Parse() and ToString() methods of the primitive types can be used to convert numeric or logical values from or to strings.
The checked context allows to check an overflow during the conversion of values.
Why is it needed to check for overflow? Why is it dangerous?
In C# arithmetic operations are only possible with 32b and 64b values.
byte b = 100;
b = (byte) (b + 200); The variable b and the value 200 will be converted to 32b (int) values each, then the addition will be executed and then that result must be explicitly cast to a byte. The sum (the value 300) of 32b will not fit into byte, so a part of 300 will overflow (the most significant bits of the result will be discarded) and 44 will make up the result of b. With the expression checked((byte)(b + 200)), this overflow wouldn&apos;t happen, instead an OverflowException would be thrown! Often overflows are errors (but sometimes it is part of the algorithm, e.g. for hash calculation). The keyword checked will replace overflowing operators with throwing ones (add -&gt; add.ovf in this example (only for add, mul, sub and conv)), nothing else.
We can activate checking for arithmetic overflow and underflow for the whole VS project w/o using the checked keyword (then checked is the default for arithmetic operations). - This option is not activated when we create a new VS project.
Only integral and the decimal will overflow, other floating point types can handle infinity.
What are binary operators?
These operators have an arity of two, i.e. they have two operands.
The operator is written in between the operands (infix notation).
Which other binary operators do you know?
What are unary operators?
These operators have one operand.
There exist prefix and postfix operators.
Increment and decrement operators -&gt; useful in loops!
Apple&apos;s Swift programming language guide does explicitly suggest to use prefix increment/decrement by default, unless the specific behavior of the postfix variants is required. (This could be understood like Apple counts prefix increment/decrement as &quot;primary operator&quot;.)
What are ternary operators?
The decision operator ?: (sometimes we call it &quot;Elvis operator&quot;).
What does that mean &quot;integral division has an integer result&quot;?
I.e. the results are no floating point values!
Integral division: How to do that in a correct way?
Use casts or the correct literals on/for any of the operands!
The division by 0 is not &quot;not allowed&quot; in maths, instead it is &quot;just&quot; undefined.
What does the operator % do?
This operator doesn&apos;t calculate the modulus, instead it calculates the remainder!
Why do we need bitwise operators?
What does it mean: &quot;Strings are immutable&quot;?
C# doesn&apos;t define a comma-operator.
As we see, C# doesn&apos;t provide a delete operator! - Heap memory is managed automatically by a garbage collector!
Many operators can be overloaded for user defined types in C#.
We can&apos;t define new operators.
We can&apos;t modify arity, placement, precedence or associativity of operators.
The programming language Haskell allows defining new operators and it allows modifying the precedence and associativity (together called &quot;fixity&quot; in Haskell) of present operators.
Opinion [NLu]: don&apos;t overload operators: it is never required in C# and it is often done wrong, or at least in a questionable way (In C++, overloading of canonical operators is often required for UDTs. - In C# it is only syntactic sugar and not required for a canonical form of a type.). E.g. the +-operator is overloaded for string to do string-concatenation. - On the other hand the +-operator means addition, which is commutative (one of the minimum requirements of addition in maths), but string-concatenation is never commutative! (The ,-operator (as sequence operator) would make more sense for string-concatenation.)
What is short circuit evaluation?
What is precedence?
What is associativity? Why is it relevant?
E.g. if we have a couple of method calls that we combine with the + operator, we&apos;ll have to know which method will be called first, because the methods could have side effects!
Rules of the thumb:
Binary operators are generally left associative.
Unary operators, the ternary operator and the assignment operators are right associative.
What is order of execution? Why is it relevant?
E.g. if we have an expression like h(g(), f()) or d() * s() how do we know, which functions are being called first? In C# we know that d() is called before s() is called (left -&gt; right), in the other expression first g() and f() are called and then h() is called (inner -&gt; outer). It is relevant to know that, because the function calls can have side effects!
The order of execution is undefined in C++!