Live data from Hacker News

Django 2.0 released

docs.djangoproject.com

161–170 of 177 posts

Re: Django 2.0 released

#161

Earlier quoted context omitted.

> That's surprising to me I'm surprised you're surprised. Have you seen the size of the breaking changes documented with each release notes? We typically hit about 10 of these changes per release, sprinkled all over our code. https://docs.djangoproject.com/en/2.0/releases/1.10/#backwar... https://docs.djangoproject.com/en/2.0/releases/1.9/#backward... https://docs.djangoproject.com/en/2.0/releases/1.8/#backward... An…

Some things to do that could help everyone (this is what I do): If documented stuff changes, Please report it (though that likely means testing against the alpha / beta versions (or just master). Keep Django honest. If you find yourself using undocumented features, consider documenting them; that way they’re held to backward compatibility. Also, follow the development of Django and comment on the intentional breaks i…

> Also, follow the development of Django and comment on the intentional breaks if you think they’re not worth changing.

I really don't want to be sucked into Django's drama:

https://us.pycon.org/2015/schedule/presentation/381/

I've encountered very little sympathy from Django developers. Everyone seems to have just accepted that it breaks often and it's totally my fault for not keeping up with the breaking changes. Everyone seems to think that Django breaking compatibility all over the place is good, proper, acceptable, and inevitable. Nothing is sacred, anything can break, and make sure you go through that list each release to see what you have to change in your code.

This makes me sad and frustrated.

http://stevelosh.com/blog/2012/04/volatile-software/

Re: Django 2.0 released

#162
post #44
post #26

Earlier quoted context omitted.

There have been lots of breaking changes along the way. Django is pretty good at giving developers a heads up of what is deprecated and slated for removal, but there have been lots of growing pains in the 1.x release cycles.

I really dread upgrading Django. We have a codebase that has been with us since the 1.3 days and each time there's an upgrade, someone on the team sets about one month aside to deal with all of the breakage. You could say that this is our fault for "doing it wrong" but we just wanna get stuff done. Sometimes the only way to do it that we could figure out was by doing something that Django later decided we shouldn't h…

I am currently upgrading a code base from 1.4 to 1.5.12 as a weekend project.

On the plus side the original authors managed to avoid using Django features so that makes it a bit easier. Someone actually wrote their own ORM in the process

Re: Django 2.0 released

#163

Earlier quoted context omitted.

Ever tried using SQLAlchemy with Flask? It's exactly the same situation: either you luck out, and someone already wrote all the conveniences and utilities and integrations with components for you exactly the way you want them with exactly the set of other components you wanted, or you do it yourself. Also, you could make a similar argument about swapping major components into, say, Pyramid. Most of the alternatives p…

I've used SqlAlchemy with Flask. You only need a few lines of code to integrate them. But yes, with Flask (or similar frameworks/libraries), you need to do the integrations yourself with the components you want to use. Advantage of Flask in this regard is, you don't need to fight with Flask to make it happen. That's why I'm saying it's better suited for complex apps that you want to build with your own abstractions.…

You only need a few lines of code to integrate them.

Really? So you got all the things you get in Django -- ORM, forms with validation, etc. etc. -- from "a few lines of code"?

Somehow I think that's not true.

Re: Django 2.0 released

#164
post #159
post #27

Earlier quoted context omitted.

I am learning Python right now and want to build a website using this programming language. Django and Flask seem to be the best frameworks for this purpose. I understand that Django has steeper learning curve and comes with "everything", whereas Flask is more modular and compositional. If I were to use Flask, is there anything that I could not do but that Django could?

With frameworks, the more they do for you, the more risk you will end up fighting against them if you need to do something they're not designed for. Django isn't particular bad at this (it has some escape hatches to allow you to e.g. write custom SQL), but it is overal still quite a big framework and it's certainly harder to bend to your will than Flask. So, you need to know the extra things it gives you and figure o…

I do not have much experience with flask, but I recently told a coworker: if you are fighting the Django framework to do something, atleast question why you are doing that because there is a good chance you are going down the wrong path. The caveat is, yes there are some times when that is necessary, but it is also necessary to question what you are doing, and why it isn't possible.

Re: Django 2.0 released

#165
post #115
post #112

Earlier quoted context omitted.

https://thenewstack.io/instagram-makes-smooth-move-python-3/ How has Python 3 performed since then? "Ding: We did not have performance gain expectations for Python 3 right out of the box. So it was a pleasant surprise to see 12 percent CPU savings (on uswgi/Django) and 30 percent memory savings (on celery). It’s only been four months since rollout, we don’t expect to see constant 10 percent performance improvement, b…

Removing the 2/3 compatibility shims saves a lot of code and runtime cost, that could be a contributing factor.

Good point.

Re: Django 2.0 released

#166
post #130

Congrats to the team, this has been a long time coming. No Python2 support which is unfortunate, my Python3 migration strategy was to move to C# for my main language instead. No regrets, I like it a lot. I describe it as industrial strength. Good IDE and granted me a larger job market with Xamarin for iOS coverage. For web stuff, I'll probably be using a C# framework, or Wordpress with one of the JITs. Still, a lot o…

Why would you not want to use Python 3?

I think choosing to migrate to a completely different language rather than rewriting in python 3 is a totally valid strategy.

Maybe they’ve switched to c# lately and are using lack of py2 as a trigger to rewrite. Maybe going after the benefits of a compiled language. Maybe just wanting to use c# because it’s one of the best languages out there.

There are some python apps out there I’ve contributed to that I’d rather rewrite in a static type lang rather than migrate to py3. Others I’d move to py3 no problem.

Re: Django 2.0 released

#167
post #30

Earlier quoted context omitted.

And if you don't mind the learning curve (which will make you a better thinker!), I would add Elixir - Phoenix I wish there was a complete Clojure - ???

I'd wait for the ecosystem to mature before building a business app with Phoenix. You never know what taken for granted library is missing in Elixir, and it's going to be damn hard to hire a developer experienced with Phoenix. Everyone on your team will be slow and will be making a steady stream of mistakes as they learn the framework

I think Phoenix (and Elixir) is mature enough already to use in production. I've made pretty good, bordering on oracle-like :) predictions about directions in technology over more years than I care to think about; so I'm confident that Phoenix is only going to grow in use and positive attention.

It will be the logical successor to Rails. It already is.

That said, I use a good mix of Elixir+Phoenix and old-school cron launched Python utility scripts, and that works nicely. Anything that's difficult (probably because I am still a newb) in Elixir I can easily do out of band with a Python script.

But your point about difficult to hire experienced people is the reason for my reply. This is the mentality that is ruining IT and development. Yes, having someone with hands on experience in all of your tools is nice - a rare luxury in fact. But it's really not necessary. I would be quite happy to have someone that has willingly built something in Rails, Django, and Nodejs with an "Oh I can learn that" attitude. Especially if you come from a modern MVC framework, Phoenix itself is easy. Elixir is the part that requires some real effort, imo.

Re: Django 2.0 released

#168

Earlier quoted context omitted.

> Why? Because we are getting more and more CPU cores to utilize. I don't think this trend will stop soon. The software stack will have to adjust to this and it already does. The next generation of mainstream (highlevel)languages/frameworks will be those that are designed to easily utilize CPU cores. It may be more expensive for now, but it might pay out later and I think it's much more exciting. ;)

