News for hackers. Stuff that matters.

Ask HN: How to write the first line of code in a new startup?

My friends and I, are starting to create our own startup, we have no intend on revolution the world but some of our idea seems to be interesting enough to try.

My main goal, as a developper is to provide a great start for our idea. But I'm facing an interesting question.

How do I write my first php line of code. I mean, I'v started plenty of little project but what make a startup a great startup? What is the first thing you need to do when you'r the developper? And the secondary question, there probably many technological challenges so does startup rely on framework (and trust other) or prefer to use a custom solution?

( 10 comments | 2 points | on HN )
Re:Ask HN: How to write the first line of code in a new star... by krapp on Wednesday June 05, 2013 @02:13PM (#5827435)
I can't speak to this at all from the standpoint of someone who's actually successfully launched a startup, so feel free to disregard this as you will, but my advice is just to start pick a framework[1] and maybe Twitter Bootstrap (even though people will probably complain, just change the colors around so it doesn't look so bootstrappy) and just put the hard work into the interesting parts of the code, and avoid reinventing the wheel.

[1] I suggest Laravel 4 (http://four.laravel.com) just because I like it and happen to be playing around with it at the moment. It's already got a Twig package if you're into that.

Re:Ask HN: How to write the first line of code in a new star... by h1fra on Wednesday June 05, 2013 @02:36PM (#5827593)
I actually value any kind of well writen advice & constructive criticism. "just put the hard work into the interesting parts of the code, and avoid reinventing the wheel." That's probably my real problem, what to do when I feel that I need to reinvent the wheel, to have a full control over my code.
Re:Ask HN: How to write the first line of code in a new star... by krapp on Wednesday June 05, 2013 @02:46PM (#5827688)
I've been through the same thing, trust me, i've wasted years tinkering on problems that'll never see the light of day that have already been solved by other people. Learn to take advantage of Composer and existing libraries and frameworks. You'll save yourself an absurd amount of unnecessary work and maybe actually get something done.

And good luck with the whatever it is.

Re:Ask HN: How to write the first line of code in a new star... by janus on Wednesday June 05, 2013 @02:04PM (#5827387)
Just do it as a if it was another application, then refactor when needed. The important thing is to ship, not to create the most beautiful code in the world.
Re:Ask HN: How to write the first line of code in a new star... by lsiebert on Wednesday June 05, 2013 @09:51PM (#5829891)
I have noticed the following often is an issue for people, which may or may not apply to you.

People starting out are afraid to start and get things wrong, pick the wrong way or whatever, so they don't start. Every person who wants to know whether their first language should be python or ruby, java or c++, etc instead of picking one and trying it may have this issue.

It's not about the right language, it's the fear of making the wrong choice.

(note: this has effected me too).

So for you, the way to write your first line of php is to write it. Break your idea down into parts, and implement them.

Have a goal. Find something that might get you there. Don't spend too much time avoiding failures. Instead, learn as you go from your mistakes. Pick something that might work and try it. Don't try to pick the perfect thing without having worked on your problem... That is a paralyzing impossibility.

If my advice is not applicable, ignore it.

Re:Ask HN: How to write the first line of code in a new star... by h1fra on Thursday June 06, 2013 @07:51AM (#5831782)
Thanks, I reassurring that other have that kind of question. You'r right, I keep trying to avoid any failure, maybe I should embrace it.
Re:Ask HN: How to write the first line of code in a new star... by PaulHoule on Wednesday June 05, 2013 @02:33PM (#5827576)
first, open a text editor.

two, write

<?php

that's your first line of code.

Re:Ask HN: How to write the first line of code in a new star... by Sealy on Monday June 10, 2013 @09:49PM (#5859034)
Thats how all of my projects start. Little do I know how much of a Pandora's box I always open up between those opening and closing php tags.

In a nutshell, that is the joy, excitement and inspiration behind all great projects.

<?php //Pandora's Box ?>

Re:Ask HN: How to write the first line of code in a new star... by tanglisha on Wednesday June 05, 2013 @05:49PM (#5828870)
Don't get so caught up in worrying about the future. Even if you do everything exactly right, things will change down the road.

Just be sure to write lots and lots of tests. You'll thank me later :)

Re:Ask HN: How to write the first line of code in a new star... by eli_gottlieb on Wednesday June 05, 2013 @05:55PM (#5828900)
How? A text editor.

Stop asking stupid questions and go get something done.