<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Pietari Heino&#039;s personal website</title>
	<atom:link href="https://www.extreg.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.extreg.com/</link>
	<description></description>
	<lastBuildDate>Sat, 01 Jun 2019 15:03:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.10</generator>
<site xmlns="com-wordpress:feed-additions:1">99365322</site>	<item>
		<title>The XY problem</title>
		<link>https://www.extreg.com/blog/2019/06/the-xy-problem/</link>
					<comments>https://www.extreg.com/blog/2019/06/the-xy-problem/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sat, 01 Jun 2019 15:02:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xy problem]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=482</guid>

					<description><![CDATA[<p>Since I just re-discovered the more than brillian xyproblem.info, I&#8217;m posting it here for my future self. Reading through the small page always brings me lots of joy. This is a serious, real thing. I&#8217;ve wasted countless hours of my life dealing with the XY problem. And be aware: this is NOT only a thing ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2019/06/the-xy-problem/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/06/the-xy-problem/">The XY problem</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Since I just re-discovered the more than brillian xyproblem.info, I&#8217;m posting it here for my future self. Reading through the small page always brings me lots of joy.</p>



<p>This is a serious, real thing. I&#8217;ve wasted countless hours of my life dealing with the XY problem. <strong>And be aware</strong>: this is NOT only a thing of the engineering world, this is everywhere. I&#8217;m almost completely sure that this is one of those things that upon reading about it, seeing the phenomenon in a few paragraphs of text, you&#8217;ll start to notice it every once in a while.</p>



<p>For your pleasure, please check out <a href="http://xyproblem.info/">xyproblem.info</a>.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/06/the-xy-problem/">The XY problem</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2019/06/the-xy-problem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">482</post-id>	</item>
		<item>
		<title>}{{} vs. {}{}</title>
		<link>https://www.extreg.com/blog/2019/04/vs/</link>
					<comments>https://www.extreg.com/blog/2019/04/vs/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Wed, 24 Apr 2019 07:26:27 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=462</guid>

					<description><![CDATA[<p>I would like to note that one of these is a palindrome and one is not. This discovery is not my own, but I find it most delightful.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/04/vs/">}{{} vs. {}{}</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I would like to note that one of these is a palindrome and one is not.</p>



<p>This discovery is not my own, but I find it most delightful.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/04/vs/">}{{} vs. {}{}</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2019/04/vs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">462</post-id>	</item>
		<item>
		<title>Testing React HOC&#8217;s private logic</title>
		<link>https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/</link>
					<comments>https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sun, 14 Apr 2019 13:34:14 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[material-ui]]></category>
		<category><![CDATA[react]]></category>
		<category><![CDATA[react hoc]]></category>
		<category><![CDATA[withstyles]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=447</guid>

					<description><![CDATA[<p>I had a problem with higher-order components, their use of even higher-order components, passing styles from the component-to-be-wrapped to the HOC, and testing of the bare/naked/base HOC without involving the wrapped component. In this post I shortly present the solution my colleague and I found to be working quite nicely (I expect you know all ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/">Testing React HOC&#8217;s private logic</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I had a problem with higher-order components, their use of even higher-order components, passing styles from the component-to-be-wrapped to the HOC, and testing of the bare/naked/base HOC without involving the wrapped component. In this post I shortly present the solution my colleague and I found to be working quite nicely (I expect you know all the terms/names used in this post). What I wanted:</p>



<ul><li>Create a higher-order component (WithBaseEditor) that has its own styles (using withStyles from material-ui/JSS)</li><li>Be able to override styles in the HOC from the wrapped component (ImageEditor/VideoEditor/ArticleEditor) </li><li>Be able to easily test the HOC methods separated from the wrapped component</li></ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
// BaseEditor.js
const baseEditorStyles = {...};

const WithBaseEditor = (Component, options = {}, overrideStyles = {}) =&gt; {
  class BaseEditor extends React.Component {
    ...
    baseEditorMethod() {} // this is &quot;private&quot;
    mutualMethod() {}
    ...
    render() {
      return (
      // some mutual jsx for layout
        &lt;Component
          mutualMethod={this.mutualMethod}
        /&gt;
      );
    }
  }
  
  const enhanced = withStyles(overrideStyles)(withStyles(baseEditorStyles)(BaseEditor));

  enhanced.__Naked = BaseEditor;

  return enhanced;
};

export default WithBaseEditor;


// ImageEditor.js
import WithBaseEditor from 'BaseEditor';

const styles = {...};
class ImageEditor extends React.Component {...}

export default WithBaseEditor(withStyles(styles)(ImageEditor), options, styleConfig);
</pre></div>


<p>What happens in the code:<br>Create a HOC called WithBaseEditor that is implemented as a function that takes a component, some options, and styles. In the function body create a new class extending React.Component that implements what I call a BaseEditor that has got some private logic and some mutual logic. Private logic is never to be passed down to the component that is being wrapped whereas mutual logic is passed explicitly in the props. In order to use isolated styles for the BaseEditor, they&#8217;re defined in the HOC&#8217;s own file. In order to have some styling in the BaseEditor to be overwritten with customised styles &#8220;coming from&#8221; the wrapped component, they&#8217;re passed into the HOC function. What the HOC returns, finally, is BaseEditor, that is first wrapped with its own isolated styles defined in the same file and then re-wrapped with the styles passed in from the caller of the HOC. This way, the wrapped component, ImageEditor, can define its own styles and some styles that it wants to overwrite in the BaseEditor, and just call the HOC with carefully chosen arguments.</p>



<p>What&#8217;s that with the __Naked = BaseEditor?<br>Immediately before returning the enhanced component the actual BaseEditor class is injected into the returned component. This way BaseEditor is available bare/naked/whatever when you want to test it without involving wrapped component logic. You just pass in some dummy wrapped component and write the tests for the BaseEditor&#8217;s private methods.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/">Testing React HOC&#8217;s private logic</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2019/04/testing-react-hocs-private-logic/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">447</post-id>	</item>
		<item>
		<title>Read this for a nice view of the 5G landscape in 2019</title>
		<link>https://www.extreg.com/blog/2018/12/read-this-for-a-nice-view-of-the-5g-landscape-in-2019/</link>
					<comments>https://www.extreg.com/blog/2018/12/read-this-for-a-nice-view-of-the-5g-landscape-in-2019/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sat, 15 Dec 2018 21:07:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=405</guid>

					<description><![CDATA[<p>What&#8217;s up with the new SoCs (or not-so-SoCs, hehe), what will you get, is it really worth it, does it matter. What the heck. Just read it. Very good. https://arstechnica.com/gadgets/2018/12/dont-buy-a-5g-smartphone-at-least-not-for-a-while/</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/12/read-this-for-a-nice-view-of-the-5g-landscape-in-2019/">Read this for a nice view of the 5G landscape in 2019</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>What&#8217;s up with the new SoCs (or not-so-SoCs, hehe), what will you get, is it really worth it, does it matter. What the heck. Just read it. Very good.</p>
<p><a href="https://arstechnica.com/gadgets/2018/12/dont-buy-a-5g-smartphone-at-least-not-for-a-while/">https://arstechnica.com/gadgets/2018/12/dont-buy-a-5g-smartphone-at-least-not-for-a-while/</a></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/12/read-this-for-a-nice-view-of-the-5g-landscape-in-2019/">Read this for a nice view of the 5G landscape in 2019</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/12/read-this-for-a-nice-view-of-the-5g-landscape-in-2019/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">405</post-id>	</item>
		<item>
		<title>Paranoid Optimist</title>
		<link>https://www.extreg.com/blog/2018/10/paranoid-optimist/</link>
					<comments>https://www.extreg.com/blog/2018/10/paranoid-optimist/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sun, 28 Oct 2018 11:05:09 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[paranoid optimist]]></category>
		<category><![CDATA[risto siilasmaa]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=379</guid>

					<description><![CDATA[<p>I really recommend Paranoid Optimist by Risto Siilasmaa. It has got some very good insights on Nokia&#8217;s transformation from the smartphone market leader to Symbian&#8217;s destruction partly through iPhone and new world ignorance, Windows Phone deal with Microsoft, rising from the ashes and finally the transformation to a more or less new company providing not ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2018/10/paranoid-optimist/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/10/paranoid-optimist/">Paranoid Optimist</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" class="wp-image-380 aligncenter" src="https://www.extreg.com/wp-content/uploads/2018/10/Transforming-Nokia-839x1024.png" alt="Transforming Nokia by Risto Siilasmaa" width="281" height="343" />I really recommend Paranoid Optimist by Risto Siilasmaa. It has got some very good insights on Nokia&#8217;s transformation from the smartphone market leader to Symbian&#8217;s destruction partly through iPhone and new world ignorance, Windows Phone deal with Microsoft, rising from the ashes and finally the transformation to a more or less new company providing not only radio tech but also network systems for the big iron companies. You would be surprised to know that Symbian&#8217;s complete compilation with all the necessary bits and pieces of the platform took two weeks and how and why Meego was shutdown. The book clearly tells what went wrong in the management inside the company and in the board meetings, what sort of problems the employees and their foremen had in communicattion, how Windows Phone was actually the best option, and that Stephen Elop was most definitely not a Trojan horse. Also a lot of interesting details about the forces at play in the phone business are covered, and how big international companies deal with tough situations and negotiate deals and so on. <strong>There really is something interesting to learn for everyone </strong>from multiple perspectives.</p>
<p>When I was finishing the second part of the book I decided to write a short word on it on my blog. I started to feel that the book is actually too thin on material: it is not a complete story of Nokia from the beginning to the ALu merger but it is not only a business book either (at least in my opinion). I&#8217;m not sure what I expected but I started to feel that it&#8217;s a mixed bag in some way, not being able to clearly articulate my feelings. Now after finishing the book, I looked at the title and remembered that it actually is <em><strong>Transforming Nokia: The Power of Paranoid Optimism to Lead Through Colossal Change</strong>. </em>I then realised that it is <strong><em>the </em>perfect</strong> title for the book, it says it all. This is Nokia&#8217;s transformation told by Risto Siilasmaa with not only the story itself but filled with business and decision making bullets and ideas and whatnot – the Paranoid Optimism that he developed.</p>
<p>It is a very good and interesting book, I really did enjoy reading it.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/10/paranoid-optimist/">Paranoid Optimist</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/10/paranoid-optimist/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">379</post-id>	</item>
		<item>
		<title>TabJump Chrome extension updates</title>
		<link>https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/</link>
					<comments>https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sun, 16 Sep 2018 17:41:51 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[chrome extension]]></category>
		<category><![CDATA[tabjump]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=360</guid>

					<description><![CDATA[<p>I&#8217;ve updated my TabJump Chrome extension, which lets you easily search through your open tabs from any windows, and jump into them. A longer explanation of the ideas and functionality of the extension may be found from my first blog posting about it, here. This time around I&#8217;ve changed the core functionality of the extension to make ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/">TabJump Chrome extension updates</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" class=" wp-image-361 aligncenter" src="https://www.extreg.com/wp-content/uploads/2018/09/tabjump-chrome-extension.png" alt="" width="582" height="313" srcset="https://www.extreg.com/wp-content/uploads/2018/09/tabjump-chrome-extension.png 775w, https://www.extreg.com/wp-content/uploads/2018/09/tabjump-chrome-extension-300x161.png 300w, https://www.extreg.com/wp-content/uploads/2018/09/tabjump-chrome-extension-768x413.png 768w" sizes="(max-width: 582px) 100vw, 582px" /></p>
<p>I&#8217;ve updated my TabJump Chrome extension, which lets you easily search through your open tabs from any windows, and <em>jump </em>into them. A longer explanation of the ideas and functionality of the extension may be found from my first blog posting about it, <a href="https://www.extreg.com/blog/2017/11/introducing-tabjump-chrome-extension-jump-tabs/">here</a>.</p>
<p>This time around I&#8217;ve changed the core functionality of the extension to make it work more reliably and to enable better end-user customization. Now the extension&#8217;s UI is not drawn on top of the current page but instead it utilizes the usual popup container functionality of web extensions. It&#8217;s also possible to open it on a separate page, and when doing so, it is aware of its previous appearances and instead of spawning a multitude of TabJump tabs it always focuses on the living one.</p>
<p>The only missing feature as of now is history search. When you open up the search and try to find something that doesn&#8217;t exist as a tab on the machine, you need to close the extension, focus the URL bar, and type it in in there. This is of course not-optimal and a pain in the ass. The extension should do two things in a case of a missing match: first, suggest from your history and enable creation of a new tab based on user selection, and second, let you type any URL and hit enter to just get there.</p>
<p>The code is still very experimental and badly organized because of the experimental nature of the development (getting to know the web extension inner workings), and as such, not available anywhere. Also, some bugs might be hiding in the source. If you&#8217;d like to try out the extension, you can access it from <a href="https://chrome.google.com/webstore/detail/tabjump/llgdignfpbanaeejhiilkipocphhgcbl">this public link</a>. When you install it, make sure you open Chrome&#8217;s extension shortcuts and map the two functions to some keys (my mappings are: CTRL+, opens the popup while CTRL+. opens the single tab view).</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/">TabJump Chrome extension updates</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/09/tabjump-chrome-extension-updates/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">360</post-id>	</item>
		<item>
		<title>Center current window in KDE Plasma</title>
		<link>https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/</link>
					<comments>https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sun, 29 Jul 2018 10:48:03 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[center window]]></category>
		<category><![CDATA[kde plasma]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[kwin]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=336</guid>

					<description><![CDATA[<p>I&#8217;ve got a nice Samsung 27&#8243; 2K monitor at my home office. The one and only pain I have got with the resolution and size of the monitor is that most programs don&#8217;t need that much of horizontal space and become mostly useless and horrible to use. For instance your web browser very rarely needs ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/">Center current window in KDE Plasma</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve got a nice Samsung 27&#8243; 2K monitor at my home office. The one and only pain I have got with the resolution and size of the monitor is that most programs don&#8217;t need that much of horizontal space and become mostly useless and horrible to use. For instance your web browser very rarely needs to be that wide if you&#8217;re not staring at a dashboard or a video or something. Usually I want the browser to be a little more than half of the width of the screen and in the center if I&#8217;m doing web surfing etc.</p>
<p>KDE Plasma 5.12 doesn&#8217;t come with the required functionality to get the window resized to half of the screen and positioned in the center so I needed to dig in to KWin scripting and do it myself. I now have three shortcuts that let me:</p>
<ol>
<li>resize the current window to 1/2 of screen width and center it</li>
<li>grow it horizontally by 40 px</li>
<li>shrink it horizontally by 40 px</li>
</ol>
<p>This is super useful – one button to get the size where it functions nicely 99 % of time and then a few pushes more to grow/shrink it if needed.</p>
<p>You may find my KWin script as a git repository that may be installed into your Plasma system with one command <a href="https://github.com/piehei/kde-plasma-center-window">right here over at Github</a>. The script itself is very simple and might even give you nice pointers on how to achieve something similar with the KWin&#8217;s scripting facilities. More details on KWin scripting (and Plasma UI manipulation) may be found from <a href="https://techbase.kde.org/Development/Tutorials/KWin/Scripting">the official documentation</a>.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/">Center current window in KDE Plasma</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/07/center-current-window-in-kde-plasma/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">336</post-id>	</item>
		<item>
		<title>Using D3 and Puppeteer to generate visualizations</title>
		<link>https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/</link>
					<comments>https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/#comments</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Sun, 08 Apr 2018 10:37:19 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[d3]]></category>
		<category><![CDATA[puppeteer]]></category>
		<category><![CDATA[springer]]></category>
		<category><![CDATA[visualization]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=310</guid>

					<description><![CDATA[<p>While working on a book chapter called Criterion-based grading, agile goals, and course (un)completion strategies (with Ihantola, Isohanni &#38; Mikkonen) for a new Springer book that concentrates on agile learning strategies etc. we needed to generate lots of visualizations. The visualizations were supposed to show the completion paths of different students for the first programming course at ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/">Using D3 and Puppeteer to generate visualizations</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><div id="attachment_311" style="width: 970px" class="wp-caption alignright"><img aria-describedby="caption-attachment-311" loading="lazy" class="size-full wp-image-311" src="https://www.extreg.com/wp-content/uploads/2018/04/d3_vis.png" alt="" width="960" height="540" srcset="https://www.extreg.com/wp-content/uploads/2018/04/d3_vis.png 960w, https://www.extreg.com/wp-content/uploads/2018/04/d3_vis-300x169.png 300w, https://www.extreg.com/wp-content/uploads/2018/04/d3_vis-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /><p id="caption-attachment-311" class="wp-caption-text">Criterion-based grading, agile goals, and course (un)completion strategies: a visualization of a student&#8217;s learning path on TUT Programming 1 course. The Y-axis shows different automatically assessed programming tasks and the X-axisshows the rounds of the course (mapping to weeks on a semester). Colored balls are completed (the student&#8217;s solution passed the tests). Different colors represent different categories/levels of the tasks.</p></div></p>
<p>While working on a book chapter called <em>Criterion-based grading, agile goals, and course (un)completion strategies </em>(with Ihantola, Isohanni &amp; Mikkonen) for a new Springer book that concentrates on agile learning strategies etc. we needed to generate lots of visualizations. The visualizations were supposed to show the completion paths of different students for the first programming course at Tampere University of Technology.</p>
<p>I took on the task and chose Python for scripting to digest all the data and transform it to a suitable format, D3.js for generating the actual visualizations, and Puppeteer to handle the generation and PNG saving of ~1000 visualizations.</p>
<p>The visualizations turned out pretty nice and the workflow was good. After nailing down the Python data digestion and what we even wanted from it, I played a ton with D3 and came up with a nice looking visualization. After we all agreed on how the thing should look like I used a simple Puppeteer script to turn everything into a nice directory hierarchy of lots of PNGs. I was happy that each of the steps were self-contained and didn&#8217;t depend on any of the other steps. My initial data was in CSV format and I used Python to go through it and dig out the needed bits and pieces. I made a simple visualization.html that contained all HTML, CSS, and JavaScript to display a single visualization, nothing more. I ran Python&#8217;s SimpleHTTPServer to serve the page on my localhost and to play with it until it looked nice. In the end I had a very simple Node.JS script that started Puppeteer which uses Headless Chrome browser in the background to do all sorts of webpage manipulation; Puppeteer went over every student&#8217;s data and loaded the visualization.html for all of them and turned to page into a PNG file.</p>
<p>I could have gone for all Python solution but I hadn&#8217;t had any reason to use Puppeteer before so this was a nice thing to tryout. Also, I had some experience from D3.js so it was much easier to come up with the visualization code using the library and the web instead of some Python plotting library or whatnot. We were happy with the results.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/">Using D3 and Puppeteer to generate visualizations</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/04/using-d3-and-puppeteer-to-generate-visualizations/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">310</post-id>	</item>
		<item>
		<title>Lazy loading the Vue root component</title>
		<link>https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/</link>
					<comments>https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Wed, 21 Feb 2018 07:07:07 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[lazy load]]></category>
		<category><![CDATA[vue]]></category>
		<category><![CDATA[vue root component]]></category>
		<category><![CDATA[webpack]]></category>
		<guid isPermaLink="false">https://www.extreg.com/?p=296</guid>

					<description><![CDATA[<p>Webpack and Vue together make it possible to split your bundle in chunks and lazy load only the actually needed chunks. Usually one chunk is one view, one component, or one of any encapsulated bunch of only optionally shown piece of content, a software component. This, of course, means that the client makes fewer requests ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/">Lazy loading the Vue root component</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Webpack and Vue together make it possible to split your bundle in chunks and lazy load only the actually needed chunks. Usually one chunk is one view, one component, or one of any encapsulated bunch of only optionally shown piece of content, a software component. This, of course, means that the client makes fewer requests to the server, transfers fewer kb over the network, and parses, compiles and evals fewer lines of JavaScript etc. Huge win.</p>
<p>I&#8217;ve been using this pattern with <a href="https://nyssetutka.fi">Nyssetutka.fi</a> for quite a some time. The client loads more or less the minimum needed JS payload in order to get the UI going as fast as possible and then conditionally more if the user navigates to some specific views. This isn&#8217;t the complete truth and there are a couple of things I could do to make the initial payload even smaller but the gist of it is that not everything is loaded at once in the beginning.</p>
<p>The other day I 15 minutes of hard time googling around along the lines of the title of this blog posting. How would one lazy load the root component of a Vue application? Couldn&#8217;t find the answer anywhere so here it is:</p>
<pre class="brush: jscript; title: ; notranslate">
const rootComp = () =&gt; import('./components/rootComp.vue');

new Vue({
  el: &quot;#app-container&quot;,
  render: h =&gt; h(rootComp)
})
</pre>
<p>Now that I know the answer&#8230; it&#8217;s completely clear and logical that this is the way to do it. It&#8217;s the completely same syntax you would use for any other component lazy loading but here you just use it for the root component. But even if it&#8217;s kinda implicit that this is the way, the official Vue documentation nor any of the Vue lazy loading blog postings out there mention it. So here it is if someone else is looking for the info.</p>
<p><strong>When could this be useful?</strong> The answer is not so clear if you compare it to lazy loading <em>just </em>normal components. They&#8217;re normal components not needed at the initialization of the app, right, but why would you lazy load the root, eh? If your app has multiple Vue instances and you don&#8217;t need them all either at the beginning or at all. In my case the app implements a notification popup telling about new updates and improvements to the site. The popup was easy to implement as a completely separate component used only by a separate Vue instance sharing the same Vuex store with the main app. So this was the way to do it – the popup itself is shown only to a small number of visitors, conditionally, and only once.</p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/">Lazy loading the Vue root component</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2018/02/lazy-loading-vue-root-component/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">296</post-id>	</item>
		<item>
		<title>Android battery life: Pixel 2 and Oreo (8.1) nail it</title>
		<link>https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/</link>
					<comments>https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/#respond</comments>
		
		<dc:creator><![CDATA[Pietari]]></dc:creator>
		<pubDate>Mon, 11 Dec 2017 00:04:47 +0000</pubDate>
				<category><![CDATA[random]]></category>
		<category><![CDATA[android battery life]]></category>
		<category><![CDATA[android oreo]]></category>
		<category><![CDATA[pixel 2]]></category>
		<guid isPermaLink="false">https://extreg.com/?p=270</guid>

					<description><![CDATA[<p>Android is the mobile operating system for me. It has been for quite a many years. I especially love the vanilla experience and have been a proud owner of Nexus 4, Nexus 5, Nexus 5X, Pixel and now Pixel 2. I’ve also had a couple of devices from HTC and Samsung. I love having the ... <span class="more"><a class="more-link" href="https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/">[Read more...]</a></span></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/">Android battery life: Pixel 2 and Oreo (8.1) nail it</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Android is the mobile operating system for me. It has been for quite a many years. I especially love the vanilla experience and have been a proud owner of Nexus 4, Nexus 5, Nexus 5X, Pixel and now Pixel 2. I’ve also had a couple of devices from HTC and Samsung. I love having the latest and greatest from Google and am happy to pay the big price of the last two generations of Google-made phones in order to get the vanilla experience, fast updates, and the most optimized hw-sw combo there is.</p>
<p>One thing that has *always* bothered me is battery life. No matter what phone I’ve been using the battery life has never been good. Doesn&#8217;t matter what sort of battery saving strategies I&#8217;ve been using (builtin, limiting services/apps etc.) or what resources the apps have been able to use, the juice has always run out surprisingly easily. At the same time some people around me have had *vastly* better experiences on their iDevices. That has sucked a big time.</p>
<p>This has now changed. Pixel 2 and the latest and greatest of the Google&#8217;s mobile OS deliver. I don&#8217;t have any numbers to share and am not interested in checking them up from the system stats since everything&#8217;s subjective and one person&#8217;s usage habits very rarely match anyone else&#8217;s. But I&#8217;m the type of user who wants to get multiple hours of screen time through various reading-this-and-that sessions, browsing the web to its bottom, and taking the phone into hand when you literally have to wait 35 seconds for the bus.</p>
<p>Pixel 2 running Oreo 8.1 has consistently delivered a <strong>MUCH BETTER</strong> battery life experience than <strong>*ANY*</strong> of my previous devices (<em>first paragraph</em>). This is not just a tad better, this is <strong>hugely better</strong>. The phone lasts so long that it has surprised me multiple times and had me over and again spontaneously praise it to my iGeeky brother. This is something totally different.</p>
<p>I really do hope this is more an advancement in the OS and not specific to the Pixel 2 hardware. If you&#8217;re interested, I really recommend to check out Ars Technica&#8217;s excellent deep-dive review of the new Google phones over <a href="https://arstechnica.com/gadgets/2017/10/pixel-2-and-2-xl-review-the-best-android-phone-you-can-buy/">here</a>. The picture below is from their review and shows the excellence – at least in what I use my phone for, web browsing and stuff, not gaming. If you&#8217;ve got some insight or speculation to this happy matter, please share!</p>
<p><img loading="lazy" class="alignright size-large wp-image-271" src="https://extreg.com/wp-content/uploads/2017/12/ars_technica_pixel2_review_battery-1024x768.jpeg" alt="" width="700" height="525" srcset="https://www.extreg.com/wp-content/uploads/2017/12/ars_technica_pixel2_review_battery-1024x768.jpeg 1024w, https://www.extreg.com/wp-content/uploads/2017/12/ars_technica_pixel2_review_battery-300x225.jpeg 300w, https://www.extreg.com/wp-content/uploads/2017/12/ars_technica_pixel2_review_battery-768x576.jpeg 768w, https://www.extreg.com/wp-content/uploads/2017/12/ars_technica_pixel2_review_battery.jpeg 1440w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>The post <a rel="nofollow" href="https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/">Android battery life: Pixel 2 and Oreo (8.1) nail it</a> appeared first on <a rel="nofollow" href="https://www.extreg.com">Pietari Heino&#039;s personal website</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.extreg.com/blog/2017/12/android-battery-life-pixel-2-oreo-8-1-nail/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">270</post-id>	</item>
	</channel>
</rss>
