Skip to main content
Tweeted twitter.com/StackSoftEng/status/921847445490978816
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I post the origin question in stackoverflowstackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several problems:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these problems?

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several problems:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these problems?

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several problems:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these problems?

edited body
Source Link
Martijn Pieters
  • 14.7k
  • 10
  • 60
  • 59

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several troublesproblems:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these troublesproblems?

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several troubles:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these troubles?

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several problems:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these problems?

Source Link
jiluo
  • 161
  • 4

How to reduce errors in dynamic language such as python, and improve my code quality

I post the origin question in stackoverflow, some people suggest me to post here

I've always have trouble with dynamic language like Python.

Several troubles:

  1. Typo error, I can use pylint to reduce some of these errors. But there's still some errors that pylint can not figure out.
  2. Object type error, I often forgot what type of the parameter is, int? str? some object? Also, forgot the type of some object in my code.

Unit test might help me sometimes, but I'm not always have enough time to do UT. When I need a script to do a small job, the line of code are 100 - 200 lines, not big, but I don't have time to do the unit test, because I need to use the script as soon as possible. So, many errors appear.

So, any idea on how to reduce the number of these troubles?