Significant Network Problems on macbooks with M1/ M2 Chips With Proposed Solutions
0 (0)

Click to rate this post!
[Total: 0 Average: 0]

As Apple’s M1/M2 processors got significant attention lately, different users reported significant stability issues & network performance issues, specially when using Wi-Fi on the 2.4 GHz band or connecting via a USB dongle for LAN.

One common complaint is sudden long drops in transfer rates, often resulting in frustrating experiences for users. These issues can be attributed to the design of the network card in these devices, which may struggle to maintain consistent performance under certain conditions.

When operating on the 2.4 GHz band, devices with M1 or M2 processors may experience very low transfer rates like 0.5 mbps transfer rate 😱, significantly lower than expected, not all the devices are necessarily affected, but a lot of complaints about this can be found.

I had a connection about 30 times faster when connecting through my macbook pro 2019 than M1 Pro, simple benchmarks using networkQuality command.

M1 Pro based internet speed
Downlink: 0.568 Mbps, 31 RPM – Uplink: 1.920 Mbps, 36 RPM

Intel based internet speed
Downlink: 14.347 Mbps, 63 RPM – Uplink: 4.175 Mbps, 47 RPM

Such results were shocking to me 😱, maybe you are also in shock to the 15 Mbps speed of mine as I don’t have fiber-internet where I live and still on 4G. 🤣

In the beginning I was suspecting that the VPN/MDM on the M1 Pro to be why I have sudden significant long speed drops, but after doing some research I found some useful findings that helped me retrieve the speed back on M1 Pro device.

The 2.4GHz band offers a better coverage and penetration through walls. However, it is more suspectible to interference from other devices & nearby Wi-Fi networks. This can potentially lead to congestion and speed drops, especially in crowded areas. On the other hand, the 5GHz band is generally faster and is less susceptible to interference. However, it has a shorter range and may have more difficulty penetrating objects.

Connecting to a LAN via a USB dongle (specially with a monitor on the same dongle) is also reported to lead to network performance issues, further complicating the challenges faced by users relying on a stable and high-speed network connection.

While these problems may seem daunting, there are potential workarounds and solutions that users can consider.

1- When troubleshooting network performance issues on devices with M1 or M2 processors, utilizing the “networkQuality” command in safe mode can be a valuable diagnostic tool. By entering safe mode, the system loads only essential components, allowing users to isolate potential software conflicts or third-party applications that may be impacting network performance. Running the “networkQuality” command in this environment can provide a clearer picture of the device’s network status.

This can help narrow down the potential sources of the issue, whether it’s related to software conflicts, driver issues, or other factors. By leveraging safe mode and the “networkQuality” command, users can gather crucial data to aid in the debugging process and work towards resolving network performance issues effectively.

2- Switching to the 5 GHz band and disabling the 2.4 GHz network on your router can be an effective strategy for addressing performance issues associated with the 2.4 GHz band. Along with using 40MHz channel width, you can potentially mitigate the impact of congestion and interference, resulting in improved network performance.

This simple change can often make a noticeable difference in the overall reliability and speed of the Wi-Fi network for devices with M1 or M2 processors.

3- If you find yourself using a USB-C dongle for network connectivity using LAN and you are experiencing network issues, it may be worth considering a switch to Wi-Fi as an alternative. By transitioning to Wi-Fi, you can assess the network quality using “networkQuality”, This approach allows you to compare the performance of the USB-C dongle with that of the Wi-Fi connection, potentially identifying any specific issues related to the dongle or the network environment.

4- disable needless network features such as “Thunderbolt Bridge” which is a networking technology that allows for high-speed data transfer between two Mac computers using Thunderbolt ports. Consider disabling this feature and other features that you don’t use, disabling these is reported to solve the issue.

It’s important to be aware of these potential network performance issues when using devices with M1 or M2 processors. some devices could be not affected by these issues, but I saw a lot of people complaining about the same, I hope this information proves helpful to those navigating network performance issues on M1 and M2 powered devices.

Test Doubles In Swift (Part 1)
5 (1)

Click to rate this post!
[Total: 1 Average: 5]
Test doubles name is inspired by "stunt doubles"

Test doubles name is inspired by “stunt doubles” from movies industry.

Testing is an essential part of software development, allowing us to ensure the correctness and reliability of our code.

However, when it comes to writing tests, one concept that often perplexes developers is the use of test doubles, test doubles are objects that replace dependencies in our code during testing, enabling us to isolate and verify specific behaviors.

In general, there are various types of test doubles, such as dummies, fakes, stubs, spies, and mocks, understanding when and how to use each type can greatly enhance the effectiveness of our tests and improve the overall quality of our code.

In this blog post series, we will delve into the world of test doubles in Swift, exploring their purpose, distinctions, and practical examples, by the end, you’ll have a solid understanding of how to leverage test doubles to write comprehensive and reliable tests.

A test double is an object that stands in for a real dependency during testing, these dependencies, such as external services, databases, or complex components, can introduce complexity and make testing challenging, test doubles help us isolate the code under test and focus on specific behaviors, making our tests more reliable and efficient.

