Skip to main content

Japan Releases Snowman-Like Asteroid Image After Flyby

1 month 3 weeks ago
Japan's Hayabusa2 probe captured rare close-up images of near-Earth asteroid Torifune, revealing a snowman-like shape made of two joined lobes. Phys.org reports: The fridge-sized Hayabusa2 skimmed asteroid Torifune on Sunday in a mission that demonstrated the ability to deflect a potentially dangerous space rock away from Earth. A new image released by the Japan Aerospace Exploration Agency (JAXA) on Monday could aid such efforts, as researchers say near-Earth asteroids vary in their size, shape and surface characteristics. "The moment I actually saw this image and the scientific data -- it really gave me goosebumps," JAXA scientist Yuya Mimasu told reporters, adding the asteroid "personally looked like a snowman." The black-and-white image, captured by a telescopic camera, showed what appeared to be two round objects joined together. "You can actually see the rocks... I really hadn't expected to be able to take a photo like this, so I'm absolutely over the moon," he said. [...] Moving at a speed of more than 18,000 kilometers (11,185 miles) per hour, the probe was due to fly within 800 meters (2,625 feet) of the asteroid, but JAXA said it would analyze the distance later. If confirmed, the mission would be one of the closest flybys of a near-Earth asteroid ever. JAXA also said Monday it succeeded in acquiring data from three other devices that can measure the distance from the asteroid and examine the existence of water.

Read more of this story at Slashdot.

BeauHD

CodeSOD: Module Test

1 month 3 weeks ago

TJ inherited a NestJS project. The original developers left the team many years ago, but they've left their mark in the codebase.

// ProjectsModule.ts @Module({ controllers: […], providers: […], exports: […], }) export class ProjectsModule {}

NestJS is a dependency-injection oriented framework for TypeScript code. It offers "providers" (dependencies that can be injected), "controllers" (as one would expect), and lets you bundle them together into "modules". Modules can depend on other modules, letting you build a modular and flexible graph of dependencies. This means that the empty module isn't wrong here.

No, for it to be wrong, we need to write some tests:

// ProjectsModule.test.ts describe("ProjectsModule", () => { it("can be created", () => { const projectsModule = new ProjectsModule() expect(projectsModule).toBeTruthy() }) })

Since modules are just containers for related code objects, there isn't much to test here. While "dynamic modules" which execute code are a thing, they don't execute that code at construction time anyway. This test will always pass. It isn't a test, it doesn't do anything. It likely doesn't even get their coverage up, since whatever providers or controllers it's referencing aren't covered by this test. It's a test that tests nothing but the framework it runs on top of.

"At least there are tests," TJ writes.

[Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.
Remy Porter