We've Open-Sourced Everything - <AUTHOR> http://blog.codecombat.com/we-have-open-sourced-everything

<comment><USER2> Good stuff going on over there at CodeCombat. My favorite part about this headline is that during office hours PG questioned them about their decision to go open source, so I wasn't sure if they would do it. This shows me that CodeCombat has a vision they are following and I believe a big bright future.

[http://www.youtube.com/watch?v=ABuvRv4Vv3s](http://www.youtube.com/watch?v=ABuvRv4Vv3s)

<comment><AUTHOR> I had a personal blog post about that story that someone posted to HN, and the top comment thread there was very helpful to us in the decision to open source anyway:

[https://news.ycombinator.com/item?id=6601712](https://news.ycombinator.com/item?id=6601712)

sillysaurus2 and highCs made some excellent points about ignoring what the gaming industry as a whole was doing, and this went a long way toward allaying our concerns. Then we talked to everyone we could think of who might have reasons why this wouldn't be a great idea, including some good lawyers, and no one could think of anything.

For a startup like CodeCombat where the audience may be interested in the code, open source should be the default choice, and hopefully we can succeed in this and start to make that happen by example.

</comment></comment><comment><USER3> I'm just going to hazard a guess that that Nick, George and Scott made a very clever decision to set up a script to alert them when HN went up (and perhaps even to submit this post as soon as it happened). This was the first post after the site went up. They might just be lucky, but somehow I doubt it.

Way to hack HN. You win my upvote.

Edit: Also, more specifically to the news of them open sourcing: It'll be particularly awesome if people eventually graduate from learning to code on Codecombat to working on its codebase. Since the backend is all node, it's not inconceivable. A virtuous loop for sure.

<comment><AUTHOR> I just had a Chrome extension refreshing the page every couple minutes is all. I think it was actually a bad decision, because we were #40 on the new page in under 10 minutes with everyone doing the same thing. I just posted it because it's news today, and fortunately some people like it.

<comment><USER3> That makes sense, though given the result I don't think it was a bad decision. Congrats on open sourcing today in any case!

</comment></comment></comment><comment><USER4> This is awesome! There are lot's of things to learn from this code base...

In particular, I had not heard about [http://brunch.io/](http://brunch.io/) before and it looks like an interesting frontend build tool. The config file looks totally readable, even for a complex app like this: [https://github.com/codecombat/codecombat/blob/master/brunch....](https://github.com/codecombat/codecombat/blob/master/brunch.coffee)

I can't seem to find ''app/assets/images/sprites'' in the git repo which I was interested in for an RPG project of mine. Were these not included to simply to keep the repo light, or are these not to be released?

<comment><AUTHOR> Brunch is amazing. I was using Grunt in another project, but Brunch is so, so much faster to recompile changes, since it's very clever about caching.

Oh yeah, those sprites were in the repo as raster files, but we managed to move them all over to our awesome vector-graphics-in-the-database system just before launch. Check the DB dump to get a copy: [https://github.com/codecombat/codecombat/wiki/Developer- envi...](https://github.com/codecombat/codecombat/wiki/Developer- environment#setup)

(We did a ton of cleanup work before open sourcing, which managed to get our gzipped GitHub clone download from 203MB to 3.5MB.)

It might be hard to use these art assets in another game unless you take a lot of CodeCombat code on top of EaselJS to render the sprites directly from the vector graphics data, though, because of how they are stored: [https://github.com/codecombat/codecombat/wiki/Surface#vector...](https://github.com/codecombat/codecombat/wiki/Surface#vector- art)

I could send you the old raster versions if you did want to use EaselJS for their animations but not go whole-hog with the CocoSprite solution.

<comment><USER5> FWIW, I would be interested in the old raster versions! Think you could put them on a public Dropbox folder or something? Thanks in advance for any help!

<comment><AUTHOR> I just put some exported .png copies of some of them in the Dropbox folder you shared with me, but I'm realizing that without the associated metadata it's not going to be very useful (I can perhaps find where that was put later but it's not in the places I'm looking). Would you be able to use them in .swf form?

<comment><USER5> Wow, this is just amazingly helpful. Thanks a ton! SWF format would also be helpful for me personally at least.

A couple of questions:

* I assume you'd be fine with me putting these up on Github, pointing to your project and the license document?

* At this point I only see one "ally" folder, is that because the other ally sprites (magician etc.) were made later when you had the vector format?

Again - massive props to you all for just giving away your hours and hours of hard work! Not every day you see professional-grade artwork like this. Deeply appreciated.

<comment><AUTHOR> Sure, that's what CC-BY is all about. Will be happy to see the art used in more places. (We don't actually draw the stuff ourselves; we're hiring an excellent game art studio to draw it for us, RetroStyle Games.)

Right, this is an old export, and the latest batch of units have never been exported in raster. Let's keep discussing the best way to get the exports here–Scott has come up with a better idea for it that'll stay current: [https://github.com/codecombat/codecombat/issues/94](https://github.com/codecombat/codecombat/issues/94)

The SWFs are also part of the old format, so they won't be kept up-to-date; I wonder if we could just build some process around the vector -> raster export Scott's talking about through our site and still be useful.

</comment></comment></comment></comment></comment></comment><comment><USER6> Would it be rude of me to ask what the business model is? This doesn't seem like the type of venture that lends itself well to the standard ways of making a profit off of open source, ie consulting or support.

<comment><AUTHOR> Sure! This is what we are trying first: [http://blog.codecombat.com/beat-this- level-get-a-programming...](http://blog.codecombat.com/beat-this-level-get-a- programming-job)

Now we know we can definitely have enough skilled candidates, and though it's only been a week, it is looking really good on the employer end as well.

<comment><USER7> I hate to be that guy but… If you do HR, could you clarify the need for a visa early on?

<comment><AUTHOR> We are so new to this that I'm not sure how big a deal it is going to be. We'll definitely find out soon, as a lot of great candidates are not US citizens.

<comment><USER7> I'll let you see how it stacks up at Kaggle: [http://www.kaggle.com/users](http://www.kaggle.com/users) Jobs threads on HN seem to have the same callous approach, but… I have never met an American, even expatriated for a decade, that didn't grossly underestimated how US- centrism was hurting them.

<comment><AUTHOR> You're almost certainly right that I'm underestimating the detriment of US- centrism, since I don't quite understand what you're suggesting–maybe you can explain some more?

Seems the only three things we can do with skilled non-US candidates are 1) try to find them work in the US, 2) try to find them work outside the US, and 3) not try to find them work. We are of course focusing on 1), since we currently only have manpower to do matching in person and we live in SF, which happens to be in the US. 2) would be nice if we grew big enough, and we have one employer in Australia so far. 3) would be an unfortunate necessity if we couldn't get an international employer network and it proved way too hard to convince US companies to sponsor visas. But it's going to be up to our employers, not us, to decide whether that's worthwhile.

<comment><USER7> The most urgent thing to do is to ask companies if they'd consider an H1B visa applicants, or international contracts and post that information for applicants to see. Taking the time to write applications to dozens of companies to receive a handful of "Sorry, when we meant skilled people, we obviously didn't mean _you_." is… well, not great.

There is a special level of WTF when you read for now several years in every business magazine that what you do is the most looked for skill-set, that they'll be millions like you needed, and having that conversation "It is so difficult to hire the right kind of people! I've tried that for months! — Couldn't you argue that to get me a H1B? — Nah, it's too difficult: you have to put out an ad and wait three months."

My point is: your brand can be associated to that kind of experience for 60% of your user-base, or try to avoid it.

Your response seems to come exclusively from your perspective, both as US- based and as an intermediary. Great products are made by walking in the shoes of every party involved.

One thing you could do too, as you have a list of candidates, is some instant __feedback __to employers on whether or not lobbying for a visa would make sense: just say how many candidates are available for each options, how expensive they are or, better, how the best candidates for each option rank in your game; when they might be available. That would require coding, and I appreciate you have limited ressources — but being open-source should let you hope for an interested party to do it for you. So I guess: congratulation on your strategy.

<comment><AUTHOR> We'll definitely be up front on how necessary an H1B turns out to be once we have that info from our employers. Preliminary results suggest that around 2/3 of companies are fine with sponsoring H1B transfers, but we don't have data yet on sponsoring new H1Bs, which I guess is the big question.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Holy crap. They opened-up their entire stack! You can literally spin up a clone of the site.

<comment><USER9> It's wonderful, but the absurd thing is the whole protective start-up culture that thinks this is crazy. The truth is that people _ought_ to not trust businesses whose main function is to lock you in with trade secrets and other anti-competitive measures.

Obviously the only real risk to their business would be if someone else completely outdoes them, like does everything they do and better with their codebase. Simple clones are competition. Yes, competition makes things harder. But isn't competition what all these capitalists say is the answer to things anyway?? These guys are among the few non-hypocrites.

<comment><USER10> > Simple clones are competition.

Will they be able to combat them with better code?

</comment></comment></comment><comment><USER11> This is so fantastic. The tools you've made really remind me of some of Bret Victor's ideas around the future of programming. I look forward to the day where I can play an MMO where my character progresses inline with my programming ability. You could program your own spells and weapons... Non destructive exploits and hacking would be encouraged rather than discouraged... that's the world I want to live in right now.

<comment><USER12> Bret Victor's talk in question: [http://youtu.be/PUv66718DII](http://youtu.be/PUv66718DII)

</comment></comment><comment><USER5> This is just absolutely insane in a good way, and will at the very least prove to be incredibly valuable as a case study of whether or not being this generous to the open source community can actually be a good, profitable thing for a company to do.

Obviously we all hope it can be, and if this catches on, the Internet would become a much better, freer, more "open" place.

Huge thanks to CodeCombat (gsaines and co)!

</comment><comment><USER13> You talk about the levels contributed by your community - will there be / is there a way for those to be shared under open licenses too?

<comment><AUTHOR> If someone makes a level on another CodeCombat server in their own database, they can share that with other CodeCombat servers all they please. We are just being cautious about the levels that end up in the main codecombat.com database, because at some point we might want to either make premium-only campaigns or allow others to sell access to their campaigns, and we can't do that if the levels are all MIT.

Hopefully we can keep all levels free for everyone anyway, since recruiting is looking pretty good as a monetization strategy so far.

<comment><USER14> I'm honestly amazed at the idea of recruiting as a monetization strategy for a project like this. It seems to be a way to make money while keep literally everyone happy. I think the only thing that could be worrisome is if perhaps there will end up being a disconnect in how hard a challenge needs to be to make it worth it as a screen, and how good of a programmer the primary user base will be.

<comment><USER15> What does recruting as a monetization strategy means? That is, what is recruting? Truly curious.

<comment><USER16> If their plan is anything like similar startups (like the also-YC-funded Hacker School), the idea is that they can connect employers looking to hire with engineers looking for jobs. Maybe this means something like letting people flag on their profile that they're looking for a job, and giving companies tools to search, filter, and contact the users who've said they're looking (and vice versa).

After someone takes a job through CodeCombat, the employer would pay them some sort of referral fee. This sort of arrangement is common; a typical fee structure is around 20% of the new hire's annual salary.

Employers get a concrete way to assess the skill of potential employees, job- seekers get free visibility they wouldn't otherwise get (this sort of thing tends to benefit newer programmers whose limited experience doesn't accurately represent their raw skill and potential), and CodeCombat gets paid. Everybody wins.