I honestly don't understand this argument. With 30 workers threads in Python Django, I should be able to make very good use of 6 CPUs even if the workers only run 20% of the time.

I mean, actually think that I don't understand and would like to be educated.

Re: Django 2.0 released

#169
There's a huge amount of talk about Django vs. Other Frameworks here, which is not surprising. Bottle and Flask come up. Sadly, Pyramid comes up. Rails comes up.

I think the real crux of the discussion around which framework is best is really about the relationship between the framework and the language it's based on.

Let's separate this from the Python world for a second and talk about the relationship between Objective-C and iOS. Knowing the former doesn't in any way imply that you know the latter. There's an incredibly host of things you have to know to write an iOS app in addition to knowing Obj-C. XCode, UIKit, all the different xKits there are. Which are basically magic, and the APIs you're referencing are not necessarily written in Obj-C.

It is even possible to be a competent iOS developer and not really know anything but the framework. No real understanding of Obj-C or Swift is required, let alone any guiding principle of how programming languages work or how computers work, or how computer science works.

That's not a dig against people who went to code camp or took an online course or just read a book. I'm someone who learned about stuff mainly by reading books. And that worked out fine for the first few years of my career. But there's a legitimate problem that you run into (I know first hand) about what you do when the framework breaks down or you encounter something unexpected.

Anyone can learn a framework relatively quickly. What do you do when the framework fails for some reason?

As someone who learned SQL and Python from the ground up--language-first--I love that Django exists. It's damn impressive, and only ever gets better. But I like Flask + SQLAlchemy better, and I like Pyramid + Stored Procedures best.

I would probably have a different attitude if I started with Frameworks first. And again, that's not a criticism. It's just a different approach. One way to get things done is to learn the fastest way to get things done, and in many cases that's quite possibly Django or Rails.

But both of those make me a little nuts when I dig into the internals. Magic isn't bad by definition. Good magic is when you can invoke a class you don't have to understand to use well. Bad magic is when you have to understand the internals of a class to work around it when it fails to meet your needs.

But I think we need some context about this when we talk about which framework reigns supreme. If you're taking a class and learning to write web apps for the first time with no other experience at all, Django is the bomb. You can spend an entire career as a Django developer and do well.

Just like you can spend an entire career as an iOS developer writing apps, do well, and never actually learn anything about programming. I think this is a wonderful development in our world of programming because it brings so much economic opportunity to such a large group of people who wouldn't otherwise have access to it.

I think it's safe to say that Django is creating jobs for people who wouldn't otherwise have them, and that's a good thing. My 98-year-old father and WW2 vet is starting to help me with a Django app just as a thing we can do together. And I don't have to teach him anything at all about anything except that framework.

It's a brilliant and beautiful framework, and I love it. But to me, it's a little bit more like iOS or RoR than it is a framework that's really ideal for people who started with bottom-up rather than top-down development.

I know what I need in a new project, and it isn't going to be all of that. And I know how to quickly integrate the boilerplate things I will need. That's what repos and plugins are for.

The short version of my response to everyone talking about different frameworks is this: we need them all. Bottle and Flask are great; Pyramid is great; Django is great.

What you are using them for is an important consideration, as is who you plan to have working on them.

Re: Django 2.0 released

#170
post #67

I really wish they merge Django and DRF.

The value of the ecosystem is that each component does its part and each other component that has interaction with that component reaps the rewards. This leads to a natural evolution of components in the ecosystem (for instance, DRF evolved out of the need for better REST support, since projects like Tasty Pie were lacking thing that the rest of the ecosystem desired). The idea that anything of value has to be nation…

OT but gonational you asked a couple weeks back to tell my story. I finally got around to doing it: https://news.ycombinator.com/item?id=15762821
Post reply on HN