Saturday, July 6, 2024

Excel VBA - Timing Complexity

I cannot comment about others but normally I am always in a hurry to write macro(s) so that I can finish task in hand as soon as possible. In this process I loose track of functions/methods I am using to finish the task. Does it matter? As goal is to finish the task. Let's go through one example.

I am adding two integers, in this example 1+1, 10000 times. I will perform this task using two ways. First way, I will use excel's Autofill method. Second way, I will use a For loop to iterate the addition operation 10000 times. Now, check this out.

Time taken by:
1. Autofill function - 0.02s
2. For loop - 5.98s

So, 5.98/0.02 = 299 .. First method was 299 times faster than second method.

Surprised !! .. Imagine if you perform a complex operation involving functions like VLOOKUP, FIND, MATCH and INDEX on a huge dataset 10000 times then what would time delta be ?

Yes, you got it. Performance optimization is as important as finishing the task. We normally work with huge datasets hence how we manipulate data becomes equally important. Once you figure out the logic for a particular problem, take your time to write the program. What's the point of automation if a task requires 5 minutes and your code is taking 10-15 minutes to finish the same task šŸ˜‚

Once I wrote a huge (in terms of number of lines) macro. The macro took almost an hour. I figured out few changes but forgot where to make them as I had not added comments 😁 . Now, I am doing some part of that activity manually.

So, try to optimize your code as much as possible so that it takes less time to execute. The attached document shows subroutines used for both the ways discussed above.



Please find the below URL:
https://learn.microsoft.com/en-us/office/vba/excel/concepts/excel-performance/excel-tips-for-optimizing-performance-obstructions

Remember:
First, solve the problem. Then, write the code. – John Johnson

Make it work, make it right, make it fast. – Kent Beck

Happy Learning !!
hashtagexcel hashtagmicrosoft hashtagmsexcel hashtagvba

Access Management - IAM (IM & AM), IGA and PAM

I was trying to learn and understand differences between IAM, IGA and PAM. My colleague Anant Sharma helped me understand the concepts.


Per Gartner, IAM:
The discipline that enables the right individuals to access the right resources at the right times for the right reasons. IAM systems enable your organization to manage employee apps without logging into each app as an administrator.

Difference between IM and AM:
Identity Management confirms that you are who you claim to be and stores information about you. An identity management database holds information about your identity - for example, your job title and your direct reports - and authenticates that you are, indeed, the person described in the database.

Access Management uses the information about your identity to determine which software suites you're allowed access to and what you're allowed to do when you access them.

IGA (Identity Governance & Administration):
IGA is both a policy framework and set of security solutions that enable organizations to more effectively mitigate identity-related access risks within their business. IGA automates the creation, management, and certification of user accounts, roles, and access rights for individual users in an organization.

PAM:
PAM enables organizations to simplify how they define, monitor, and manage privileged access across their IT systems, applications, and infrastructure. Because administrator accounts have elevated privileges that can access valuable data and execute applications or transactions, often with little or no tracking control, it can be very difficult to manage privileged accounts. PAM solutions centralize management of administrator profiles and ensure least privilege access is enforced to give users only the access they need.

Per Gartner, difference between IAM and IGA:
IGA differs from IAM in that it allows organizations to not only define and enforce IAM policy, but also connect IAM functions to meet audit and compliance requirements.

While IAM and IGA focus on wider levels of user access for resources, systems, and applications across the organization, PAM primarily defines and controls access for privileged users.

For example, inappropriate and/or outdated access to enterprise resources is a common problem in IAM. A remote workforce, time-consuming provisioning processes, weak Bring Your Own Device (BYOD) policies and strict compliance requirements are some other identity management system challenges. These issues increase security risk and weaken organizations’ compliance posture. That’s why many organizations use IGA to meet the compliance requirements laid out in GDPR, HIPAA, SOX and PCI DSS.

Please refer the below URLs for more details:

Happy Learning
hashtagaccessmanagement hashtagcybersecurity hashtagIAM hashtagidentity

Vulnerability Management - Understanding vulnerability posture

Understanding the vulnerability posture of an organisation at a basic level helps you drive remediation efforts. So, I don't know what t...