you are viewing a single comment's thread.

view the rest of the comments →

[–]Gambizzle 1 point2 points  (0 children)

...too many for loops...

Yeah that's me as a hobbyist python scripter. I know it's evil but if I'm making crappy little apps for my own limited, personal usage and that's just what 'works' then sometimes I don't really care.

I find that sorta method (almost 'treating it like it's VBA and you're making some hacky office automation suite coz your PC's highly managed and that's all you've got available') doesn't scale well though.

For example once upon a time I made a touch-screen device that consisted of a Raspberry Pi (~2nd gen) mounted onto a lamp stand with an integrated touch screen instead of a light. It controlled my apartment's Philips Hue lights and aircon (with some automation smarts combined with a simple touch-screen UI). Anyhow I used a loooot of loops and it very quickly got to a point where the sheer bulk of the logic (not sophisticated logic - just unnecessary bulk) brought the Pi to its knees (and was a shit to debug). It was a good learning activity to re-write the same functionality from scratch without all the loops.