News for hackers. Stuff that matters.
Re:Ask HN: How do you handle large Python projects? by hacker_9 on Saturday May 28, 2016 @04:06PM (#11793203)
I've recently written a Blender addon using Python that came to just over 1000 LOC. Not big at all and yet already I was running into problems that are just non existent in static languages. I couldn't refactor variable names and had to manually replace the text which was very error prone, I had no help from the language about whether I had referenced a variable by the right name as it would just create a new one, no 'goto defintion' and instead I was reduced to scrolling or ctrl+F, no braces to tell me where scope starts and ends (which you wouldn't think mattered, but only relying on indentation actually gets quite messy), and no contextual knowledge of the blender APIs unless I knew what to Google and it often came down to someone asking the same question on stackexchange.

The only way I could manage it was to write tiny functions, so I could literally eyeball the scope and keep all the details in my short term memory. I would not recommend using this language for larger projects.

Re:Ask HN: How do you handle large Python projects? by olau on Saturday May 28, 2016 @05:51PM (#11793721)
You have obviously previously been relying on a context-sensitive IDE. Those things exist for Python too, or you can turn a text editor like Emacs into one by installing various packages.

It's true that there are limits to what they can do, since Python will let you do some pretty funky stuff, but you were nowhere near those limits.

Regarding the missing API documentation: Python programmers will often have a Python shell open and just experiment with stuff in there with instant feedback.

For instance, I know one project where someone decided to write a relatively large Python plugin for Excel. One essential component was a button that put up a shell so you could experiment with the Excel COM API live. So you could access the sheets and write stuff into cells and see Excel update them.

If you write Python like you write .NET or Java code, you'll probably only see the downsides. Getting a taste of the upside requires adjusting your coding style. It's going to take some time. And yes, there are of course downsides, language design is a trade-off.

Re:Ask HN: How do you handle large Python projects? by brianwawok on Saturday May 28, 2016 @07:44PM (#11794091)
Renames are one reason why code I write in Python have way more unit tests then code I write in Scala. I think the end result of well unit tested Python is better than lazy tested Scala...
Re:Ask HN: How do you handle large Python projects? by ves on Saturday May 28, 2016 @06:05PM (#11793787)
if you spend 15 or so minutes configuring your editor (I use vim, so python-mode and ctags for me), you can get around all of these issues you mentioned.
Re:Ask HN: How do you handle large Python projects? by arjie on Saturday May 28, 2016 @08:09PM (#11794166)
Is `python-mode` and `ctags` all that you have for Python specifically or is there more?
Re:Ask HN: How do you handle large Python projects? by kirang1989 on Monday May 30, 2016 @12:15AM (#11799522)
You should try elpy-mode or anaconda-mode. You get better completion, integration with eldoc for documentation, go-to definition and much more.