Randy Creasi

328 posts

Randy Creasi banner
Randy Creasi

Randy Creasi

@Randemonium

Boston, MA Katılım Temmuz 2010
747 Takip Edilen48 Takipçiler
Adam Rackis
Adam Rackis@AdamRackis·
@Randemonium @LauraFlowD Bro sometimes conditionals nest. And sometimes syntactically you need an expression instead of a statement
English
1
0
2
21
Adam Rackis
Adam Rackis@AdamRackis·
Eat my entire asshole eslint I'll nest ternaries if I want
English
10
3
83
16.9K
Randy Creasi
Randy Creasi@Randemonium·
@LauraFlowD @AdamRackis It's not a question of easy to read. With each ternary you nest, that's 2ⁿ cases you're attempting to cover. It's unlikely you've really considered them all. More likely you're modeling the problem wrong.
English
2
0
0
22
Randy Creasi
Randy Creasi@Randemonium·
@vintrwt @nizzyabi Configure it to translate everyone into the language you're learning on Duo. Instant immersion.
English
0
0
1
115
Vineet Rawat
Vineet Rawat@vintrwt·
@nizzyabi So no need to keep my duolingo streak going? 😅
English
9
6
543
81.2K
nizzy
nizzy@nizzyabi·
this is wild
nizzy tweet media
English
255
291
9.8K
7.1M
Randy Creasi
Randy Creasi@Randemonium·
@GiftVincy @denicmarko That also (sort of!) justifies why NaN != NaN. If a calculation produces a result that's outside the universe of things we can represent, then we can't even say if it's equivalent to another such result.
English
0
0
1
8
Marko Denic
Marko Denic@denicmarko·
JavaScript Quiz! Can you guess what the output of the code below will be?
Marko Denic tweet media
English
15
3
51
17.9K
Randy Creasi
Randy Creasi@Randemonium·
@GiftVincy @denicmarko When you see "not a number" think "not a number you can represent with floating point math" instead. sqrt(-1) *is* a number, it has a definition in complex math, but floating point calculations can't represent it so they turn it into NaN.
English
1
0
1
13
Vincy
Vincy@GiftVincy·
@denicmarko it will print as 'number' because in JavaScript, NaN is still considered a number type. Just one of those JS quirks!
English
1
0
1
166
Randy Creasi
Randy Creasi@Randemonium·
@NameNick90 @TheMarz77 @PicturesFoIder That makes perfect sense once you understand the concept of project but I can't help but feel the animation would've been more approachable if they just used a sphere ¯\_(ツ)_/¯
English
0
0
0
18
NickNameNick90
NickNameNick90@NameNick90·
@TheMarz77 @PicturesFoIder The map which is used is called the Mercator projection. This map makes the land look neat and uniform, at the cost of showing accurate land size. Land at the top and bottom of the map is stretched, making Greenland look much larger than it's true size.
English
1
0
58
55.7K
Randy Creasi
Randy Creasi@Randemonium·
@denicmarko This cheatsheet is confusing because some of these methods mutate the array in place and return something else entirely.
English
0
0
1
89
Marko Denic
Marko Denic@denicmarko·
JavaScript Array methods cheat sheet:
Marko Denic tweet media
English
14
100
577
57K
opensas
opensas@opensas·
@TranquilMarmot @JNYBGR @MozDevNet .fill should also be able to receive a function, with the current index and a reference to the whole array itself as parameters, and it should just push what that functions returns
English
2
0
0
97
Jonny Burger
Jonny Burger@JNYBGR·
10 years JS experience, still trapping myself
Jonny Burger tweet media
English
49
76
1.2K
382.6K
Randy Creasi
Randy Creasi@Randemonium·
@rossipedia It's rumored that was Jonny Greenwood trying to mess up the song because he didn't like it. #Composition" target="_blank" rel="nofollow noopener">en.wikipedia.org/wiki/Creep_(Ra…
English
0
0
0
35
Randy Creasi
Randy Creasi@Randemonium·
@BenKingNTU That's a fair point, you could just return `response.json()`, no await needed. But assigning a promise to a variable called `data` is certainly misleading. And often you'll want to do something with `data` before returning it and that would not work without the `await`.
English
0
0
0
14
Thomas Findlay
Thomas Findlay@thomasfindlay94·
Async code in JS can sometimes be tricky, but often it doesn't work because of a small mistake. Can you see what's the problem with this code? 🧐 Share it below 👇
Thomas Findlay tweet media
English
26
3
70
89.7K
Richie_Mufc (Ø,G)
Richie_Mufc (Ø,G)@MufcRichie·
@thomasfindlay94 Await should be on fetch as it returns a promise. The await currently on the third line isn’t needed.
English
1
0
1
1.3K
Randy Creasi retweetledi
BYP
BYP@_B_Y_P_·
Finished REDE, a Regex IDE which visualizes the structure and evaluation of Regex/NFAs for my submission to @handmade_net visibility jam
English
34
186
1.1K
112.9K
Cory House
Cory House@housecor·
JS arrow functions are great. ✅ Concise ✅ Optional implicit return ✅ Don’t have their own “this” context But, I don’t recommended using them everywhere. Prefer function declarations for *top-level* functions. Here's why.
Cory House tweet media
English
47
88
1.1K
245.6K
Randy Creasi retweetledi
saharan / さはら
saharan / さはら@shr_id·
Life Universe oimo.io/works/life Explore the infinitely recursive universe of Game of Life! Works in real-time and is perfectly consistent, never fails to remember where you are and where you came from. 無限に再帰するライフゲームの宇宙を探索できる作品を作りました #indiedev
日本語
145
5K
18.1K
0
Randy Creasi
Randy Creasi@Randemonium·
@wollantine I tend to think of the test runner as a domain-specific language. In that framing, `cy` is a built-in rather than a mysterious global.
English
1
0
1
0
Wollantine
Wollantine@wollantine·
@housecor Using misterious globals that come from nowhere gives me chills. But Playwright's magic dependency injection with proxies is not much better. What's up with end to end test runners' APIs? Not a single one has ever heard of DX, much less FP.
English
1
0
0
0
Cory House
Cory House@housecor·
Yesterday I shared why I'm switching from Cypress to Playwright. But Cypress is solid too. Here are 4 Cypress benefits: 1. More concise syntax. In Cypress, I don’t have to say “await”, “expect”, or “exact” constantly. In Playwright, I must use these 3 keywords a lot. 1/5 👇
Cory House tweet media
English
12
33
325
0
Randy Creasi
Randy Creasi@Randemonium·
@ericbureltech Those keys suggest you use vim, in which case I'd like to inform you that vim actually has an undo tree. g- and g+ move through it. You won't lose your changes. #undo-branches" target="_blank" rel="nofollow noopener">vimhelp.org/undo.txt.html#…
English
6
2
41
0
Eric Burel
Eric Burel@ericbureltech·
@dan_abramov Yes except that it's "u" then "ctrl+R" because I am fancy person I fear the day where I accidentally press another key and lose all changes during the fast forward step
English
4
0
22
0
Randy Creasi
Randy Creasi@Randemonium·
@joelnet Promises were originally implemented in userland. When native support was added, it was desirable to maintain compatibility with libraries like Q and Bluebird. Therefore, any object with a `then` property is considered a "thenable." masteringjs.io/tutorials/fund…
English
2
0
5
0
Joel Thoms
Joel Thoms@joelnet·
Why does the function inside two() get called? Why does await one() return an object while await two() returns the string "TWO"? #JavaScript
Joel Thoms tweet media
English
4
2
19
0
Abakcus
Abakcus@abakcus·
Probably, the second most interesting prime number! 😮
Abakcus tweet media
English
39
693
5.5K
0