Hacker Newsnew | past | comments | ask | show | jobs | submit | more phpnode's commentslogin

Just curious, do you really make more money as a photographer than as a developer? Or is one firmly work and the other firmly hobby?


I have, but the one that pays best tends to be the one I'm more interested in (read: show more effort in). I'm more accustomed to photography but development is a lot more fun these days. If someone wanted to be only a wedding photographer there's almost no reason to not have a packed summer (demand seems _much_ higher than supply).


Or perhaps both are work?

He wouldn't be the first person in history to work two jobs when one paid more than the other.


Exactly/thank you. They're complimentary, and like most things in life, one single thing can't really satisfy all our creative hopes/needs.


ugh. I am so sick of this "build a proper VM" wailing. It is such a naive and ignorant position. It completely ignores the reality of the market. JavaScript is dominant, it is fast, it runs on basically every device, browser vendors are deeply invested in it and you want to throw all that away and start afresh? ASM.js is a realistic way to get better performance today, not in the 10 years or so it would take for a new platform to reach acceptable adoption rates. And who's to say that some new "proper" VM wouldn't end up with warts like JS has anyway?


ASM.js has nothing to do with performance. It's about abstracting away the utter pile of shit that is JavaScript so that we can start using the languages of real men on the web.

There have been plenty of works done in this area already. See WebSharper, Script#... just two of the many available in the .NET ecosystem.

ASM.js is about formalising a known-good subset of JS that can be guaranteed to be compatible across browsers and therefore prime territory for building compilers on top of.

JS is nothing more than an intermediate language; it is similar to MSIL, JVM Bytecode, ASM. The only difference is that it happens to have a slightly C-style syntax. This is merely a coincidence and does not change the fact that is still an intermediate language designed for the web. It is utterly crazy the world has persisted writing code in it for so long. It is the modern web day equivalent of writing code in Assembly language.


What you're saying is contradictory. If JavaScript is already "fast", then why the need for something like this "to get better performance today"? If JavaScript is "dominant", then why is technology like this needed, mainly to enable developers to use non-JavaScript languages?

The market is speaking, and it's saying that JavaScript needs to go.

Besides, there are numerous proven VMs and runtimes that could either be used directly, or at least used as a model if a new system is needed. NaCl and PNaCl have already shown one much better approach that is possible. Your "10 years" estimate is not based on reality.

And frankly, no, I don't think any proper VM or runtime would ever end up as bad as JavaScript is today. No other language, aside from perhaps PHP, exhibits so many inherent, fundamental flaws. It would take significant effort (and ignorance) to duplicate the same degree of mistake and flaw.


1. speed is relative. it's possible for fast things to go faster. JavaScript as it stands is fast enough for a lot of tasks, ASM.js makes it faster in certain places. This can only be a good thing.

2. The market isn't saying JavaScript needs to go, JavaScript skills are high in demand, more so than ever.

