Skip to content

Commit

Permalink
add all images
Browse files Browse the repository at this point in the history
  • Loading branch information
konfig-bot committed Oct 25, 2023
1 parent 77c1b5b commit 71ce8c3
Show file tree
Hide file tree
Showing 79 changed files with 285 additions and 22 deletions.
235 changes: 214 additions & 21 deletions generator/konfig-docs/blog/2023/10/23-github-copilot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ only thought-provoking opinions.
</Figure>

Next, I transcribed these discussions onto a whiteboard, organizing them into
"Pro Copilot," "Anti Copilot", or "Neutral" categories, and then clustering them
"Anti-Copilot" (👍), "Pro-Copilot" (👎), or "Neutral" (🧐) categories, and then clustering them
into distinct opinions. Each section in this post showcases an opinion while
referencing pertinent discussions.

<Figure caption='Whiteboard of opinions'>
TODO
![Whiteboard](./github-copilot-assets/whiteboard.png)
</Figure>

## Anti-Copilot Opinions

### Opinion: Copilot produces bad results
## 👎 Copilot produces bad results

LLMs are probabilistic models, which means they are not always correct. This is
especially true for Copilot, which is trained on a corpus of code that may not
Expand All @@ -85,8 +83,53 @@ produce consistently bad results.

<Carousel.Wrapper>
<Carousel.Slide>
<Figure caption={<a href="https://twitter.com/swyx/status/1711792178031460618?s=46&t=3D8YW9UxdZo4eiYzLsOALw">GitHub Copilot crosses 100M ARR Milestone</a>}>
![100M ARR](./github-copilot-assets/slides/after/good-news/100m-arr.png)
<Figure caption={<a href="https://www.reddit.com/r/ProgrammerHumor/comments/15h0rpl/comment/julph3k/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![job-worry](./github-copilot-assets/slides/after/bad-results/job-worry.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/programming/comments/vhnvlm/comment/id90t4a/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![clippy](./github-copilot-assets/slides/after/bad-results/clippy.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31827065">Hacker News</a>}>
![disaster](./github-copilot-assets/slides/after/bad-results/disaster.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/xk8lal/comment/ipcgmex/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![decades](./github-copilot-assets/slides/after/bad-results/decades.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=RDd71IUIgpg&lc=UgwVzIvvMrJ4c_01xsd4AaABAg">YouTube</a>}>
![months-bugs](./github-copilot-assets/slides/after/bad-results/months-bugs.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/14lylhu/comment/jpyu6gy/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![lying](./github-copilot-assets/slides/after/bad-results/lying.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31827656">Hacker News</a>}>
![90-percent](./github-copilot-assets/slides/after/bad-results/90-percent.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/14lylhu/am_i_alone_in_just_not_getting_github_copilot/">Reddit</a>}>
![fall-short](./github-copilot-assets/slides/after/bad-results/fall-short.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/Unity3D/comments/16ww6rd/comment/k2z87ms/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![far-worse](./github-copilot-assets/slides/after/bad-results/far-worse.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31827556">Hacker News</a>}>
![incorrect](./github-copilot-assets/slides/after/bad-results/incorrect.png)
</Figure>
</Carousel.Slide>
</Carousel.Wrapper>
Expand All @@ -96,31 +139,114 @@ produce consistently bad results.
Developers expect their tools to be reliable.

Copilot is not reliable, and therefore, certain developers have a tough time
wrestling with its output. For people who worry about job security, fear
wrestling with its output. Copilot would sometimes lie or produce bad results
for a vast majority of the time. For people who worry about job security, fear
nothing, because Copilot is not going to replace you anytime soon.

### Opinion: Copilot creates more problems than solutions

## 👎 Copilot creates more problems than solutions

Copilot is a tool that is supposed to help developers write code. However, it
can also create more problems than solutions. Code requires 100% accuracy, and
inaccuracy can lead you down a rabbit hole of debugging. Often wasting time or flat out
breaking your code.

<Carousel.Wrapper>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=RDd71IUIgpg&lc=UgwnC6wQIW_0R3jVRgJ4AaABAg">YouTube</a>}>
![screwed](./github-copilot-assets/slides/after/more-problems/screwed.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/11hmsqp/comment/jav6ncb/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![subtle-bugs](./github-copilot-assets/slides/after/more-problems/subtle-bugs.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/xk8lal/comment/ipcgrah/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![hassle](./github-copilot-assets/slides/after/more-problems/hassle.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31828276">Hacker News</a>}>
![caused-more-problems](./github-copilot-assets/slides/after/more-problems/caused-more-problems.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/zc726g/comment/iyw1u5a/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![interferes](./github-copilot-assets/slides/after/more-problems/interferes.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=RDd71IUIgpg&lc=UgwVzIvvMrJ4c_01xsd4AaABAg">YouTube</a>}>
![junior-dev](./github-copilot-assets/slides/after/more-problems/junior-dev.png)
</Figure>
</Carousel.Slide>
</Carousel.Wrapper>

#### Key Takeaway 🔑

Copilot can mess up your code.

In some cases, this is frustrating enough for developers to stop using Copilot
altogether. Just like managing a junior developer, Copilot requires a lot of
oversight.
altogether. Just like managing a junior developer, Copilot requires a lot of
oversight. Sometimes subtle bugs can take more time to debug and fix than
writing the code yourself. For some developers who find the output to be too
inaccurate, Copilot becomes an interference and ultimately doesn't save them any
time.

## Pro Copilot Opinions

### Opinion: Copilot helps you write software faster
## 👍 Copilot helps you write software faster

Despite the inaccuracy of LLMs, if you treat Copilot as a tool that can help
take care of the boring stuff, it can be a powerful tool. And a 10-20% increase
in productivity is nothing to scoff at.
take care of the boring stuff, it can be a powerful tool.

<Carousel.Wrapper>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/zc726g/comment/iyv62x3/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![twice-as-fast](./github-copilot-assets/slides/after/faster-software/twice-as-fast.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31826614">Hacker News</a>}>
![10-20-pct](./github-copilot-assets/slides/after/faster-software/10-20-pct.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/11hmsqp/comment/jau80h8/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![worth-it](./github-copilot-assets/slides/after/faster-software/worth-it.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/11hmsqp/comment/jaueocf/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![30-line-test](./github-copilot-assets/slides/after/faster-software/30-line-test.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=_KjSkGgaJ1k">YouTube</a>}>
![boring-stuff](./github-copilot-assets/slides/after/faster-software/boring-stuff.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31826890">Hacker News</a>}>
![mundane](./github-copilot-assets/slides/after/faster-software/mundane.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/14lylhu/comment/jpyu6pq/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![tedium](./github-copilot-assets/slides/after/faster-software/tedium.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/zc726g/comment/iyvlk2m/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![hours-to-minutes](./github-copilot-assets/slides/after/faster-software/hours-to-minutes.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/xk8lal/github_copilot_scares_me/">Reddit</a>}>
![near-perfect](./github-copilot-assets/slides/after/faster-software/near-perfect.png)
</Figure>
</Carousel.Slide>
</Carousel.Wrapper>

#### Key Takeaway 🔑

Expand All @@ -129,14 +255,50 @@ Copilot increases productivity.
Often time developers are faced with mundane and repetitive tasks. Given enough
context, Copilot can do these tasks for you with sufficient accuracy. For some
developers, these tasks can be a significant time sink, and Copilot can help you
get that time back.
get that time back. A 10-20% increase in productivity is nothing to scoff at.
Assuming an engineer is paid $100k/yr and they are 5% more productive. At the
yearly price of [$100/yr](https://github.com/features/copilot#pricing), you are
creating $4900 of value for your company.

### Opinion: Copilot helps you write better software
## 👍 Copilot helps you write better software

Copilot can be a great learning tool for junior developers, giving tech leads
more time to focus on higher-level tasks. Ultimately leading to better software
and happier developers.

<Carousel.Wrapper>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=27676845">Hacker News</a>}>
![better-code-docs-tests](./github-copilot-assets/slides/after/better-software/better-code-docs-tests.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/xk8lal/comment/ipcybk8/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![test-coverage](./github-copilot-assets/slides/after/better-software/test-coverage.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31830789">Hacker News</a>}>
![higher-level](./github-copilot-assets/slides/after/better-software/higher-level.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://news.ycombinator.com/item?id=31826524">Hacker News</a>}>
![really-super-powers](./github-copilot-assets/slides/after/better-software/really-super-powers.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://x.com/scoumbourdis/status/1532613467567423492?s=20">x.com</a>}>
![super-power](./github-copilot-assets/slides/after/better-software/super-power.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=IavOJI5OV7g&lc=UgxLwkWPAAYQvBcak7J4AaABAg">YouTube</a>}>
![amazing](./github-copilot-assets/slides/after/better-software/amazing.png)
</Figure>
</Carousel.Slide>
</Carousel.Wrapper>

#### Key Takeaway 🔑

Copilot has enough intelligence to help you write better software.
Expand All @@ -146,14 +308,45 @@ It can drastically make mundane tasks like documentation and testing easier,
giving developers more time to focus on the bigger picture while maintaining a
high standard of code quality.

## Neutral Opinions

### Opinion: Copilot is like a calculator
## 🧐 Copilot is like a calculator

Copilot is a tool that can help you solve problems faster, but it is not a
replacement for your brain. You still need to know how to solve problems, and
you still need to know how to write code.

<Carousel.Wrapper>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/zc726g/comment/iyv3b6e/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![not-equally-good](./github-copilot-assets/slides/after/calculator/not-equally-good.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/webdev/comments/xk8lal/comment/ipcrmg5/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![cheating-math](./github-copilot-assets/slides/after/calculator/cheating-math.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=RDd71IUIgpg&lc=Ugzyhhcfmliu0fZbngR4AaABAg">YouTube</a>}>
![corner-drag](./github-copilot-assets/slides/after/calculator/corner-drag.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.youtube.com/watch?v=RDd71IUIgpg&lc=UgzLBXWrgjrk9U-gdB14AaABAg">YouTube</a>}>
![interns](./github-copilot-assets/slides/after/calculator/interns.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://x.com/kelseyhightower/status/1412855977452490755?s=20">x.com</a>}>
![calculator](./github-copilot-assets/slides/after/calculator/calculator.png)
</Figure>
</Carousel.Slide>
<Carousel.Slide>
<Figure caption={<a href="https://www.reddit.com/r/programming/comments/156s33l/comment/jt1erb4/?utm_source=share&utm_medium=web2x&context=3">Reddit</a>}>
![pros-cons](./github-copilot-assets/slides/after/calculator/pros-cons.png)
</Figure>
</Carousel.Slide>
</Carousel.Wrapper>

#### Key Takeaway 🔑

Similar to how calculators allow mathematicians to solve problems faster,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import os
import pyperclip
from urllib.parse import urlparse

def get_comment(file_path):
"""Fetches the comment of a file on MacOS using AppleScript."""
script = f'''
tell application "Finder"
set theItem to (POSIX file "{file_path}") as alias
get comment of theItem
end tell
'''
return os.popen(f"osascript -e '{script}'").read().strip()

def extract_source_website(url):
"""Extracts the source website from a given URL."""
netloc = urlparse(url).netloc
if "youtube" in netloc:
return "YouTube"
elif "news.ycombinator" in netloc:
return "Hacker News"
elif "twitter" in netloc:
return "Twitter"
elif "reddit" in netloc:
return "Reddit"
else:
# Return the domain name as default if no other conditions match
return netloc

def generate_string(folder_path):
output_str = "<Carousel.Wrapper>"
for file_name in os.listdir(folder_path):
if file_name.endswith('.png'):
file_path = os.path.join(folder_path, file_name)

comment = get_comment(file_path)
source_website = extract_source_website(comment)

file_name_without_ext = os.path.splitext(file_name)[0]
folder_name = os.path.basename(os.path.normpath(folder_path)) # This gives 'bad-result' for './before/bad-result'

slide = f"""
<Carousel.Slide>
<Figure caption={{<a href="{comment}">{source_website}</a>}}>
![{file_name_without_ext}](./github-copilot-assets/slides/after/{folder_name}/{file_name})
</Figure>
</Carousel.Slide>"""
output_str += slide

output_str += "\n</Carousel.Wrapper>"
return output_str

folder_path = input("Enter the path of the folder containing the images (e.g. ./before/bad-result): ")
output = generate_string(folder_path)
print(output)

# Copy the output to the clipboard
pyperclip.copy(output)
print("The generated string has been copied to the clipboard!")

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "<3.13,>=3.9"
opencv-python = "^4.8.1.78"
pyperclip = "^1.8.2"

[tool.poetry.group.dev.dependencies]
numpy = "^1.26.1"
Expand Down

0 comments on commit 71ce8c3

Please sign in to comment.