QUORA: How should I structure PHP files to output nicely formatted HTML?

Curtis Oden added this answer.

Start by putting <?php on the first line and ?> on the last line. You’ll now have to either explicitly ‘echo’ the HTML to the screen, or close PHP ( ?> ) before your HTML, and then reopen it after.

Here’s a rough example:

//This is my PHP application

//The whitepace above won’t go to the browser
//START awesome conditional code.

$helloWorld = ‘Hello World’;

//END awesome conditional code.

Hello Wild World

Sometimes I just like to shout: “.”

And sometimes i like to whisper: “
echo ($helloWorld);
And sometimes ….
echo (‘I feel fancy and feel like singing”‘ . $helloWorld . ‘.”‘);

//This is the end…

And there are a dozen other ways to do this. Just remember: what happens in PHP, stays in PHP.

See question on Quora

Read more…

QUORA: How can you inspire programmers to work longer work weeks voluntarily?

Curtis Oden voted up this answer.

Contrary to popular belief, most of us have family, friends, children,
and social lives. We don’t need “motivation” to work long hours, we need you people in management to give us clear, concise, and comprehensive specs (yes, you can do all three), ask us for time estimates based on those specs (because no, you do NOT have the expertise to know how long a particular bit of code should take to write), and then harbor sane expectations.

“This is going to take about 120 man hours” does not mean “we’d like to have 100 man hours, but if you ‘negotiate’ hard we can ‘finish’ in 80
and then spend another 40 in unpaid, salaried overtime because we have nothing better to do”. Programming time is not something you can haggle over, and we are not bored kids who can’t think of anything better to do with our time than work long hours for free.

No, this isn’t an angry, frustrated rant; I work in a company that does
what I described above, and the result is that we finish projects on
time and on budget and we bill clients what the Read more…

QUORA: Is it possible to be a web designer as a second job, and what are some suggestions on how to do that?

Curtis Oden added this answer.

If you are a good designer, and your primary occupation is design (i.e. print), you can certainly make a decent supplemental income by learning how to create good HTML mockups (really HTML5 these days) from Photoshop designs. You’ll need to get proficient in doing storyboards for various viewports (device sizes), landing pages and content types.

You should become an expert in CSS3 and Responsive Web Design techniques. Also, it’s helpful to get to know how theming working in common content management systems like WordPress. The best designers may not know how to do programming, but they should have a good grasp of what the code is going to generate on the page.

If you’re any good and in a decent market, you’re part-time gigs may drag you into a new full-time gig.

The first thing you need to do is build up a solid portfolio of any professional work that you’ve done (and can share without violating non-disclosure agreements or threatening your main gig).

Take on some cheesy blogs or small-business brochureware sites for family, friends and acquaintances in exchange for beer (or babysitting if you have kids – date nights are expensive!), Read more…

QUORA: What is the coding community in China like for someone whose Chinese is not good? Would I be likely to hire 3-5 quality coders to build a web app? What part of China is best?

Curtis Oden added this answer.

I’ve done a bit of outsourcing to China, the Asian Subcontinent and Eastern Europe. If you have an excellent local Project Manager who understands your language and culture, that’s a good start to only spending three times as much as the project Read more…