<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>petermakowski.io</title>
	<subtitle>Peter Makowski - Front End Engineer | Accessible Web and Native Apps with React</subtitle>
	
	<link href="https://petermakowski.io/rss.xml" rel="self"/>
	<link href="https://petermakowski.io/"/>
	<updated>2022-07-24T22:00:00Z</updated>
	<id>https://petermakowski.io/</id>
	<author>
		<name>Peter Makowski</name>
		<email></email>
	</author>
	
	<entry>
		<title>Balancing innovation in software engineering teams</title>
		<link href="https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/"/>
		<updated>2022-07-24T22:00:00Z</updated>
		<id>https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/</id>
		<content type="html">&lt;img class=&quot;featured&quot; src=&quot;https://petermakowski.io/img/illustrations/balancing.jpg&quot; alt=&quot;DALL·E illustration of a software engineering team balancing on a tightrope over a majestic mountain range in minimalistic style&quot; /&gt;
&lt;h2 id=&quot;software-engineering-as-a-field-of-constant-change&quot; tabindex=&quot;-1&quot;&gt;Software engineering as a field of constant change &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/#software-engineering-as-a-field-of-constant-change&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Software engineering is a relatively new discipline and for that reason alone we should question its fundamental axioms on a regular basis. We do not seem to be in a place where we have good, fairly future-proof answers for most problems like older disciplines do. Practices such as extreme programming or micro-services created massive disruptions in the field not so long ago and things do not seem to have slowed down, with the advancements in machine learning creating another major shift being just one example.&lt;/p&gt;
&lt;p&gt;As software engineers, we need to periodically review and question assumptions left over by previous eras. On a more practical level, this means maintaining a healthy discipline in encouraging experimentation and change. There&#39;s nothing quite like the fresh eyes of a newcomer in the moment of seeing a project for the first time. That&#39;s why rotating developers between projects can be a very valuable strategy for keeping things in check.&lt;/p&gt;
&lt;h2 id=&quot;the-inherent-value-of-experimentation&quot; tabindex=&quot;-1&quot;&gt;The inherent value of experimentation &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/#the-inherent-value-of-experimentation&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We should also recognise the value of experimentation in and of itself. All mammals have the play circuit in their nervous system which is often the birthplace of new behaviours, biologically speaking. In humans, the playful pursuit of curiosity allows the discovery of ideas and solutions that could not be found otherwise. In software engineering teams this can take the form of regular hackathons on side-projects - but even better if it&#39;s allowed within the main product to a certain degree as it&#39;s sometimes difficult to translate knowledge from hackathons to real projects.&lt;/p&gt;
&lt;p&gt;Experimentation is particularly important in the current era of obsession with productivity. The narrow field of view that&#39;s a result of such a mindset certainly has its place at work but can lead to pathology if not kept in check and combined with a broad field of view that&#39;s associated with play.&lt;/p&gt;
&lt;p&gt;To allow and encourage play in your team you need to ensure their psychological safety. Nobody will want to play if they&#39;re worried about a predator that might be lurking around. That&#39;s why it&#39;s important to keep a healthy attitude towards mistakes made by the team. With true innovation, mistakes will happen.&lt;/p&gt;
&lt;h2 id=&quot;the-risks-of-stifling-innovation&quot; tabindex=&quot;-1&quot;&gt;The risks of stifling innovation &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/#the-risks-of-stifling-innovation&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We need to recognise experimentation as something that has value in and of itself and a requirement and a sign of healthy software teams.&lt;/p&gt;
&lt;p&gt;Doing things as they used to be done is easy. It&#39;s low-risk. If a project fails, it&#39;s less likely it will be blamed on the old way of doing things. They did work for so long, and it&#39;s not likely attention would be drawn to them as a cause of failure. Often something else gets the blame, like the lack of time (&amp;quot;we did it this way because we didn&#39;t have time for major changes&amp;quot;) or the need for consistency.&lt;/p&gt;
&lt;p&gt;Teams are often afraid of bringing too much chaos into the system as it makes things less predictable. That&#39;s the inherent nature of change. Things destabilise for a while until a new state of equilibrium is reached. This is required for growth.&lt;/p&gt;
&lt;p&gt;The exact amount of change versus stability can be a subject of debate but it&#39;s safe to assume software engineering will require more innovation than other, more established fields as it still lives on the edge. Not allowing for a degree of innovation can not only lead to boredom and or/burnout of certain team members but ultimately failure of the product.&lt;/p&gt;
&lt;h2 id=&quot;it&#39;s-a-balancing-act&quot; tabindex=&quot;-1&quot;&gt;It&#39;s a balancing act &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/balancing-innovation-in-software-engineering-teams/#it&#39;s-a-balancing-act&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Innovation is great, but you can have too much of the good thing, and both the lack of innovation and the lack of rules can be a sign of dysfunction. Too much innovation can cause a lot of stress, especially for team members that are more resistant to change. It should be approached with caution and be kept under constant review to make sure the right balance has been reached.&lt;/p&gt;
&lt;p&gt;Balancing innovation brought on by new ideas and the stability of established ways of doing things is a complicated dance. And although it&#39;s hard to say what&#39;s the right balance between the two and will most likely depend on the circumstances, one thing is for certain - you need them both.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Enzyme encourages bad testing practices</title>
		<link href="https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/"/>
		<updated>2022-06-13T00:00:00Z</updated>
		<id>https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/</id>
		<content type="html">&lt;p&gt;Enzyme encourages testing implementation details. This is bad practice and such tests can do more harm than good.&lt;/p&gt;
