#developers

LIVE
On this International Programmers Day, learn how developers are working to solve some of the most pr

On this International Programmers Day, learn how developers are working to solve some of the most pressing disaster relief problems, and how you can get involved.


Post link

yahoodevelopers:

By Mohit Goenka, Gnanavel Shanmugam, and Lance Welsh

At Yahoo Mail, we’re constantly striving to upgrade our product experience. We do this not only by adding new features based on our members’ feedback, but also by providing the best technical solutions to power the most engaging experiences. As such, we’ve recently introduced a number of novel and unique revisions to the way in which we use Redux that have resulted in significant stability and performance improvements. Developers may find our methods useful in achieving similar results in their apps.

Improvements to product metrics

Last year Yahoo Mail implemented a brand new architecture using Redux. Since then, we have transformed the overall architecture to reduce latencies in various operations, reduce JavaScript exceptions, and better synchronized states. As a result, the product is much faster and more stable.

Stability improvements:

  • when checking for new emails – 20%
  • when reading emails – 30%
  • when sending emails – 20%

Performance improvements:

  • 10% improvement in page load performance
  • 40% improvement in frame rendering time

We have also reduced API calls by approximately 20%.

How we use Redux in Yahoo Mail

Redux architecture is reliant on one large store that represents the application state. In a Redux cycle, action creators dispatch actions to change the state of the store. React Components then respond to those state changes. We’ve made some modifications on top of this architecture that are atypical in the React-Redux community.

For instance, when fetching data over the network, the traditional methodology is to use Thunk middleware. Yahoo Mail fetches data over the network from our API. Thunks would create an unnecessary and undesirable dependency between the action creators and our API. If and when the API changes, the action creators must then also change. To keep these concerns separate we dispatch the action payload from the action creator to store them in the Redux state for later processing by “action syncers”. Action syncers use the payload information from the store to make requests to the API and process responses. In other words, the action syncers form an API layer by interacting with the store. An additional benefit to keeping the concerns separate is that the API layer can change as the backend changes, thereby preventing such changes from bubbling back up into the action creators and components. This also allowed us to optimize the API calls by batching, deduping, and processing the requests only when the network is available. We applied similar strategies for handling other side effects like route handling and instrumentation. Overall, action syncers helped us to reduce our API calls by ~20% and bring down API errors by 20-30%.

Another change to the normal Redux architecture was made to avoid unnecessary props. The React-Redux community has learned to avoid passing unnecessary props from high-level components through multiple layers down to lower-level components (prop drilling) for rendering. We have introduced action enhancers middleware to avoid passing additional unnecessary props that are purely used when dispatching actions. Action enhancers add data to the action payload so that data does not have to come from the component when dispatching the action. This avoids the component from having to receive that data through props and has improved frame rendering by ~40%. The use of action enhancers also avoids writing utility functions to add commonly-used data to each action from action creators.

image

In our new architecture, the store reducers accept the dispatched action via action enhancers to update the state. The store then updates the UI, completing the action cycle. Action syncers then initiate the call to the backend APIs to synchronize local changes.

Conclusion

Our novel use of Redux in Yahoo Mail has led to significant user-facing benefits through a more performant application. It has also reduced development cycles for new features due to its simplified architecture. We’re excited to share our work with the community and would love to hear from anyone interested in learning more.

yahoodevelopers:

image

By Murali Krishna Bachhu, Anurag Damle, and Utkarsh Shrivastava

As engineers on the Yahoo Mail team at Oath, we pride ourselves on the things that matter most to developers: faster development cycles, more reliability, and better performance. Users don’t necessarily see these elements, but they certainly feel the difference they make when significant improvements are made. Recently, we were able to upgrade all three of these areas at scale by adopting webpack® as Yahoo Mail’s underlying module bundler, and you can do the same for your web application.

What is webpack?

webpack is an open source module bundler for modern JavaScript applications. When webpack processes your application, it recursively builds a dependency graph that includes every module your application needs. Then it packages all of those modules into a small number of bundles, often only one, to be loaded by the browser.

