Christmas is over and it’s Lent all over again, Should I eat a meat sandwich or should it be plain? Should I fast for 5 hours or skip breakfast and lunch, Or just have tea and a little something to munch?
Should I stop smoking or should I shun drink, Should I stop thinking those wrong thoughts I always think? Should I be patient with the one driving in front of me, Should I give a mouthful to my colleague or just let him be?
This, my friends, is what we’ve made Lent out to be, A set of bargaining chips, to be paid as salvation fee! It is just a reminder for you and for me, The price has been paid, by the One on the tree!
Let’s make use of this time given to us for no fee, To reconcile with the world and the One who set us free. Because no chicken or chocolate can ever pay the price That has already been paid by our Lord Jesus Christ.
Mobile phones have evolved a lot over the last few years. However storage is still a big concern. In addition to all the apps we have installed, we still would love to have a lot more storage for our photos and music. This makes the mobile app developer’s job a little more challenging as they need to keep their application size in control to make downloads fast and improve the user experience.
Source: CleverTap
When forced to uninstall a few apps to make room in their phone’s memory, a person is most likely to choose from a list of apps that take up more space and are used the least. If your app is on that list, it’s likely getting deleted.
A bigger app size also results in longer installation time and slow launch times. When choosing between apps with similar features and similar ratings, a user is more likely to go for one that takes up less space in their phone.
Here are a few techniques used to reduce app size and improve performance so your app gets downloaded and stays on your ideal user’s device.
Compress image files
Many apps, if not all, make use of images to improve user experience. Reducing the size of these images is an easy way to decrease your app size.
There are two ways to reduce image size:
Remove metadata from image files (lossless compression)
Reduce file size by reducing image quality (lossy compression)
Remove metadata from image files
Your image files have a lot of metadata stored in them that has nothing to do with image quality. For example, an image taken with a digital camera may store information about the date, time, shutter speed, flash mode, and camera manufacturer and model. Removing this information will reduce the file size without having any impact on image quality.
To remove metadata in Windows 11, right-click the image, go to Properties, and click Details. The window will give you the option to ‘Remove Properties and Personal Information.’
Source: Bitrise.io
Click on that, and you’ll get another window to select the metadata you want to remove.
Source: Bitrise.io
Select all and click OK. That will remove all metadata. This method will not result in a significant decrease in file size. However, doing it for every file in your app will result in a cumulative reduction in size that can make a noticeable difference.
To remove the metadata from images on MacOS, you need to use a third party application like Exif Metadata to remove metadata from your photos.
Use vector graphics where possible
Vector graphics are images generated based on mathematical commands that tell the system to connect a series of points. Vector graphics are smaller in size and more scalable compared to raster images — images that are saved as pixels. Vector graphics are usually saved in SVG (scalable vector graphics) format.
The use of vector images for icons, symbols, logos, and characters is very common, and you can create a vector version of any raster image using Adobe Illustrator or a similar tool. Doing so will result in the loss of some colors and sharpness — so this method is not applicable in all cases. If your app is image heavy and you think that converting all raster images into vector images will be too resource intensive — or there will be an unacceptable loss of quality — you can always go for image compression.
Use image compression tools for raster images
Image compression tools such as TinyPNG can compress images by reducing their quality by 50% or more. This is also called lossy compression and is achieved by removing less critical information from the image. This is an irreversible process, and the compressed image cannot be restored by any means.
With high-resolution images, the human eye cannot spot the difference between the original image and the compressed image. That is why lossy compression using an image compression tool is a good idea to reduce the size of all images used in your app.
Using this method, you can reduce the file size for each image by a few hundred kilobytes or just a few kilobytes depending on how much you choose to compress the images. If there are dozens or hundreds of images in your app, the saved space will become significant.
Reduce or remove unused resources
As you keep updating your app, some features may become obsolete, and some layouts, colors, strings, etc., may slowly go out of use. Removing unused resources of all types when you update will help you keep your app size small.
Remove unused resources in iOS
You can open up the app in Xcode and see all the resources in the resource list or use a tool like FengNiao to detect all unused resources. The tool helps you find all unused resources, which you can then remove from the IPA file. Your IPA (iOS App Store package) file is a compressed file that contains all the resources, code, and metadata that iOS uses to distribute and install apps.
Remove unused resources in Android
Use the lint tool to detect unused resources in your APKfile. The APK file is the Android equivalent of the IPA file — it is a compressed file that contains all the resources, code, and metadata that Android uses to distribute and install apps. The lint tool shows warnings about all unused resources, and you can then proceed to remove them.
Use Android App Bundle for Android
The Android App Bundle is a pre-APK publishing format that contains all of your app’s resources and code. Google Play uses it to create multiple APKs, each optimized to support a different device.
Using the Android App Bundle helps you reduce download size. That’s because once you sign up for it, Google Play only delivers the resources necessary to run the app on each device. For example, Super Mario Run on Google Play has a download size of 60 MBs for devices with smaller screens and 80+ MBs for those with bigger screens.
You can use the Gradle command to build your App Bundle by using the following command:
./gradlew :app:bundleDebug
Use App thinning for iOS
App thinning removes unnecessary resources and code from your IPA file. Using this technology, you can decrease the size of your app on your users’ phones. When you export your app to the App Store, you get the option to enable App thinning.
Additionally, you can enable on-demand resources. The App Store hosts all resources for released apps — resources being images, video, and sound files. Enabling on-demand resources means resources are downloaded in the background as needed, only called when needed, and removed when not needed automatically. You have to mark on-demand resources by tagging them.
The App Store also creates multiple variations of your app for different versions of iOS and devices. These variations only contain the necessary resources needed to run the app; all else is removed. This is very similar to how Android App Bundles work. The App Store does it for every new app now, i.e., you don’t have to enable this option from anywhere.
Aim for a lower-than-average app size — and keep it that way
The top apps on the App Store are 153 to 206 MB in size, and those on Google Play are 55 to 73 MB. This also depends on the type of app. A gaming app will definitely be bigger than a To Do app. But aiming for a lower-than-average app size can lead to quicker installation and better performance — giving you a chance to increase your conversion rate and user retention.
Having a small app size on release is good, but as you release new updates and features, your app size will grow. To keep the app size lower than the average for your category, you need continuous testing and monitoring capabilities.
Any other tips/ideas/suggestions on reducing app size? Let me know in the comments below!
As an engineer, especially when working on enterprise-grade applications, our coding is influenced by many factors. It is no longer about if your function worked or your ability to achieve the desired result. It is rather about writing performant code, thinking about time complexity vs space complexity, scaling, and ensuring that your application is as fast as possible.
The console.time() method is the console class of Node.js. It is used to starts a timer that is used to compute the time taken by a piece of code or function. The method console.timeEnd() is used to stop the timer and output the elapsed time in milliseconds to stdout. The timer can be accurate to the sub-millisecond.
console.time() takes the parameter “label” and the label must be the same name when calling console.timeEnd() to stop the timer and get the time output to the console. If the label name is not the same, it will throw Warning: No such label ‘{label name}’ for console.timeEnd().
To understand this better, let me use the stopwatch concept to illustrate. Let’s assume you wanted to start a race, you would start your stopwatch and when the race ends, you would stop your stopwatch. So console.time() is the same as starting your stopwatch and console.timeEnd() as stopping your stopwatch. Easy right?
Now let us take an example of merging two objects with time complexity in mind. Remember, it is not about what works but what works in the shortest time.
In the above code, I merged two objects using Object constructor method Object.assign() and Javascript spread operator.
Time output on the console:
object_assign: 0.257ms
rest_operator: 0.032ms
From the console output, we can see that the rest/spread operator is faster than Object.assign()
And hence we can now make an informed decision. Please note that in this article we are NOT talking about why rest operators should be used over Object.assign(), but about HOW to use console.time! :)
We’ve all seen kids going about their day with a large majority spent in a joyful state. You would have to try really hard to make a child unhappy. But as we grow up, that trend reverses. We spend most of our days unhappy and we are constantly looking for something or someone externally to make us happy.
We are the most comfortable generation in the history of humanity and yet we are not it’s happiest one! In fact, all the comforts and advancement in our history was because of some level of unhappiness faced by our ancestors.
Yet, here we are, in the middle of all the comfort constantly living in fear and anxiety-more worried about what could have been or might be, rather than enjoying what is.
There is nobody in this world that has not been happy or doesn’t know how that feels. Somewhere along the way, we just decided to give in to the rigors of life and die a slow death rather than live an exuberant life.
Our happiness is our responsibility, just like a million other things that we are responsible for, which is probably why so many of us are not trying! We are responsible for our careers, for our health, for our sleep, for our relationships and on top of all that, now we have to figure out what makes us happy!
If you are relying on anyone or anything else for your happiness, stop that right now. If you feel like you’re not quite doing what you want to be doing and you’re not quite the person you want to be, let reading this be the sign that you have a change to make.
There are those who take control of their life and there are those who are life’s victims. Which do you want to be? The type who confidently assesses their own worth or the type that complains about feeling undervalued? No one can ‘make’ you feel anything. Happy or sad. Every emotion you feel you can be in charge of. Giving away control of your feelings? Sort it out.
Recognize that you are in control of your happiness.
The first step is to recognize that you are the one in control of your happiness. Your entire happiness lies within you. The more you learn to tap into it internally rather than depending on others to bring that out, the easier it will be for you to be happy.
Your mantra today
I have at all times, within me, all the happiness that I need and I am solely responsible for my happiness.
Once you recognise that you are in control of your happiness, here are a few other things that have helped me:
Do what makes you happy
Stop worrying about what others think
Stop complaining
Stop comparing
Happiness might be subjective but it sure isn’t rocket science. We make things complex when they don’t need to be. The options I have mentioned above are not complex. They are the simplest of things that you can do on a daily basis to increase your joy quotient.
Only you have the power and inclination to control your own happiness. No external factors should penetrate your inner core. No one can make you feel anything you don’t want to feel, it’s all a choice. You’ve got this!
Here’s my all time favourite “Happy” song to get you going!
When we are emotionally reactive, we tend to be more stressed. We feel angry or often hurt because we react impulsively. Putting it another way, we overreact. Our perception of the existing situation confronting us becomes altered. This makes us prone to making the wrong decisions.
Correcting a misunderstanding is much harder than learning to think before acting. When in control of your reactions, you can better evaluate current situations, see better solutions, and establish rapport with other employees.
So how can we stop being emotionally reactive?
1. Come From Curiosity, Not Conclusion If you want to be more intentional in your response, slow your thinking down. Instead of drawing conclusions, ask questions to assess the accuracy of your conclusion. When you check your assumptions, stay open to being wrong, and assume positive intent about the other person, your interactions will take an entirely different turn.
2. Surround Yourself with Positive Thinkers If it’s possible, surround yourself with people who are constructive in the way they think and feel. Whom you associate with has a powerful impact on how you perceive things. When a problem arises, and the folks you mingle with all give varying suggestions that result in cheerful ones, you are blessed. And you will statistically be less prone to stress.
3. Don’t Take Things So Personally High reactivity often comes from elevated personal investment. In other words, when we take things personally. That’s a state of amygdala-hijack. First, breathe. Reclaim the brain. Second, shift perspective. People are usually clear on what they want from another person. When we are clear what we want for the other person, it allows us to take things less personally and be more deliberate.
4. Learn How To Pause And Seek Clarity This requires that you take some time prior to answering someone or stating your opinion. One of the most effective techniques is taking that simple pause: 10 seconds to inhale and exhale in lieu of blurting out the first thing that comes to mind. Consider asking a question to clarify what you’ve heard instead of giving an answer. It can save you from a bad assumption.
5. Think And Edit, Then Speak Think, edit and then speak. Stop and ask yourself, “Is what I am about to say going to move the conversation forward for me, for them, and for the relationship?” If the answer is no to any of these pieces, then it’s time to take a deep breath and come back to it when the answer is a resounding yes.
6. Ask More Questions A lot of the time, we are reactionary because we are making assumptions. Perception check with people you are communicating with to ensure the message sent is the message received. Ask about people’s reasoning or thinking rather than jumping to telling them what they did wrong. And listen: The power of listening is often the best communication tool.
7. Don’t Let a Bad Past Experience Induce Emotional Reactivity A previous negative experience may form a prejudice in your mind, even one you may not be fully aware of having. Remind yourself that whenever you are reacting to something in the present, you may be making an assumption because of an experience in the past. Disconnecting our previous experiences from our present ones helps us stop being emotionally reactive.
8. Sleep Well Your emotions and your ability to have enough sleep have an intimate relationship. Sleep deprivation makes you more emotionally aroused easily and more sensitive to stressful stimuli and scenarios (in a negative way).
Research has shown that enough sleep (6 to 8 hours) is essential to better cope with emotional reactivity in everyday situations. So when you need to stop working or whatever you’re doing because it’s bedtime, stop. The benefits far outweigh the cons.
Hope these tips help you on your journey to self-improvement and self-care. Let me know in the comments below if you have any other techniques that help you be less reactive!
Web components were introduced in 2011, but if you ask most frontend developers, they aren’t their first choice for composing UI layouts. This is partly due to an increase in JavaScript frameworks, component-driven development enthusiasts, and other esoteric factors over the years.
Two key drawbacks of web components are:
Web components don’t follow native HTML behaviour.
Issues with backward-compatability and SEO
Now, in comes Shoelace, a UI library built on web component technology that offers the same experience as any JavaScript framework but with better perks. It defines all your standard UX components: tabs, modals, accordions, auto-completes, and much, much more. They look beautiful out of the box, are accessible, and fully customizable. But rather than creating these components in React, or Solid, or Svelte, etc., it creates them with Web Components; this means you can use them with any framework.
With Shoelace, you can:
Start building things faster (no need to roll your own buttons)
Build multiple apps with different frameworks that all share the same UI components
Fully customize components to match your existing designs
Incrementally adopt components as needed (no need to ditch your framework)
Upgrade or switch frameworks without rebuilding foundational components
A Better Developer Experience
A huge advantage of using Web Components is that you get real custom HTML elements with a familiar API. Let’s compare the markup for a Bootstrap button and a Shoelace button.
Even with this simple example, you can already see there’s less code involved. This becomes even more obvious with complex components. Let’s take a look at dialogs. Here’s a Bootstrap dialog.
That’s a lot of markup! And there’s plenty of room for error with those aria attributes exposed.
Now let’s take a look at an equivalent Shoelace dialog.
<!-- Shoelace -->
<sl-dialog label="Dialog">
<h3 slot="header">Modal Title</h3>
Modal body text goes here.
<sl-button slot="footer">Close</sl-button>
<sl-button slot="footer" type="primary">Save Changes</sl-button>
</sl-dialog>
That’s much easier to work with! And there’s less room for error since the component handles its aria attributes internally. Pretty cool right?
Why Use It?
At this point, you’re probably wondering what sets Shoelace apart from other component libraries. For one, it’s framework agnostic, meaning you can use it in React, Vue, Angular, and any other framework you throw at it. This is perfect for teams that want to use different frameworks with the same components for a consistent UX.
Since Shoelace components are Web Components, they’re built on standards that browsers have committed to supporting for a long time. As old frameworks age and new ones emerge, you won’t have to spend time rebuilding buttons, inputs, and other low-level components. Shoelace will just keep working.
If you prefer to use the platform and avoid frameworks altogether, that’s fine too. Shoelace works great with vanilla HTML+JS!
And yes, Shoelace is open source and available under the MIT license, so it’s free to use and anyone can contribute to it!
If you’re interested in learning more about Shoelace, here are some links you’ll find useful!
Japanese fans at the recent FIFA World Cup tournament have been receiving praise for their admirable habit of cleaning up the stadium after their team’s matches. It’s commonplace to see Japanese fans, blue garbage sacks in hand, hanging back after the game to pick up the trash everyone has left behind in the stadium.
Did you know that some schools in Japan don’t even hire janitorial staff, as the students clean their schools themselves?
So what is it that compels Japanese fans to clean the stadium at the World Cup, despite the fact that there are people hired to do it already?
It generally comes down to one word: “atarimae”
Atarimae isn’t easy to directly translate into English, but it basically means”natural” or “obvious” or “the norm.” Japanese fans may be getting a lot of attention for their cleaning habits, but they’re not trying to make some grand statement or gesture—for them, it’s simply a matter of course that one would clean up mess wherever they are.
Here are 7 Japanese concepts that have definitely transformed my life.
Ikigai Discover your purpose in life.
Determine the reason you wake up each morning.
Choose something that aligns with your strengths, passions and the needs of the world.
Of all the families in human history, the family of Jesus stands above all others. This family is outstanding for its holiness, genuineness, understanding and acceptance of one another.
Not health, wealth, education, location or social status accounts for their place of prominence in human history. To the contrary, Mary and Joseph were poor. They were unschooled country people. Externally, they had nothing to distinguish them above any other Israelite of their time.
Internally, what distinguished them were their holy hearts and their close personal relationship with God. It is this that has given them lasting greatness. It is this that motivates us to look at them as a model family. They illustrate God’s plan for a family. They challenge all of us to pattern our homes after the heart of God.
The Holy Family is a model of faithfulness and love. They were totally devoted to God and his call on their lives. And, they faithfully followed their God-given vocations.
Their love for the Father and their desire to be faithful to him and to please him in all things was what also strengthened their love for each other.
They accepted God’s unique, individual plan for each of their lives and were obedient to His call. Mary accepted God’s plan to be the mother of Jesus. Joseph accepted taking Mary into his home and was obedient to being the foster father of God’s son. Jesus accepted the will of his Father which was often a difficult road to follow but one he followed in obedience.
The Holy Family also models forgiveness. And forgiveness leads to love. In fact, Jesus was the prime model for forgiveness as part of the Holy Family. For example, Jesus didn’t utter a single word in his defence against those who hurt him. Furthermore, he forgave those who put him to death.
So how can we model the Holy Family’s virtues in our own families? How can we take what we’ve learned from the Holy Family and apply it to our own life?
Pray together – First and foremost, as a family, our goal should be to draw each other closer to Christ. And, what better way to do so than through prayer?
Be Faithful to Your Vocation – Jesus, Mary and Joseph showed faithfulness to their vocation. And, we can do the same. Above all, try doing your duties without grumbling or complaining. This can be difficult, I know. Instead offer your vocation to the Lord. As married couples, we can model faithfulness by showing affection to one another, scheduling alone time, or by praying together. By doing so, we are being faithful to our marriage vocation and honouring the marriage covenant.
Honour Each Other – God wants us to honour each member of our family. For example, we can work on parenting our children with love instead of nagging. By the same token, we can show respect and love to our own parents, no matter what their age. Sometimes this is difficult as our own parents age and their health fails. But, no matter what stage of life we are in, God is calling us to be patient and to honour our family members as an act of faithfulness to him.
Accept Each Other – Oh how harmonious our family life could be if we learn to accept our family members without trying to change them! Just like the Holy Family, we are children of God. And we all have our own unique personalities. Similarly, God has a unique plan and purpose for each member of our family. So, not only do we need to accept God’s plan for our own life, but we need to accept that plan for others too.
Forgive Daily – This might be the hardest virtue of all to imitate. Because it’s all too easy to let a hurt fester and grow instead of choosing to forgive and let it go. I recently read a reflection that spoke about turning the family home into a confessional and not a courtroom. Meaning, let’s not become the judge and jury when it comes to our
family. Instead, let’s recognize that we all have imperfections and we are all sinners. When we do sin, let’s take it to the confessional of our homes. Let’s admit to any wrongdoing, ask for forgiveness, show mercy, and move on!
Be Present in Communication – The Holy Family certainly didn’t have as many distractions when it comes to communicating as we do today. It’s ironic that the very devices we use to communicate, such as cell phones, computers, and tablets, actually get in the way of us being present in our communication to one another. To emulate the Holy Family’s means of communicating, we can take simple steps like looking each other in the eye when we speak; putting aside our cell phones or any activity when someone is talking to us; And, basically just listen. To emphasize this point, on the Feast of the Holy Family, Pope Francis challenged all families to put their cell phones away during family meal time encouraging us to communicate just like the Holy Family did.
In this Christmas Season, let us pray that, inspired by the Holy Family, our families may grow in love and holiness.
Our Lady of Guadalupe appeared in Mexico as the pregnant Mother of God to Blessed Juan Diego, an Aztec Indian, in 1531 on December 9, 10 and 12. She left a Miraculous Image of her appearance on his cactus fiber cloak, or tilma, which still exists today for all to see in the Basilica of Our Lady of Guadalupe in Mexico City.
Our Lady came to offer faith, hope and consolation to the oppressed natives of Mexico and to reconcile them with their Spanish rulers. She put an end to the bloody human sacrifice of the Aztecs and converted ten million natives in the next 10 years!
The Image of Our Lady is actually an Aztec Pictograph that was read and interpreted quickly by the Aztec Indians.
THE LADY STOOD IN FRONT OF THE SUN: She was greater than their dreaded sun-god “Huitzilopochtli”.
HER FOOT RESTED ON THE CRESCENT MOON:She had clearly vanquished their foremost deity, the feather serpent “Quetzalcoatl.”
THE STARS STREWN ACROSS THE MANTLE: She was greater than the stars of heaven that they worshipped. She was a virgin and the Queen of the heavens for Virgo rests over her womb and the northern crown upon her head. She appeared on December 12, 1531 for the stars that she wore are the constellation of stars that appeared in the sky that day!
THE BLUE-GREEN HUE OF HER MANTLE: She was a Queen for she wears the color of royalty.
THE BLACK CROSS ON THE BROOCH AT HER NECK: Her God was that of the Spanish Missionaries, Jesus Christ her son.
THE BLACK BELT: She was with child for she wore the Aztec Maternity Belt.
THE FOUR-PETAL FLOWER OVER THE WOMB:She was the “Mother of God.” The flower was a special symbol of life, movement and deity-the center of the universe.
HER HANDS ARE JOINED IN PRAYER: She was not God but clearly there was one greater than Her and she pointed her finger to the cross on her brooch.
THE DESIGN ON HER ROSE COLORED GARMENT:She is the “Queen of the Earth” for she is wearing a map of Mexico telling the Indians exactly where the apparition took place.
And then there’s what Modern Science has to say about the tilma:
The image, to this date, cannot be explained by science.
The image shows no sign of deterioration after almost 500 years! The tilma or cloak of Juan Diego on which the image of Our Lady has been imprinted, is a coarse fabric made from the threads of the maguey cactus. This fiber disintegrates within 20-60 years!
There is no under sketch, no sizing and no protective over-varnish on the image.
Microscopic examination revealed that there were no brush strokes.
The image seems to increase in size and change colors due to an unknown property of the surface and substance of which it is made.
According to Kodak of Mexico, the image is smooth and feels like a modern day photograph. (Produced 300 years before the invention of photography.)
The image has consistently defied exact reproduction, whether by brush or camera.
Several images can be seen reflected in the eyes of the Virgin. It is believed to be the images of Juan Diego, Bishop Juan de Zummaraga, Juan Gonzales-the interpreter and others.
The distortion and place of the images are identical to what is produced in the normal eye, which is impossible to obtain on a flat surface.
The stars on Our Lady’s Mantle coincide with the constellation in the sky on December 12, 1531. All who have scientifically examined the image of Our Lady over the centuries confess that its properties are absolutely unique and so inexplicable in human terms that the image can only be supernatural!