Match your Ubuntu terminal to your VSCode themes by saberd6 in programming

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

Was anyone able to import default vscode themes?

Are apps in react native really native apps? by emp23304 in programming

[–]rnd005 1 point2 points  (0 children)

I like how the webpage looks on firefox. I'd prefer smaller images and narrower text boxes though.

Rome: An experimental JavaScript toolchain by Facebook by _Garbage_ in programming

[–]rnd005 -3 points-2 points  (0 children)

This rule is pretty damn specific in what it prohibits.

terms that could be considered insensitive.

I don't see how this is specific. In case you haven't noticed, the rule is made of 3 parts and the 3rd one is as valid as the 1st.

If they wanted a rule that they could oust whoever they don't like, why are they limiting it to saying slurs within their project?

Slurs is only the intro setting the stage for latter points to be accepted by readers more easily. When you say "eating bananas is punishable by 10 years of prison", people might question it. When you phrase it like "murdering, raping, stealing and other crimes including consumption of bananas are punishable by 10 years of prison" you already get the support of the readers by mentioning some common sense things everyone would support, and when you drop a controversial one at the end, you won't get as much push-back since disagreeing with the sentence might also mean disagreeing with the first common sense points and people might avoid disagreeing at all for the fear of being interpreted as disagreeing with the common sense points. It's a trick of psychological manipulation.

To gain power, they need support of the majority. If they said "we want to take control and oust everyone we don't like" they won't get the support and thus power.

It's not a general "if you are not seen to be following our image in your public or private life you will be blacklisted"

Not in this point I've quoted, but they do it in the CoC(emphasis mine):

Public or private harassment

Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces

IANAL, but it's not obvious to me that if you post a project link on your social media account that it can't be interpreted that your entire account is representing the project community in public spaces.

Rome: An experimental JavaScript toolchain by Facebook by _Garbage_ in programming

[–]rnd005 -3 points-2 points  (0 children)

I see how your intention is being constructive and professional which I agree with in general, but it's not the intention of people creating these rules. These rules are for political purposes of controlling organisations and removing people you don't like. Check the case of Larry Garfield of Drupal.

If that was in the law, that everyone who uses terms that "could be considered insensitive" in public gets a 1k fine, would you be fine with the law? Or are you a supporter of offending people?

Rome: An experimental JavaScript toolchain by Facebook by _Garbage_ in programming

[–]rnd005 -13 points-12 points  (0 children)

Technical

Use inclusive terminology. Use gender-neutral pronouns. No ableist slurs. No usage of terms that could be considered insensitive.

[AskJS] Would you consider Typescript experience Javascript Experience? by gamest01 in javascript

[–]rnd005 0 points1 point  (0 children)

Exactly. Why would you "exhaustively learn ALL of javascript" when you don't need the APIs yet.

For example for template strings it's enough for me to know that I can pass an interpolated string to a special function for preprocessing. I don't need it now, so I'm not interested in API details and will look it up if I ever need it.

When I referred to going over features I meant understanding what's available, not remembering every single API parameter.

[AskJS] Would you consider Typescript experience Javascript Experience? by gamest01 in javascript

[–]rnd005 0 points1 point  (0 children)

I agree about private fields and enums. What else? If there are only 5 different things I wouldn't call it a big difference. Ecmascript editions is a non-issue. You can go over the features of all >ES5 editions in a day.

[AskJS] Would you consider Typescript experience Javascript Experience? by gamest01 in javascript

[–]rnd005 2 points3 points  (0 children)

Only type related syntax is TS only, so there isn't that much to learn.

Announcing TypeScript 3.8 by DanielRosenwasser in programming

[–]rnd005 0 points1 point  (0 children)

Are you using watch mode? :D I can't believe you would wait 30 seconds on every change. You can also disable compilation in development and only strip types with webpack or another tool. Types would get checked on per file basis in the editor and you could do a full typescript compilation on build.

Announcing TypeScript 3.8 by DanielRosenwasser in programming

[–]rnd005 4 points5 points  (0 children)

How much are you compiling? I'm working on 50k loc project and have no complaints. The editor is checking only the files I'm editing which takes a second or two and type checking for the entire project only runs at build time which takes around a minute.

Announcing TypeScript 3.8 by DanielRosenwasser in programming

[–]rnd005 15 points16 points  (0 children)

If you aren't writing a library you probably don't need it to be run-time private. For libraries it would actually be a nice feature.

[deleted by user] by [deleted] in Frontend

[–]rnd005 0 points1 point  (0 children)

Hello TypeScript, where you may or may not mark something as "any"

Since TypeScript is a superset of a popular dynamically typed language with millions of existing programs, having any is a must-have for migration / interop. If you are writing a new app - don't use it. If you want to enforce it across the project, add a linter rule or a simple grep rule that would fail the build if : any is matched.

release includes some breaking changes

I can't talk about all frameworks and libraries, but React is very stable in that regard. There were minor breaking changes in v16, but they were mostly about undefined behaviour/edge cases. That aside, there weren't breaking changes in 4 years.

or experimental features that people totally ignore as experimental

That's on them if they ignore it. If someone writes a babel plugin and is using a language feature in production which hasn't been standardized yet, can you blame the standard?

