# What has been the worst Julia production code you have written?

**URL:** <https://discourse.julialang.org/t/what-has-been-the-worst-julia-production-code-you-have-written/60524>\
**Category:** Offtopic\
**Created:** [May 4, 2021, 3:13pm UTC](https://discourse.julialang.org/t/what-has-been-the-worst-julia-production-code-you-have-written/60524 "2021-05-04T15:13:35Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 14, 2021, 10:00am UTC](https://discourse.julialang.org/t/what-has-been-the-worst-julia-production-code-you-have-written/60524/12 "2021-05-14T10:00:33Z")

</div>

If Division II league posts are allowed here, the naive solution to [this integer decomposition problem](https://discourse.julialang.org/t/function-for-finding-additiion-decompositions-of-an-integer/60295/3), while simple and working fine for small N, its “algorithm” is so bad that the execution time increases exponentially with N (_compare it to Gustaphe’s turbo solution_).

A rough estimate is that the naive algorithm would take about 1 Million years to run for case N=100 in a normal laptop (_if it wouldn’t run out of memory long before that_).

_ **NB:** _  
_It would be nice to have a package that estimates the run time and disk space required for such massive problems, where complexity increases dramatically with some parameter N._

---

_[View the full topic](https://discourse.julialang.org/t/what-has-been-the-worst-julia-production-code-you-have-written/60524)._