<comment><USER17> MOOCs have struggled with this avenue unfortunately, but considering CC is so different and more "practical" if you will, I hope they have a much better go at it, as what they're doing is awesome :)

</comment></comment></comment></comment></comment></comment><comment><USER18> This look awesome. I'm an experienced developer who wants to learn game development, will it works for me?

</comment><comment><USER19> I could upvote this a hundred times... Its so damn good. I want to be the kid who learns to code, again.

</comment><comment><USER20> That's awesome, I will have some busy time looking through it ! Thanks

</comment><comment><USER21> Wow that is commitment! Good job guys, keep it on!

</comment><comment><USER22> Nicely done!</comment>


STL on the GPU with Thrust - <AUTHOR> http://code.google.com/p/thrust/

<comment><USER2> Not to be "that guy" .. but the headline is a little misleading; the library has similarities in syntax with STL but it is not a replacement.

</comment><comment><USER3> I've been waiting to see something like this for a while. Expect more of this sort of thing in the future. openCL seems a bit wordy to me. I won't be surprised if you lose a few % performance with this, but that's a decent tradeoff I think.

In the long term, expect the GPU to go away and be absorbed by the cpu. Just like the FPU used to be an add on chip, and was absorbed into the CPU, so will the GPU.

<comment><USER4> The real problem with combining the CPU and GPU really just comes down to memory issues. Paying for .5 to 1 GB of GDDR5 is no big deal, replacing 8-16GB of RAM with high speed GDDR5 costs more than most graphics cards without helping out the CPU. Adding a separate memory system seems like an easy solution, but CPU's are already pushing over 1000 pins to connect to a MB which are already fairly crowded etc.

