r/learnpython • • Nov 27 '20

Milestone - 1,000 lines of code - TU r/learnpython!

Hi friends,

Just wanted to tell you all that I reached my first 1,000 lines of Python code (wanted to show a pic, but not allowed). I'm going through the book Python Crash Course, 2nd edition and doing all the exercises and some of the examples. Strongly recommend this resource, as so many others already have done. Also, I want to say a huge thank you to this community! I wouldn't have come this far without you <3

333 Upvotes

49 comments sorted by

View all comments

54

u/potato-sword Nov 27 '20

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.

17

u/TheTruthIsOutThur Nov 27 '20

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

1

u/lolslim 🐍Telegram🤖 Nov 27 '20

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.

2

u/ryrythe3rd Nov 27 '20

I get DRY, but what is WET?

2

u/RangerPretzel Python 3.7+ Nov 27 '20

We enjoy typing

or

Write everything twice (or thrice)

3

u/lolslim 🐍Telegram🤖 Nov 27 '20

WET = "Write Everything Twice"

1

u/ryrythe3rd Nov 27 '20

Makes sense, I always have to fight that urge

1

u/Vitaman02 Nov 28 '20

I've heard it as "We Enjoy Typing"

2

u/lolslim 🐍Telegram🤖 Nov 28 '20

ohhh, i like that one too.