&lt;h2 id=&quot;typical-enzyme-test&quot; tabindex=&quot;-1&quot;&gt;Typical enzyme test &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/#typical-enzyme-test&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token function&quot;&gt;it&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;displays a spinner on load&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; wrapper &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;mount&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;EditComponent&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token function&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;wrapper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;[data-testid=&#39;loading-details&#39;]&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;exists&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toBe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;false-positives&quot; tabindex=&quot;-1&quot;&gt;False positives &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/#false-positives&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Tests that do not fail when you break the functionality are said to return a false positive. Arguably, the test above can never return a &amp;quot;true positive&amp;quot; as it&#39;s not even testing anything that&#39;s relevant for the end user. Even if the &lt;code&gt;loading-details&lt;/code&gt; test id was added to the DOM, we&#39;ll never know for sure the expected loading indicator (like a spinner icon with a &amp;quot;loading&amp;quot; text) is returned by this component.&lt;/p&gt;
&lt;p&gt;Even worse, it&#39;s possible that even the &lt;code&gt;data-testid=&amp;quot;loading-details&amp;quot;&lt;/code&gt; itself never appears in the DOM and this test still passes. This could happen if the underlying component doesn’t render the data-testid prop. Enzyme lets this test pass because it’s testing component instances instead of the output of these components - the DOM nodes.&lt;/p&gt;
&lt;h3 id=&quot;false-negatives&quot; tabindex=&quot;-1&quot;&gt;False negatives &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/#false-negatives&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Refactoring should be encouraged and easy, with tests serving as an extra layer of confidence giving you immediate feedback if the application&#39;s functionality remained unchanged. This test can also break after doing some refactoring - giving you a false negative. All this test cares about is the test id which mean this test could fail even if the component still returns a loading spinner with a correct text (what&#39;s visible to the user).&lt;/p&gt;
&lt;h3 id=&quot;such-tests-do-more-harm-than-good&quot; tabindex=&quot;-1&quot;&gt;Such tests do more harm than good &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/enzyme-encourages-bad-testing-practices/#such-tests-do-more-harm-than-good&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;What&#39;s the point of writing tests in a way that doesn&#39;t give you confidence the application still works as expected?&lt;/p&gt;
&lt;p&gt;All you&#39;re doing is giving yourself a false sense of security and creating more work whenever you need to make a change.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Just hit publish</title>
		<link href="https://petermakowski.io/posts/just-hit-publish/"/>
		<updated>2022-06-09T22:00:00Z</updated>
		<id>https://petermakowski.io/posts/just-hit-publish/</id>
		<content type="html">&lt;p&gt;Some time ago I&#39;ve set myself a goal of publishing 2 blog posts a month. I was hoping that writing more often would help me become more comfortable sharing my opinions publicly and allow to flesh out my ideas.&lt;/p&gt;