webpack became our choice module bundler not only because it supports on-demand loading, multiple bundle generation, and has a relatively low runtime overhead, but also because it is better suited for web platforms and NodeJS apps and has great community support.

image
Comparison of webpack to other open source bundlers

How did we integrate webpack?

Like any developer does when integrating a new module bundler, we started integrating webpack into Yahoo Mail by looking at its basic config file. We explored available default webpack plugins as well as third-party webpack plugins and then picked the plugins most suitable for our application. If we didn’t find a plugin that suited a specific need, we wrote the webpack plugin ourselves (e.g., We wrote a plugin to execute Atomic CSS scripts in the latest Yahoo Mail experience in order to decrease our overall CSS payload**).

During the development process for Yahoo Mail, we needed a way to make sure webpack would continuously run in the background. To make this happen, we decided to use the task runner Grunt. Not only does Grunt keep the connection to webpack alive, but it also gives us the ability to pass different parameters to the webpack config file based on the given environment. Some examples of these parameters are source map options,enabling HMR, and uglification.

Before deployment to production, we wanted to optimize the javascript bundles for size to make the Yahoo Mail experience faster. webpack provides good default support for this with the UglifyJS plugin. Although the default options are conservative, they give us the ability to configure the options. Once we modified the options to our specifications, we saved approximately 10KB.

image
Code snippet showing the configuration options for the UglifyJS plugin

Faster development cycles for developers

While developing a new feature, engineers ideally want to see their code changes reflected on their web app instantaneously. This allows them to maintain their train of thought and eventually results in more productivity. Before we implemented webpack, it took us around 30 seconds to 1 minute for changes to reflect on our Yahoo Mail development environment. webpack helped us reduce the wait time to 5 seconds.

More reliability

Consumers love a reliable product, where all the features work seamlessly every time. Before we began using webpack, we were generating javascript bundles on demand or during run-time, which meant the product was more prone to exceptions or failures while fetching the javascript bundles. With webpack, we now generate all the bundles during build time, which means that all the bundles are available whenever consumers access Yahoo Mail. This results in significantly fewer exceptions and failures and a better experience overall.

Better Performance

We were able to attain a significant reduction of payload after adopting webpack.

  1. Reduction of about 75 KB gzipped Javascript payload
  2. 50% reduction on server-side render time
  3. 10% improvement in Yahoo Mail’s launch performance metrics, as measured by render time above the fold (e.g., Time to load contents of an email).

Below are some charts that demonstrate the payload size of Yahoo Mail before and after implementing webpack.

image
Payload before using webpack (JavaScript Size = 741.41KB)

image
Payload after switching to webpack (JavaScript size = 669.08KB)

image

Conclusion

Shifting to webpack has resulted in significant improvements. We saw a common build process go from 30 seconds to 5 seconds, large JavaScript bundle size reductions, and a halving in server-side rendering time. In addition to these benefits, our engineers have found the community support for webpack to have been impressive as well. webpack has made the development of Yahoo Mail more efficient and enhanced the product for users. We believe you can use it to achieve similar results for your web application as well.

**Optimized CSS generation with Atomizer

Before we implemented webpack into the development of Yahoo Mail, we looked into how we could decrease our CSS payload. To achieve this, we developed an in-house solution for writing modular and scoped CSS in React. Our solution is similar to the Atomizer library, and our CSS is written in JavaScript like the example below:

image
Sample snippet of CSS written with Atomizer

Every React component creates its own styles.js file with required style definitions. React-Atomic-CSS converts these files into unique class definitions. Our total CSS payload after implementing our solution equaled all the unique style definitions in our code, or only 83KB (21KB gzipped).

During our migration to webpack, we created a custom plugin and loader to parse these files and extract the unique style definitions from all of our CSS files. Since this process is tied to bundling, only CSS files that are part of the dependency chain are included in the final CSS.

Last year hurricane Matthew scorched the Gulf Of Mexico hitting the whole Caribbean region, parts of South-Central America, and Southern US states. Today we have hurricane Irma and Jose executing a two-punch set which will make more deaths and destruction.