3. This is the crux of your misunderstanding. I agree it would be nice if browsers supported e.g. LLVM out of the box. But they don't. And for political reasons they won't. If a company as large and powerful as Google cannot push NaCl adoption at all in other browsers (and NaCl was announced in 2008, so we're already half way to 10 years), how will you get them to adopt $YourVMofChoice? This is where ASM.js really wins - it is a subset of JavaScript, so it already works in other browsers, albeit without the performance boost and it is much easier for browser vendors to implement support for ASM.js than it is a whole new VM. Being backwards compatible means more web developers are likely to use it which will put pressure on other browser vendors to implement it. No one is arguing that ASM.js is a better technical solution to the problem, but it is a much better practical solution to the problem.

4. So this is another thing. Most of the people who are against ASM.js seem to dislike JavaScript the language. But ASM.js would free you from JavaScript almost entirely. The only time you'd see it is when you're debugging the "bytecode", and surely human readable bytecode is nicer than whatever something like LLVM spits out? Anyway, it seems like slightly curious reasoning.


"I don't think any proper VM or runtime would ever end up as bad as JavaScript"

Flash? Silverlight? ActiveX?


>"If JavaScript is already "fast", then why the need for something like this "to get better performance today"?

This feels obtuse -- obviously JS today is faster than it's ever been, but we want native c performance out of it. Do you have a in-browser VM solution today that can do complex, GPU-powered full 3D on every platform?

Then your VM solution is already inferior to javascript and will need significant time, money and development to even catch up to javascripts current level of "fast".

(Using, of course, "game" performance as a benchmark for the vague term "fast")

>"The market is speaking, and it's saying that JavaScript needs to go.

What? How do you rationalize this? Every major browser supports it to their core and most are working on dramatic imporvements for their implementations. Every mobile device supports it natively. Every computer I've seen in the past decade supports it.

The market is speaking? Where? Where is the market speaking? What devices are without javascript?

What browsers don't support javascript?

I think you are confusing the "market" for "a small subset of a-typical vocal developers".


saying that javascript is fast doesnt make sense.

Is it faster than 5 years ago sure. But the amount of work on needs to do have good performances is just silly. Is it everywhere ? sure. But i've seen a lot of crazy JS demos , i'm running a decent machine ( Macbook pro) and sorry but most of the exemples i see have poor perfomances , and nothing close to native performances. So imagine a soft you need to use 6 hours a day , you'll feel the bad perfs , trust me.

So please let's stop saying javascript is fast, it is a lie. Speed is not something absolute , it is relative. It is slower than native and will always be. Native will always be easier to optimize too.

Doesnt mean we cant do anything in html5/js , just mean we cant do everything. And the more "special" feature one uses the less "compatible" the js app will be.

Now is ASM a good thing sure. But let's not fool people just to promote JS.


math0ne: your account has been dead for very nearly 5 years, this must be some kind of record.


The record might be that he was hellbanned for his very first comment.


crashed my entire PC on chrome, mint-linux 64bit

edit - likely a webgl problem that I've brought upon myself by disabling the gpu-blacklist


Working perfectly with Version 25.0.1364.160 Ubuntu 12.10 (25.0.1364.160-0ubuntu0.12.10.1)


but i got directed to this page: http://chrome.com/maze/pc/not-supported/ on Ubuntu 12.10 Chrome Version 25.0.1364.172


It depends on your video card and drivers whether WebGL will be automatically enabled / supported. I had to go to chrome://flags and enable the

Override software rendering list Mac, Windows, Linux, Chrome OS, Android Overrides the built-in software rendering list and enables GPU-acceleration on unsupported system configurations.

Option to get WebGL enabled by default


maybe they've closed these holes, but click fraud has been an issue every since the earliest days of banner ads, so I'd be really surprised if it has been eliminated completely.


Yes, there will always be people that invest time/effort into figuring out how to exploit a system when there's money involved! I am sure there are still many exploits, it's just a matter of being more clever than the individual(s) that designed the system, and being willing to take the risk of indictment in case your scheme is discovered.


We stay pretty on top of things, and have a lot of data to look over for suspicious activity. Staying ahead of us means continually iterating methods, at which point, why not just get a job?

That said, it's nice to see this stuff separate the slick from the competent in the industry.


> at which point, why not just get a job?

Considering the pot could be somewhere in the several 100Ks per month (according to the article) range, which 'job' would that be?


I remember a buddy of mine telling me about doing affiliate advertising and using botnets to send fake click throughs to make money.

This was five or six years ago, but it looks like not much has changed.


That's a shame. This serves as a reminder to us all to be very careful when signing employment contracts. We're fortunate enough to be in an industry with huge demand for talent at the moment, so in addition to salary / benefits, things like having the right to open source your work should be included in your negotiations. In my experience, most good companies are OK with it.


>This serves as a reminder to us all to be very careful when signing employment contracts.

If he was a full-time employee in the US, a contract wouldn't be necessary for this to be an issue. All work done by an employee on company time or using company resources is 'work for hire' (a term often misused in the software contracting industry, where it rarely applies), and that IP belongs to the company.

>In my experience, most good companies are OK with it.

Most good companies are sometimes 'OK with it'. It depends on how much it will affect their competitive advantages in their field. My employer would probably sign off on open-sourcing a charting library, but not a graph layout library, for example - displaying complex data as graphs is near the core of our business.

Certainly most companies will not grant you a blanket right to open source all of your work for them.


> If he was a full-time employee in the US, a contract wouldn't be necessary for this to be an issue.

Right, but you can still address this when you're negotiating the terms of your employment.

> Certainly most companies will not grant you a blanket right to open source all of your work for them

agreed, but many companies will be ok with open sourcing individual components, especially if it's done so under their name.

My point is this is another tool for you to use at negotiation time when they've reached a limit on price / other benefits.


I agree that it's worth bringing up, though investigating yourself is likely more accurate (if they haven't released any open projects previously, I'd be hesitant to believe their newfound commitment to the cause).

But it's not really something they can honestly negotiate with - they can't commit to releasing anything until they can see what it is, and how likely it is to help their competitors.


> All work done by an employee on company time or using company resources is 'work for hire' (a term often misused in the software contracting industry, where it rarely applies), and that IP belongs to the company.

Even if the company is friendly today, it's worth noting that one should -never- use company-owned resources or time (including laptops) for personal projects. You can get into a situation where the a claim could be made that since company resources were utilized, that real financial value was contributed by the company towards its creation, and some ownership could be claimed.

Whether or not such a claim would eventually prevail in court is orthogonal to one's ability to fund the experience in discovery.


My thought is aligning with the policy what nevinera mentioned. The company should have the right to say whether to open src certain project or not programmed by the staff during the work time.

But the code written by the same staff during the off-hour should belonged to the same staff.

I am running a startup in Hong Kong, and I am thinking of adopting this kind of policy.


I'd like to know about your business - if only because I'm interested in working in this field. Can you share any info about your employer?


Definitely! Emcien (from mCn - we deal with a lot of combinatoric problems) is focused on analysis of large-scale data by constructing and operating on relationship graphs of tokens within that data.

We use Rails pretty heavily for presentation, though our apps have been leaning more and more on Backbone.js, and most of the core science is performed in some C code largely written by one of the founders, O.R. prof Roy Marsten.

The business/marketing site is at emcien.com, and the (fairly new) engineering blog is at engineering.emcien.com. Management sadly isn't interested in long-term remote devs yet - we're in Atlanta, GA. It's a great environment though, in the sweet-spot between risky startup and heavy corporate work.


looks nice, but one thing I really don't get is how

    <a ng-click="modal.saved=true;dismiss()">...</a>
is any different to

    <a onClick="thisIsAnAntiPattern()">...</a>

I'm all for declarative code but isn't stuffing javascript in html attributes something we learnt not to do about 10 years ago? Why the resurgence?


An interesting discussion about the difference between

  <a ng-click="modal.saved=true;dismiss()">...</a>
and

  <a onClick="thisIsAnAntiPattern()">...</a>
and why context / scope matters could be found here: http://www.bennadel.com/blog/2439-My-Experience-With-Angular...


thanks, that was interesting and it's obvious how it can be useful. but for some reason it still feels dirty.


onClick will be evaluated within the global scope, ng-click is evaluated within the scope of the controller. That's a pretty substantial difference.

Your HTML has to be hooked up to your controller somehow, I personally prefer angular's declarative approach rather than a big messy init method.


I think as one uses Angular more, a person will move most of their code out of `ng-click` style directives into their own components which might include click handlers on them.

That's the case, for me anyway.


This is an example for brevity but certainly misleading if you're not familiar with Angular. You're right that this is typically an anti-pattern, but it's one that Angular tries to eliminate, even though it is using a similar looking mechanism. Angular controllers expose an API for the widget they enclose, but it leaves the wiring up to the designer. Sometimes it makes sense to sprinkle event bindings onto the DOM via code, but there are many cases where it doesn't. My code almost never needs to know exactly what element(s) are bound to a method, so it makes sense to me to just declare that stuff right in the document.

As a side point, you can't evaluate arbitrary JavaScript in Angular attributes. Angular parses the attributes and evaluates them as in a JavaScript-like way, but with some exceptions. See http://docs.angularjs.org/guide/expression


Didn't we learn that static files for serving websites are so uncool many many years ago and stuffed the content into databases and served off them? And what is seeing a great resurgence these days?

More things change, more they remain the same.

PS: I am not saying JS in attributes is a good thing, but just that these things keep happening, for good or worse.


I'm pretty sure the linked site is using code inside ng-click directives for illustrative purposes. It makes documenting and demonstrating the project much easier.


This is a bit tangent to your question, but, I think you can still run with ng-click if you deploy Content Security Policy, whereas onclicks will be banned.


> I'm all for declarative code but isn't stuffing javascript in html attributes something we learnt not to do about 10 years ago?

And why?


Harder to test, of course.


A good thing that AngularJS is test friendly then


schraeds your account has been dead for 11 months :(


hfs - your account has been dead for > 200 days


thanks for the suggestion, but using their online calculator it looks like they'd charge me £300+ / month for something I currently get for £~20


Look at their Home::1 package.


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

Search: