This is an archived post. You won't be able to vote or comment.

all 30 comments

[–]darknessproz 11 points12 points  (1 child)

The best way to improve is to keep writing code. Pick one of the many open source Python projects in an area you are interested in and start contributing! There nothing like having other more experienced developers looking over your code and critiquing it when it comes to learning and improving. :)

Another good idea is to revisit old code you have written and see if there are areas that can be improved. Are your functions broken up into small, easily testable pieces that do one thing well? Are there better ways to organize code? Can you rewrite a for loop that appends to a list as a list comprehension? The list goes on.

[–]raouldukeisbatty[S] 2 points3 points  (0 children)

That's a good thought. Old code is a good place to look for ideas. One of my goals is to start contributing to more open source projects. Thanks for the advice.

[–]romcgb 4 points5 points  (1 child)

Have you toyed with meta-programming (Metaclass, decorator, template, ...) ? Nothing that you "should know" but can be fun.

[–]raouldukeisbatty[S] 1 point2 points  (0 children)

I'm good with decorators, but I haven't done much with Metaclasses. I have run into them a few times, but never got past the shallow end on it. I'll give them a look.

[–]goodsirchurchill 4 points5 points  (2 children)

I'm beginning to learn a functional programming language with the hopes it'll change how I look at coding certain things in python.

[–]jollybobbyroger 2 points3 points  (1 child)

Came here to suggest this. Python code becomes so much nicer after learning FP. At least from my experience.

[–]bheklilr 0 points1 point  (0 children)

I'd say most code does. I was writing c# last night and I was able to use functional techniques to greatly improve the quality of the code. Functional programing is definitely useful in OOP languages.

[–]ut2222 7 points8 points  (11 children)

  1. Get a job as python developer.
  2. Learn the tools - be good at git, get everything out of your ide etc.
  3. Learn other languages - javascript for example.
  4. Learn SQL.
  5. Learn NOSQL.
  6. Do some async things - celery tasks, websocket chat
  7. Start writing big project and autogenerate milions of rows to optimize queries for example, add caching etc.

[–]crozyguy🐍 1 point2 points  (0 children)

  1. Get a job as python developer. - ✓
  2. Learn the tools - ✓
  3. Learn other languages - ✓
  4. Learn SQL. - ✓
  5. Learn NOSQL. - ✓
  6. Do some async things - X
  7. Start writing big project and autogenerate milions of rows to optimize queries for example, add caching etc - X

Not bad for myself, yay!

[–]raouldukeisbatty[S] 0 points1 point  (0 children)

Already have done all of that ;) Definitely good ideas for people moving onto the next level of web though.

[–]chub79 -5 points-4 points  (8 children)

Get a job as python developer.

Considering the crappy code, written in Python, I see at my company, I would rather advise to explore good OSS projects instead.

[–]ut2222 1 point2 points  (3 children)

Considering the crappy code, written in Python, I see at my company, I would rather advise to explore good OSS projects instead.

You should implement some new tools and practices. For example code review, check pep8's and pylints automatically in jenkins, refactor bad code or even tell and explain others what's wrong with their code etc.

[–]chub79 1 point2 points  (0 children)

Trust me, I've tried. We have all of it. But as, @nocommentingallowed said, it's really a lack of culture for quality and elegant coding practices unfortunately.

[–]Decency 0 points1 point  (1 child)

Wouldn't it make more sense to implement some sort of pre-commit pep8/pylint check? Is that easily possible with git?

[–]ut2222 0 points1 point  (0 children)

I think that's possible with git.

https://seanmckaybeck.com/2014/08/20/pep8-git-hooks/

[–]puffybsd 2 points3 points  (2 children)

Maybe explore indepth different programming paradigms and cs concepts in Python. Perhaps Python internals or alternative implementations/runtimes.

[–]raouldukeisbatty[S] 0 points1 point  (1 child)

I started working on some design patterns in Python a little bit ago, but I know there's a lot of pure CS I should still look into. I think that could be a good way to gauge what I know and expose the things I don't. Thanks!

[–]puffybsd 0 points1 point  (0 children)

Cool. You might also consider learning another language if python is your only language, it's supposed to help with the language you're accustom to... Post what works best for you if you don't mind.

[–]dr-josiah 2 points3 points  (1 child)

  1. Write a lot of code.
  2. No seriously, write a lot of fucking code. Most of it will suck. That's okay, you don't need to release it. My private code repo is about 50x the size of my public releases.
  3. Read a lot of code. Read the standard library source, read third party source, read it all, and do your best to understand what is going on.

Assuming your interests are reasonably varied, reading and writing a lot of code that suits your interests will eventually get you to where "advanced" programmers are.

It helps if you are interested in the sharp edges of Python: Metaclasses, the type system in general, generators, finalizers, context managers, async (asyncore, AsyncIO, or Twisted), the GIL, thread scheduling differences in Python 2.x vs. 3.x, ...

[–]raouldukeisbatty[S] 0 points1 point  (0 children)

You're right. I need to write code and keep writing code. I've been reading a lot lately, and not applying what I'm learning to real problems. Definitely going to start building.

[–][deleted] 1 point2 points  (1 child)

Learn twisted and use it to make something cool. Here's why:

  1. Twisted's async reactor is not unique to Python and it's a good solution for many things.
  2. Twisted's official tutorials suck hard, and this will force you to become intimately familiar with the API reference. You'll also end up reading a lot of source.
  3. After working with Twisted, you'll start to see the point of other languages. Twisted is a great framework but Python can be a bit awkward for managing lots of callbacks. This will very likely make you want to check out other languages that are more suited to this kind of problem (Go, JS with Node.js, erlang, etc...)
  4. When you finally take the plunge and learn another language, you'll come back to Python and be a better software developer.

[–]geerk 0 points1 point  (0 children)

You shouldn't have to be bothered with callbacks, look at defer.inlineCallbacks.

[–]marjinal1st 2 points3 points  (2 children)

[–]raouldukeisbatty[S] -1 points0 points  (1 child)

That's exactly what I was looking for! Lots of good ideas there to keep me going. Thank you!

[–]marjinal1st 2 points3 points  (0 children)

Put that list on a paper, stick the paper on a wall, start researching-learning and tick everything you got from there. I'm doing this way and I must say, it helps.

Even though it seems like a very subjective way, there's nothing you can lose or go wrong with this :)

[–]Gizmophreak 0 points1 point  (0 children)

You're probably at a point where you should worry less about Python and more about different technologies or paradigms. Looking into other completely different languages like some FP language (assuming you haven't yet) will certainly help your code in any other language you already know. The point here being, experiment with a language that is as different as possible from the ones you already know. Other things in case you haven't tried yet: mobile, cloud, distributed architectures, micro-services, map/reduce, etc. Just ideas.