Hacker News new | ask | show | jobs
by radagaisus 5409 days ago
here's how I learned Python without noticing it:

(I had a background in PHP, JS, C++) 1. Off hours on 2-3 days with dive into python 3. 2. A month later - 'oh let's do this in python!' on google code jam 3. 'python challenge? that's cool' - one night hackathon a month later 4. 'I hate php, I'll do this new web app in django' 5. Two days messing with django 6. Five days and the app was done.

I don't know if I write 'best practice' python or django but it's about x6 less code than in PHP. I can rewrite my app completely in 2 days.

For me, the biggest problem in learning a new technology is finding the balance between cowboy hacking & analysis paralysis.

2 comments

>I don't know if I write 'best practice' python or django but it's about x6 less code than in PHP.

Just curious... Surely you mean django vs php (not zend or some other framework - which _would_ have been the fair comparison.

I think he compared before (plain php) and after (invested time in learning some new technology).
No, the weird thing is I'm comparing Django to Kohana. The app I worked on in PHP was more complex, but one API page was very similar in both apps:

- Kohana: ~200 lines of code. - Django: 15. Seriously.

It's not only a matter of LOCs, it's also that writing code should be enjoyable. Python is, PHP not so.
Story of my summer Except now I have couple hundred of lines of "legacy" PHP that's not being written in Python just yet and considering time constraints won't be. It makes crossover projects hard.