Live data from Hacker News

Why I push for Python

lorenabarba.com

81–90 of 129 posts

Re: Why I push for Python

#81

Earlier quoted context omitted.

I think it all depends of your goals, if you learn to cook in order to impress your friends, no you probably don't need chemistry lessons, but if you plan to win 3 Michelin stars for your restaurant, you probably need to. Same for programmation, if you just want to ease your work, compute quickly some math formulas, etc, you can start with Python. But if you plan to write the next big OS, you better start with C...

I doubt there's any cooking course that starts with chemistry.

Tufts's "Gourmet Engineering" was close enough, I think: http://www.tufts.edu/as/tampl/en43

Re: Why I push for Python

#82
post #21

I think I could have written this article a few months ago, when I was a huge Python fan and would spend a significant amount of time telling my friends in academia to stop using Matlab and start using Python. Then I started working in a research lab myself, and I haven't used Python since. Very simply, there's an immense amount of code written for Matlab that I can learn from in domain-specific instances, hardware v…

I'll make the obligatory "I hope that Julia will replace Matlab in this role soon" statement. But I also hope that infix matrix operations will make Python 3.5 more competitive in this situation too.

Re: Why I push for Python

#83
post #67
post #9

Earlier quoted context omitted.

I haven't been following the ruby/rails community much. In what way is rails falling?

Ruby on Rails apps have started causing a lot of problems for a lot of people. Any small initial gains obtained by getting Ruby on Rails web apps put together and deployed rapidly have time and time again been lost many times over due to performance problems, severe maintenance headaches, security flaws, and other issues such as those. In short, it hasn't managed to live up to the immense amount of hype that once sur…

Which frameworks are far better than Rails? I've used Flask and Django, and like Python due to the large ecosystem of general packages available via pip. However, I've heard that Rails developers can be super-productive due to the much much larger ecosystem of web-related gems.

If a Rails developer were to move to another framework, which ones would you recommend and why?

Re: Why I push for Python

#84

I teach 11 to 18 year olds and I've stopped teaching them Python and started teaching them JavaScript. My main reason for the switch is to overcome the "What's the point of this?" questions that I used to receive. With JavaScript the kids instantly see a result on a platform they're familiar with - a browser. window.alert() is instantly recognisable to them and seems far more relevant than print"" where the output is…

I've also found that most people who were curious about programming got very excited when I showed them the dev tools of browsers. For at least one it triggered a love of programming.

One option to make js a little easier to start with is to install a CoffeeScript plugin. Not sure if it's a good idea, but it's an option.

Also, one nice side-effect of getting them started on javascript is that learning another language (ruby or python, perhaps), is a wonderful next step because suddenly you're using a much 'friendlier' language! Whereas if you start with that, having to deal with js can be frustrating.

Re: Why I push for Python

#85
post #52

Earlier quoted context omitted.

I think it all depends of your goals, if you learn to cook in order to impress your friends, no you probably don't need chemistry lessons, but if you plan to win 3 Michelin stars for your restaurant, you probably need to. Same for programmation, if you just want to ease your work, compute quickly some math formulas, etc, you can start with Python. But if you plan to write the next big OS, you better start with C...

No, you absolutely don't need to start with C. You need to learn C (or some equivalently low-level language) eventually .

I don't even think you need to learn it eventually. For a similar argument, ask if most programmers need to learn assembly or further down the stack, EE, eventually. The answer is a resounding no. Extrapolating this even further, in the future "programmers" will be people who are just very good at issuing NLP commands to computers. They won't type strings of characters into consoles.

Re: Why I push for Python

#86
post #65
post #36

It seems the only argument for pushing Python is that it sidesteps the need to understand fundamental programming concepts. Sure Python is easy to read and easy to write, but that's not really the point. To teach somebody print "hello world" in Python is not really teaching them much at all... Teaching someone the C equivalent would cover functions ("what is 'void main()'?"), entry points and how programs are loaded…

>Sure Python is easy to read and easy to write, but that's not really the point. That is the point. This isn't for comp. sci. students, this is for engineering students. I know that in America, unlike other countries, "engineer" is a non-protected term and that lots of guys who don't actually have engineering degrees (such as comp sci majors) call themselves engineers. But "actual" Engineers, i.e. the people who have…

You have quite a few muddled definitions that you trip yourself over in your post. First you say that you're an engineer, which means you're an "applied scientist". Then afterwards you go on to claim that computer scientists aren't really "engineers" by your definition. Then further down you go on and say that they're instead "specialists". Sounds like you just had to find another word other than "Engineer" there, so you picked specialist.

