frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Synadia and TigerBeetle Commit $512k USD to the Zig Software Foundation

https://www.synadia.com/blog/synadia-tigerbeetle-zig-foundation-pledge
196•derekcollison•2h ago•40 comments

Making a micro Linux distro (2023)

https://popovicu.com/posts/making-a-micro-linux-distro/
64•turrini•3h ago•17 comments

React vs. Backbone in 2025

https://backbonenotbad.hyperclay.com/
185•mjsu•6h ago•134 comments

Windows 10 Deadline Boosts Mac Sales

https://www.macrumors.com/2025/10/25/windows-10-deadline-boosts-mac-sales/
32•akyuu•37m ago•6 comments

The future of Python web services looks GIL-free

https://blog.baro.dev/p/the-future-of-python-web-services-looks-gil-free
71•gi0baro-dev•6d ago•24 comments

Unlocking free WiFi on British Airways

https://www.saxrag.com/tech/reversing/2025/06/01/BAWiFi.html
447•vinhnx•1d ago•104 comments

The Swift SDK for Android

https://www.swift.org/blog/nightly-swift-sdk-for-android/
609•gok•19h ago•241 comments

People with blindness can read again after retinal implant and special glasses

https://www.nbcnews.com/health/health-news/tiny-eye-implant-special-glasses-legally-blind-patient...
219•8bitsrule•4d ago•61 comments

Valetudo: Cloud replacement for vacuum robots enabling local-only operation

https://valetudo.cloud/
348•freetonik•5d ago•146 comments

DNA reveals the real killers that brought down Napoleon's army

https://www.gavi.org/vaccineswork/dna-reveals-real-killers-brought-down-napoleons-army
43•janandonly•2h ago•44 comments

First shape found that can't pass through itself

https://www.quantamagazine.org/first-shape-found-that-cant-pass-through-itself-20251024/
477•fleahunter•1d ago•133 comments

Key IOCs for Pegasus and Predator Spyware Removed with iOS 26 Update

https://iverify.io/blog/key-iocs-for-pegasus-and-predator-spyware-cleaned-with-ios-26-update
143•transpute•13h ago•89 comments

Context engineering is sleeping on the humble hyperlink

https://mbleigh.dev/posts/context-engineering-with-links/
136•mbleigh•2d ago•58 comments

Study: MRI contrast agent causes harmful metal buildup in some patients

https://www.ormanager.com/briefs/study-mri-contrast-agent-causes-harmful-metal-buildup-in-some-pa...
192•nikolay•19h ago•167 comments

Harnessing America's heat pump moment

https://www.heatpumped.org/p/harnessing-america-s-heat-pump-moment
189•ssuds•19h ago•406 comments

What is intelligence? (2024)

https://whatisintelligence.antikythera.org/
127•sva_•14h ago•81 comments

The State of Machine Learning Frameworks in 2019

https://thegradient.pub/state-of-ml-frameworks-2019-pytorch-dominates-research-tensorflow-dominat...
11•jxmorris12•3d ago•6 comments

I invited strangers to message me through a receipt printer

https://aschmelyun.com/blog/i-invited-strangers-to-message-me-through-a-receipt-printer/
253•chrisdemarco•6d ago•98 comments

Public Montessori programs strengthen learning outcomes at lower costs: study

https://phys.org/news/2025-10-national-montessori-early-outcomes-sharply.html
334•strict9•2d ago•199 comments

The persistence of tradition: the curious case of Henry Symeonis (2023)

https://blogs.bodleian.ox.ac.uk/archivesandmanuscripts/2023/12/13/the-persistence-of-tradition-th...
22•georgecmu•3d ago•1 comments

The geometry of mathematical methods

https://books.physics.oregonstate.edu/GMM/book.html
51•kalind•5d ago•3 comments

Code like a surgeon

https://www.geoffreylitt.com/2025/10/24/code-like-a-surgeon
203•simonw•1d ago•109 comments

Twake Drive – An open-source alternative to Google Drive

https://github.com/linagora/twake-drive
340•javatuts•1d ago•199 comments

Meet the real screen addicts: the elderly

https://www.economist.com/international/2025/10/23/meet-the-real-screen-addicts-the-elderly
219•johntfella•11h ago•220 comments

Diamond Thermal Conductivity: A New Era in Chip Cooling

https://spectrum.ieee.org/diamond-thermal-conductivity
45•rbanffy•4d ago•18 comments

Luau's performance

https://luau.org/performance
49•todsacerdoti•2d ago•10 comments

Fast TypeScript (Code Complexity) Analyzer

https://ftaproject.dev/
40•hannofcart•10h ago•17 comments

Euro cops take down cybercrime network with 49M fake accounts

https://www.itnews.com.au/news/euro-cops-take-down-cybercrime-network-with-49-million-fake-accoun...
116•ubutler•9h ago•61 comments

Why formalize mathematics – more than catching errors

https://rkirov.github.io/posts/why_lean/
205•birdculture•6d ago•70 comments

How to make a Smith chart

https://www.johndcook.com/blog/2025/10/23/smith-chart/
148•tzury•22h ago•26 comments
Open in hackernews

Fast TypeScript (Code Complexity) Analyzer

https://ftaproject.dev/
40•hannofcart•10h ago

Comments

austin-cheney•7h ago
That looks cool. I have never been a fan of cyclomatic complexity analysis. At some point I suspect a perfect score would be branchless code, but that isn’t maintainable.

I prefer redundancy analysis checking for duplicate logic in the code base. It’s more challenging than it sounds.

motorest•5h ago
> At some point I suspect a perfect score would be branchless code, but that isn’t maintainable.

That's a failure to understand and interpret computational complexity in general, and cyclomatic complexity in particular. I'll explain why.