PS: When CPU's can hold both a good GPU and enough cache to substitute for vram then Intel wins, until then having a separate GPU is a vary good idea. Because today the choice is either pay more or sacrifice 75% of the performance for about the same cost.

</comment></comment><comment><USER5> Could be quite useful with Amazon's AWS Cluster GPU instances: <http://aws.amazon.com/ec2/hpc-applications/>

</comment><comment><USER6> Quick question: why is transferring to the device done by assignment, while transferring back to the host done by a copy function?

<comment><USER7> Either form is permissible; I think the example is just meant to illustrate both options.

</comment></comment><comment><USER8> That's pretty nice. Does anyone know if it's smart enough to use the second GPU if you're using the primary one already, and if it'll use CPU as a last resort in case no GPUs are available?</comment>


What My Kitten Did This Morning Now I've No Office - <AUTHOR> http://www.sudorank.com/kitten-morning/

<comment><USER2> this is so adorable</comment>


Google's new bus is for the people - <AUTHOR> http://www.mercurynews.com/business/ci_27291456/googles-new-bus-is-people?source=infinite <comment><USER2> Isn't this the city's job? I actually think it's kind of creepy that Corporations are taking the role of the City. The general idea is the City collects taxes and uses those to provide services like buses.

<comment><USER3> In my anecdotal experience, it seems like at least a few Bay Area cities have a hard time doing that properly. Public transit is terrible here. I'm excited at the prospect of a private company giving it a try as a free service to the public. Of course, it's not pure altruism, there are PR motivations. But that's not necessarily a bad thing.

