Live data from Hacker News

Ask HN: C/C++ developer wanting to learn efficient Python

news.ycombinator.com

1–10 of 50 posts

Ask HN: C/C++ developer wanting to learn efficient Python

#1
Hey,

I have been writing python in my everyday work for the last 5 years or so. However, I never took a course on python. I want to prepare for some upcoming job interviews where I will be programming in python. How can I improve my ability to write data structure/algo code in python? I want to gain a similar understanding of what is "fast" in C++ (std::move, copy elison, etc.), but with python. Any suggested resources?

Re: Ask HN: C/C++ developer wanting to learn efficient Python

#4

Just read the best Python book that's out there: Fluent Python; enough said!

Exactly what I was looking for. This reminds me of Straustrup's "The C++ Programming Language". Covers all of the essentials and shines the light on all of the features I didn't even know existed. THANK YOU!

Re: Ask HN: C/C++ developer wanting to learn efficient Python

#6
> How can I improve my ability to write data structure/algo code in python?

You don't need a book on Python, you need to practice solving data structures and algorithms problems.

Completely disagree with the recommendation to read Fluent Python, that book has nothing to do with your goals.

> understanding of what is "fast"

Do you mean in terms of performance? Depending on the problem fastest is usually to use libraries instead of native Python code. But that's not really relevant to DS&A interviews.

Re: Ask HN: C/C++ developer wanting to learn efficient Python

#8
post #6

> How can I improve my ability to write data structure/algo code in python? You don't need a book on Python, you need to practice solving data structures and algorithms problems. Completely disagree with the recommendation to read Fluent Python, that book has nothing to do with your goals. > understanding of what is "fast" Do you mean in terms of performance? Depending on the problem fastest is usually to use librari…

I do think there is something to reading Fluent Python. Knowing how to write elegant solutions in python is part of what I have been missing when using python and this book is very good at illustrating this.

Re: Ask HN: C/C++ developer wanting to learn efficient Python

#9
post #8
post #6

> How can I improve my ability to write data structure/algo code in python? You don't need a book on Python, you need to practice solving data structures and algorithms problems. Completely disagree with the recommendation to read Fluent Python, that book has nothing to do with your goals. > understanding of what is "fast" Do you mean in terms of performance? Depending on the problem fastest is usually to use librari…

I do think there is something to reading Fluent Python. Knowing how to write elegant solutions in python is part of what I have been missing when using python and this book is very good at illustrating this.

The book doesn’t teach you how to write elegant solutions.
Post reply on HN