252 karma · joined August 14, 2015
- Co-Founder Biscuit (biscuit.so) - (Previously) Co-Founder of CodeSandbox, acquired by Together
My email is first name @ biscuit.so
meet.hn/city/nl-Amsterdam
Socials: - x.com/compuives
---
The fact that we made your projects public and kept charging is definitely a big mistake, and shouldn't have happened in the first place. When you cancel a subscription, we should keep your existing work private. Could you send me an email at ives@codesandbox.io so we can fix it?
Apologies for the fact this happened to you, that's a severe mistake and shouldn't have happened!
Also nice side-effect is that it's amazing to explore other code-bases, just being able to put a console.log somewhere to see how often it's run when using an application is a lot of fun.
After 3 sudden blocks from them, they now give us a warning before they're planning to block us, but it took many calls before we got to that stage.
The one thing that we struggled with Elixir with is that it's quite hard to find people that know Elixir. For a long time I was the only one doing Elixir in the company, which introduced a bottleneck. That said, when you find someone who knows Elixir they tend to know Elixir (and a bit of infra) quite well.
If you have any questions about how things work in CodeSandbox don't hesitate to ask me! I'll watch this thread to answer any questions.
I don't want to give a comparison of StackBlitz and CodeSandbox, because my view as one of the creators would be skewed. I want to note though that CodeSandbox existed before StackBlitz released, I published CodeSandbox in April ([1] [2]) and StackBlitz released in August [3].
[1] https://hackernoon.com/codesandbox-an-online-react-editor-b8...
[2] https://news.ycombinator.com/item?id=14022860
[3] https://medium.com/@ericsimons/stackblitz-online-vs-code-ide...
2) Ah that's really stupid of me, `.stream` was our staging server. I should mention this somewhere, codesandbox.io should have the latest version with live.
3) Good one! I'll update it.
4) That's a super nice sandbox, I love tutorials that use gameplay, makes it much more fun to learn. I'd move it to the io domain, because our stream database is horribly outdated. I'll add a redirect from stream soon to avoid confusion.
I learned most from the official Kubernetes tutorials (https://kubernetes.io/docs/tutorials/). I also used mix_docker (https://github.com/Recruitee/mix_docker) as a reference on how to build the image. The advantage of Kubernetes is that you can have the same way to deploy for all servers, so if you learn how Kubernetes deploys you automatically know how to deploy Phoenix applications.
And if you really want to make sure, we're open source: https://github.com/CompuIves/codesandbox-client.
I started working on this on March 15th, and the past few days was about testing everything, preparing the release and squashing bugs. The advantage of this type of functionality is that there are tons of high quality papers and articles already written on the subject, especially this one helped me a lot: http://www.codecommit.com/blog/java/understanding-and-applyi.... There were a lot of sleepless nights involved too.
I'm not sure about the VS Code and Atom teams, but I imagine that there are more constraints and there is more functionality to implement since they work with hundreds of potentially big files. I think those factors make it harder to implement this functionality than in the case of CodeSandbox.
The server is mostly responsible for keeping all room state (the editors, the owner, operations per module) and transforming operations. When an operation comes in at the server, like an insertion, the server will check what revision that operation is at and transform it accordingly if the sent operation is based on outdated code. Then that operation will be broadcasted to the clients and again transformed on the clients to handle any inconsistency.
The library we use for doing the transformations is called ot_ex.
I hope this quick view is clearly written, let me know if there are any other questions!
1. Open https://stackblitz.com/fork/react
2. Disconnect from internet
3. Refresh the tab
At least for me this gives me a 404. I'm on Chrome. However, when I open the preview tab while offline it doesn't 404 on me.
Essentially CodeSandbox can work offline if you already had the website open while you're online, then you can still continue offline. StackBlitz has the advantage that the tab where your application is can also be opened initially offline, which is handy for showing your application when you have no connection, but if I'm not wrong you cannot continue developing offline. I'd love to hear that I'm wrong, I'm really impressed with StackBlitz.
I'm the author of CodeSandbox btw :).
For now a quick summary of what we use now:
1. Phoenix/Elixir for the API
2. Node for bundling NPM packages
3. Postgres for SQL
4. Redis for caching NPM package metadata
The editor itself is written in React (hah!) and uses styled-components, redux, redux-thunk and react-router@4.0.0 as most used libraries. I code split every optional preference a user may have (like autocomplete, vim or prettify) using webpack 2.
Everything is hosted on Vultr (20$ node).
I'd love to answer more if you have any questions.
The next thing I’m building for CodeSandbox is the real reusable part: it should be possible to publish any project you have on CodeSandbox to NPM with a single click and let others reuse it as much as they like. An example is that someone makes a button on CodeSandbox and publishes it, others can then use this button inside CodeSandbox or in any project out of CodeSandbox. Publishing is already done, I’m now working on UI so publishing and searching sandboxes becomes easier.
I’d love to hear any feedback or suggestions or problems you might have! I want to make CodeSandbox as friendly as possible.