<comment><USER4> > Public transit is terrible here

It sounds like you've never traveled outside the bay area. Muni + BART + Caltrain is far more than most cities have. What other cities have a system like Caltrain?

I'm not saying it's perfect, far from that. There are plenty of issues, especially with Muni. But it's not terrible.

<comment><USER5> > It sounds like you've never traveled outside the bay area.

It seems to me that many urban areas in the US have better public transit than the Bay Area, and, even moreso, places in the developed world outside of the US tend to be better than the US.

Its true that the Bay Area's public transit is better than pretty much anywhere else _in California_ , but that seems to be setting the bar low enough that you can trip over it.

<comment><USER6> Agreed. Many cities on the East Coast have a Caltrain like system in the Amtrak Acela trains. DC, ATL, NYC, Baltimore all crush the system here.

Muni is terrible. Full stop.

</comment></comment></comment></comment></comment><comment><USER7> I'd be pretty disappointed in El Goog, if they weren't taking this opportunity to learn something about providing public transit service--with an eye toward making public transit better.

In transportation planning, we sometimes differentiate between "fixed route" (a.k.a. the busses and trains you're accustomed to) and other specialty forms of public transit that often serve some particular demographic in a more flexible manner. Now, think about Google's self-driving cars for a minute here. What are the big challenges? Well, it appears Google needs to have a LOT of data about the rights-of-way that they drive. New and novel driving environments are handled by way of "pull over and stop."

Could Google perchance see some value in pursuing the "fixed route transit" market? Oh my yes. It's a perfect use-case for their technology more or less as it exists today.

Further, let's think about the economics. It is a fact that labor costs are typically the greatest single cost when providing public transit in the developed world. Busses are relatively cheap compared to the drivers. See where this is going?

Transit typically doesn't manage farebox cost recovery by quite a wide margin (cars don't internalize nearly all their costs either, but that's another story). A lot--enough to have an enormous impact on policy--of transit funding in the US comes from the federal government. Transportation is the second largest appropriations package Congress passes after military, and there is typically a big fight over how much will be allocated to public transit. This tends to break down along party lines as you'd expect: godless, commie pinko scum want public transit; fascist plutocratic narcissists don't.

I can just imagine the appropriations discussions now: Google announces self- driving bus and all of a sudden Republicans have a means by which they can support public transit--provided in large part by private industry--and that hurts a big segment of organized labor in the process (bonus?). And, of course if there is an upset in Congress, selling improved public transit to democrats isn't hard either.

I like that there are good paying jobs for bus drivers currently, but I like good public transit more. So I'm pretty bullish about Google getting into this game... assuming they're getting into the game, which they should be.

Google, if you're getting into this game and looking for transportation planners to shower with money and hot lunches, this humble PhD student bicycles past your Seattle offices daily. Just sayin' ;-)

<comment><USER8> _" It is a fact that labor costs are typically the greatest single cost when providing public transit in the developed world."_

Labor costs include maintenance and administration. It's possible that _" Busses are relatively cheap compared to the drivers"_ still holds but I hope you have considered it specifically rather than inferring it from the content of your preceding sentence.

<comment><USER7> > Labor costs include maintenance and administration.

Yes.

> It's possible that "Busses are relatively cheap compared to the drivers" > still holds

Yes. Indeed it does; drivers don't come cheap.

> I hope you have considered it specifically rather than inferring it from the > content of your preceding sentence.

Fear not; I have!

</comment></comment></comment><comment><USER9> I fully expect to see this dismissed as a stunt that abuses public transit and hurts the poor sometime in the next hour.

