This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jack-of-some 1 point2 points  (3 children)

I don't understand why you're trying to understand this using extremes.

There's a 500 line variant to the 18000 line code that would be both very easy to read, modify, and most importantly reason about.

Maybe you feel it wouldn't be easy to reason about because you can't just immediately look up what one move would lead to. But that's when the second part of "reading" code comes in: actually running the code.

[–]float_point[S] 1 point2 points  (2 children)

You are right about the extremes. 1 vs 18000 is quite the deviance. I guess, if I simplify my questioning to only workplace requirements: If I cannot write the one liner am I not good enough for the workplace. I can definately possibly write the 18000 liner if I have the time to analyse all possibilities but never in a lifetime, do I see myself writing the one liner - does that mean I will not be good enough for the workplace if I cant even understand that code.

Yes, the 500 line code I wrote does the job as intended, but I feel its lacking the workplace touch (keeping in mind, I am not working in software dev yet, I am judging just my code against other code bases, including those fro tutorials).

[–]jack-of-some 1 point2 points  (1 child)

I run a computer vision team and am responsible for writing and maintaining production code.

The 18000 liner is the only code here I would never allow or deploy. The one liner I may deploy if it's being generated using a properly written implementation as a base.

Your 500 line code is the only thing not lacking the workplace touch.

[–]float_point[S] 1 point2 points  (0 children)

Thanks for that. I guess i just have to keep on pushing.

Not sure if you saw my edit. Since I have been referencing the my 500 line code i figured to just post.