Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask YC: Deciding what programming language
13 points by wumi on Dec 22, 2007 | hide | past | favorite | 46 comments
Scenario: Two programmers with solid programming knowledge are trying to build a scalable website that will include multimedia uploading and user login.

One loves ruby on rails, ajax knows some php , c ++,

Other loves php, java, knows some c ++ etc.

Both nkow mySql

How do they decide which programming language they should choose for dynamic, scalable website?



Go for a language that's case insensitive...


Why? I'm not convinced this is the number one criteria... Am I missing a joke/reference to something?


I believe he's referring to how every single one of the languages and technologies listed in this post are not capitalized how they're normally capitalized.


No it was that Ask YC was capitalized strangely before an editor fixed it. It wasn't that funny.


Yes.


I think some people took this as a lisp reference.


A more powerful language is a better choice than a familiar one. The learning curve with the first is mostly a one-time cost, but the cost of a lower-level language (complexity and gruntwork) is ongoing and increases as your system grows.

Just as important is to pick something you both love and feel great about working in. If you can't find something you both love, try to figure out why. It may be a sign of incompatibility.


We chose Python because 2 guys knew PHP and one guy was an ASP dude. We decided on Python because it would give all 3 something to learn (and to help to bond) but ultimately its ended up being more powerful than we all imagined.

The main thing for you is just to get on and get started


Python is a great language... my only concern with it is Python 3000.

from http://www.python.org/dev/peps/pep-3000/#timeline: "Python 3.0 will break backwards compatibility with Python 2.x."

how do people using python account for this? (I think the timeline mentioned 2008 for Python 3.0 final)

this is really the only reason I'm hesistant to use Django beyond just experimentation


2.x versions will be around for a looong time.

It's not like suddenly everyone is going to switch to 3.0.


still - if you have a 2.x project that you care about (and still cared about) once the 3.0 transition was complete (say 3-4 years from now); what are you going to do, a complete rewrite when you want new features or just stay out of date forever? to me it just makes more sense to wait on starting new python projects until 2008 (or start writing it in 3000 now)


There's a converter for 2.x to 3.x. Or you can transition code by hand -- there are some differences in some places. Breaking backward compatibility just means not everything is guaranteed to work the same -- it does NOT mean that now everything is different. It's still Python.

Being "out of date" doesn't make any sense -- today's libraries aren't suddenly going to become less functional later. The stuff that works today will still work 5 years from now.

You change versions IF the new version gives you something you need. You don't change just because it's new.

And, always, the paper tiger is better than the real one. Not doing something today because it'll be outdated in a few years would mean never doing anything in the computer industry.


"There's a converter for 2.x to 3.x."

In theory this will work 100%... but I'm predicting this will probably introduce really nasty bugs and I'm sure they'll be limits...

"Or you can transition code by hand"

More bugs...

"Being "out of date" doesn't make any sense -- today's libraries aren't suddenly going to become less functional later."

I'm not talking about stuff you have now. I'm refering to new hotness features that you'll be missing out on; being trapped.

"You change versions IF the new version gives you something you need. You don't change just because it's new."

Typically with good languages like Python, you may not need new features - but they sure as hell make life easier and coding faster.

"Not doing something today because it'll be outdated in a few years would mean never doing anything in the computer industry."

That's not what I meant. It's more about why trap yourself in a building that's set for demolition in a few months? Theoritically migration sounds easy with the converter but to me that's a wait and see.


How long have you guys been debating this? If it's longer than a day, that it's just a mechanism to help you not get started. Just write it, open the editor and make the first page, then the second and so on. Get the site built so that it works. Don't worry about scalability, you'll need to rewrite it anyway.

Choose rails if the guy who loves rails wants to write the the majority of the app, otherwise write it in php.

It would be best if you two sat together while you wrote the it, that way you can figure out if you can work together, or not.


If you're looking to optimize for learning, choose a more powerful language that you don't yet know: Python, a Lisp, or Scala.


PHP is fine if you don't want to learn a new langugae, just use one of the MVC frameworks like Symfony or Cake.

The general consensus here though is Python/Django or Ruby on Rails, whatever you prefer.


If you both know php, it sounds like you've answered your own question.

+1 for suggesting an MVC framework like Symfony or Cake.


If you both know php, use php.

If you want someone else to cut the Gordian knot for you, I hereby command you to use python! ;-)


Learning a new language is easy if you already know how to hack. Use the most powerful one you can find.


I would say, rather, use the language with the most libraries in the area of your startup. Code you don't have to write beats ease of reinventing everything, any day. I say this as someone who has reinvented some things over and over during the last seven years.