&lt;p&gt;I failed at reaching that goal. I haven&#39;t published anything in months, in fact.&lt;/p&gt;
&lt;p&gt;That&#39;s why I decided to hit publish on something raw and unfinished. That&#39;s the most I can do today. And that&#39;s okay. For someone that constantly questions the point and validity of every attempt to say anything publicly it could be considered an achievement in an of itself.&lt;/p&gt;
&lt;p&gt;And that&#39;s why I feel proud I&#39;ve hit publish today.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Quick introduction to Testing Library queries</title>
		<link href="https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/"/>
		<updated>2022-02-27T00:00:00Z</updated>
		<id>https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://testing-library.com/&quot;&gt;Testing Library&lt;/a&gt; queries can be a little confusing at first. This guide should help you get started writing tests without having to know all intricacies of different queries.&lt;/p&gt;
&lt;h2 id=&quot;which-query-should-i-use&quot; tabindex=&quot;-1&quot;&gt;Which query should I use? &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#which-query-should-i-use&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It&#39;s best to query elements by their semantic role and name&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#fn1&quot; id=&quot;fnref1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;. Query by text only if the element you&#39;re looking for has no semantic role.&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Save&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;❌ &lt;span class=&quot;token function&quot;&gt;getByText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Save&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;✅ &lt;span class=&quot;token function&quot;&gt;getByRole&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Save&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;looking-for-a-single-element&quot; tabindex=&quot;-1&quot;&gt;Looking for a single element? &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#looking-for-a-single-element&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;use &lt;code&gt;getByRole&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;looking-for-multiple-elements&quot; tabindex=&quot;-1&quot;&gt;Looking for multiple elements? &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#looking-for-multiple-elements&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;use &lt;code&gt;getAllByRole&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;testing-that-something-doesn&#39;t-exist&quot; tabindex=&quot;-1&quot;&gt;Testing that something doesn’t exist? &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#testing-that-something-doesn&#39;t-exist&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;use &lt;code&gt;queryByRole&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;testing-library-queries-in-more-depth&quot; tabindex=&quot;-1&quot;&gt;Testing Library queries in more depth &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#testing-library-queries-in-more-depth&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you&#39;re interested in knowing more about the queries it&#39;s useful to know how their names are constructed.&lt;/p&gt;
&lt;p&gt;You can divide all queries into 2 main categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;get&lt;/code&gt;&lt;/strong&gt; - throw an error when no match is found&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;query&lt;/code&gt;&lt;/strong&gt; - don&#39;t throw an error when no match is found (useful when you expect something &lt;strong&gt;not to be&lt;/strong&gt; on the screen)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The categories above can be divided further into 2 subcategories:&lt;/p&gt;
&lt;h3 id=&quot;single-element-queries&quot; tabindex=&quot;-1&quot;&gt;Single element queries &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#single-element-queries&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;getBy&lt;/code&gt;, &lt;code&gt;queryBy&lt;/code&gt;, &lt;code&gt;findBy&lt;/code&gt;&lt;br /&gt;
&lt;strong&gt;throw an error&lt;/strong&gt; when more than 1 match is found&lt;/p&gt;
&lt;h3 id=&quot;multiple-elements-queries&quot; tabindex=&quot;-1&quot;&gt;Multiple elements queries &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#multiple-elements-queries&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;getAllBy&lt;/code&gt;, &lt;code&gt;queryAllBy&lt;/code&gt;, &lt;code&gt;findAllBy&lt;/code&gt;&lt;br /&gt;
&lt;strong&gt;do not throw an error&lt;/strong&gt; when more than 1 match is found&lt;/p&gt;
&lt;p&gt;Finally, the above can be combined with&lt;br /&gt;
&lt;code&gt;role&lt;/code&gt;, &lt;code&gt;text&lt;/code&gt;, &lt;code&gt;labelText&lt;/code&gt;, &lt;code&gt;placeholderText&lt;/code&gt; to construct an actual query.&lt;/p&gt;
&lt;h2 id=&quot;testing-user-interactions&quot; tabindex=&quot;-1&quot;&gt;Testing user interactions &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#testing-user-interactions&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It&#39;s best to use &lt;code&gt;@testing-library/user-event&lt;/code&gt;, a companion library that provides advanced simulation of browser interactions.&lt;/p&gt;
&lt;p&gt;The 3 &lt;code&gt;user-event&lt;/code&gt; methods below are really all you need&lt;br /&gt;
(most of the time):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;click&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;selectOptions&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr class=&quot;footnotes-sep&quot; /&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn1&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;By default, many semantic elements in HTML have a role; for example, &lt;code&gt;&amp;lt;input type=&amp;quot;radio&amp;quot;&amp;gt;&lt;/code&gt; has the &amp;quot;radio&amp;quot; role. You can check an element&#39;s role by opening developer tools and accessibility properties. More on this in &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques#roles&quot;&gt;Using ARIA: Roles | MDN&lt;/a&gt; &lt;a href=&quot;https://petermakowski.io/posts/quick-introduction-to-testing-library-queries/#fnref1&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content>
	</entry>
	
	<entry>
		<title>Blog post ideas</title>
		<link href="https://petermakowski.io/posts/blog-post-ideas/"/>
		<updated>2022-02-02T00:00:00Z</updated>
		<id>https://petermakowski.io/posts/blog-post-ideas/</id>
		<content type="html">&lt;p&gt;This is going to be a dynamic post, more of a note to self really, which I will keep updating.&lt;/p&gt;
