Life After PHP
s3.amazonaws.com
s3.amazonaws.com
Maybe my experience was different because I was already heavily using ORM's (SilverStripe in particular) to build complex apps very rapidly, and moving to Python+Django was a far more natural process.
> "the fact that Django makes most of the decisions about how the database will be structured just baffled me"
You define your structure with your model, so this is baffling to me. If you're worried about trivialities like column or table names, you're worried about the wrong things.
Anyway, I think that a bit of time with Django and you'll never want to go back. I certainly don't.
Everything just felt easier, many task where you had to repeat yourself got abstracted away (forms) and the documentation was just awesome one of the main selling points at the time and it still is.
The ORM took me a while to get used to it but after the initial hump i learned it was very powerful and easy to use.
Overall my efficiency went up a lot i was able to prototype in days instead of weeks for feature rich applications. It made me able to toy around with ideas and the first time in my life i had this experience that i hadn't had to fight the framework to get something i wanted.
And you can express yourself so much better in python than php and till today i enjoy the community which is nice and helpful across the board.
http://docs.python.org/3/library/binascii.html#binascii.b2a_...
In Python function description is often just unscannable short blob of prose.
edit: I feel like the real life examples in the PHP docs are very nice, but not really missing in Python (there are a lot examples in the Python documentation but not for such trivial functions). In python you just start the interactive interpreter and do "import module", "module.function(xyz)" and you see exactly what's going on. It's then a copy&paste away from your shell to your editor.
It's bit strange strange that you gave undocumented function as an example of how PHP functions are documented. :-)
This difference between Python docs and PHP docs is just the thing I noticed when I started having fun with Python which is btw awesome language though finding which lib to use for given task sometimes is hard.
Good thing to do to find out what python function does is running help(module_name.function_name) in interpreter.
> Moreover, the fact that Django makes most of the decisions about how the database will be structured just baffled me – why does Django know better than me what the database should look like?
If that is really true (I don't have any Django/Python experience) the simple answer is "It doesn't". In the long run, relying on the ORM to provide high scalability is not a sane choice and I'm pretty sure Django must be able to allow some flexibility on how tables and columns are defined according to your needs.The thing is that lately I'm finding myself unhappy with the idea of ORMs and how they handle things. When I see that a framework has a lot of dependency to some ORM, I get instantly unmotivated to learn more about it.
-- Me, a developer.
up to a certain size, most ORMs will behave just fine! the bigger problem is when your mental model of how the ORM should be behaving for a certain data access pattern is thwarted by the actual implementation. This usually only happens when you notice a performance bottleneck around a semi-exotic query that you know to be trivial in sql or whatever.
it's also possible to put up performance abstractions between you and that ORM bottleneck, but often the experience and tradeoff sours most people. i don't blame them, but i agree that for most day-to-day cases, orms are pretty handy.
ORMs seem to be great if you are doing prototyping, but most of my analysis tools have to be built against existing datasets or ecosystems. I'm either shoehorning in two databases from two separate architectures together or at the very least working with one that is populated by another tool.
ORMs fall flat on their face in these circumstances, and I'm left with having to fight against it in cases where it may be tightly coupled.
One of the biggest problems I have had with a lot of the cool new frameworks is that they make basic assumptions about how they will use them.
The lessons learned from this article don't really apply specifically to Django or Python, but seem to represent an overall learning of how programming languages can work in general.
Use virtualenv, pip, and Python's own built in scripting tools (check out the OS and sys modules of the Python standard library). Try to learn some of the best practices before complaining about dealing with dependencies.
To be honest, i would never contract this guy to do some web work for me (he's is some freelancer of some sort? He mentions making tons of money with PHP). Or any work. Really, who developed web stuff for quite some years and finds it strange that not to write pure SQL statements? Or dependencies? He find's it hard to deploy Django or node.js?
It reads to me like he has been living under a rock for years. And that's probably the worst thing you can do in the fast paced IT sector. You need to catch up and constantly learn new stuff to be up to date. I strongly believe that to be a good developer/IT guy the most important skill is to be eager to learn new things, to strive to improve yourself and learn, read, learn, learn, learn.
I always hate talking to overpaid contractors/freelancers about technical stuff and see how many people don't even know basic stuff. Talking about node.js or NoSQL or puppet or ansible or other "new technology" and be greeted by ignorance. And then i think "And this guy earns 100$ an hour and has a dozen certificates!?".
Deploying PHP also means updating database schemas or configuring .htaccess or configuring apache or updating php modules. Deploying a django app can be as easy as upload + restart django. Everyone doing a little bit of development should have no problem automating that tiny bit.
I think he's the kind of young developer that when he moves on to university or the workplace he'll rapidly broaden his skills.
Telling me a developer is likely to get the same kind of experience working bit jobs as a contractor in high school as they are either doing the same while pursing a CS degree, or working in a development team is preposterous.
Edit: I just realised you're the OP. Add "gaining some maturity" to the things you'll get from the above.
> Talking about node.js or NoSQL or puppet or ansible or other "new technology" and be greeted by ignorance.
You'd be greeted by a great big meh from me and I make considerably more than $100/hour.
Your definition of 'basic stuff' is not inspiring. My definition would include processes and threads, I/O and networking, conversations around which also happen to often be greeted with ignorance.
In the article he says he mentions using Twitter Bootstrap before he'd even discovered CodeIgniter. Bootstrap was released about 2.5 years ago, so in 2 and a half years he's gone from insecure raw PHP apps, through CodeIgniter and ORMs, to Python with Django. Sounds like a dev who's constantly learning and improving to me. And don't forget he's 18 and in school, so web dev isn't even his full time job.
My advice to the OP would be if you're not feeling at home in Django try Rails. I went from raw PHP, through CodeIgniter, and now I use Rails. Rails instantly felt very natural for me, maybe it will for you as well.
Don't even come in here saying that I have been living under a rock. I am the owner of my company, on the board with three more technology companies and also a director for a non-profit.
Edit: Still kudos to you, for running a business at that age, respect for that!
Edit: In the end i feel like i have to justify my post more then i want to. It's not that i hate that guy or that i think he is a bad programmer or a bad person or whatever. I was just surprised to read that someone who has been coding PHP for 7 years never used an ORM. I imagine that most people that want to learn "web programming" start with a framework that includes an ORM. He surely has a big benefit over "competitors" who only know ORMs and never cared about the underlying SQL. That's surely not good as well.
Or even in general, unless you're dealing with a language that has a fundamentally different approach, frameworks constitute a much bigger learning curve.
Especially if you're coming from a simple, lightweight framework like CodeIgniter to Django. Much of what the author describes would also apply if you go from CodeIgnitor to Symfony, even though it's still PHP.
Not if you design your application correctly. HA is really not that hard to do, in the cloud or otherwise, so that single points of failure (e.g., vm or dyno outages) do not result in service unavailability. Also, consider that if you're not building HA into your apps, you are still at the mercy of things beyond your control with local physical servers. What if your upstream network provider accidentally publishes a BGP route that sends all your traffic into the void? Or, in a timely example, what if your authoritative nameservers get DoS'd? Build HA apps, aim to physically separate key redundant infrastructure pieces (built in to most big PAAS services and configurable in most big IAAS services), and you'll have no worries using a cloud service.
Life after CodeIgniter.
P.S. Python is totally ready for web development. Django was released in 2005 and it's stable. There are other frameworks too. YouTube and, of what I'm heard, half of Google is using it (maybe they are rewriting some things to Go now). Ton of popular sites uses Python and Django too! When it comes to deployment, I stick to Nginx that serves static or sends request to gunicorn. It's stable and fast. :)