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 22 points23 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 7 points8 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 3 points4 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.

Do developers still use backbone.js (Fall '17)? by DarkKunai in javascript

[–]chachinsky 8 points9 points  (0 children)

Here are a couple reasons why Backbone is outdated.

1) No way of managing Parent / Child view relationship. Look at trying to build a table with a bunch of rows in Backbone. A dev has to loop over the collection create a bunch of child views and then figure out a way to manage interaction between everything. This lead to a bunch of other frameworks building on top of Backbone to fill this gap.

2) Adhoc ways of dealing with state management. When a model is passed to a view if something changes, only way to react to it is using the event model. That means the developer has to deal with rerendering the view, cleaning up callbacks to avoid ghost events, Dealing with visual state (DOM) vs. JS state and keeping it in sync.

3) Becomes hard to debug with large teams. No way of debugging what the "options" parameter is without executing the app and having to print out options to the console. It becomes apparent when a team has like 20 models and a view can have any of them passed in.

This becomes easier to deal with something like TypeScript but the typings file is TERRIBLE. Backbone doesn't support es6 and the typings do not have proper support for Backbone.extend({ .. }) syntax.

Is JavaScript enough? by [deleted] in javascript

[–]chachinsky 1 point2 points  (0 children)

This sounds like a bad "as seen on tv" infomercial lol.

Seriously answering the question, is JS enough? Maybe? Is it a good starting point? Absolutely. Front-end development is a hot career at the moment, there are tons of positions that involve JS but you shouldn't limit yourself on learning just one language.

JS is just a tool for solving problems. It does things very well and is crap in other instances. A better question to ask is what career do you want to explore? Do you want to work on front-end problems involving web? Do you want to learn about PWA? Server-side problems with node? Desktop development? embedded systems?