r/programming • • Dec 05 '15

Microsoft Edge’s JavaScript engine to go open-source

https://blogs.windows.com/msedgedev/2015/12/05/open-source-chakra-core/
1.6k Upvotes

504 comments sorted by

View all comments

Show parent comments

9

u/[deleted] Dec 06 '15 edited Dec 06 '15

*500 Million lines of code for healthcare.gov according to the graph.

How the hell is that possible ?

19

u/tornato7 Dec 06 '15

I saw the code for healthcare.gov, I'll paste some of the it here:

Healthcare.giveHealthcare(citizens[0]);
Healthcare.giveHealthcare(citizens[1]);
Healthcare.giveHealthcare(citizens[2]);
...
Healthcare.giveHealthcare(citizens[297000000]);

Apparently they were getting paid per line of code.

10

u/Throwaway_Kiwi Dec 06 '15

....I seriously hope you're kidding.

2

u/cr42yh17m4n Dec 06 '15

Lol, the developers might have created a sub program to only do that.

2

u/[deleted] Dec 06 '15

I sincerely hope that is a joke.

1

u/immibis Dec 06 '15

The giveHealthcare method dispatches robotic surgeon drones*, right?

7

u/speedisavirus Dec 06 '15 edited Dec 06 '15

I know. I can't possibly comprehend how that is possible. They had to have hired an enormous amount of the most incompetent people on the planet for that to happen. Definitely a fuck ton of people to write 500,000,000 lines in that time period regardless of how shitty they were.

7

u/OMG_Ponies Dec 06 '15

welcome to government contracting.

7

u/[deleted] Dec 06 '15

Not to be that guy, but:

500,000 = 500 thousand
500,000,000 = 500 million

You keep writing 500,000. It's 500,000,000 ( 500 million ) lines of code, which I can't even fathom.

2

u/speedisavirus Dec 06 '15

I don't know why. 500,000 isn't that big of a project. I swear I was saying 500,000,000 in my head. Not sure why I wasn't typing it. Probably because I'm replying between breaks while working on a project.

1

u/j0hnGa1t Dec 06 '15

Easy: Just think 10 million lines of useful code and 490 million lines of auto generated IDE boilerplate getters and setters.

1

u/Thought_Ninja Dec 06 '15

I would argue that such a figure is highly improbable... Maybe if they're counting JSON objects or some other generated "code," but 500,000,000 simply doesn't make sense.

Source: web developer

-1

u/NewDark90 Dec 06 '15

Here, I can help you write healthcare.gov. Just a little Javascript magic:

for(var i = 0; i < 500000000; i++){
    console.log("var healthcareVariable" + i + " = " + i ";");
}

3

u/OffbeatDrizzle Dec 06 '15

that's still 3 lines of code ...

0

u/NewDark90 Dec 06 '15

The point is that it is writing the javascript code for you.

As in, you copy/paste all the lines of code written from the console into your source code.

1

u/OffbeatDrizzle Dec 06 '15

afaik javascript isn't self modifying

1

u/NewDark90 Dec 06 '15

That... isn't really the point?

I could have wrote the script in python, C#, or any language really to write fake lines of code for me.

*500 Million lines of code for healthcare.gov according to the graph. How the hell is that possible ?

The point was it was highly unlikely that exists naturally, and full of bullshit... however, it's totally possible to write code that writes your code and get a huge LOC number.

It wasn't a terribly funny joke, but I didn't think it would need this much explaining.

0

u/OffbeatDrizzle Dec 06 '15

Oh don't get me wrong, I understood the joke - I just wanted to know how far you'd go to explain it

1

u/[deleted] Dec 06 '15

That makes more sense. Thank you.