Ever had to deal with a large dataset within your web application? Let’s say a call to your API returns thousands of items. You now want to render a scrollable list without pagination displaying each of those items. Rendering that many items would pollute the DOM and consume too much memory, thus degrading your app’s performance. Plus, remember, every time the DOM is updated, it needs to recalculate its layout based on any changes.
How to fix this? Enter virtual scrolling.
The above scenario can be tackled using virtual scrolling. Virtual scrolling reduces the number of items being rendered into the DOM and the time it takes to repaint the document with new items. It does so by only showing users a certain portion of the data at a time. The rest of the data is virtualized using top and bottom padding elements that contain some height to allow for scrolling. Each time the user scrolls out of the visible content, the layout is rebuilt, new items are fetched and the padding and heights are recalculated. …
The Massachusetts Institute of Technology (MIT) has recently released information about a potential game-changer in screening for COVID-19 asymptomatic patients.
So far during this pandemic, scientists have identified that there are individuals who show symptoms, and those who are infected but show no symptoms at all. These pose a substantial danger given they feel no need to stay at home, and rightly so, and thus potentially contaminating whoever they are in contact with.
Researches at MIT, however, have developed an artificial intelligence model that can detect the virus in asymptomatic individuals. After being fed with new recordings, the model correctly identified 98.5% …
With react-bootstrap and useReducer()
I recently came across the use case for a modal in one of my personal projects — the usual ‘are you sure you want to block X user?’ I installed my package of choice, added an out of the box modal with the desired content and surely enough, I had a modal. The problem is that this wasn’t the only use case I would need it for within that same component. With that screen, I could also carry out other behaviours, such as seeking a user’s availability. I then also wanted modals to confirm the successful completion of actions. I quickly saw this could be a one size fits all if I cleaned it up and made it's content dynamic. …
On WCAG guidelines, ARIA attributes, and testing frameworks.
Accessibility across web apps is key to ensure the inclusion of those living with disabilities. According to the WHO, around 15% of the global population lives with some form of disability, with at least 2.2 billion people having a visual impairment. The International Classification of Functioning, Disability and Health (ICF) defines disability as an umbrella term for impairments, activity limitations, and participation restrictions. That’s a considerable amount of the population struggling to smoothly navigate through a website. …
Has it been six months already?! It sure has. You know what that means: A new Laravel version is here — Laravel 8!
Laravel 8 was released two days ago with a bunch of useful updates I was excited to hear about. In this article, I’ll go over what’s changed. For full details visit the release note here.
Disclaimer: Laravel will continue to provide bug fixes for this version for the next six months and security fixes for the next year.
And to whom we are eternally grateful!
Debugging is a vital part of programming. A breakpoint — which by definition is an intentional stopping or pausing place in a program — is often key during the debugging process. They allow developers to gain insights into a program’s values during its execution — at which point said values may change to produce unexpected results upon completion. Having breakpoints means the execution will pause at different stages for the developer to inspect a certain value. …
The term is more literal than you think.
Safe to say all programmers are familiar with bugs. By definition, a bug in programming is described as:
An error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways — Wikipedia.
Chances are you’ve played a part in unintentionally sneaking one into your code, or have debugged someone else’s to fix it. After all, a bug can be anything from an infinite loop to a division by zero to using an uninitialised variable! …
Programming isn’t always smooth sailing. According to Stripe’s survey conducted on over 1000 developers, on average about half of a developer’s week is spent on maintenance such as debugging, fixing bugs, or reworking existing code. For many of us still in junior positions, we’re encountering certain errors or problems for the very first time. Below are a few things I always aim to remind myself when working on my daily tasks to get me a little bit further when really struggling.
Timeboxing — something’s wrong with your code. You’ve gone round in circles,
git reset —-hard and started all over again. You still can’t get that new functionality to work. You end up spending a day on it, at this point you’ve invested so much of your time that you have to carry on and fix it. We’ve all been there. I tell you, it went down much smoother when I timeboxed how much time I wanted to spend on a task. By timeboxing, you’ve got a set timeframe in mind by which point if you haven’t solved it, time to jump to point 3 (asking for help), or move on to something else. …
Learning to shake off codependency and shifting energy and focus.
For a long time, I was choosing ‘should do’s’ as opposed to ‘want to’s’. Never checking in with how that choice made me feel but instead always checking in with how it made others feel. I’d go to most places with a bad gut feeling, I’d talk myself into thinking this was the right path and accept obligations I knew I wasn’t up to.
What even is the right path if not the one that is right for you?
It took me a long time to realise that this was damaging my emotional health. I have always been an over-thinker, but now this was coupled with insane worrying. This was especially true when it came to decision making, and even more so if other people were involved. I couldn’t think straight about what I wanted to do as long as there was someone else involved. This made things extremely frustrating in my relationship as my partner never truly knew what I wanted to do. …
React Navigation provides seamless routing and navigation on both iOS and Android for your React Native apps. Having recently taken a course on React Native, I learned that there were a lot of useful features you can add to your app through navigation, much of which I’ll explain here.
Note: For this article, I’ll be using React Navigation’s latest stable version, which is v5.
In the same way going back and forth is handled in a web browser — where routes are pushed and popped — React Navigation pushes and pops your app’s routes. The special thing about it is that it includes the smooth animations we see and love on our phones today when switching between screens. …