We can’t continue the denial of climate change and pretend this is something out of our hands. It was predicted decades ago but dumb politicians get to keep their seats in Washington, and this is costing countless lives as well as a final bill in the order of the billions footed by US tax payers adding insult to the injury.

As of September 10 two violent hurricanes have hit the Caribbean and the US


It’s time to exit the denial in which far too many got cozy; local governments have to stop letting this disasters happen and should rethink their approach on home building in those areas who suffer the most from violent weather, from the tornado alley to the states impacted by hurricanes.

How are we going to safeguards the lives of millions of people who live in dangerous weather areas?- We stop pretending plywood and drywall are enough to shield lives with homes poorly designed and too fragile to withstand any type weather phenomena out of the norm.

The three little pigs survived because upon trial and error they develop a house that would resist the wolf’s breath.


The reconstruction process after natural calamities has become a hefty business for material providers, developers, working crews, transportation, and so on; there’s a chain of events that allows enterprises to continue to make money out of these disasters rebuilding homes.

Governments and voters have to get serious and demand a change in building practices, they have to demand future homes will be able to resist strong winds and provide a minimum amount of structure integrity to safeguard families inside their places.

Many countries around the world have been using hollow bricks to pull up all sorts of structures knowing that according to specific standards they would have resisted strong winds. It surely is a better option than constantly rebuild the same houses displacing thousands of people from their dwellings.

Nations affected by natural disasters like earthquakes have geared up to seek the latest technological achievement to save lives and their economy. Japan for instance is known for facing more than one type of calamity, yet the country knew that protecting people was a priority, so they developed engineering and architecture practices to design homes and buildings that would resist earthquakes.

Until the US government continues to set their order of business in the wrong orders many more lives will be lost, breaking down local economies until the whole landscape will be so bruised we won’t be able to turn back.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque posuere consequat nisl a sagittis. Maecenas euismod nunc eget eros tincidunt, eu consequat tellus bibendum. Vestibulum ultrices varius elit, non vulputate nunc efficitur ut. Morbi vulputate sapien elementum dictum lobortis. Nunc sodales, mi sit amet pretium pellentesque, turpis lectus lobortis odio, in dictum enim nisi elementum…

View On WordPress

myothertardisisonthemun:

tiktoksthataregood-ish:

As usual, Microsoft is a little less fancy looking but way ahead of apple:

Look at them all

They eat and sleep and bathe and sometimes aliens get them

They inhabit your desktop permanently until you close the program

jessicameats:

kaiasky:

Firefox being fast/secure/supporting new web standards isn’t enough. we need to make extremely useful websites that don’t work on chrome.

No, this won’t work. If they don’t work on chrome, chrome users won’t find out that they’re useful.

You have to make an extremely useful website that works on chrome but then have it stop working and instead display a message saying “It looks like you’re trying to use a bad/insecure/non-standard web browser - try switching to firefox” with a download link where the really useful content used to be

stinkyhat:want to spread a resource: https://www.darkpattern.games/dark pattern has articles on game

stinkyhat:

want to spread a resource: https://www.darkpattern.games/

dark pattern has articles on gameplay patterns that are used to manipulate how you play a game and/or how much money you spend on it.

there are also lists for games breaking down what patterns they feature/dont feature

check it out, make sure you friends arent falling into a pit of gambling and despair.

https://www.darkpattern.games/


Post link
aurora1040: dailytechnologynews: Clearview AI ordered to delete facial recognition data belonging to

aurora1040:

dailytechnologynews:

Clearview AI ordered to delete facial recognition data belonging to UK residents https://ift.tt/RqD6ya9

just a casual reminder that i have never, not once, liked biometric or facial recognition software. idc how ‘secure’ it is. i will not ever enable it on any device.


Post link

Word on the street is Windows 11 will run android apps natively so… I’m backing up my Windows 10 laptop and giving it a go. Stay tuned.

As someone forced to retrofit various programs left broken by previous devs…. I appreciate seeing my life illustrated in this way

thingsprogrammersshout:

One week before program is due: “I’ve defined all of my classes, I can easily write the code to implement them in a few hours!”

One hour before program is due: “I can not do this it takes more time than I thought!”

// submitted by @kurokatana101

loading