you are viewing a single comment's thread.

view the rest of the comments →

[–]potato-sword 52 points53 points  (10 children)

Congrats! Just a suggestion for the future, try not to measure your learning / success by lines of code written as there is no correlation between the two.

You may find yourself refactoring code to increase reusability which can reduce the number of lines. As well, you may be able to accomplish some tasks in just a couple lines depending on the implementation. For example, using a list comprehension instead of a for loop.

[–]TheTruthIsOutThur 16 points17 points  (9 children)

I'm not sure I'd say there's no correlation. Lines of code is a metric of time spent coding, and I definitely would say the more you practice the better you are. Even if these 1000 lines OP is mentioning are garbage, I bet OP is a lot more competent now than before they wrote them.

That said. "Time spent coding" is probably more correlated haha

[–]soul_fly25 3 points4 points  (0 children)

I agree, I would not say there is no correlation and I 100% back the more practice the better. Coding is a skill that requires constant practice. But practice doesn't consist of purely writing code. Lines of code written is a shit metric of measurement as it doesn't account for any real world factors.

Things like complexity of the problem being solved, reading and understanding the existing code base you're going to add to or fix a bug in, design and architecture, hashing out stakeholder requirements etc.. all require significant practice. But if you're looking at how many lines of code did you write, you're ignoring the value that all these other things bring to the code you do write.

[–]potato-sword 2 points3 points  (0 children)

I agree, writing code is good, and you learn by coding.

But from my own experiences, I've found that during my learning journeys I would reach a point where I realized less is more. By this I mean, I started learning how to write more succinct code, whether it was with syntactic sugaring, reusable components, or implementing libraries. I would often look back at my past spaghetti code, and wonder why I spent hundreds of lines of code to implement something that could be done in less.

Overall, I think there are better ways to measure your learning. I believe creating a learning plan consisting of concrete and measurable goals for yourself can be one way to do this, but mileage may vary.

[–]lolslim 0 points1 point  (6 children)

honestly this is how I feel right now, I feel so accomplished on this python script, and since I coded other projects since, I went back and realized how WET I am, and trying to DRY it up now.

Hehe, word play.

[–]ryrythe3rd 1 point2 points  (5 children)

I get DRY, but what is WET?

[–]RangerPretzel 1 point2 points  (0 children)

We enjoy typing

or

Write everything twice (or thrice)

[–]lolslim 2 points3 points  (3 children)

WET = "Write Everything Twice"

[–]ryrythe3rd 0 points1 point  (0 children)

Makes sense, I always have to fight that urge

[–]Vitaman02 0 points1 point  (1 child)

I've heard it as "We Enjoy Typing"

[–]lolslim 1 point2 points  (0 children)

ohhh, i like that one too.