Senior Solution Architect - Personalization Strategist at Contentful

Contentful is hiring Senior Solution Architect - Personalization Strategist

 JS folks! There will be a brand new JS conference next month @jstek in Chicago! Full info here: https://jstek.io/ but please help spread the word and repost this ❤️ #javascript #typescript #react #vue #jstek
JS TEK 2026 - The Inaugural JavaScript Conference

Join us at JS TEK 2026, the inaugural single-track JavaScript conference featuring expert speakers, hands-on workshops, and exceptional networking opportunities.

Optique 1.0.0: environment variables, interactive prompts, and 1.0 API cleanup

https://lemmy.ml/post/45924367

Optique 1.0.0: environment variables, interactive prompts, and 1.0 API cleanup - Lemmy

Lemmy

Optique 1.0.0: environment variables, interactive prompts, and 1.0 API cleanup

https://lemmy.ml/post/45924365

Optique 1.0.0: environment variables, interactive prompts, and 1.0 API cleanup - Lemmy

Lemmy

CEOs claim #AI is revolutionizing their companies, but 90% are still stuck trying to enable #JavaScript. 🤖💻 Meanwhile, the other 10% are too busy polishing their PR statements to notice the tech isn't working. 🙈📢
https://businessasusual.io/p/ninety-percent-of-ceos-say-ai-changed #Revolution #Struggles #TechIndustry #PRFocus #HackerNews #ngated
Ninety Percent of CEOs Say AI Changed Nothing. The Other Ten Percent Have a PR Team.

An NBER survey of 6,000 executives reveals a productivity gap that most boardrooms won't talk about honestly.

Business as Usual
Scalar Types Are Not Enough

Using `string`, `int`, and `bool` for everything gives a false sense of security. The compiler checks the *shape* of your data — but ignores its *meaning* entirely. --- ## The positional parameter problem Say you have a function that processes a seller payout after an order is delivered: ```rust // Rust fn process_order_payout( shop_id: String, customer_id: String, order_id: String, amount: i64, platform_fee: i64, tx_fee: i64, net_amount: i64, ) { ... } ``` Seven parameters. Three IDs, all `String`. Four money values, all `i64`. Now imagine a caller accidentally writes: ```rust process_order_payout( customer_id, // passed where shop_id was expected shop_id, // passed where customer_id was expected order_id, net_amount, // net amount in place of gross tx_fee, platform_fee, amount, ); ``` The compiler doesn't complain. Tests probably pass. The app runs, pays the wrong entity, credits the wrong amount, and nobody notices until a seller asks why they received $35 instead of $5,400. --- ## Structs help — but not enough The natural next step is grouping parameters into a struct. Named fields eliminate positional confusion. But look at what they *don't* prevent: ```rust let params = OrderPayoutParams { shop_id: customer_id, // compiler: fine customer_id: shop_id, // compiler: fine amount: net_amount, // compiler: fine ... }; ``` Every `String` field got a `String`. Every `i64` field got an `i64`. The fact that `customer_id` holds a customer identifier and not a shop identifier? Invisible to the type system. --- ## The fix: wrap every meaningful value in its own type Stop using scalar types for domain concepts. Give each value its own type: ```rust // Rust — newtypes struct ShopId(String); struct CustomerId(String); struct Amount(i64); struct NetAmount(i64); struct OrderPayoutParams { shop_id: ShopId, customer_id: CustomerId, amount: Amount, net_amount: NetAmount, ... } ``` Now try to swap them: ```rust let params = OrderPayoutParams { shop_id: customer_id, // ERROR: expected `ShopId`, found `CustomerId` customer_id: shop_id, // ERROR: expected `CustomerId`, found `ShopId` amount: net_amount, // ERROR: expected `Amount`, found `NetAmount` }; ``` The compiler refuses — not because the data is shaped wrong, but because the *meaning* is wrong. The same idea works in Go and TypeScript: ```go // Go — type definitions (not aliases) type ShopID string type CustomerID string type Amount int64 type NetAmount int64 // ShopID and CustomerID are distinct types. // Passing one where the other is expected = compile error. ``` ```typescript // TypeScript — branded types type ShopId = string & { readonly __brand: "ShopId" }; type CustomerId = string & { readonly __brand: "CustomerId" }; type Amount = number & { readonly __brand: "Amount" }; // The brand only exists at compile time. Zero runtime overhead. ``` --- ## "But now I can't use any normal methods" In Rust, implement `Deref` to transparently expose the inner type's methods — and add validation right in the constructor: ```rust use std::ops::Deref; struct ShopId(String); impl ShopId { pub fn new(id: String) -> Result<Self, String> { if id.is_empty() { return Err("Shop ID cannot be empty".into()); } if !id.starts_with("shop_") { return Err("Shop ID must start with 'shop_'".into()); } Ok(ShopId(id)) } } impl Deref for ShopId { type Target = String; fn deref(&self) -> &String { &self.0 } } let shop = ShopId::new("shop_abc123".to_string())?; println!("{}", shop.len()); // works println!("{}", shop.to_uppercase()); // works too ``` Once a `ShopId` exists in your system, you *know* it's valid. Every function that receives one can skip validation entirely — the constructor already did the work. In Go, defined types inherit the method set of their underlying type, so methods work out of the box. In TypeScript, branded types are purely structural, so all `string` and `number` operations still work with no extra code. --- ## What you actually gain - **Self-documenting code.** A function that takes `ShopId` instead of `String` needs no comment explaining what that parameter is. The type *is* the documentation. - **Refactoring confidence.** Rename a field or change a data flow, and the compiler traces every usage of that type across your entire codebase. - **Validation at the boundary.** Every `ShopId` in your system is guaranteed valid — not because every function checks, but because the constructor checked once. - **Security.** A `RawUserInput` type that must be explicitly converted to `SanitizedHtml` before rendering? Injection prevention enforced by the compiler, not by code review discipline. --- ## The cost is lower than you think These wrapper types are typically two to five lines each. You write them once. The compiler enforces them forever. The alternative is trusting that every developer on your team, across every PR, in every late-night hotfix, will correctly match untyped strings to their intended purpose. That's not engineering — that's hope. > Scalar types describe what data *looks like*. Domain types describe what data *means*. The gap between the two is where bugs live. --- Source: [sot.dev/everything-should-be-typed.html](https://sot.dev/everything-should-be-typed.html)

