This document describes the heap sort algorithm through a series of steps taken to sort an array of numbers. It begins with an unsorted array and sinks all non-leaf nodes to construct a max heap. It then repeatedly swaps the root node (largest element) with the rightmost leaf and sinks that element to sort the array. This process is repeated until the entire array is sorted.
No (Lab) Jacket Required: Designing Experiments for Learning [2019 Flowcon]Matthew Philip
Slides as presented during the workshop with Karl Scotland at Flowcon, Paris, Dec. 12, 2019. https://www.flowcon.fr/
Hypothesis-Driven Development is thinking about the development of new ideas, products and services – even organizational change – as a series of experiments to determine whether an expected outcome will be achieved, so we need to know how to design and run experiments properly.
This session helps participants understand the importance of using experiments to help teams and organizations learn and improve, while giving hands-on practice in designing experiments to yield measurable evidence for that learning. We’ll even play a couple of inductive-logic games to get us in the mindset of how to write tests to validate – and invalidate – our hypotheses in order to acquire knowledge.
Whether you’re in product development or organizational improvement, for those wanting to move from projects to experiments in the quest of continuous learning and evolutionary improvement, this session will provide the tools and mindset for going beyond simply calling something an experiment, to conducting experiments with the proper rigor to maximize learning.
No (Lab) Jacket Required: Designing Experiments for Learning [2019 Flowcon]Matthew Philip
Slides as presented during the workshop with Karl Scotland at Flowcon, Paris, Dec. 12, 2019. https://www.flowcon.fr/
Hypothesis-Driven Development is thinking about the development of new ideas, products and services – even organizational change – as a series of experiments to determine whether an expected outcome will be achieved, so we need to know how to design and run experiments properly.
This session helps participants understand the importance of using experiments to help teams and organizations learn and improve, while giving hands-on practice in designing experiments to yield measurable evidence for that learning. We’ll even play a couple of inductive-logic games to get us in the mindset of how to write tests to validate – and invalidate – our hypotheses in order to acquire knowledge.
Whether you’re in product development or organizational improvement, for those wanting to move from projects to experiments in the quest of continuous learning and evolutionary improvement, this session will provide the tools and mindset for going beyond simply calling something an experiment, to conducting experiments with the proper rigor to maximize learning.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
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:
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
4. AbstractSort.java
public abstract class AbstractSort<T extends Comparable<T>> {
protected Comparator<T> comparator;
protected long comparisons; // total # of comparisons performed
protected long assignments; // total # of assignments performed
public AbstractSort(Comparator<T> comparator) {
this.comparator = comparator;
resetCounts();
}
public long getComparisonCount() { return comparisons; }
public long getAssignmentCount() { return assignments; }
public void resetCounts() { comparisons = assignments = 0; }
comparisons assignments
resetCounts()
5. protected int compareTo(T[] array, int i, int j) {
comparisons++;
return comparator.compare(array[i], array[j]);
}
protected void assign(T[] array, int index, T value) {
assignments++;
array[index] = value;
}
protected void swap(T[] array, int i, int j) {
T t = array[i];
assign(array, i, array[j]);
assign(array, j, t);
}
public void sort(T[] array) { sort(array, 0, array.length); }
/**
* Sorts the array[beginIndex:endIndex].
* @param beginIndex the index of the first key to be sorted (inclusive).
* @param endIndex the index of the last key to be sorted (exclusive).
*/
abstract public void sort(T[] array, int beginIndex, int endIndex);
sort()
6. Ai ∣A∣ = n i ∈ [0, n − 1)
Am m ∈ [i + 1, n)
Ai Am
O(n )2 O(n)
O(n log n) O(n log n)
7. SelectionSort.java
@Override
public void sort(T[] array, final int beginIndex, final int endIndex) {
for (int i = beginIndex; i < endIndex - 1; i++) {
int min = i;
for (int j = i + 1; j < endIndex; j++) {
if (compareTo(array, j, min) < 0)
min = j;
}
swap(array, i, min);
}
}
62. HeapSort.java
private void sink(T[] array, int k, int beginIndex, int endIndex) {
for (int i = getLeftChildIndex(beginIndex, k);
i < endIndex; k = i, i = getLeftChildIndex(beginIndex, k)) {
if (i + 1 < endIndex && compareTo(array, i, i + 1) < 0) i++;
if (compareTo(array, k, i) >= 0) break;
swap(array, k, i);
}
}
private int getLeftChildIndex(int beginIndex, int k) {
return beginIndex + 2 * (k - beginIndex) + 1;
}
array[k]
k = i, i = getLeftChildIndex(beginIndex, k)
63. @Override
public void sort(T[] array, int beginIndex, int endIndex) {
// heapify
for (int k = getParentIndex(beginIndex, endIndex); k >= beginIndex; k--)
sink(array, k, beginIndex, endIndex);
// swap
while (endIndex > beginIndex + 1) {
swap(array, beginIndex, --endIndex);
sink(array, beginIndex, beginIndex, endIndex);
}
}
private int getParentIndex(int beginIndex, int k) {
return beginIndex + (k - beginIndex) / 2 - 1;
}
64. Ai ∣A∣ = n i ∈ [1, n)
Ai−1 Ai A ≤i−1 Ai
O(n )2
O(n )2
O(n )1.5
O(n )1.5
65. InsertionSort.java
@Override
public void sort(T[] array, int beginIndex, int endIndex) {
sort(array, beginIndex, endIndex, 1);
}
protected void sort(T[] array, int beginIndex, int endIndex, final int h) {
int begin_h = beginIndex + h;
for (int i = begin_h; i < endIndex; i++)
for (int j = i; j >= begin_h && compareTo(array, j, j - h) < 0; j -= h)
swap(array, j, j - h);
}
h
88. ShellSort.java
public abstract class ShellSort<T extends Comparable<T>> extends InsertionSort<T> {
protected List<Integer> sequence;
/** @param n the expected size of the list to be sorted. */
public ShellSort(Comparator<T> comparator, int n) {
super(comparator);
sequence = new ArrayList<>();
populateSequence(n);
}
/**
* Populates the gap sequence with respect to the list size.
* @param n the size of the list to be sorted.
*/
protected abstract void populateSequence(int n);
/**
* @param n the size of the list to be sorted.
* @return the starting index of the sequence with respect to the list size.
*/
protected abstract int getSequenceStartIndex(int n);
InsertionSort
populateSequence()
89. @Override
public void sort(T[] array, int beginIndex, int endIndex) {
int n = endIndex - beginIndex;
populateSequence(n);
for (int i = getSequenceStartIndex(n); i >= 0; i--)
sort(array, beginIndex, endIndex, sequence.get(i));
}
populateSequence()
InsertionSort.java
protected void sort(T[] array, int beginIndex, int endIndex, final int h) {
int begin_h = beginIndex + h;
for (int i = begin_h; i < endIndex; i++)
for (int j = i; j >= begin_h && compareTo(array, j, j - h) < 0; j -= h)
swap(array, j, j - h);
}
90. ShellSortKnuth.java
public class ShellSortKnuth<T extends Comparable<T>> extends ShellSort<T> {
public ShellSortKnuth(Comparator<T> comparator) {
this(comparator, 1000);
}
public ShellSortKnuth(Comparator<T> comparator, int n) {
super(comparator, n);
}
@Override
protected void populateSequence(int n) {
n /= 3;
for (int t = sequence.size() + 1; ; t++) {
int h = (int) ((Math.pow(3, t) - 1) / 2);
if (h <= n) sequence.add(h);
else break;
}
}
n /= 3
populateSequence()
91. @Override
protected int getSequenceStartIndex(int n) {
int index = Collections.binarySearch(sequence, n / 3);
if (index < 0) index = -(index + 1);
if (index == sequence.size()) index--;
return index;
}
index == sequence.size()
92. SortTest.java
@Test
public void testAccuracy() {
final int iter = 100;
final int size = 100;
testAccuracy(iter, size, new SelectionSort<>());
testAccuracy(iter, size, new InsertionSort<>());
testAccuracy(iter, size, new HeapSort<>());
testAccuracy(iter, size, new ShellSortKnuth<>());
}
private void testAccuracy(final int iter, final int size, AbstractSort<Integer> engine) {
final Random rand = new Random();
Integer[] original, sorted;
for (int i = 0; i < iter; i++) {
original = Stream.generate(rand::nextInt).limit(size).toArray(Integer[]::new);
sorted = Arrays.copyOf(original, size);
engine.sort(original);
Arrays.sort(sorted);
assertArrayEquals(original, sorted);
}
}
Arrays.copyOf() Arrays.sort()