I suppose it depends on how groundbreaking your project is. A lot of web apps are mostly glue code and presentation, making libraries more important than language features. If you're solving more interesting problems, your ability to write new code will be more important.


That's true. I'm just saying you shouldn't pick a language that forces you to solve interesting problems you otherwise wouldn't. But I don't think we're in much disagreement, if any.


I suggest that you first code for flexibility for at least the first few iterations of your site. Think of it as a fail fast optimization. Because you will be learning a lot and finding better ways to do things, you want to keep it as cheap as possible for as long as possible to explore different alternatives to your initial website concept(s).

Other than that, don't focus on languages too much. Find a way for you and your partner to write 'services' with language agnostic interfaces. If done correctly, there's no reason why you couldn't have parts of your site built in every one of the languages you mentioned. Naturally, the extra flexibility this affords you comes at a cost of being much harder to do correctly.


I'd say spend a day, competing. See which one can get the most features, in the least lines/simplest/easiest to maintain code.


Yes, yes and yes! I took a week and evaluated basically one setup per day. RoR, Django, Zope, Java/Struts/Hibernate. Yes, the last one took 2 days to evaluate.

My top two were RoR and Django, but the learning experience was invaluable. I got to see a good perspective of how they all handle things front to back.


Why Struts? Why can't Struts be buried?


The company had used Struts for several other projects and had programmers experienced in it.


IMO, it's a question of accountability. Decide first who is accountable for the success of the effort and the give that person the power to make the decision.


People have suggested languages, but I think they (and you!) are missing out the most fundamental first step. What do you want to achieve! You need to make a high level overview of what your site will do, and from that sketch out a rough mid-level idea of the technologies you will need in the implementation. Then ask which languages have libraries or built-ins which facilitate your design. And only then, pick amongst the languages which are still in the running.

It's hard to learn a new language, but it's harder to write a library/binding for video frame decoding, if your favored language doesn't already have one.


RIFE of course. It handles login stuff and much more about authentication built in and also support uploading. Use RIFE/Crud. It takes less then 5 minutes. (it is a Java Framework by the way. rifers.org)


Imho, consider three main aspects: overall performance, future scalability, and learning-curve for the team.

Looking at what you have described, I would recommend you to go with PHP and MySQL, or RoR and MySQL.


Use Blub. It has everything you need. All those "more powerful" languages just add a bunch of meaningless parentheses.


I'm not sure that learning a new language while developing for final product is a good idea, it will slow you down unless you are an expert. So I think it depends on what you want: decent website right now = old language; really powerful stuff at some point in the future = new language.


"I'm not sure that learning a new language while developing for final product is a good idea"

I KNOW it's not. I wasted 6 months on this same stupid question before coding it in what I knew best first. Don't make the same mistake as me.

Minimize the number of unknowns. Your app is unknown. That should be the only unknown. Forget about scaling for now. Forget about learning new technology for now. They'll just take focus and energy away from the only important thing now: getting Your App 1.0 up and running. Code it with what you already know. When you're ready to rewrite it later (you know you'll have to), post your question again.


Which language did you try to learn?


I was trying to learn php along w/ MySQL. Nothing hard about it. Except every question was either "What do I want to do?" or "How do I do...?" By switching back to older technology I knew like the back of my hand, every question was, "What do I want to do?" because I already knew how. In my case, it wasn't just the choice of language, but also DBMS and operating system. Once the prototype was done, I starting my current phase, where all the questions are, "How do I do...?" Already have the what. IMO, a much more effective way to learn a new technology.


I would absolutely disagree.


Consensus is boring. I think you should write your own custom MVC framework in C++.


Choice of language does not affect scaling - Website architecture does... massively!

I would go for the language you know best between you too that serves your current needs. If you get successful, you will have the money to re-write the damn thing.

So just get going!

Pierre


You should probably use S3 to store and access the multimedia stuff. Other than that, I'm not sure what a scalable website is.


Give Visual Basic a look. It's 133+.


Lisp of course :)


oh yuck... Ruby.


c++ LDO

el oh l


Hmm. You could be a competitor.

I recommend using PHP and Java.


I agree with downer. I also strongly suggest .NET. It is well worth borrowing 50k on credit cards to pay the licensing fees, and Windows servers are much easier to manage. Linux is highly unstable and experimental, you get what you pay for with it. Additionally I would consider outsourcing your core code development, and hiring a new 'idea guy'.

Best of luck competitors!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: