Word or idiom defining something barely functional

Related: haphazard. Things are often unreliable because they were improvised or cobbled together in an unsystematic fashion.

That term may come in handy for one of your future commits ;-).


How about brittle?

1a : easily broken, cracked, or snapped
definition from m-w.com

From the "choose the right synonym" section, Merriam-Webster also says:

Fragile, frangible, brittle mean breaking easily. Fragile implies extreme delicacy of material or construction and need for careful handling. Frangible implies susceptibility to being broken without implying weakness or delicacy. Brittle implies hardness together with lack of elasticity or flexibility or toughness.

Adding on to M-W's description, my understanding is that fragile implies that "ordinary handling" (e.g. just picking something up in a casual manner) is likely to cause damage or breakage, while brittle is generally okay with ordinary handling but anything beyond that (e.g. setting it down hard, bumping it) will likely cause damage.

So, if you consider "within your context" to be "ordinary handling", your algorithm works fine here; but trying to apply it to anything outside of that context is likely to cause a problem. Thus you could use "brittle" to describe it.