Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Is this a bad sign?
Hello community!

I have just started learning Python a month ago or so. I have been doing python exercises, writing small scripts and solving some coding problems. One thing I've found with my code is it's not succinct enough. When I write code, it works and my solutions show up as correct, however, when I look at some of the other solutions, the code is cleaner and shorter than mine. Are there any tips for shortening my code? Is this a bad sign that I may be bad at coding? I'm starting a software engineering degree soon, hopefully my code improves with time and more practice.
One month is a very short time. I started python more than 20 years ago and I'm still learning. A lot of experience is involved in programming. Start with code that works. When you see better code, create a collection of these better code snippets. A good knowledge of some existing libraries is also necessary, starting with Python's standard library. This takes also some time to learn.
Also realize that shorter code doesn't necessarily mean better code. It's quite possible to shorten your code to the point where it's not clear what's going on, and that's bad code. Clearer code is easier to maintain, and easier for a team to work with.
Craig "Ichabod" O'Brien -
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures


Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)