Complexity is inherent to a problem domain, which automatically means it's unrealistic to assume there's always a no-branching implementation. However, higher-complexity code is associated with higher likelihood of both having bugs and introducing bugs when introducing changes. Higher-complexity code is also harder to test.

Based on this alone, it's obvious that is desirable to produce code with low complexity, and there are advantages in refactoring code to lower it's complexity.

How do you tell if code is complex, and what approaches have lower complexity? You need complexity metrics.

Cyclomatic complexity is a complexity metric which is designed to output a complexity score based on a objective and very precise set of rules: the number of branching operations and independent code paths in a component. The fewer code paths, the easier it is to reason about and test, and harder to hide bugs.

You use cyclomatic complexity to figure out which components are more error-prone and harder to maintain. The higher the score, the higher the priority to test, refactor, and simplify. If you have two competing implementations, In general you are better off adopting the one with the lower complexity.

Indirectly, cyclomatic complexity also offers you guidelines on how wo write code. Branching increases the likelihood of bugs and makes components harder to test and maintain. Therefore, you are better off favoring solutions that minimize branching.

The goal is not to minimize cyclomatic complexity. The goal is to use cyclomatic complexity to raise awareness on code quality problems and drive your development effort. It's something you can automate, too, so you can have it side by side with code coverage. You use the metric to inform your effort, but the metric is not the goal.

socalgal2•2h ago
Sound like coding to the metrics would lead to hard to read code as you find creative and convoluted ways to multiply by one and zero so to pretend you aren’t branching
devjab•5h ago
Maybe I'm doing things wrong, but I assume this tool is meant to focus on cognetive complexity and not things like code quality, transpiling or performance, but if that's true then why does this:

(score is 7) function get_first_user(data) { first_user = data[0]; return first_user; }

Score better than this:

(score is 8) function get_first_user(data: User[]): Result<User> { first_user = data[0]; return first_user; }

I mean, I know that the type annotations is what gives the lower score, but I would argue that the latter has the lower cognetive complexity.

k__•5h ago
Maybe because the type can be inferred and it potentially adds effort for changes in the future.
zenmac•4h ago
Then why use TypeScript at all? Just write js and put a TS definition on top. TS is a linter anyway. Now that will make the code easier to read, and in the end it is the code that will be interpreated by the browser or whatever JS runtimes.
motorest•3h ago
> TS is a linter anyway.

Not really. TypeScript introduces optional static type analysis, but how you configure TypeScript also has an impact on how your codebase is transpiled to JavaScript.

Nowadays there is absolutely no excuse to opt for JavaScript instead of TypeScript.

zenmac•3h ago
What about debugging. Or with proper sitemap the code on the client-side can be debugged with the right map to the TS code? Just feels like an extra layer of complexity in the deployment process and debugging.
motorest•18m ago
> What about debugging.

With source maps configured, debugging tends to work out of the box.

The only place where I personally saw this becoming an issue was with a non-nodejs project that used an obscure barreler, and it only posed a problem when debugging unit tests.

> Just feels like an extra layer of complexity in the deployment process and debugging.

Your concern is focused on hypothetical tooling issues. Nowadays I think the practical pros greatly outnumber the hypothetical cons, to the point you need to bend yourself out of shape to even argue against adopting TypeScript.

uallo•4h ago
I get the same overall FTA score of 7 for both of your examples. When omitting the return type (which can be inferred), you get the exact same scores. Not just the same FTA score. Also note that `Return<User>` should be just `User` if you prefer to specify the return type explicitly. That change will improve several of the scores as well.
whilenot-dev•1m ago
> Also note that `Return<User>` should be just `User` if you prefer to specify the return type explicitly.

No? first_user = data[0] assigns User | undefined to first_user, since the list isn't guaranteed to be non-empty. I expect Return to be implemented as type Return<T> = T | undefined, so Return<User> makes sense.

motorest•3h ago
> (...) I assume this tool is meant to focus on cognetive complexity and not things like code quality, transpiling or performance (...)

I don't know about transpiling or performance, but cyclomatic complexity is associated with both cognitive complexity and code quality.

I mean, why would code quality not reflect cognitive load? What would be the point, then?

DeadlineDE•3h ago
For a refactoring project I've built the reports of the tool into the CI pipeline of our repository. On every PR it will create a fixed post with the current branches complexity scores comparing it to the target branch and reporting a trend.

It may not be perfect in its outputs but I like it for bringing attention to arising (or still existing) hotspots.

I've found that the output is - at least on a high level - aligning well with my inner expectation of what files deserve work and which ones are fine. Additionally it's given us measurable outcomes for code refactoring which non technical people like as well.

yboris•1h ago
Mildly related: TypeScript Call Graph - CLI to generate an interactive graph of functions and calls from your TypeScript files - my project.

https://github.com/whyboris/TypeScript-Call-Graph

inflames123•51m ago
cool
paularmstrong•31m ago
This is a bit underwhelming because it gives a score and says, "Needs improvement", but has no real indication of what it considers problematic about a file. Maybe as a very senior TypeScript developer it could be obvious how to fix some things, but this isn't going to help anyone more junior on the team be able to make things better.
motorest•13m ago
> This is a bit underwhelming because it gives a score and says, "Needs improvement", but has no real indication of what it considers problematic about a file.

I think you didn't bothered to pay attention to the project's description. The quick start section is clear on how the "score" is an arbitrary metric that "serves as a general, overall indication of the quality of a particular TypeScript file." Then it's quite clear in how "The full metrics available for each file". The Playground page showcases a very obvious and very informative and detailed summary of how a component was evaluated.

> Maybe as a very senior TypeScript developer it could be obvious how to fix some things, but this isn't going to help anyone more junior on the team be able to make things better.

Anyone can look at the results of any analysis run. They seem to be extremely detailed and informative.