Then again... You mention that the job of an "engineer" is to "develop a solution". Well, that's pretty much what a software developer or software engineer would do. They're all grey, and it sounds like you're not quite sure of your own definitions. I can't tell if you're just confused about what all these terms mean to you, or you're just hurriedly trying to justify your own internal view of superiority over "non-engineers" because you're a "mechanical engineer" and don't like being on the same plane as them.

All in all, I should probably disclose that I've had this argument a few times with "engineers" in the physical sciences. They all had a vested interest in protecting the term engineer because if they didn't, it would devalue their worth and the degree they hold. And the government-body given "accreditation" that they lord over people for higher pay.

Re: Why I push for Python

#87

Earlier quoted context omitted.

http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Not that I am not agree with the link but Python is not caveats free either. The fact that they have to "fix" the language in one version making it incompatible with previous versions is smelly enough to me from a design point of view.

Breaking backwards compatibility doesn't necessarily mean bad initial design. One of the main breaks of compatibility in python 3 was making strings unicode by default. The world changes, why wouldn't a language change to meet that need?

Honestly I think a lot more languages (cough, Java, cough, cough) would benefit from breaking backward compatibility (occasionally, like every 10-15 years) rather than force it to maintain cruft that no longer makes sense to keep.

Re: Why I push for Python

#88
post #52

Earlier quoted context omitted.

I think it all depends of your goals, if you learn to cook in order to impress your friends, no you probably don't need chemistry lessons, but if you plan to win 3 Michelin stars for your restaurant, you probably need to. Same for programmation, if you just want to ease your work, compute quickly some math formulas, etc, you can start with Python. But if you plan to write the next big OS, you better start with C...

No, you absolutely don't need to start with C. You need to learn C (or some equivalently low-level language) eventually .

Disagreed. You can easily go for a full career without ever doing any low level programming.

Re: Why I push for Python

#89
post #54

I teach 11 to 18 year olds and I've stopped teaching them Python and started teaching them JavaScript. My main reason for the switch is to overcome the "What's the point of this?" questions that I used to receive. With JavaScript the kids instantly see a result on a platform they're familiar with - a browser. window.alert() is instantly recognisable to them and seems far more relevant than print"" where the output is…

My main problem with Javascript is the various truthiness rules as well as the numerous implicit conversions to strings. Eg. > [2,1,3,10,6, 200].sort() [1, 10, 2, 200, 3, 6] is both unexpected, and is just one of many landmines that can completely derail beginners.

This may be an unpopular opinion (certainly contrary to what the majority of publications on the web would have one believe) but I wouldn't consider Javascript a beginner's programming language.

C was hard for some kids to grasp in my high school class, but I didn't struggle with it, and it certainly taught me rigor and attention to detail. Ruby (on and off Rails) helped me build things without getting bogged down in syntax; the LOC-to-output ratio was quite gratifying. Only later did I progress to writing non-trivial Javascript.

While it's an incredibly powerful language (when I hear people describe the "enlightenment" of developing in Lisp, I'm often reminded of JS), it has a lot of warts that, as you rightly stated, can throw beginners for a loop. I imagine that if I had encountered the example you described above at the beginning of my career, I would have decided that Javascript is for the birds and resolved to just write C/C++ for the rest of my life.

Re: Why I push for Python

#90
post #63
post #33

Earlier quoted context omitted.

The reason for Ruby is that more playful things seem to happen in that ecosystem. If you want to push something you want to be at the edge right? And although I believe Python and Ruby are equal in many qualities, Ruby is closer to the edge of where the next development happens. That was the reason behind my decision to add that.

This. I don't know why more creativity seems to happen in the ruby ecosystem, but it really does. My preference of ruby over python comes down to elegance and string interpolation operators (ie. not much). But ruby attracts people trying to do interesting things. Some examples; Puppet, Chef, Vagrant, github, Jekyll. I'm noticing similar cutting edge infrastructure/service stuff being written in go by default.

I think Ruby hit its peak at the same time as people were deciding what language to write Puppet, Chef, Vagrant, Jekyll, and Github in, but it's more a coincidence than something inherent in the language that led to those choices.

Salt and Ansible, successors to Puppet and Chef, are written in Python. The author of Vagrant is writing his new tools in Go. The buzz and constant churn of new shiny things that I saw in the Ruby community a few years ago seems to have moved more to the node.js community these days.

Post reply on HN