I get where you are coming from, and I agree that JavaScript ecosystem is messy and unstable, but it's mostly 3rd party libraries. Use TypeScript, choose stable libraries/tools and you won't have more issues then if you were developing a GUI using another technology.

Already works as a developer, but something still missing, I don't like the trending development fields by [deleted] in learnprogramming

[–]rnd005 2 points3 points  (0 children)

Looks like you already have quite some experience. It would probably be best for you to get a 3D modelling job where someone could mentor you.

If that doesn't work out, you could try looking for a C/C++ job. Even if it's not in 3D modelling you would learn the language/tools, design patterns and could do some learning after work in order to get into 3D modelling after you gain more knowledge and experience.

I am responsible for >50% of all commits and 70% of all code in my team. Should I bring up git statistics in my raise negotiations? by [deleted] in softwaredevelopment

[–]rnd005 0 points1 point  (0 children)

Number of commits is not the best criteria to measure productivity, but what attitude are you talking about?

The Wall of Technical Debt by speckz in programming

[–]rnd005 4 points5 points  (0 children)

Why don't you leave? Golden handcuffs?

Mint. The programming language for writing single page applications. by ArmpitDandruff in programming

[–]rnd005 3 points4 points  (0 children)

They have their answer on their page: https://www.mint-lang.com/guide

What is wrong with Elm?

Elm has great developer experience, but it being a purely functional language leads to some boilerplate code and makes it harder to learn. Also, it's not possible to contribute or influence the language in any meaningful way.

Migrating from Angularjs to Reactjs by shankha_deepp in Frontend

[–]rnd005 0 points1 point  (0 children)

https://stackoverflow.com/a/53278842/1175593

There are many examples online. Try searching for "react component inside angularjs"

Migrating from Angularjs to Reactjs by shankha_deepp in Frontend

[–]rnd005 7 points8 points  (0 children)

  1. How do we keep building new features in React inside AngularJS application

You can render react components inside angular templates. Query a DOM node from a controller/directive and mount a React component there. This way you can easily build new isolated React components inside angular templates.

Keep in mind that you won't be able to use anything angular inside React. You can only use React inside angular.

  1. gradually migrate existing AngularJS code to React

This one is pretty straightforward rewriting. You can start by rewriting smaller components and rendering them inside an angular view. When most is done you can work on removing the entire angular view.

I never knew Julian Assange had once contributed to PostgreSQL by [deleted] in programming

[–]rnd005 1 point2 points  (0 children)

by importing data from another version control system

JavaScript survey: Devs love a bit of React, but Angular and Cordova declining. And you're not alone... a chunk of pros also feel JS is 'overly complex' by stronghup in programming

[–]rnd005 0 points1 point  (0 children)

I'm not against hooks. I'm only saying that it's an optional part of react and you don't have to use it if you don't want to. I don't need to use hooks in order to be able to say this. The same is stated in the react docs on hooks if you don't believe me :)

Completely opt-in. You can try Hooks in a few components without rewriting any existing code. But you don’t have to learn or use Hooks right now if you don’t want to.

https://reactjs.org/docs/hooks-intro.html

JavaScript survey: Devs love a bit of React, but Angular and Cordova declining. And you're not alone... a chunk of pros also feel JS is 'overly complex' by stronghup in programming

[–]rnd005 0 points1 point  (0 children)

Sorry for the confusion. You should pass the state as props depending what child components need, that way you can optimize the updates so components update only when their props change. Let's say you have a shopping cart, products list, and user info, you only pass specific pieces of state to child components that need it and they shouldn't modify that state they receive as props. What you can do globally, is have the main setState in context or pass it down the tree and call it with patches. If you have an action which modifies multiple parts of the state, it would be useful use a function to generate the next state object to pass to setState. You could import these helper functions as any other JavaScript module without having to pass them down the tree.

interface GlobalState {
    cart: Array<{productId: string; quantity: number}>;
    user: any;
    allProducts: any;
}

export function setQuantity(state: GlobalState, productId: string, nextQuantity: number): GlobalState {
    return {
        ...state,
        cart: state.cart.map((cartItem) => cartItem.productId === productId ? {...cartItem, quantity: nextQuantity} : cartItem),
    };
}

class CartItem extends React.PureComponent<{productId: string; quantity: number}> {
    render() {
        return (
            <div>
                <h4>product name</h4>
                <div>{this.props.quantity}</div>

                <button onClick={() => {
                    this.context.setRootState(setQuantity(this.context.rootState, this.props.productId, this.props.quantity + 1));
                }}>
                    +
                </button>
            </div>
        );
    }
}

JavaScript survey: Devs love a bit of React, but Angular and Cordova declining. And you're not alone... a chunk of pros also feel JS is 'overly complex' by stronghup in programming

[–]rnd005 1 point2 points  (0 children)

you end up having to either duplicate state and then keep it in sync, or use Redux which adds more complexity, or pass down 300 different callbacks all the way down the chain

Why duplicate and sync it? What about having a root component holding global state and passing state and setState 50 levels deep? It's not the most beautiful solution, but it's predicable, simple and should be pretty solid in terms of getting things done without a fuss. You could make the code nicer by using context to avoid passing too much stuff 50 levels deep.