HNHacker News
TopNewBestAskShowJobs

cpojer

1,589 karma · joined September 26, 2012

Blog: https://cpojer.net Twitter: https://twitter.com/cnakazawa

nakazawa.tech

submissionscomments
cpojer··on Show HN: Play the game I'm developing directly on its website
The magic interaction to see this info is long pressing on anything. This is one of a few interactions that works consistently on all input methods since my goal is to provide the same experience across all platforms.

When playing the real game a character explains this before you get started. I chose not to show a character message for now but maybe I should when you first scroll it into view.

cpojer··on Show HN: Play the game I'm developing directly on its website
You are all correct, both about calling it NUX or FTE* and that the game should teach players better. That's been recurring feedback, and the actual game once it fully launches (after Early Access) will feature a gentle introduction – which I'll also add to the landing page then.

*Some companies I worked at called it NUX because FTE would be ambiguous as it usually means "Full-Time Employee".

cpojer··on Show HN: Play the game I'm developing directly on its website
Tap the button on the right bottom to end your turn.
cpojer··on Show HN: Play the game I'm developing directly on its website
I started building this game while I was on paternity leave after our second daughter was born. At the time it was a fun side project, and I was sure I would ship it in some form, but I never even thought about founding a company and finding a publisher.

When I had something fun I got a few keynote slots at React and web conferences in 2023 (that's where the resume comes in, I guess?) and while I put together the presentation I also put a publisher deck together, mostly just for fun. The game was fully embedded in the slide deck just like it is now on the website, and how I did it in the public presentation (see: https://www.youtube.com/watch?v=m8SmXOTM8Ec ).

A mutual friend introduced me to Null, we had one meeting, and that set me on this path. I didn't seriously talk to other publishers.

I'm afraid this story is not super repeatable and mostly just hard work and serendipity. Before all that I spent 10 years as a teenager and early adult building games and social networks, and than I spent 12 years at Facebook & Stripe.

I wrote about my reasons for starting a company here: https://cpojer.net/posts/building-a-company

cpojer··on Show HN: Play the game I'm developing directly on its website
Advance Wars is one of my favorite games of all time. Nakazawa Tech, the indie studio I founded, is aiming at recreating games that I loved playing as a kid, and building on top of them with twists and novel ideas.
cpojer··on Show HN: Play the game I'm developing directly on its website
Oh that sucks. If you don't mind helping me troubleshoot the issue: Does this also happen with a Chromium based browser? Any chance you could profile using Firefox's web tools and send it to me (Find my details on twitter.com/cpojer or on the bottom of cpojer.net).

Firefox has not been a focus for the game as it mostly ships on Chromium/WebKit based browsers/app wrappers, but the landing page should still work great.

cpojer··on 10k Bounty for Rewriting Prettier in Rust
I ran into the same issue and have been separating the prettier and eslint steps ever since: https://cpojer.net/posts/fastest-frontend-tooling-in-2022#es...
cpojer··on Fastest Frontend Tooling in 2022
Maybe not ideal, but when you are changing configuration and running into caching issues it might be worth just running `rm -rf node_modules/.vite` on every change.
cpojer··on Ask HN: Front End Development 2022
I published a fast and lightweight starter pack with Vite and wrote about it here: https://cpojer.net/posts/fastest-frontend-tooling-in-2022
cpojer··on Ask HN: What is the most impactful thing you've built?
I didn’t start Jest, but I made it what it is today.
cpojer··on Solarized
Check out licht-theme: https://marketplace.visualstudio.com/items?itemName=cnakazaw...

And the corresponding dunkel-theme: https://marketplace.visualstudio.com/items?itemName=cnakazaw...

I have a bunch of set-up tips on how to use these across all tools here: https://cpojer.net/posts/the-perfect-development-environment

cpojer··on What it takes to make a game by yourself
This is a great post, thank you for writing it. I got into programming 20 years ago because I wanted to make games, and I spent my teenage years in the 2000s building web games. As a high school project I spent a year building a turn-based strategy web game (https://twitter.com/cpojer/status/1460221157634830337).

I have recently gotten back into it to explore things I never got a chance to do before like building an AI and fog-of-war. Currently the game is inspired by Advance Wars, and you can see me play against my AI here: https://m.youtube.com/watch?v=bGeEeti22bM

I’m tweeting about the technical details and progress on Twitter:

* Basic explanation and code examples: https://twitter.com/cpojer/status/1460221157634830337

* Map Editor: https://twitter.com/cpojer/status/1488510688389566464

* Fog of War: https://twitter.com/cpojer/status/1547967785015189504

* Testing Infrastructure: https://twitter.com/cpojer/status/1538299796334686208

* Random Map Generator: https://twitter.com/cpojer/status/1537444893580136454

I’m currently working on the game design to make it “inspired by Advance Wars” instead of just a clone.

cpojer··on Meta Is Transferring Jest to the OpenJS Foundation
Jest supports multiple “projects” in a single invocation, and they can all use a different reporter.

You can define a base config for your repo, and then inherit two sub-configs from it each with different runners and mutually exclusive selection for tests (by suffix, folder, or any convention that works for you).

See https://jestjs.io/docs/configuration

cpojer··on Meta Is Transferring Jest to the OpenJS Foundation
Hi! Christoph from Jest here. Your feedback is great, and 100% valid. Jest was built a long time ago when ES modules did not exist, and we are still carrying some of that legacy baggage around.

The good news is that we have never been shy about making breaking changes and we are working on cleaning the house and making many legacy components optional, all while bringing the existing community with us.

As for mocking, you don’t have to rely on Jest’s inbuilt mocking libraries and you can use the ones you like better.

If you care more about raw performance and ES module support and less about isolation, check out the jest-light-runner: https://github.com/nicolo-ribaudo/jest-light-runner

We also mentioned it in our Jest 28 blog post: https://jestjs.io/blog/2022/04/25/jest-28

I’m wondering if it’s time to consider taking a big step and making this runner the default, and give people the optionality of isolation. However, in my past experience at large companies (both first-hand and second-hand experience), the lack of isolation in tests led to major reliability problems with testing infrastructure. I’m still feeling like it’s the better default today, but maybe we should have a serious discussion about Jest’s next set of defaults.

cpojer··on Announcing Rome Tools, Inc.
Those are all great bundlers/dev servers but they aren’t as ambitious as Rome. Rome aims to be the one tool that handles everything: compiling, bundling, testing, linting and everything else.
cpojer··on Announcing Rome Tools, Inc.
The JavaScript tooling ecosystem is fragmented, bloated and slow. Rome is the best - and currently only - bet to fix this. I’m excited!
cpojer··on Yarn vs. npm5 determinism
Yarn has a "--mutex" option for exactly this purpose.
cpojer··on Refactoring Legacy JavaScript Code to Use Classes
Indeed. I also spoke about this topic a lot: https://www.youtube.com/watch?v=d0pOgY8__JM
cpojer··on Jest – Painless JavaScript Testing
Thanks! That's great. Maybe you can help us upgrade then? Jest is fun to contribute to.
cpojer··on Jest – Painless JavaScript Testing
Hi! I work on JavaScript Tools at FB.

There is a fantastic post by Ben McCormick about the up and downsides of this system: http://benmccormick.org/2016/09/19/testing-with-jest-snapsho...

Snapshots aren't the only feature of Jest; it is simply one assertion in our assertion library. There is a ton of other stuff in the framework that makes setting up a test environment and writing tests easier.

My philosophy for building a test framework is to build a good feature set to help you out in any situation but the user should be in total control. This allows you to find the best way to test your code which I've found to be extremely subjective. The choice of test framework and test methodology seems almost religious at times and I've deliberately tried to stay away from these conversations.

cpojer··on Jest – Painless JavaScript Testing
I work on Jest at FB.

* I agree regexes suck but that's all we had five years ago when it was started. Would love to move to a glob system incrementally but most of that will have to come from the community. I'm also still concerned about performance. We match things against tens of thousands of files a lot and regex seems strictly faster to me but I'm happy to be proven wrong or shown that it won't be relevant. * There is one minor issue with create-react-app's recommended use of node_modules to split up things. I would recommend lerna for multi-package development ( https://github.com/lerna/lerna ) and we are hoping to put whatever fix in place here that will work well. There are workarounds but they aren't great.

cpojer··on Yarn: Lockfiles should be committed on all projects
How's your lockfile, yo!
cpojer··on Yarn – A new package manager for JavaScript
Hey, I work on Yarn and Jest. Let me respond to why we built Jest: It solves a ton of problems no other test runner solves and it works well at Facebook's scale. We open sourced it more than two years ago but only recently started to promote the project in open source more actively because it is working so well at FB.

If you are curious to find out more about why we built it, please read our blog posts, beginning with one about testing performance and our unique constraints at FB: http://facebook.github.io/jest/blog/2016/03/11/javascript-un...

Finally, test runners tend to get stale. Any large organization will run into trouble with any kind of tooling as companies scale up engineers or codebases. Testing is no different and we aimed to solve those problems for Facebook; getting to open source our solutions is an added bonus and we are excited to work with the JS community to build the best tooling we can possibly build.

cpojer··on Yarn – A new package manager for JavaScript
We don't think this way. We needed to solve this problem for Facebook, explored alternatives and made the case to build Yarn. We work at Facebook to solve Facebook's engineering challenges; when we can collaborate with other companies and the open source community, that's an added bonus.
cpojer··on Yarn – A new package manager for JavaScript
You are right, we aren't 100% compatible right now. Please track the issues on the Yarn GitHub repo that you linked or better yet: help us fix it. This is a community project and we are excited for the community to jump in and help us out and complete the few missing pieces.

I agree local development with many packages can be hard. For Jest we adopted `lerna`

See https://github.com/facebook/jest and https://github.com/lerna/lerna which makes cross-package development in a mono-repo a lot of fun. Maybe that solution will work for you?

cpojer··on Yarn – A new package manager for JavaScript
As Sebastian said we are more than excited to explore what we can improve in the future. If you are interested, please start a discussion on the GitHub issue tracker: https://github.com/yarnpkg/yarn :)
cpojer··on Yarn – A new package manager for JavaScript
Can you make yarn out of hair?
cpojer··on The State of JavaScript – Survey results
You can use Jest together with enzyme! We posted a big community update together with Jest 16 which should highlight a bunch of ways that you can test with Jest.

https://facebook.github.io/jest/blog/2016/10/03/jest-16.html

cpojer··on The State of JavaScript – Survey results
Hey! I'm Christoph and I work on Jest. We wrote a blog post about how we are making Jest fast: facebook.github.io/jest/blog/2016/03/11/javascript-unit-testing-performance.html

If your test is fully CPU bound and limited to one core, it probably won't be faster with Jest. If you split it up across multiple files, it will parallelize tests.

cpojer··on Jest 15: New Defaults for Jest
The only thing that Jest has in common with Jest from a year ago is the name. We rewrote the entire framework incrementally (as all the blog posts on the Jest blog point out). We still do not support browser testing. We don't believe that it is critical for a unit testing framework and defer this form of testing to other tools at Facebook.

I am however interested in running Jest within Electron to provide better visual debugging while people are writing tests :)

← PreviousPage 2 of 3Next →