Test doubles are designed to mimic the behavior of real objects, but they provide simplified or controlled implementations, by replacing real dependencies with test doubles, we can create predictable and controlled environments for testing, without relying on external systems or complex setups.

iOS Accessibility Series (Part 1)
3 (2)

Click to rate this post!
[Total: 2 Average: 3]

iOS accessibility, from a developer’s point of view, refers to the set of tools, technologies, and guidelines provided by Apple to ensure that iOS applications are usable and inclusive for people with disabilities, as a developer, incorporating accessibility features into your iOS app involves considering the diverse needs of users with visual, auditory, motor, cognitive, and any other impairments. (see table below for a list of most common impairments and disabilities)

Many developers and businesses do not prioritize making their applications accessible for several reasons, first, there is often a lack of awareness about the significance of accessibility and the benefits it brings to a broader user base, second, some developers perceive accessibility implementation as a complex and time-consuming task, leading them to prioritize other features instead, there are also other concerns about additional costs, limited resources, the assumption that their target audience does not include people with disabilities can deter developers from investing in accessibility.

Legal enforcement of accessibility regulations may be weak or inconsistent in some regions, reducing the incentive to comply, moreover, the emphasis on aesthetics over accessibility, inadequate training on accessibility best practices, and resistance to change can further hinder the adoption of accessible design, despite these challenges, raising awareness and promoting the positive impact of accessibility remain crucial in encouraging developers to make their applications inclusive and accessible to all users.

Several countries have enacted laws and regulations to enforce digital accessibility. In the United States, the Americans with Disabilities Act (ADA) and Section 508 of the Rehabilitation Act of 1973 outline accessibility requirements for websites, applications, and other digital content provided by federal agencies and entities receiving federal funding.

The Web Content Accessibility Guidelines (WCAG), created by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), are widely recognized as the global standard for web accessibility, these guidelines provide specific criteria for making digital content accessible to individuals with disabilities.

Failure to comply with accessibility regulations and standards can lead to legal consequences. Companies and organizations that do not provide accessible digital content may face complaints, lawsuits, or enforcement actions by individuals, advocacy groups, or government agencies.

Penalties can include fines, legal fees, court orders to rectify accessibility issues, and reputational damage.

Several high-profile cases have set important precedents for digital accessibility enforcement, resulting in settlements or court rulings against companies that were found to have inaccessible websites or applications, these cases highlight the significance of accessibility and the legal ramifications of non-compliance.

Numerous prominent cases have established crucial precedents for enforcing digital accessibility, leading to settlements or court rulings against companies with inaccessible websites or applications. Notably, Domino’s Pizza, Netflix, and Target faced legal issues related to the lack of accessible applications for individuals with disabilities. The Ninth Circuit Court of Appeals ruled in favor of a blind plaintiff, stating that the ADA applies to websites and mobile apps. Netflix settled with the National Association of the Deaf, agreeing to make its streaming content accessible with closed captions. Similarly, Target settled with the National Federation of the Blind, committing to enhance its website’s accessibility.

These cases emphasize the significance of digital accessibility and the legal consequences for non-compliance, prompting businesses to increasingly prioritize accessibility for a more inclusive online environment.

Main types of disabilities and impairments:

VisualUsers with visual impairments may have a partial or complete loss of vision. They rely on assistive technologies like VoiceOver to navigate the app using spoken feedback. Developers must ensure that UI elements have meaningful labels, provide appropriate descriptions, and support dynamic text sizes for better readability. Additionally, maintaining proper contrast and avoiding reliance on color-only cues is crucial to aid users with low vision.

When creating an accessible app, developers should consider various visual impairments, such as blindness, low vision, color blindness, glaucoma, cataracts, macular degeneration, nystagmus, diabetic retinopathy, hemianopia, and photophobia.

To accommodate users with these conditions, designers should prioritize VoiceOver support, dynamic text sizing, high contrast options, and clear layouts. Regular accessibility testing with assistive technologies ensures the app meets the needs of all users, providing an inclusive experience for those with visual challenges.
AuditoryUsers with auditory impairments experience hearing loss, which can range from mild to profound. Closed captioning and subtitles are essential for video or audio content to make it accessible to this audience. Developers should also consider providing visual or haptic feedback for important alerts or notifications.
MotorUsers with motor impairments may have difficulty with precise touch gestures or using physical buttons. To accommodate these users, developers should ensure that app elements are well-spaced and have an appropriate touch target size. Supporting alternative input methods like switch control and voice commands can also enhance accessibility for users with motor challenges.
CognitiveUsers with cognitive impairments may face challenges with memory, attention, and problem-solving. To cater to this audience, developers should strive for simplicity and clarity in the app’s user interface. Avoiding complex navigation flows and providing clear instructions can make the app more user-friendly for individuals with cognitive disabilities.
SpeechUsers with speech impairments may have difficulty communicating through traditional speech. Developers can consider integrating communication tools or support for alternative input methods like text-to-speech or augmentative and alternative communication (AAC) into their apps.
Situational disabilitiesUsers in certain situations, such as noisy environments or poor lighting conditions, may benefit from accessibility features like closed captioning or larger text sizes.