<comment><AUTHOR> The reason I'm personally excited by this is because SV corporations often seem to wash their hands about any significant civic output (other than occasional donations to non-profits) because it should be the responsibility of the government. In the world we inhabit, where companies in some ways can exert much greater power locally (in some specific ways) than a local government can, they should step up and use some of that power to help the general good.

Companies like Google can at the drop of hat move tens of thousands of works into a municipality; if they're choosing to exercise that right they should think about other ways they can make that change responsibly.

<comment><USER10> > corporations often seem to wash their hands about any significant civic > output because it should be the responsibility of the government

Public transit _is_ the responsibility of the government. If you want these companies to contribute more, raise taxes.

<comment><USER11> Raising taxes is inefficient and indirect. By providing buses, Google (et al.) can quickly address a need in the community. And they don't need to use other people's money to do it.

<comment><USER12> > Google (et al.) can quickly address a need in the community.

And therein lies the problem. Who are "et al." and "the community"? How much does each of them pay? Where do the buses go? Who's allowed to use them, and how do you keep people who aren't from doing so anyways?

It's almost like you need to create a decision-making body with the ability to raise and spend money, and make and enforce rules. An Alþing? Folkmoot? I'm sure we have a word for this.

<comment><USER11> The buses are already regulated by the city. The city doesn't need to own them.

</comment></comment></comment></comment></comment></comment><comment><USER4> > "They're [Google] responsible for a lot of the pain the area is feeling," > said newly inaugurated City Councilman Ken Rosenberg

Can anyone explain this? What "pain" in the area is Google responsible for?

<comment><USER13> Primarily ludicrous housing prices, I presume. Although the city (and its residents) are IMHO equally responsible for approving every office development in sight while doing all they can to resist building new residential properties.

</comment></comment><comment><USER13> The news hidden away at the end, about a bunch of SV companies getting together to operate a shared shuttle service, is arguably much more interesting. It's a huge waste to have each company operate buses for their own employees only: sharing there costs and making them open to all makes a lot more sense. Now if only they'd start doing this for SFO-MTV as well...

[http://www.mvgo.org/maps-and-schedule.html](http://www.mvgo.org/maps-and- schedule.html)

<comment><USER14> One thing that can make this difficult is a lot of company shuttles have corporate wifi on them and sometimes people even take meetings during the ride. Obviously this wouldn't work due to security/NDA reasons if you have employees from multiple companies on the same bus.

<comment><USER15> From Google shuttles you still need VPN, just the same as you need from a Starbucks. And a secure corporate laptop, of course.

It's considered very bad to talk in Google shuttles anyway, meetings or not, folks hate that.

<comment><USER16> Apple prohibits most employees from working on their shuttles, interestingly enough -- too much risk that a fellow employee would see something they're not cleared for.</comment></comment></comment></comment>


Please help explaining this to a friend - <AUTHOR> Hi, I am having a hard time explaining the concept of callback functions in DOM to a friend coming from Qt/C++ background. Any thoughts how I could make it sound more friendly sounding given his background. This was my most recent attempt:<p>The most common host environment in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of Facade Pattern is a utility to help run multiple versions of Node. Despite the performance limitations inherent to its dynamic nature, the increasing speed of JavaScript utilities designed for the web. HTTP requests. Virtual DOM is a predictable state container for apps. <comment><USER2> Do you mean 'DOM event handlers'?

[1] [https://developer.mozilla.org/en- US/docs/Web/Guide/Events/Ev...](https://developer.mozilla.org/en- US/docs/Web/Guide/Events/Event_handlers)

Your explanation seems to have two or more unrelated topics mixed in towards the end.

<comment><AUTHOR> I am trying to draw as much analogies as possible hoping that he will get up to speed fast.</comment></comment>


Pet Peeve: "You Guys" - <AUTHOR> http://avc.com/2014/05/pet-peeve-you-guys

<comment><USER2> Curious, as I've stumbled over this one myself - do you have a non-gendered group pronoun you prefer? I feel odd saying "you guys" to mixed groups, but I feel odder with "you all" and "you folks". I've had many female coworkers not care, and others care deeply, but haven't arrived at a solid replacement for "this group I am addressing"

</comment><comment><USER3> Meh. This is the kind of absurd handwashing that is more about making someone feel better about themselves than actually improving the general situation. The term "you guys" will be heard frequently in pretty much any work environment in the U.S.

I won't pretend to have all the answers, but I can assure you that women aren't avoiding tech because someone said "you guys". Spending 20 minutes with a bunch of cheerleaders should convince you of that.</comment>