News for hackers. Stuff that matters.

whitefish

Re:Announcing TypeScript 2.7 on Wednesday January 31, 2018 @03:12PM (#16277116)
On the one hand I am glad they are continuing to enhance TypeScript. On the other hand I am concerned that TypeScript is becoming a very bloated language. If you have seen the latest edition of Stroustrup’s C++ Programming Language book you know what a bloated language looks like. Is that where TypeScript is headed?

Programming languages are not like your Word or Excel where more features is better. Some programming language designers take pride in how small the language is, for example Kernighan and Ritchie. I worry that as long as Microsoft has Program Managers and Development Leads assigned to TypeScript and their job performance is measured by the number of features they add, TypeScript is going to get more and more bloated with obscure features.

If that’s bizarre consider the fact that Microsoft does credit check on employees every two years, as a condition of employment, and you can be fired if something really bad shows up. This is for employees that work in the Azure division and the purpose is to reassure customers who host their data on Azure.
Re:How Redux Works: A Counter-Example on Monday November 20, 2017 @12:59PM (#15741751)
Sorry, that’s not making sense. In the MVC I am used to there’s only one controller active at one time and that controller owns the entire screen.
Re:How Redux Works: A Counter-Example on Monday November 20, 2017 @12:08PM (#15741384)
If your model layer objects are firing events you have problems already because it obscures the call graph. I try to avoid that style. The controller should update the model objects, then if a view update is needed it should be triggered by the controller not the model layer object.
Re:Angular 5.0.0 on Wednesday November 01, 2017 @04:13PM (#15605041)
Can you put a breakpoint in the template?

In .tsx templates you can.

Templates frequently need loops and conditionals. In the case of .tsx this logic is in TyprScipt so you can debug it just like any other TypeScript. In the case of Angular such logic is written in an undebuggable custom syntax.

Re:Hacker News Clone Using GraphQL and React on Sunday October 01, 2017 @10:18PM (#15381287)
So basically you prefer something more along the lines of Model View Controller. Me too. When React was first released it was advertised as “the ‘V’ in MVC”. Unfortunately the developer community took it in a different direction.
Re:React 16 on Wednesday September 27, 2017 @02:30PM (#15350823)
Have you considered using MVC? It works well. Search the complementary tools page of React.
Re:The end of Framework Churn on Monday September 18, 2017 @04:07PM (#15279064)
JSX standard is independent of React and can be used with Web Components. Also, HTML import is unnecessary to use Web Components. The key technologies in Web Components are ShadowDOM and Custom Elements.
Re:Learn how to use Redux step-by-step on Saturday September 09, 2017 @03:40PM (#15208824)
Which Javascript MVC framework did you use? Some people who used Angular hated it and conclude that MVC is horrible. No, Angular is horrible, not MVC.
Re:Learn how to use Redux step-by-step on Saturday September 09, 2017 @01:32PM (#15208086)
None of these problems are unique to web development. How do you solve these problems in iOS? In iOS you use MVC, and the Application object holds the state as a tree. MVC has a better solution to all these problems.
Re:Learn how to use Redux step-by-step on Saturday September 09, 2017 @11:06AM (#15207417)
Redux is unnecessary complexity. Anyone considering it, please do yourself a favor: check out an MVC framework and see how simple it is. Remember, when React first came out they described at as "React is the V in MVC." Adopt MVC in your project and watch your productivity soar.

Note: Some people believe that MVC implies two-way data binding. This is false.

Re:JSX in detail on Friday September 08, 2017 @08:54AM (#15199778)
Note that JSX is not limited to React. You can use JSX (or TSX in the case of Typescript) as a better replacement for Moustache or Handlebars. See here: https://github.com/wisercoder/uibuilder
Real estate agents (in the USA at least)
Re:What's New in Create React App on Friday May 19, 2017 @10:14AM (#14375819)
If you want to go with MVC use this: https://github.com/Rajeev-K/mvc-router
Re:Wipro, Infosys, Tech Mahindra, Cognizant Slash Jobs on Tuesday May 16, 2017 @11:01PM (#14355295)
This will lower salaries in India for IT professionals. As a result outsourcing to India will become more attractive.
Re:Lessons from last week’s cyberattack on Sunday May 14, 2017 @07:00PM (#14337984)
Should hospitals such as UK's NHS and other such organizations use dumb terminals (or chromebooks) instead of Windows? That way data is centralized on servers where it is easy to backup and harder for hackers to hold to ransom.
Re:Show HN: Cqrs-react-router – A Redux alternative on Saturday May 13, 2017 @11:45AM (#14331512)
Routers can and should be independent of View technology. Here's one that works well for React but is independent of React:

https://github.com/Rajeev-K/mvc-router

The MVC model is well-understood, and does not require Redux. MVC does not imply two-way data binding, btw.

Ask HN: How much have you saved for retirement?

This blog post says as a Software Engineer working in the US you should have $4 Million in savings to have the same income, in retirement, as a fresh software engineer.http://chase-seibert.github.io/blog/2014/01/01/saving-for-retirement-as-a-software-engineer.htmlHow much have you saved for retirement, and at what age?

( Read More... | 62 comments | 39 points | on HN )
Who here is old enough to remember Larry Ellison's Network Computer? Chromebook is the realization of Larry Ellison's vision.

Back in the mid 90's Larry Ellison said, "we need computers that do less, not more". He was widely ridiculed at that time. Now we know he was right.

Those who think React + ReactRouter + Redux is too complex -- you're right. But there is an easier way to use React: MVC. React is the V in MVC.

https://github.com/Rajeev-K/mvc-router

Note that using MVC does not imply 2-way binding!

Re:React v15.5.0 on Saturday April 08, 2017 @03:13PM (#14068485)
You can use JSX for Web Components too, see: https://github.com/wisercoder/uibuilder There is no need for a complex framework like React. Web Components + JSX is better than React. Why use a proprietary framework with patent issues when you could be using a standards based solution instead?
Re:React v15.5.0 on Saturday April 08, 2017 @12:05AM (#14065251)
I'd like to see React support shadow-dom and web components. Not holding my breath however, since Facebook considers web components to be a "competing technology".

Unlike real web components, React components are brittle since React does not have the equivalent of Shadow DOM.

No. With 8 bit you had to execute multiple instructions to add two numbers. Same with 16 bit. This problem went away with 32 bit. Adding more bits beyond 32 does not bring proportional benefits because the numbers we deal with fit in 32 bit.
Couldn't you say this about the software industry in general? In the 90's I used to have a Sun workstation on my desk. It ran the powerful Solaris operating system, but had just 16MB of RAM! Today you need 1GB of RAM to run an OS comfortably. My question: what does modern Linux do that Solaris from the 90's did not, that it requires 50x more memory?