Testing web sites and apps come in many forms. Testers try their best to test everything, but obviously there’s only so much they can do within a schedule. Some forms of testing are more prioritized than others, and that’s not inherently bad; for a solo tester on a team, one usually tests in a way that covers more bases at the beginning.
Web accessibility testing is one of those forms of testing that often takes a backseat, sometimes even forgotten. Web accessibility helps people with disabilities get better surfing experience. Although websites are typically not built with such functionality in mind, it matters.
And tota11y is a tool from Khan Academy we can leverage for testing accessibility. It is available as an easy-to-use bookmarklet. For whatever page we want to test, we just need to go there and click the bookmarklet, after which the tool will appear on the bottom left corner of the page. Clicking the tool reveals options and using each helps us spot common accessibility violations.
Here are some screenshots of using it on a page I test at work, checking headings, contrast, and link text:
Spotted: Nonconsecutive heading level use
Multiple insufficient contrast ratio violations
And unclear link texts
Looks like there’s room for improvement, although these violations are not necessarily errors.
A month ago, I got accepted into a no-pay internship program volunteering as a Flutter programmer. It’s an interesting learning opportunity; I’m working with four other programmers from around the globe who personally don’t know each other, building native mobile apps on our free time. The program runs for six months, so I suppose I’ll be writing code with these guys until around April next year.
Team chat over at Discord 🙂
Even though there’s no pay and I spend time to help the team finish given app challenges, what I get in return is an insider experience working with a remote team as a programmer myself, instead of being a tester. That means I need to pitch in on the actual application code, and pitch in with a respectable level of quality. Although I already work with programmers on my day job, the communication dynamics is a bit different from what I encounter on a daily basis. It’s a good change of pace, and I’m somehow broadening my horizons a little.
Most of this past month’s challenge erred on the side of communication: talking to each other over at Discord, familiarizing ourselves with other people’s style of writing code, and gauging our roles within the team. It’s been fun so far. 🙂
I picked up Mark Manson’s “Models: Attract Women Through Honesty” because I was intrigued by the title and because I am at a time in my life where I’d like to meet more interesting women. It did not disappoint. The book was insightful, and, like other compelling reads, it pushes me to look hard at myself and how I’ve been living my life, this time particularly on the subject of women. The concepts of neediness and vulnerability are, for me, the main takeaways.
Here are just a few of the noteworthy lines from the book:
In our post-industrial, post-feminist world, we lack a clear model of what an attractive man is. Centuries ago, a man’s role and duty was power and protection. Decades ago, it was to provide. But now? We’re not quite sure. We are either the first or second generation of men to grow up without a clear definition of our social roles, and without a model of what it is to be strong and attractive men.
Seduction is an interplay of emotions. Your movement or lack of movement reflects and alters emotions, not the words. Words are the side-effect. Sex is the side-effect. The game is emotions, emotions through movement.
- In surveys among literally tens of thousands of women, across all cultures, ethnicities, age groups, and socio-economic standing, and even time periods, there’s one universal quality in men that they all find desirable: social status and access to resources. The amount in which they desire it varies from culture to culture and from age group to age group, but the desire for it is universal.
- Social status is determined by how you behave around other people, how other people behave around you, and how you treat yourself.
Female arousal is somewhat narcissistic in nature. Women are turned on by being wanted, by being desired. The more physical assertiveness you pursue a woman with, the more aroused she becomes — sometimes even if she wasn’t interested in you to begin with.
How attractive a man is is inversely proportional to how emotionally needy he is. The more emotionally needy he is in his life, the less attractive he is and vice-versa. Neediness is defined by being more highly invested in other people’s perceptions of you than your perception of yourself.
All people eventually return to their baseline levels of investment. And until one is able to permanently alter his baseline level of identity investment in themselves, they will continue to attract the same types of women, and end up in the same failed relationships. Permanent change to one’s investment and neediness in their relationships with women is hard and a process that encompasses all facets of one’s life. But it’s a worthwhile journey. As a man, it may be the most worthwhile journey. And the key to it is probably something you wouldn’t expect. In fact, it’s something that most men turn their nose up to when they hear it. It’s vulnerability.
Making yourself vulnerable doesn’t just mean being willing to share your fears or insecurities. It can mean putting yourself in a position where you can be rejected, saying a joke that may not be funny, asserting an opinion that may offend others, joining a table of people you don’t know, telling a woman that you like her and want to date her. All of these things require you to stick your neck out on the line emotionally in some way. You’re making yourself vulnerable when you do them. In this way, vulnerability represents a form of power, a deep and subtle form of power. A man who’s able to make himself vulnerable is saying to the world, “I don’t care what you think of me; this is who I am, and I refuse to be anyone else.” He’s saying he’s not needy and that he’s high status.
Show your rough edges. Stop trying to be perfect. Expose yourself and share yourself without inhibition. Take the rejections and lumps and move on because you’re a bigger and stronger man. And when you find a woman who loves who you are (and you will), revel in her affection.
- The biggest criticism of showing interest to a woman that you want to be with is that it immediately shows you as highly invested in her responses. When you say, “You’re cute and I wanted to meet you,” that translates roughly to, “Hi, I want to be with you and am officially invested in the prospect of it happening.” What they miss though is the sub-communication going on underneath what’s actually being said. The sub-communication is, “I’m totally OK with the idea of you rejecting me, otherwise I would not be approaching you in this manner.”
- True honesty is only possible when it is unconditional. The truth is only the truth when it is given as a gift — when nothing is expected in return. When I tell a girl that she is beautiful, I say it not expecting anything in return. Whether she rejects me or falls in love with me isn’t important in that moment. What’s important is that I’m expressing my feelings to her. I will give compliments only when I am honestly inspired to give them, and usually after already meeting a woman and displaying to her that I’m willing to disagree with her, willing to be rejected by her and willing to walk away from her if it ever comes to that.
Last year, I’ve tried automating a Windows 7 desktop calculator using a Java library called Winium. A year later, someone from the comments told me that the example didn’t work on Windows 10. I ignored the comment for a while because I didn’t have a Windows 10 machine to perform a test back then, but now that I’ve recently upgraded my home PC I decided to try it out.
What I found:
Running a Windows 7 desktop calculator automation example (using Winium) on a Windows 10 machine
The Windows 10 calculator opened up but the tests didn’t run properly. The error log told me that the program was unable to find the calculator elements it was supposed to click. Bummer. Maybe the names of the calculator elements were different, Windows 10 versus Windows 7? It wasn’t; the element names were still the same according to UI Spy. Perhaps there’s something from Winium that can point me to a clue? Oh, it seems that the library has not been updated in recent years.
If I can’t use Winium, how then can I automate the Windows 10 calculator? A Google search pointed me to PyAutoGui. Instead of Java, it says that I’ll need Python (and Pip) for this tool to work. And yes, being Windows, I also need to properly set the environment variables so I can use the Python and Pip commands on a terminal.
Let’s install PyAutoGui:
And after writing some code, let’s see if we can automate the Windows 10 calculator with it:
Automating the Windows 10 desktop calculator with PyAutoGui. Click the image to view the GIF full-size on another browser tab 🙂
But here are some catches:
- I had to rely on PyAutoGui’s keyboard control functions for performing the calculator actions, instead of finding elements via the user interface. Well, from what I’ve seen so far from the docs is that the only way to locate a UI element is by locating elements using screenshots. I tried that the first time and it was very flaky, so I opted for using the keyboard control functions instead.
- The code introduces a time variable to wait for the calculator to appear on screen. The code also introduces a time variable to pause a portion of a second in-between each keyboard action so the actions don’t happen too fast for a person’s eye.
- There are no assertions in the example code, because I couldn’t find any assertion functions I could use from the PyAutoGui docs. It is not a tool built for testing, only for automating desktop apps.
Source code for this experiment can be found on: Win-Calculator-PyAutoGui.
Sharing a new batch of engaging videos from people I follow, which I hope you’ll come to like as I do:
- Workarounds (by Alan Richardson, about workarounds, how you can use them in testing, custom-using tools, moving boilerplate to the appendix, bypassing processes that gets in the way, understanding risks and value, technical skills, and taking control of your career)
- 100% Coverage is Too High for Apps! (by Kent Dodds, on code coverage, what it tells you, as well as what it does not tell you)
- Open Water Swimming (by Timothy Ferriss, about fears, habits, total immersion swimming, Terry Laughlin, compressing months of conventional training into just a few days, and the power of micro-successes)
- How To Stop Hating Your Tests (by Justin Searls, representing Test Double, on doing only three things for tests, avoiding conditionals, consistency, apparent test purpose, redundant test coverage, optimizing feedback loops, false negatives, and building better workflows)
- Meaning of Life (by Derek Sivers, about a classic unsolvable problem, using time wisely, making good choices, making memories, the growth mindset, inherent meaning, and a blank slate)
This is probably old news, but I only recently found out that there is a way for Cucumber tests running in Ruby to automatically retry when they fail.
Here’s a sample failing test:
Apparently we can just add a
--retry command to set the test to retry if it fails. And we can set how many times we want the test to retry. If we retry the failing test above to retry two times, with a
--retry 2 command, we’ll get the following output:
It did retry the test twice, after the initial failure. Neat! 🙂
But what happens if we run the test, with the same retry command, and the test passes? Does the test run three times? Let’s see:
Good, the retry command gets ignored when the test passes.
Paulo Coelho’s “The Alchemist” has been around a while but I’ve never read it before until now. It’s a short book that tells the adventure of a young Santiago in pursuit of his treasure under the pyramids of Egypt, and tries to inspire readers to do the same, to go in pursuit of their own dreams. It’s a story that has remained popular in bookstores all these years and now I understand why. Personally, however, I’ve found it to be a bit underwhelming, perhaps because the writing wasn’t to my taste.
Nevertheless, here are some interesting lines from the book:
- That was what made traveling appeal to him – he always made new friends, and he didn’t need to spend all of his time with them. When someone sees the same people every day, as had happened with him at the seminary, they wind up becoming a part of that person’s life. And then they want the person to change. If someone isn’t what others want them to be, the others become angry. Everyone seems to have a clear idea of how other people should lead their lives, but none about his or her own.
- “People learn, early in their lives, what is their reason for being,” said the old man, with a certain bitterness. “Maybe that’s why they give up on it so early, too.”
- The sheep had taught him something even more important; that there was a language in the world that everyone understood, a language the boy had used throughout the time that he was trying to improve things at that shop. It was the language of enthusiasm, of things accomplished with love and purpose, and as part of a search for something believed in and desired.
- I know why I want to get back to my flock, he thought. I understand sheep; they’re no longer a problem, and they can be good friends. On the other hand, I don’t know if the desert can be a friend, and it’s in the desert that I have to search for my treasure.
- He still had some doubts about the decision he had made. But he was able to understand one thing; making a decision was only the beginning of things.
- “I’m alive,” he said to the boy, as they ate a bunch of dates one night, with no fires and no moon. “When I’m eating, that’s all I think about. If I’m on the march, I just concentrate on marching. If I have to fight, it will be just as good a day to die as any other.”
- Most people see the world as a threatening place, and, because they do, the world turns out, indeed, to be a threatening place.
- “Everyone has his or her own way of learning things,” he said to himself. “His way isn’t the same way as mine, nor mine as his. But we’re both in search of our Personal Legends, and I respect him for that.”