WebGPU, библиотека Orillusion и кастомные шейдеры: как я создавал 4D Тессеракт

Orillusion + кастомные шейдеры: полный разбор процесса Как зарегистрировать WGSL-шейдер, связать его с геометрией, настроить атрибуты и добиться анимации. Разбираем compute-шейдеры для GPU-вычислений и инстансинг на примере пяти вращающихся 4D-тессерактов. Если вам интересно то код и небольшие пояснения ниже.

https://habr.com/ru/articles/1023432/

#orillusion #3dграфика #webgpu #javascript #shaders #shader_graph #wsgl

WebGPU, библиотека Orillusion и кастомные шейдеры: как я создавал 4D Тессеракт

orillusion Тессеракты WebGPU — это новый стандарт для доступа к возможностям видеокарт, который я уже несколько лет хочу использовать в своем проекте. Два года, даже с включенными флагами, у меня не...

Хабр

More Reasons to Delete Your #Javascript Series: Invoker Commands & Popovers APIs

In the past decade, #CSS and #HTML has made fantastic strides into JS’s territory with multiple new APIs and features, like scroll-driven animations and dialog elements. Last week, I got to experiment with extending my dialog elements to opening without any #JS whatsoever...

https://amberweinberg.com/more-reasons-to-delete-your-javascript-series-invoker-commands-popovers-apis/

#frontEnd #webdevelopment #webdev #a11y #accessibility

More Reasons to Delete Your Javascript Series: Invoker Commands & Popovers APIs - Amber Weinberg - Freelance Front-End WordPress Development

Fast loading, responsive front-end WordPress development using validated, accessible, and semantic coding practices.

Amber Weinberg - Freelance Front-End WordPress Development

```sh
data0@fromm:~ $ cat .npmrc
ignore-scripts=true
min-release-age=14
save-exact=true
```

I still run as much as possible in a #container. #npm #javascript

I was reading the #sveltekit docs, apparently the definition of a “pure function” is vastly different in the #javascript world. In their “pure” functions, you can still query a third-party API. 🤦‍♂️ 🤦‍♂️
×

Do you want to quickly learn a new programming language while still having a fairly good knowledge of another, such as Ruby?
After reading the official documentation and the book recommended by the community, I would advise you look at comparison lists of how something can be done in a language that you know and how it is done in another language that you are trying to learn.

#Polyglot #Learning #JavaScript #Ruby #Python #PHP #Perl #Java #Go #Rust

These two resources provide a great foundation:
* https://hyperpolyglot.org/scripting
* https://www.lurklurk.org/rosetta.html

Even if the new language isn't on these sites, you can follow their plan. It will even be more effective than just watching this sites.

Scripting Languages I: Node.js, Python, PHP, Ruby - Hyperpolyglot