James Sinclair

3K posts

James Sinclair banner
James Sinclair

James Sinclair

@jrsinclair

Australia เข้าร่วม Eylül 2008
247 กำลังติดตาม2.1K ผู้ติดตาม
ทวีตที่ปักหมุด
James Sinclair
James Sinclair@jrsinclair·
I'm so excited. ‘A Skeptic's Guide to Functional Programming with JavaScript’ is now available. To celebrate launch, it's on sale until 9 December 2022. jrsinclair.com/skeptics-guide
English
11
13
64
0
James Sinclair รีทวีตแล้ว
React Geek
React Geek@react_geek·
The Algebraic Structure of Functions, illustrated using React components ✍ @jrsinclair bit.ly/2xU9iIV
English
0
1
2
237
James Sinclair
James Sinclair@jrsinclair·
A maze that exists only as a data structure in memory is a bit useless. We need some way to make it legible to human beings. So I’ve written an article that addresses how we do that. ​jrsinclair.com/articles/2025/…
English
0
0
3
262
James Sinclair รีทวีตแล้ว
Eric Elliott
Eric Elliott@ericelliott_·
Dear JavaScript pipeline spec authors, Point-free isn't optional sugar, it's the whole point. % is an ugly hack. In fact, hack is literally in the name! 🤣 Thanks, Every functional programmer
English
0
2
10
1.8K
James Sinclair รีทวีตแล้ว
Jay 🙈🙉🙊
Jay 🙈🙉🙊@Jay52_TX·
What’s the Difference Between Ordinary Functions and Arrow Functions? — This sounds like basic stuff, but James always does a good job of digging in and explaining things... || #JavaScript #WebDev #Coding bit.ly/4lvWf1W
English
0
1
3
126
James Sinclair
James Sinclair@jrsinclair·
I felt like writing about something fun. So I wrote an article about creating mazes with JavaScript. Things got out of hand and it grew to two articles. Second one will be published real soon. jrsinclair.com/articles/2025/…
English
0
0
8
273
James Sinclair รีทวีตแล้ว
Joulse
Joulse@joulsounet·
Just read up on named vs arrow functions: named ones hoist, help recursion and stack traces, and even act as constructors; arrows lexically bind this, skip prototypes and shine in callbacks. Time to stop defaulting to arrows for everything jrsinclair.com/articles/2025/…
English
0
1
4
173
James Sinclair
James Sinclair@jrsinclair·
Charity Majors talks a lot of sense, as usual: [10x Engineers exist] So what? It doesn’t matter. … What matters is how fast the team can collectively write, test, review, ship, maintain, refactor, extend, architect, and revise the software that they own charity.wtf/2025/06/19/in-…
English
0
1
0
204
James Sinclair รีทวีตแล้ว
ASTRAM
ASTRAM@_astram·
CycleJS was the most amazing innovation in frontend since React, but sadly, it never took off… - rxjs-based: app (DOM, HTTP, state) is a stream, with no explicit state management - a single main function maps input streams (e.g. user events) to output streams (e.g. UI, effects) - side effects are declarative, managed via "drivers" that integrate with the reactive loop
Ryan Florence@ryanflorence

@jherr this is my question, has anybody introduced something significantly different than react the way react disrupted the jQuery + event emitter era? or are we just looking at a bunch of jQuery, MooTools, Dojos? they "look" like all the same thing, I want to know if they're not

English
1
1
11
3.8K
James Sinclair
James Sinclair@jrsinclair·
I wrote a thing about all the ways you can summon a function in Javascript. It even includes a flow-chart to help check if you're picking a suitable incantation. jrsinclair.com/articles/2025/…
English
0
0
7
270
James Sinclair รีทวีตแล้ว
Alex MacArthur
Alex MacArthur@amacarthur·
One of the nerdier things I've seen lately. @jrsinclair's blog generates a unique maze in the source code based on page content. A little jealous I didn't think of the idea.
Alex MacArthur tweet media
English
0
1
2
269
James Sinclair
James Sinclair@jrsinclair·
What do you think? Does this theory make sense, or am I simply defending my biases?
English
0
0
0
122
James Sinclair
James Sinclair@jrsinclair·
As a side effect of this structured thinking process, you also generate automated tests that provide immediate feedback on your progress. And if you're following _all_ the steps (red, green, refactor), the code improves with every iteration.
English
1
0
0
131
James Sinclair
James Sinclair@jrsinclair·
I have a theory. People struggle with TDD because it feels like hard work. This is because many of us code to think. We're assigned a task, and we start hacking away in the IDE. The solution languidly emerges as we learn more by writing code. But TDD won't let you do that.
English
1
1
3
222
James Sinclair
James Sinclair@jrsinclair·
What would you use these for? Well, if you have large arrays, they can (sometimes) be a more efficient alternative than `.filter()` if you know where the data you want is at the start (or the end) of the array. They also come in handy when writing parsers.
English
0
0
0
121
James Sinclair
James Sinclair@jrsinclair·
The second, dropWhile(), does the opposite. It traverses your array and ignores items until a predicate returns false. Then it will give you the rest of the array.
James Sinclair tweet media
English
1
0
0
134
James Sinclair
James Sinclair@jrsinclair·
A couple of array utilities you won't find in Array.prototype 🧵
English
1
0
3
172