# Looking for a fun (and quite short!) recreational project? Try implementing a progress bar!

**URL:** https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905
**Category:** New to Julia
**Created:** [February 28, 2024, 4:19pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905 "2024-02-28T16:19:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mcmuffin6o](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mcmuffin6o](https://discourse.julialang.org/u/mcmuffin6o)
#### Post date: [February 28, 2024, 4:19pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905/1 "2024-02-28T16:19:28Z")

</div>

I need to implement a progress bar for a long-term project I’m working on, but I decided to have fun with it by making the bars a little snazzy.

If you’re looking for terminal amenities, you’re better off with something like [Term.jl](https://github.com/FedeClaudi/Term.jl), but you can find [my project](https://github.com/matthewelmer/ProgressBar.jl) on GitHub, too. (Not to be confused with [ProgressBars.jl](https://github.com/cloud-oak/ProgressBars.jl))

Happy to hear feedback! Mostly just wanted to share how much fun this was, though.

I will preemptively address a couple of things:

1. Yes, it assumes the terminal is at least 80 characters wide. This is good enough for me and my purposes!
2. Yes, I could pre-cache the bar for each progress percentage, but this only makes a significant difference for really fast progress, which is when you care about a progress bar the least.

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [February 28, 2024, 4:47pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905/2 "2024-02-28T16:47:59Z")

</div>

That is a cool project @mcmuffin6o , thanks for sharing. You are probably aware of ProgressMeter.jl, but worth sharing the link here anyways.

One thing that ProgressMeter.jl supports that I really like is progress bars for parallel processes. Perhaps that is another challenge you can tackle for fun.

Also, the ProgressLogging.jl package defines an interface for such progress bar implementations. I understand that you can use these progress bars in Pluto.jl and elsewhere if you adopt the interface.

---

<div class="post-metadata">

### Author: ![mnemnion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mnemnion/32/206596_2.png) [@mnemnion](https://discourse.julialang.org/u/mnemnion)
#### Post date: [February 28, 2024, 5:23pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905/3 "2024-02-28T17:23:34Z")

</div>

> [@mcmuffin6o](#):
>
> Yes, it assumes the terminal is at least 80 characters wide. This is good enough for me and my purposes!

Just as a tip, you don’t have to do it this way if you don’t want: `displaysize` is in the default namespace, and `_, cols = displaysize()` will get you the actual value. Your choice!.

---

<div class="post-metadata">

### Author: ![mcmuffin6o](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mcmuffin6o](https://discourse.julialang.org/u/mcmuffin6o)
#### Post date: [February 28, 2024, 5:37pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905/4 "2024-02-28T17:37:59Z")

</div>

Something to look into for sure!

---

<div class="post-metadata">

### Author: ![mcmuffin6o](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mcmuffin6o](https://discourse.julialang.org/u/mcmuffin6o)
#### Post date: [May 14, 2024, 3:16pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905/5 "2024-05-14T15:16:47Z")

</div>

I went ahead and implemented the display size query! Progress bars have never been so snazzy.