&lt;h2 id=&quot;web-development-related&quot; tabindex=&quot;-1&quot;&gt;Web-development - related &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/blog-post-ideas/#web-development-related&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;User-centric testing with Testing Library&lt;/li&gt;
&lt;li&gt;New year new blog system - how and why I replaced gatsby with 11ty&lt;/li&gt;
&lt;li&gt;How I made MAAS UI navigation more accessible&lt;/li&gt;
&lt;li&gt;Code review best practices&lt;/li&gt;
&lt;li&gt;How to test websites accessibility with a screen reader (VoiceOver)&lt;/li&gt;
&lt;li&gt;How to improve accessibility score of your website in 5 minutes&lt;/li&gt;
&lt;li&gt;Building X with Web Audio API&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;personal-development&quot; tabindex=&quot;-1&quot;&gt;Personal development &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/blog-post-ideas/#personal-development&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;How to deal with the imposter syndrome&lt;/li&gt;
&lt;li&gt;How to improve your motivation - on negative and positive motivation, nature of satisfaction&lt;/li&gt;
&lt;li&gt;How my dog made me a better developer&lt;/li&gt;
&lt;li&gt;On the importance of downtime&lt;/li&gt;
&lt;li&gt;Learning to let go (when to say it&#39;s okay to abandon a project/goal)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;on-the-edge-of-psychologyphilosophy&quot; tabindex=&quot;-1&quot;&gt;On the edge of psychology/philosophy &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/blog-post-ideas/#on-the-edge-of-psychologyphilosophy&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Philosophy/ethics for developers&lt;/li&gt;
&lt;li&gt;Summary of my presentation on personality&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;random-thoughts&quot; tabindex=&quot;-1&quot;&gt;Random thoughts &lt;a class=&quot;direct-link&quot; href=&quot;https://petermakowski.io/posts/blog-post-ideas/#random-thoughts&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;How to pick your dog&#39;s name&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Idea stolen from &lt;a href=&quot;https://robinwinslow.uk/blog-ideas&quot;&gt;Robin&#39;s blog&lt;/a&gt;. Thanks Robin!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>How I built a musical instrument controlled via hand-tracking running in a browser in 24 hours</title>
		<link href="https://petermakowski.io/posts/bighack/"/>
		<updated>2020-06-15T00:00:00Z</updated>
		<id>https://petermakowski.io/posts/bighack/</id>
		<content type="html">&lt;p&gt;Do you know that feeling of overwhelm just before starting a challenging project followed by urge to procastrinate? I do, too. That&#39;s a place I found myself in when I nearly gave up the day before &lt;a href=&quot;https://twitter.com/TotallyMoney/status/1271097009630523397&quot;&gt;TotallyMoney Big Hack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&#39;ve never participated in a Hackaton before. Wasn&#39;t sure what to expect. I don&#39;t need to give myself even more work, I need a break from coding, I thought. I thought it&#39;s going to be lots of effort with little reward. How much, in fact, can you do in 24 hours? Not enough for it to be worthwile, I thought. I couldn&#39;t have been more wrong.&lt;/p&gt;
&lt;p&gt;Let me start from the beginning. Given my musical background and that I work as a Front End Engineer I decided to build something with Web Audio API. Building a synthesiser from scratch seemed exciting. Initially it was meant to be a one-man job, but soon after I announced my idea, 2 colleagues joined in. Idea evolved to building a synthesiser with a &lt;a href=&quot;https://en.wikipedia.org/wiki/Music_sequencer&quot;&gt;step sequencer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://petermakowski.io/img/totallysynth.jpg&quot; alt=&quot;Screenshot of TotallySynth&quot; /&gt;&lt;/p&gt;
&lt;p&gt;We started by discussing what approach we want to take, decided to use a combination of TypeScript and JavaScript and a simple 2-dimensional array to hold the state of the step sequencer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A piece advice for anyone participating in a hackathon: TS can initially slow you down, not a good thing for a project to be built within 24 hours.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&#39;m at my best when I work alone, but this was a good reminder of how energising, and stimulating working closely together on an exciting project with other devs can be. One of my front-end colleagues at work shared a video inspired by &lt;a href=&quot;https://en.wikipedia.org/wiki/Theremin&quot;&gt;Theremin&lt;/a&gt; (musical instrument played without without physical contact) saying that these are his expectations for this project. I&#39;m sure this was partly a joke, but I thought of it as a challenge.&lt;/p&gt;
&lt;p&gt;That made me think, surely, in the age of machine learning, it can&#39;t be that difficult to track user&#39;s hand with a webcam and then translate that position to some sort of an input for the synthesiser?&lt;/p&gt;
&lt;p&gt;Well, it appeared that there already was a library for prototyping real-time hand detection in the browser (&lt;a href=&quot;https://github.com/victordibia/handtrack.js/&quot;&gt;handtrack.js&lt;/a&gt;) making this task pretty straight-forward. Having already built core audio functionality for the step sequencer it was easy to plug it into it, and there you go, you&#39;ve not only got a step sequencer, but also a theremin that you can play right in your browser!&lt;/p&gt;
&lt;p&gt;You can try it here: &lt;a href=&quot;https://www.thebighack.net/totally-synth/&quot;&gt;TotallySynth&lt;/a&gt;.&lt;br /&gt;
&lt;a href=&quot;https://github.com/totallymoney/totally-synth&quot;&gt;TotallySynth on Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Just be careful with volume when using headphones! Also it&#39;s pretty buggy - it was built in a day, after all!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Hack Day happened to be one of the most exciting moments of my career as an Engineer recently. It reignited my passion for coding and reminded me of the value of human connection at work. If you&#39;re wondering if you should participate in one, just do it. Maybe it won&#39;t change your life, but might give you the reason to finally write that first blog post that you&#39;ve been wanting to write for months.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://petermakowski.io/img/big-hack-congrats.jpg&quot; alt=&quot;Card with printed text: To Peter For winning the Best Overall hack at the Big Hack 2020, with many congratulations! Thanks very much for your effort, TotallyMoney.&quot; /&gt;&lt;/p&gt;
</content>
	</entry>
</feed>
