Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks like an impressive, cool project.

The justification for why it matters seems a bit "off" to me:

  For perspective on why this matters, consider that many Facebook engineers 
  spend their days developing PHP code in an endless edit-reload-debug cycle. 
  The difference between 8-second and 5-second reloads due to switching from 
  hphpi to the hhvm interpreter makes a big difference to productivity, 
  and this improvement will be even more dramatic once we enable the translator.
Big leap of intuition follows, bear with me:

Clearly there are some very talented engineers working at Facebook, as evident by this project. On the other hand, apparently a large number of Facebook engineers are spending all their time in a run-debug cycle, trying to "make this darn thing work," and the engineers with talent are being used to incrementally improve the mediocre coders' lackluster productivity.

Guys, if three seconds in compile overhead makes such a difference in your productivity, maybe you should think for a few seconds about code correctness before you hit the compile button.



All engineers, those who work on HHVM like me included, spend their lives in a run-debug cycle trying to "make this darned thing work," whether "this darned thing" is a language runtime or the new photo uploader. The tighter you can make that loop, the more productive the engineer is, because she has less time to keep all the items she's mentally juggling pinned in volatile short-term memory.


Sure, we all go through life via a form of trial and error, learning from our mistakes.

Personally, I think the fewer times you have to go around that wheel, the better.

I don't want to diminish the technical excellence of the achievements touted, and as a coder of primarily compiled languages, I would welcome any such improvements in the compilers I use.

However, my larger point stands-- which is that if a few seconds shaved on the run-debug loop is really a big deal for your total productivity, it means you're looping too much.

Trial and error is a fine way to learn a language, or to debug truly mysterious issues, such as those that exist outside of the abstraction layer you're working in. But in my opinion it's a poor way to work. It means that you don't understand the code you're writing.


Other fb employee here.

One of the other annoyances we had (I think its addressed in the note?) is that until now the interpreter (on our dev machines) and the compiler (hphpc in production) occasionally differ in small, occasionally painful ways. Unifying our development and production environments will eliminate another potential source of bugs.

Also: Tight loops don't imply a lack of understanding. Often times when you're trying to get the CSS on a page just right (across all browsers) it requires quick iteration, even if you do understand CSS well.


I disagree. My anecdotal evidence as a person who prefers to meditate on code is that many times the person who does quick iterations even beats people that understand the language. A deep understanding of the language, in fact, can sometimes be a hinderance to getting things done. I realize thats anecdotal, but if you have an organization (say 1000 people or whatever facebook has) and they are doing these iterations all day and you can shave 5 minutes more out of each persons day, that 5000 mins per day :)


At many companies, those 5000 minutes "saved" will be later squandered on Facebook. :)


As much as I enjoy developing in dynamic, interpreted languages with a repl, I think this is a perfectly valid perspective. If a few seconds savings per compile is really multiplying out to a significant chunk of time, maybe it wouldn't hurt to take a more meditative approach to the code.


Note that in many dynamic languages (and I think that includes PHP), syntax checking is done right before you try to run it, and type checking is performed at runtime. When you're programming in a Java IDE, these kinds of errors (and related ones, like typos in variable names, etc.) all get resolved while you're typing. In PHP or JavaScript you only find out once you run the program, so saving 3 seconds can be a huge win.

Of course, you can do static analysis to some degree which would cut down that time even further, but you may also get false alerts or miss some issues.




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

Search: