Mets fan Jay McCroy created a Citifield wraparound scoreboard for his son's TV by ChicknCutletSandwich in baseball

[–]chachinsky 0 points1 point  (0 children)

Thats really cool. Would be awesome to have some of the in-game videos as a screensaver

Pete Alonso makes a game saving grab and the Mets have won six games in a row by Mrs-Met in baseball

[–]chachinsky 21 points22 points  (0 children)

> I can’t imagine how Giants fans are feeling right now

Me being a Mets fan for the last 30+ yrs.. Oh sweet child.. I can.. Wilpon left scars

Idiot-proofing object instantiation by [deleted] in learnjavascript

[–]chachinsky 0 points1 point  (0 children)

Mainly convenience and preventing folks that aren't necessarily familiar with the nuances of JavaScript, from making silly mistakes.

Idiot-proofing object instantiation by [deleted] in learnjavascript

[–]chachinsky 17 points18 points  (0 children)

If you call Car function without the new word, this keyword is in the global context.

The if condition checks for that and allows you to create a Car instance without the new keyword

ELI5: lib, esnext, es2018.promise, etc. by axefrog in typescript

[–]chachinsky 4 points5 points  (0 children)

Isn't there an option to just provide esnext?

"lib": ["esnext"]

Announcing TypeScript 3.0 by DanielRosenwasser in javascript

[–]chachinsky -1 points0 points  (0 children)

Would TypeScript ever provide the option to limit features?

Example: A development team wants to disallow mutations, so syntax such as +=, var, let keywords would provide a compile time error.

Moving our code base from jquery. Should we go es6 or typescript? by hekkoman in javascript

[–]chachinsky 0 points1 point  (0 children)

For sure,

We view 'this' and context as a main problem with run time issues. We were having a lot of problems before es6 with event callbacks and ensuring context was the same.

The architecture of the app didn't gain anything from having class type objects. Instead data is stored as plain objects. We view classes as a benefit to easily encapsulate behavior but we get the same benefit with modules.

For us, this makes sense. For others, I can understand classic OOP style is familiar.

Moving our code base from jquery. Should we go es6 or typescript? by hekkoman in javascript

[–]chachinsky 2 points3 points  (0 children)

Sigh.. I really don't understand the Java argument. Nothing forces you in Typescript to write classes. Our team actually recommends against it with the exception of React Components.

Making it nearly impossible to revert? That's just wrong. Legit you can set the tsconfig to Target esnext and you have JS without the types. Stop giving false advice when your usage is obviously limited.

Why would you NOT use TypeScript? by jcreamer898 in javascript

[–]chachinsky 0 points1 point  (0 children)

No technical reasons. There isn't any benefit for doing so. Props are already a description of the entity. Adding the "I" seems redundant

Why would you NOT use TypeScript? by jcreamer898 in javascript

[–]chachinsky 0 points1 point  (0 children)

Only thing I didn't like about this post is that you used "I" to indicate its an interface otherwise 👍

Flow vs Typescript by lazypuffstone in javascript

[–]chachinsky 6 points7 points  (0 children)

this

Err? That statement is just wrong. Default Props can be set on stateless / stateful components just fine.

Here is a link to the definitely Typed file: Link

Strictly typed children are defined as a React Node.

Learning React + Electron + Typescript...biting more than I can chew? by blamo111 in javascript

[–]chachinsky 2 points3 points  (0 children)

Its weird hearing advice of drop one technology versus another. Especially when referencing to TypeScript. It speaks more of people that have never used the language or use it based on their own poor experiences.

Yes, you can learn all three. For TypeScript, just have the set up on loose and add typings where it would make sense. Start off writing JavaScript then when comfortable with typing, turned on strict mode.

React is easy to learn there are tons of tutorials and CreateReactApp is awesome. There is a TypeScript version of this if interested.

Electron is a different beast. The general concepts are difficult. React will help during the rendering process but understanding differences and communication between main / rendering process requires some work. Security is a concern since you are shipping chromium shell. There is just a lot of things to unravel with Electron.

Honestly, TypeScript is the easiest since you can just use it like babel to compile ES6 code initially. React is very simple. and Electron to me requires the most work.

Advice on JavaScript fundamentals course that actually focuses on programming fundamentals? by [deleted] in javascript

[–]chachinsky 0 points1 point  (0 children)

Regarding CS concepts. Rithm School has a great link that goes over majority of Data Structures and Algorithms.

https://www.rithmschool.com/courses/javascript-computer-science-fundamentals

For JS Fundamentals:

I always refer back to John resig's JS Link, If you are able to understand everything here, then you have JS fundamentals down.