Skip to content
0:00 / 0:00

#seanparent#gatheralgorithm#rotatealgorithm

Programming Conversations Lecture 5 part 1

A9 Videos

4.2K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2019 to 2025.
  • Presented by Sean Parent, Principal Scientist at Adobe
  • Linked in the descriptionsean-parent/sean-parent.github.com

Advanced. Deep dive for people who know the field.

17K views12 years ago2 recommendations

Programming languagesSoftware designC++AlgorithmsDesign patterns

Sean Parent discusses algorithm design, demonstrating how to exploit loop invariants to build generic algorithms like gather and rotate.

This week brings your our very special guest lecturer, Sean Parent. Sean Parent is a principal scientist for Adobe. Slides available here: github.com/sean-parent/sean-parent.github.com/wiki/presentat… github.com/sean-parent/sean-parent.github.com/wiki/presentat…

Why it's here

2 people recommend this

What people say. Recommended for its excellent explanation of using invariants to design algorithms, specifically the gather algorithm.

Moments people linked to

u/MysteriousSeaPeoplesin r/compsci • Recommends

On “I love loop invariants. A well-chosen invariant is useful both when designing, testing, and modifying code. Here are 4 examples (basic to fairly advanced).”

Another great example of exploiting an invariant to design an algorithm is Sean Parent's implementation of a generic 'gather' algorithm, which takes advantage of the fact that the set of objects below/above the gathering point is unchanged, allowing you to split the problem into two easier sub-problems. Here's his explanation and implementation (video should be linked to 16:50): link to this video
2View on Reddit

u/kwan_ein r/ProgrammingLanguages • Recommends

On “why we as humanity don't invest more on making new lowlevel programming languages”

Kate Gregory is pretty good, though I can't seem to find the series she did with James McNellis. Sean Parent also, especially his famous talk about rotate link to this video (an extended version). In terms of books, Bjarne's Tour of C++ gives a good overview. Professional C++ is another good book.

u/lucidguppyin r/dotnet • Mentions

On “Is there any resources for getting equivalents of c++ std::algorithm?”

I am trying to solve it with what C# has - that's exactly what I'm asking for. I'm trying to follow some guidelines from Sean Parent about writing better code. [video One of his pointers is "no raw loops". And he goes into "look for the algorithms you're writing in your code and replace them with std::algorithm".
1View on Reddit