<?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#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>I learned it. I share it.</title>
	<atom:link href="https://gyorgybalassy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://gyorgybalassy.wordpress.com</link>
	<description>A software engineering blog by György Balássy</description>
	<lastBuildDate>Fri, 16 Oct 2020 03:48:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<site xmlns="com-wordpress:feed-additions:1">18900174</site><cloud domain='gyorgybalassy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/3a0f654cd4a707d73c0f0ec9596c5334d472ac5271c1797c010fb85174dd0f8c?s=96&#038;d=https%3A%2F%2Fs0.wp.com%2Fi%2Fwebclip.png</url>
		<title>I learned it. I share it.</title>
		<link>https://gyorgybalassy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://gyorgybalassy.wordpress.com/osd.xml" title="I learned it. I share it." />
	<atom:link rel='hub' href='https://gyorgybalassy.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Can&#8217;t open device &#034;\\.\COM4&#034;: Access is denied error when uploading a sketch from Arduino IDE</title>
		<link>https://gyorgybalassy.wordpress.com/2020/10/16/cant-open-device-com-access-is-denied-arduino-upload/</link>
					<comments>https://gyorgybalassy.wordpress.com/2020/10/16/cant-open-device-com-access-is-denied-arduino-upload/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Fri, 16 Oct 2020 03:48:34 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[Arduino]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=844</guid>

					<description><![CDATA[I’m sure that everyone who has ever tried to upload a sketch from the Arduino IDE has seen this error message: avrdude: ser_open(): can't open device &#34;\\.\COM4&#34;: Access is denied. The number of the serial port can be different, but the error is the same. Basically (in simplified form) this error means that the USB [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I’m sure that everyone who has ever tried to upload a sketch from the Arduino IDE has seen this error message:</p>
<pre><code>avrdude: ser_open(): can't open device &quot;\\.\COM4&quot;: Access is denied.</code></pre>
<p>The number of the serial port can be different, but the error is the same. </p>
<p>Basically (in simplified form) this error means that the USB port is in use by another application in your computer, so the Arduino IDE cannot use it to upload your sketch. It is important to understand that this error has nothing to do with Arduino, the access to the serial ports are controlled by the operating system.</p>
<h3>Tip #1: Check your port in Device Manager</h3>
<p>Open <strong>Device Manager</strong> and check that your IoT device appears in the <strong>Ports (COM &amp; LPT)</strong> section. Note the number of the port (in my case <strong>COM4</strong>):</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-serial-port-in-device-manager.png"><img title="arduino-serial-port-in-device-manager" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-serial-port-in-device-manager" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-serial-port-in-device-manager_thumb.png?w=448&#038;h=572" width="448" height="572" /></a></p>
<h3>Tip #2: Check your port in the Arduino IDE</h3>
<p>Open Arduino IDE and check in the <strong>Tools –&gt; Port</strong> menu that you are trying to upload to the port you have seen in the Device Manager. The Arduino IDE is quite good to detect connected devices, but in case you have multiple devices connected at the same time this is definitely worth to check:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-selection.png"><img title="arduino-port-selection" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-port-selection" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-selection_thumb.png?w=577&#038;h=613" width="577" height="613" /></a></p>
<h3>Tip #3: Close other programs</h3>
<p>Try to close any programs that may use this port. Unfortunately I’m not aware of any tools that could list which app is locking a particular port (if you do, please share in the comments), so you have to think. Basically any app can be the culprit that communicates with devices, and unfortunately not only apps, but device drivers also. For example some Bluetooth drivers are reported to lock COM ports even before a device is connected.</p>
<p>In my experience the following apps are often causing this problem:</p>
<ul>
<li><strong>Code editors:</strong> Do you have other open Arduino IDEs, Visual Studio Code instances or apps that you use to create and upload your code open? </li>
<li><strong>Terminal monitors:</strong> Do you have a terminal monitor connected? Sometimes they are separate apps (like <a href="https://www.compuphase.com/software_termite.htm" target="_blank">Termite</a>) or built into code editors (like in Arduino IDE or in Visual Studio Code). </li>
<li><strong>Apps and drivers for other devices:</strong> Do you have other devices connected to your computer via USB or Bluetooth, e.g. a printer, a vinyl cutter or a 3D printer? </li>
</ul>
<h3>Tip #4: Rename the port</h3>
<p>If none of the above works you can rename the port, and most of the time this is what fixes the issue for me.</p>
<p>1. Open <strong>Device Manager</strong> and navigate to the <strong>Ports (COM &amp; LPT)</strong> section (see the screenshot above).</p>
<p>2. Right click your COM port and select <strong>Properties</strong>.</p>
<p>3. In the&#160; <strong>Properties </strong>window first click <strong>Change settings</strong> to switch to administrator mode, then navigate to the <strong>Port Settings</strong> tab:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-properties.png"><img title="arduino-port-properties" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-port-properties" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-properties_thumb.png?w=408&#038;h=455" width="408" height="455" /></a></p>
<p>4. In the <strong>Port Settings</strong> tab click the <strong>Advanced</strong> button:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-settings.png"><img loading="lazy" title="arduino-port-settings" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-port-settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-settings_thumb.png?w=408&#038;h=455" width="408" height="455" /></a></p>
<p>5. In the <strong>Advanced Settings</strong> window select a new <strong>COM Port Number</strong>:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-advanced-settings.png"><img loading="lazy" title="arduino-port-advanced-settings" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-port-advanced-settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-advanced-settings_thumb.png?w=550&#038;h=254" width="550" height="254" /></a></p>
<p>Click <strong>OK</strong> and close all <strong>Device Manager</strong> windows. Windows may ask you to restart your computer, but in my experience the Arduino IDE is quite smart to detect port changes immediately.</p>
<p>&#160;</p>
<p>Did this help you? What other tricks do you have when uploading a sketch fails?</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2020/10/16/cant-open-device-com-access-is-denied-arduino-upload/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">844</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-serial-port-in-device-manager_thumb.png" medium="image">
			<media:title type="html">arduino-serial-port-in-device-manager</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-selection_thumb.png" medium="image">
			<media:title type="html">arduino-port-selection</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-properties_thumb.png" medium="image">
			<media:title type="html">arduino-port-properties</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-settings_thumb.png" medium="image">
			<media:title type="html">arduino-port-settings</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-port-advanced-settings_thumb.png" medium="image">
			<media:title type="html">arduino-port-advanced-settings</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmer Is Not Responding error when uploading a sketch from Arduino IDE</title>
		<link>https://gyorgybalassy.wordpress.com/2020/10/16/arduino-programmer-is-not-responding-not-in-sync-error/</link>
					<comments>https://gyorgybalassy.wordpress.com/2020/10/16/arduino-programmer-is-not-responding-not-in-sync-error/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Fri, 16 Oct 2020 02:51:57 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[Arduino]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=831</guid>

					<description><![CDATA[I recently ordered an Arduino Nano and when I tried to upload a sketch from the Arduino IDE I received the following error: avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x9f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x9f [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I recently ordered an Arduino Nano and when I tried to upload a sketch from the Arduino IDE I received the following error:</p>
<pre>avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x9f

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x9f

...

avrdude: ser_send(): write error: sorry no info avail
Problem uploading to board. See <a href="http://www.arduino.cc/en/Guide/Troubleshooting#upload">http://www.arduino.cc/en/Guide/Troubleshooting#upload</a> for suggestions.</pre>
<p>Unfortunately the recommended page did not help. Although there are forum posts about devices that were delivered without a booloader, I definitely did not want to mess with burning it. The <a href="https://forum.arduino.cc/index.php?topic=73748.0" target="_blank">loop-back test</a> seemed to be a good idea, but in the end it turned out that the solution is very simple: selecting the <strong>ATmega328P (Old Bootloader)</strong> from the <strong>Tools –&gt; Processor</strong> menu fixed the problem:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-nano-programmer-is-not-responding-not-in-sync-fix.png"><img loading="lazy" title="arduino-nano-programmer-is-not-responding-not-in-sync-fix" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="arduino-nano-programmer-is-not-responding-not-in-sync-fix" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-nano-programmer-is-not-responding-not-in-sync-fix_thumb.png?w=550&#038;h=500" width="550" height="500" /></a></p>
<p>If this does not fix the problem for you, I recommend checking this instructable for more tips: <a title="https://www.instructables.com/A-solution-to-avrdude-stk500getsync-not-in-syn/" href="https://www.instructables.com/A-solution-to-avrdude-stk500getsync-not-in-syn/">https://www.instructables.com/A-solution-to-avrdude-stk500getsync-not-in-syn/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2020/10/16/arduino-programmer-is-not-responding-not-in-sync-error/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">831</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2020/10/arduino-nano-programmer-is-not-responding-not-in-sync-fix_thumb.png" medium="image">
			<media:title type="html">arduino-nano-programmer-is-not-responding-not-in-sync-fix</media:title>
		</media:content>
	</item>
		<item>
		<title>Surviving on Mac &#8211; Tips for Windows Users: Part 4 &#8211; Finder</title>
		<link>https://gyorgybalassy.wordpress.com/2019/05/27/mac-tips-for-windows-users-finder/</link>
					<comments>https://gyorgybalassy.wordpress.com/2019/05/27/mac-tips-for-windows-users-finder/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Mon, 27 May 2019 16:45:56 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=827</guid>

					<description><![CDATA[In previous parts of the series we’ve discussed shortcuts, applications and windows, in this episode I’m going to give you some tips about Finder, the file manager on Mac, and others. Closing Finder This will be short: don’t even try, it is not possible to close Finder 🙂 Navigating to the parent folder To navigate [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In previous parts of the series we’ve discussed <a href="https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/" target="_blank">shortcuts</a>, <a href="https://gyorgybalassy.wordpress.com/2019/04/14/mac-tips-for-windows-users-apps/" target="_blank">applications</a> and <a href="https://gyorgybalassy.wordpress.com/2019/05/12/mac-tips-for-windows-users-windows/" target="_blank">windows</a>, in this episode I’m going to give you some tips about Finder, the file manager on Mac, and others.</p>
<h2>Closing Finder</h2>
<p>This will be short: don’t even try, it is not possible to close Finder <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>Navigating to the parent folder</h2>
<p>To navigate to the parent of the current folder right-click the name of the current folder in the title of the window. A small menu will be displayed that lists all the parent folders.</p>
<p align="center"><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-parent.png"><img loading="lazy" title="mac-finder-parent" style="border-top:0;border-right:0;background-image:none;border-bottom:0;padding-top:0;padding-left:0;border-left:0;display:inline;padding-right:0;" border="0" alt="mac-finder-parent" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-parent_thumb.png?w=550&#038;h=166" width="550" height="166" /></a></p>
<h2>Showing extensions</h2>
<p>To customize Finder click the<strong> Preferences…</strong> menu item in the <strong>Finder</strong> menu, then navigate to the <strong>Advanced</strong> tab in the <strong>Finder Preferences</strong> window. To make the extensions visible enable the <strong>Show all filename extensions</strong> option.</p>
<p align="center"><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-preferences.png"><img loading="lazy" title="mac-finder-preferences" style="border-top:0;border-right:0;background-image:none;border-bottom:0;padding-top:0;padding-left:0;border-left:0;display:inline;padding-right:0;" border="0" alt="mac-finder-preferences" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-preferences_thumb.png?w=550&#038;h=543" width="550" height="543" /></a></p>
<p>You can find many other useful settings in the <strong>Finder Preferences</strong> window, for example on the <strong>General</strong> tab you can define which folder will be open by default when you launch Finder.</p>
<h2>Showing the breadcrumb</h2>
<p>The breadcrumb is called Path Bar in Finder, and you can enable it in the <strong>View</strong> menu, with the <strong>Enable Path Bar</strong> menu item (Alt+Command+P).</p>
<p>The Path Bar is displayed on the bottom of the Finder window, and you have to double-click onto the folder names to navigate to the desired folder.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-breadcrumb.png"><img loading="lazy" title="mac-finder-breadcrumb" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;margin-left:auto;border-left:0;display:block;padding-right:0;margin-right:auto;" border="0" alt="mac-finder-breadcrumb" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-breadcrumb_thumb.png?w=550&#038;h=306" width="550" height="306" /></a></p>
<h2>Showing the status bar</h2>
<p>The status bar can show very useful information, for example the number of files selected and the available free disk space. To enable it open the <strong>View</strong> menu, and click the<strong> Show Status Bar</strong> (Command+/) menu item.</p>
<h2>Showing hidden files</h2>
<p>Finder by default does not display hidden files, so any file that has a name starting with the dot character is not listed. To list the hidden files in the current Finder window you can press the <strong>Command+Shift+.</strong> (dot) shortcut, or you can use the following command in Terminal to always list the hidden files in Finder:</p>
<p><strong>defaults write com.apple.finder AppleShowAllFiles YES</strong></p>
<h2>Connecting to a Windows network share</h2>
<p>To connect to a Windows network share open the <strong>Go</strong> menu and click the<strong> Connect to Server&#8230;</strong> menu item. In the <strong>Connect to Server</strong> dialog enter the path to the network share in this format: <strong>smb://servername/foldername</strong></p>
<h2>Midnight Commander in English</h2>
<p>If you prefer Midnight Commander over Finder and use Mac with non-English regional settings you may be surprised that MC will display in your preferred language. Add the following line to your<strong> ~/.bashrc</strong> file to force English UI in Midnight Commander:</p>
<p><strong>alias mc=&#8217;LANG=en_EN.UTF-8 mc&#8217;</strong></p>
<h2>Jumping to a folder in the Terminal</h2>
<p>To jump to a folder in the Terminal without typing its full path you can use Z (<a href="https://github.com/rupa/z">https://github.com/rupa/z</a>). It learns your most frequently used folders and you can navigate to them just typing a part of their names. For installation and usage follow the steps in the <a href="https://github.com/rupa/z" target="_blank">README</a>.</p>
<p>&#160;</p>
<p>To be continued&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2019/05/27/mac-tips-for-windows-users-finder/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">827</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-parent_thumb.png" medium="image">
			<media:title type="html">mac-finder-parent</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-preferences_thumb.png" medium="image">
			<media:title type="html">mac-finder-preferences</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-finder-breadcrumb_thumb.png" medium="image">
			<media:title type="html">mac-finder-breadcrumb</media:title>
		</media:content>
	</item>
		<item>
		<title>Surviving on Mac &#8211; Tips for Windows Users: Part 3 &#8211; Windows</title>
		<link>https://gyorgybalassy.wordpress.com/2019/05/12/mac-tips-for-windows-users-windows/</link>
					<comments>https://gyorgybalassy.wordpress.com/2019/05/12/mac-tips-for-windows-users-windows/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Sun, 12 May 2019 21:48:45 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=819</guid>

					<description><![CDATA[After learning the basic shortcuts and how to start, install and uninstall applications, in this part of the series I’m going to give you some tips about managing the application windows on Mac. Finding an application window There are several ways to switch back to an application window you were using earlier: Use Command+Tab to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>After learning the basic <a href="https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/" target="_blank">shortcuts</a> and how to start, install and uninstall <a href="https://gyorgybalassy.wordpress.com/2019/04/14/mac-tips-for-windows-users-apps/" target="_blank">applications</a>, in this part of the series I’m going to give you some tips about managing the application windows on Mac.</p>
<h2>Finding an application window</h2>
<p>There are several ways to switch back to an application window you were using earlier:</p>
<ul>
<li>Use <strong>Command+Tab</strong> to navigate between the running apps.</li>
<li>Swipe up with 3 fingers to go to <strong>Mission Control</strong> that shows all non-minimized windows on the current desktop.</li>
<li>Swipe with 3 fingers to left or right to switch between desktops.</li>
<li>Look for your window on the right side of the <strong>Dock</strong>.</li>
<li>Look for your app among the status icons at the top of your screen.</li>
</ul>
<h2>Grouping windows</h2>
<p>By swiping up on the touch pad with 3 fingers you can start<strong> Mission Control</strong> which shows all your windows. To get to <strong>Mission Control</strong> using your mouse go to <strong>System Preferences</strong>, select <strong>Mouse</strong> applet and enable <strong>Mission Control</strong> on the <strong>More Gestures</strong> tab. </p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mouse-gestures.png"><img loading="lazy" title="mac-mouse-gestures" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="mac-mouse-gestures" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mouse-gestures_thumb.png?w=550&#038;h=427" width="550" height="427" /></a></p>
<p>You can force grouping of the multiple windows of the same application by enabling the <strong>Group windows by application</strong> option in the <strong>System Preferences</strong>, <strong>Mission Control</strong> dialog. </p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mission-control-preferences.png"><img loading="lazy" title="mac-mission-control-preferences" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="mac-mission-control-preferences" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mission-control-preferences_thumb.png?w=550&#038;h=446" width="550" height="446" /></a></p>
<h2>Moving the Dock</h2>
<p>You can customize the position of the <strong>Dock</strong> by clicking the <strong>Apple menu</strong>, then the<strong> System Preferences…</strong> menu item and selecting the <strong>Dock</strong> applet. </p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-dock-config.png"><img loading="lazy" title="mac-dock-config" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="mac-dock-config" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-dock-config_thumb.png?w=550&#038;h=335" width="550" height="335" /></a></p>
<p>To move the <strong>Dock</strong> between multiple monitors just move your mouse to the bottom of the desired screen and wait a few seconds – the Dock will jump to that screen.</p>
<h2>Maximizing a window</h2>
<p>You can maximize a window by double-clicking its title bar. On Mac this is called “zoom”. The window will resize itself to use as much space as possible on your desktop without hiding the <strong>Dock</strong> or the menu bar at the top of the screen. (This trick may not work with or may work differently with applications that customize their window frame, like Slack or Microsoft Word.)</p>
<p>You can also maximize a window by clicking the Green dot on the left of its title bar. This will resize the window to use your full display. Because in this mode both the <strong>Dock</strong> and the menu bar is hidden, this mode is useful if you are focusing on one application. Or you can maximize multiple apps on multiple displays, and switch between them with the 3-finger left-right swipe gesture. </p>
<p>When you switch between apps using the <strong>Command+Tab</strong> shortcut maximized windows are sliding left and right, normal windows are just moved to the foreground.</p>
<h2>Returning from full screen</h2>
<p>To restore a window that you maximized before with the green dot to non-full screen just move your mouse to the top of the window and wait until the menu bar and the window frame slides in from the top. Click the green dot again to scale the window back to normal size.</p>
<h2>Minimizing a window, so you can find it later</h2>
<p>Minimizing a window is easy: just click the <strong>Yellow dot </strong>in the application window frame or press the <strong>Command+M</strong> shortcut. But finding it to restore it can be tricky! </p>
<p>By default applications are minimizing itself to their launch icon on the <strong>Dock</strong>, so to restore their window just click on their icon on the <strong>Dock</strong> again.</p>
<p>However, by turning off the <strong>Minimise windows into application icon</strong> option among the <strong>Dock</strong> options within the <strong>System Preferences</strong> you can force the windows to minimize themselves to the right side of the <strong>Dock</strong>.</p>
<h2>Closing a window</h2>
<p>You can use the <strong>Command+W</strong> shortcut to close the current window or tab.</p>
<h2>Moving windows between displays</h2>
<p>At the moment there are no built-in shortcut to move a window to another monitor, but thankfully there are <a href="https://apple.stackexchange.com/questions/28569/is-there-a-keyboard-shortcut-to-move-a-window-from-one-monitor-to-another" target="_blank">tons of applications</a> that can do this, and even more. I use <a href="https://www.spectacleapp.com/" target="_blank">Spectacle</a>, it is free and minimal.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/spectacle.png"><img loading="lazy" title="spectacle" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="spectacle" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/spectacle_thumb.png?w=550&#038;h=442" width="550" height="442" /></a></p>
<p>&#160;</p>
<p>To be continued…</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2019/05/12/mac-tips-for-windows-users-windows/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">819</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mouse-gestures_thumb.png" medium="image">
			<media:title type="html">mac-mouse-gestures</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-mission-control-preferences_thumb.png" medium="image">
			<media:title type="html">mac-mission-control-preferences</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/mac-dock-config_thumb.png" medium="image">
			<media:title type="html">mac-dock-config</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/05/spectacle_thumb.png" medium="image">
			<media:title type="html">spectacle</media:title>
		</media:content>
	</item>
		<item>
		<title>Surviving on Mac &#8211; Tips for Windows Users: Part 2 &#8211; Applications</title>
		<link>https://gyorgybalassy.wordpress.com/2019/04/14/mac-tips-for-windows-users-apps/</link>
					<comments>https://gyorgybalassy.wordpress.com/2019/04/14/mac-tips-for-windows-users-apps/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Sun, 14 Apr 2019 19:33:07 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=809</guid>

					<description><![CDATA[In this second part of the series, I’m going to give you some tips to manage your applications on your Mac. Starting apps from Dock Dock is the name of the giant icon bar at the bottom of the screen. To start an application just click on its icon. To configure the Dock click the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this second part of the <a href="https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/" target="_blank">series</a>, I’m going to give you some tips to manage your applications on your Mac.</p>
<h2>Starting apps from Dock</h2>
<p>Dock is the name of the giant icon bar at the bottom of the screen. To start an application just click on its icon.    <br />To configure the Dock click the Apple logo on the top left corner, then click the <strong>System Preferences…</strong> menu item, and select <strong>Dock</strong> from the <strong>System Preferences</strong> dialog.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-dock-config.png"><img loading="lazy" title="mac-dock-config" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="mac-dock-config" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-dock-config_thumb.png?w=550&#038;h=335" width="550" height="335" /></a></p>
<h2>Starting apps with Spotlight</h2>
<p>You can start applications or search for basically anything by using Spotlight. Press<strong> Command+Space</strong> and start typing the name of the application.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-spotlight.png"><img loading="lazy" title="mac-spotlight" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="mac-spotlight" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-spotlight_thumb.png?w=550&#038;h=355" width="550" height="355" /></a></p>
<h2>Installing applications</h2>
<p>Mac applications are usually distributed as <strong>.dmg</strong> files without any install wizard. To install the app, double-click the <strong>.dmg</strong> file. Most apps display a dialog that asks you to drag the application’s icon and drop it to the <strong>Applications</strong> folder. That’s it.     <br />Installed applications automatically appear in the Launchpad, the full screen application launcher that you can access by clicking the rocket icon on the Dock.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-install-app.png"><img loading="lazy" title="mac-install-app" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="mac-install-app" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-install-app_thumb.png?w=550&#038;h=552" width="550" height="552" /></a></p>
<h2>Uninstall an app </h2>
<p>To uninstall an app go to the <strong>Applications</strong> folder, right click the app’s icon and click <strong>Move to Trash</strong>.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-uninstall-app.png"><img loading="lazy" title="mac-uninstall-app" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="mac-uninstall-app" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-uninstall-app_thumb.png?w=550&#038;h=254" width="550" height="254" /></a></p>
<h2>Quit from an app</h2>
<p>When you click the Red dot on the title bar of an app it is not closed, only minimized to the right side of the Dock. To quit from an app click on its name on the menu bar and click the <strong>Quit &lt;appname&gt;</strong> menu item, or use the <strong>Command+Q</strong> shortcut. Note that you cannot quit from Finder.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-quit-from-app.png"><img loading="lazy" title="mac-quit-from-app" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="mac-quit-from-app" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-quit-from-app_thumb.png?w=250&#038;h=251" width="250" height="251" /></a></p>
<h2>Switch between apps</h2>
<p>You can use the <strong>Command+Tab</strong> shortcut to navigate between the running apps. Note that the popup dialog displays every application only once, even if it is running in multiple instance or in multiple windows. When you select an app its window will not be restored if you previously minimized it to the Dock.</p>
<h2>Close a window of an app</h2>
<p>There are apps that are using multiple windows or tabs. In most apps you can use the <strong>Command+W</strong> shortcut to close the tabs or windows.</p>
<h2>Installing apps from the command line</h2>
<p><a href="https://brew.sh/" target="_blank">Homebrew</a> is the most widely used command line tool on Mac to install applications. If you don’t want to learn the numerous <a href="https://docs.brew.sh/" target="_blank">command line switches</a>, you can use <a href="https://www.cakebrew.com/" target="_blank">Cakebrew</a>, which is a simple UI for Homebrew.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-cakebrew.png"><img loading="lazy" title="mac-cakebrew" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="mac-cakebrew" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-cakebrew_thumb.png?w=550&#038;h=392" width="550" height="392" /></a></p>
<p>&#160;</p>
<p>To be continued&#8230;    </p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2019/04/14/mac-tips-for-windows-users-apps/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">809</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-dock-config_thumb.png" medium="image">
			<media:title type="html">mac-dock-config</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-spotlight_thumb.png" medium="image">
			<media:title type="html">mac-spotlight</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-install-app_thumb.png" medium="image">
			<media:title type="html">mac-install-app</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-uninstall-app_thumb.png" medium="image">
			<media:title type="html">mac-uninstall-app</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-quit-from-app_thumb.png" medium="image">
			<media:title type="html">mac-quit-from-app</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/04/mac-cakebrew_thumb.png" medium="image">
			<media:title type="html">mac-cakebrew</media:title>
		</media:content>
	</item>
		<item>
		<title>Surviving on Mac &#8211; Tips for Windows Users: Part 1 &#8211; Shortcuts</title>
		<link>https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/</link>
					<comments>https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Sun, 10 Mar 2019 21:24:49 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=791</guid>

					<description><![CDATA[So you have to work on a Mac after being a Windows user in your whole life and you can’t find anything and everything looks so unlogical? In these series I’ve collected few tips that saved my life. In this first part, let’s talk about shortcuts. Clipboard shortcuts The clipboard shortcuts on MacOS are triggered [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>So you have to work on a Mac after being a Windows user in your whole life and you can’t find anything and everything looks so unlogical? In these series I’ve collected few tips that saved my life. In this first part, let’s talk about shortcuts.</p>
<h2>Clipboard shortcuts</h2>
<p>The clipboard shortcuts on MacOS are triggered with the <strong>Command</strong> key, instead of <strong>Control</strong>, otherwise they are the same:</p>
<p>Copy: <strong>Command+C</strong></p>
<p>Cut: <strong>Command+X</strong></p>
<p>Paste: <strong>Command+V</strong></p>
<h2>Shortcut cheat sheet</h2>
<p>Media Atelier created a <a href="https://www.mediaatelier.com/CheatSheet" target="_blank" rel="noopener noreferrer">CheatSheet application</a> that displays the available shortcuts for the current app in a popup window if you press the <strong>Command</strong> button for a few seconds:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/cheatsheet-app.png"><img loading="lazy" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border:0;" title="CheatSheet-app" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/cheatsheet-app_thumb.png?w=550&#038;h=227" alt="CheatSheet-app" width="550" height="227" border="0" /></a></p>
<p>It is very handy to learn new hotkeys.</p>
<h2>Taking a screenshot</h2>
<p>There is no Print Screen button on a Mac keyboard, but you have several shortcuts to take a screenshot in different ways:</p>
<p>Take screenshot: <strong>Shift+Command+5</strong></p>
<p>Save screenshot:<strong> Shift+Command+3</strong></p>
<p>Copy screenshot: <strong>Control+Shift+Command+3</strong></p>
<p>Save screenshot (selection): <strong>Shift+Command+4</strong></p>
<p>Copy screenshot (selection): <strong>Copy+Shift+Command+4</strong></p>
<p>Unless you are a pianist, these are not short at all, so let’s call them hotkeys instead <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>Locking the screen from the Touch bar</h2>
<p>Click on the Apple logo on the top left to get to the system menu, and there you can see that the hotkey for locking the screen is <strong>Control+Command+Q</strong>, and for log out is<strong> Shift+Command+Q</strong>.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-lock-screen-hotkey.png"><img loading="lazy" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border:0;" title="Mac-lock-screen-hotkey" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-lock-screen-hotkey_thumb.png?w=301&#038;h=323" alt="Mac-lock-screen-hotkey" width="301" height="323" border="0" /></a></p>
<p>If your Mac has a Touch Bar, you can add the Lock button to it, so it will always be at your fingertip, and minimize the risk that you will press the log out combo instead.</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-keyboard-settings.png"><img loading="lazy" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border:0;" title="Mac-keyboard-settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-keyboard-settings_thumb.png?w=550&#038;h=481" alt="Mac-keyboard-settings" width="550" height="481" border="0" /></a></p>
<p>Click the Apple logo on the top left corner, then click <strong>System Preferences</strong>.</p>
<p>In the <strong>System Preferences</strong> dialog click <strong>Keyboard</strong>, then click the <strong>Customize Touch Bar</strong> button at the bottom.</p>
<p>Select the<strong> Screen Lock</strong> icon and drag it to the bottom of your screen, like you were physically moving it out from the display to the Touch Bar.</p>
<p>Using the same technique you can also add the <strong>Screenshot</strong> button to your Touch Bar.</p>
<p>&nbsp;</p>
<p>To be continued…</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2019/03/10/mac-tips-for-windows-users-shortcuts/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">791</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/cheatsheet-app_thumb.png" medium="image">
			<media:title type="html">CheatSheet-app</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-lock-screen-hotkey_thumb.png" medium="image">
			<media:title type="html">Mac-lock-screen-hotkey</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/03/mac-keyboard-settings_thumb.png" medium="image">
			<media:title type="html">Mac-keyboard-settings</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing a restart/reset/reboot loop on ESP8266</title>
		<link>https://gyorgybalassy.wordpress.com/2019/01/23/fixing-restart-reset-reboot-loop-on-esp8266/</link>
					<comments>https://gyorgybalassy.wordpress.com/2019/01/23/fixing-restart-reset-reboot-loop-on-esp8266/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Wed, 23 Jan 2019 02:10:00 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[ESP8266]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=785</guid>

					<description><![CDATA[Did you ever manage to render your ESP8266 to an infinite reset boot loop? I did! Not intentionally of course, but it happened: after loading a sketch with version 2.5.0-beta2 of the ESP8266 core for Arduino to the chip, the magical autoConnect method of the otherwise fantastic WiFiManager library started to threw an exception and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Did you ever manage to render your ESP8266 to an infinite reset boot loop? I did! Not intentionally of course, but it happened: after loading a sketch with version <a href="https://github.com/esp8266/Arduino/releases/tag/2.5.0-beta2" target="_blank">2.5.0-beta2</a> of the ESP8266 core for Arduino to the chip, the magical <a href="https://github.com/tzapu/WiFiManager#using" target="_blank">autoConnect</a> method of the otherwise fantastic <a href="https://github.com/tzapu/WiFiManager" target="_blank">WiFiManager</a> library started to threw an exception and triggered an instant reset of the device. (Why did I experiment with a beta? I desperately wanted <a href="https://github.com/esp8266/Arduino/pull/4980" target="_blank">HTTPS</a> the easy way.) Unfortunately I called this method from the <strong>setup</strong> function, so the restart happened so quickly that I did not have a chance to load a fixed code onto the device.</p>
<h2>Starting in Flash Mode</h2>
<p>To successfully load a new code to the device I had to prevent the start of the currently loaded code when the device boots. Under normal circumstances the device starts in Boot Mode, but by pulling the GPIO0 pin to LOW, you can switch it to Flash Mode, which allows loading new code to it. If you are like me you have probably never did it before, because if you have a NodeMCU DevKit, the USB connection does that automatically while flashing (<a href="https://www.instructables.com/id/How-to-Flash-NodeMCU-Firmware-in-ESP8266/" target="_blank">source</a>). This is how I did it on my NodeMCU DevKit v0.9 with a single cable:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/esp8266-reset-loop-flash-mode.png"><img loading="lazy" title="esp8266-reset-loop-flash-mode" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="esp8266-reset-loop-flash-mode" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/esp8266-reset-loop-flash-mode_thumb.png?w=500&#038;h=419" width="500" height="419" /></a></p>
<h2>Delete everything</h2>
<p>The next step is to delete everything you previously loaded or saved to the device. The Arduino IDE by default erases only the sketch, but in the <strong>Tools –&gt; Erase Flash</strong>&#160; menu you can force it to erase <strong>All Flash Contents</strong>:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/arduino-ide-erase-all-flash-contents.png"><img loading="lazy" title="arduino-ide-erase-all-flash-contents" style="border-top:0;border-right:0;background-image:none;border-bottom:0;float:none;padding-top:0;padding-left:0;border-left:0;margin:0 auto;display:block;padding-right:0;" border="0" alt="arduino-ide-erase-all-flash-contents" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/arduino-ide-erase-all-flash-contents_thumb.png?w=500&#038;h=434" width="500" height="434" /></a></p>
<p>A good idea is to load a simple sketch, like Blink to your device with this setting, or one that calls the <strong>resetSettings</strong> function of the <strong>WiFiManager</strong>.</p>
<h2>Additional tools</h2>
<p>The following tools can be also useful:</p>
<ul>
<li><a href="https://github.com/kentaylor/EraseEsp8266Flash" target="_blank">Erase Flash sketch</a> by Ken Taylor: A short Arduino sketch to erase all of the flash memory in an ESP8266 device. This is useful for fixing corrupted memory. </li>
<li><a href="https://github.com/igrr/esptool-ck" target="_blank">Esptool</a> by Christian Klippel: A tool to create firmware files for the ESP8266 chip and flash the firmware to the chip over serial port.</li>
<li><a href="https://esp8266.ru/esplorer/" target="_blank">ESPlorer</a> by 4refr0nt: An Integrated Development Environment (IDE) for ESP8266 developers, mainly useful for NodeMCU developers even to <a href="https://design.goeszen.com/recover-from-panic-esp8266.html" target="_blank">fix PANIC errors</a>.</li>
<li><a href="https://www.espressif.com/en/support/download/other-tools" target="_blank">Flash Download Tools</a> by Espressif: The official flashing tool set to completely <a href="http://www.pratikpanda.com/completely-format-erase-esp8266-flash-memory/" target="_blank">format or ease</a> the flash memory.</li>
<li><a href="https://www.compuphase.com/software_termite.htm" target="_blank">Termite</a> by CompuPhase: A simple RS232 terminal to catch error messages like <a href="http://iot-bits.com/esp8266/esp8266-reset-causes-rst-cause/" target="_blank">rst cause</a> (<a href="https://www.espressif.com/sites/default/files/documentation/esp8266_reset_causes_and_common_fatal_exception_causes_en.pdf" target="_blank">official PDF</a>) and boot mode.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2019/01/23/fixing-restart-reset-reboot-loop-on-esp8266/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">785</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/esp8266-reset-loop-flash-mode_thumb.png" medium="image">
			<media:title type="html">esp8266-reset-loop-flash-mode</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2019/01/arduino-ide-erase-all-flash-contents_thumb.png" medium="image">
			<media:title type="html">arduino-ide-erase-all-flash-contents</media:title>
		</media:content>
	</item>
		<item>
		<title>Delete old document versions from OneDrive for Business</title>
		<link>https://gyorgybalassy.wordpress.com/2018/11/11/delete-old-document-versions-from-sharepoint-onedrive/</link>
					<comments>https://gyorgybalassy.wordpress.com/2018/11/11/delete-old-document-versions-from-sharepoint-onedrive/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Sun, 11 Nov 2018 03:22:03 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[OneDrive]]></category>
		<category><![CDATA[SharePoint]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=778</guid>

					<description><![CDATA[I’m using OneDrive included in my Office 365 subscription to store a copy of my local backup in the cloud. My subscription provides 1 TB cloud storage for every user, which is quite a decent amount of storage space, at least for my needs, so I was really surprised when I received the warning that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I’m using OneDrive included in my Office 365 subscription to store a copy of my local backup in the cloud. My subscription provides 1 TB cloud storage for every user, which is quite a decent amount of storage space, at least for my needs, so I was really surprised when I received the warning that my OneDrive is full. How can that happen, my backup data is only 0.5 TB locally, how can that consume twice as much space in OneDrive?</p>
<h2>What takes up so much storage space?</h2>
<p>I sync tons of data to OneDrive, so first I had to understand what actually consumes the most storage space. OneDrive by default does not show the size of folders, but here is the trick to view that:</p>
<p>Click the <strong>Gear</strong> on the top right corner, than click <strong>Site settings </strong>on the sidebar:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings-menu.png"><img loading="lazy" title="Site-Settings-menu" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Site-Settings-menu" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings-menu_thumb.png?w=316&#038;h=267" width="316" height="267" /></a></p>
<p>If you ever administered SharePoint, the list of menu items will be familiar to you: your OneDrive for Business storage is actually a SharePoint site collection. Click <strong>Storage Metrics</strong> in the right column:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings.png"><img loading="lazy" title="Site-Settings" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Site-Settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings_thumb.png?w=500&#038;h=662" width="500" height="662" /></a></p>
<p>Here you can see all your files and even the system folders with a nice inline bar, so you can immediately see which folder consumes the most space. Actually all your data is in the <strong>Documents</strong> folder:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/storage-metrics.png"><img loading="lazy" title="Storage-Metrics" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Storage-Metrics" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/storage-metrics_thumb.png?w=500&#038;h=416" width="500" height="416" /></a></p>
<p>By clicking the folder names you can dive deeper and see subfolders and files. Note that the <strong>Total Size</strong> includes the following:</p>
<ul>
<li>Deleted files in Recycle Bin </li>
<li>All versions of the file </li>
<li>Metadata associated with the file </li>
</ul>
<p>To check the versions you can click the <strong>Version History</strong> link on file level:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/file-list.png"><img loading="lazy" title="File-List" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="File-List" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/file-list_thumb.png?w=500&#038;h=61" width="500" height="61" /></a></p>
<p>Here you can see that <strong>OneDrive for Business does have file versioning enabled by default</strong>, so when you overwrite a file, the previous version remains there and consumes storage space from your quota. By clicking the <strong>Delete All Versions</strong> link you can get rid of the old versions:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/delete-all-versions.png"><img loading="lazy" title="Delete-All-Versions" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Delete-All-Versions" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/delete-all-versions_thumb.png?w=500&#038;h=187" width="500" height="187" /></a></p>
<p>Unfortunately you have to do it file-by-file, there is no UI option to delete the old versions of all files from your subscription.</p>
<h2>Recycle Bin</h2>
<p>As a first step I wanted to check whether my Recycle Bin contains any files, because if it does, it counts into my quota. </p>
<p>So I opened my OneDrive in the browser and clicked <strong>Recycle bin</strong> in the left menu:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/onedrive-recycle-bin.png"><img loading="lazy" title="OneDrive-Recycle-Bin" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="OneDrive-Recycle-Bin" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/onedrive-recycle-bin_thumb.png?w=481&#038;h=633" width="481" height="633" /></a></p>
<p>Unfortunately it does not show how big are those files in the Recycle Bin, but clicking <strong>Return to classic OneDrive</strong> in the bottom left corner you can get a different view, where you can sort the file by Size, and <strong>Empty </strong>the <strong>Recycle Bin</strong> with a single click:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-file-size-list.png"><img loading="lazy" title="Recycle-Bin-file-size-list" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Recycle-Bin-file-size-list" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-file-size-list_thumb.png?w=500&#038;h=116" width="500" height="116" /></a></p>
<p>&#160;</p>
<p>Do you think you are done? Not yet! Recycle bin is there to protect you from accidental file deletion, but there is a second-stage recycle bin to protect you against accidental recycle bin emptying:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-empty.png"><img loading="lazy" title="Recycle-Bin-empty" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Recycle-Bin-empty" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-empty_thumb.png?w=498&#038;h=195" width="498" height="195" /></a></p>
<p>So click the <strong>second-stage recycle bin</strong> link (which is actually the admin level recycle bin on the site collection) to see that your files are still there:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/second-stage-recycle-bin.png"><img loading="lazy" title="Second-Stage-Recycle-Bin" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Second-Stage-Recycle-Bin" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/second-stage-recycle-bin_thumb.png?w=500&#038;h=205" width="500" height="205" /></a></p>
<p>Click the checkbox at the top of the first column to select all files, then click <strong>Delete Selection</strong>. Bad news: the list is paged, and you have to do it page by page <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f626.png" alt="😦" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>Disabling document versioning in OneDrive for Business</h2>
<p>Because your OneDrive for Business is actually a SharePoint site collection, and all your files are in the Documents folder which is actually a SharePoint document library, you can disable versioning for all your documents by disabling versioning in that single document library. To find that configuration option first click <strong>Return to classic OneDrive</strong> in the bottom left corner, then the <strong>Gear</strong> on the top right corner, and then click <strong>Ribbon</strong> in the right sidebar to view the ribbon:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/enable-ribbon.png"><img loading="lazy" title="Enable-Ribbon" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Enable-Ribbon" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/enable-ribbon_thumb.png?w=309&#038;h=264" width="309" height="264" /></a></p>
<p>Expand the ribbon by clicking the <strong>Library</strong> tab, and then click <strong>Library Settings</strong> towards the right end of the ribbon:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/ribbon.png"><img loading="lazy" title="RIbbon" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="RIbbon" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/ribbon_thumb.png?w=500&#038;h=107" width="500" height="107" /></a></p>
<p>The settings page of the document library contains several useful option and information:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/documents-settings.png"><img loading="lazy" title="Documents-Settings" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Documents-Settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/documents-settings_thumb.png?w=500&#038;h=412" width="500" height="412" /></a></p>
<p>First, if you have more than 5000 files in your OneDrive (like I do), a <strong>List view threshold</strong> warning is shown on this page. This will be important later, because as the description says, you cannot do operations on that many files at once.</p>
<p>Second, the <strong>Versioning settings</strong> link leads to the page where you can disable versioning, or limit the number of versions retained:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/versioining-settings.png"><img loading="lazy" title="Versioining-Settings" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Versioining-Settings" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/versioining-settings_thumb.png?w=500&#038;h=339" width="500" height="339" /></a></p>
<p>Both option can help you reduce the storage space needed for your files. Note however that turning off versioning here does not delete the existing versions of your files!</p>
<h2>Delete old document versions of all files</h2>
<p>Unfortunately there is no option on the UI to delete the old versions of all your documents with a single click, but thankfully SharePoint has an API, so you can do it programmatically.</p>
<p>If you have multifactor authentication enabled (you do, right?) then the first step is to generate an application password. To do that click your avatar in the upper right corner, then click the <strong>My account</strong> link, or navigate directly to <a title="https://portal.office.com/account/" href="https://portal.office.com/account/">https://portal.office.com/account/</a>.</p>
<p>On the left menu click <strong>Security &amp; privacy</strong>, then on the middle pane click <strong>Additional security verification</strong>. It does not look like a menu item, but it actually is, and expands the pane to show new items:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/security-and-privacy.png"><img loading="lazy" title="Security-and-privacy" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="Security-and-privacy" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/security-and-privacy_thumb.png?w=500&#038;h=405" width="500" height="405" /></a></p>
<p>Click the <strong>Create and manage app passwords</strong> link and use that page to generate a unique password for your app.</p>
<p>The next step is to download the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=42038" target="_blank">SharePoint Online SDK</a> which installs a set of DLLs into the <strong>C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI</strong> folder. You can use these DLLs with the PowerShell scripts published by <a href="https://social.technet.microsoft.com/profile/arleta%20wanat/" target="_blank">Arleta Wanat</a> to the <a href="http://technet.microsoft.com/en-us/scriptcenter/bb410849.aspx" target="_blank">TechNet Script Center</a>:</p>
<ul>
<li><a href="https://gallery.technet.microsoft.com/scriptcenter/Create-a-report-on-all-04ca555f" target="_blank">Create a report on all file versions in the library</a> </li>
<li><a href="https://gallery.technet.microsoft.com/office/Delete-all-previous-file-fd1ba18a" target="_blank">Delete all previous file versions in a library</a> </li>
</ul>
<p>These are very handy scripts, note however that they have a limitation: they cannot deal with more than 5000 files and you can receive the following exception:</p>
<blockquote>
<p>“Microsoft.SharePoint.Client.ServerException: The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.”</p>
</blockquote>
<p>Thankfully CAML has the power to limit the number of returned items using <strong>RowLimit</strong> and add paging, however it <a href="https://www.codeproject.com/Articles/1076854/Overcoming-the-List-View-Threshold-in-SharePoint-C" target="_blank">does not always work</a> if you want to run a recursive query. But the option to run a separate CAML query to each and every folder is working.</p>
<p>I implemented my final solution in a good old .NET console application using the SharePoint client-side object model. The application executes the following steps:</p>
<ol>
<li>Connects to your OneDrive for Business or SharePoint site collection. </li>
<li>Finds the <strong>Documents</strong> document library. </li>
<li>Iterates through the specified subfolder paths in the document library. </li>
<li>It runs CAML queries in every folder to retrieve the documents (files). In a single query maximum 100 documents are retrieved, and the query is executed again and again until all documents are processed. </li>
<li>If a document has multiple versions, they are deleted. </li>
</ol>
<p>You can find the code in Github and customize it according to your needs: <a title="https://github.com/balassy/OneDriveVersionCleaner" href="https://github.com/balassy/OneDriveVersionCleaner">https://github.com/balassy/OneDriveVersionCleaner</a></p>
<p>&#160;</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c9f0f00b-5efb-47da-9b8f-b9bf26effcc2" class="wlWriterEditableSmartContent" style="float:none;margin:0;display:inline;padding:0;">Technorati-címkék: <a href="http://technorati.com/tags/SharePoint" rel="tag">SharePoint</a>,<a href="http://technorati.com/tags/OneDrive" rel="tag">OneDrive</a>,<a href="http://technorati.com/tags/versions" rel="tag">versions</a>,<a href="http://technorati.com/tags/Github" rel="tag">Github</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2018/11/11/delete-old-document-versions-from-sharepoint-onedrive/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">778</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings-menu_thumb.png" medium="image">
			<media:title type="html">Site-Settings-menu</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/site-settings_thumb.png" medium="image">
			<media:title type="html">Site-Settings</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/storage-metrics_thumb.png" medium="image">
			<media:title type="html">Storage-Metrics</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/file-list_thumb.png" medium="image">
			<media:title type="html">File-List</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/delete-all-versions_thumb.png" medium="image">
			<media:title type="html">Delete-All-Versions</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/onedrive-recycle-bin_thumb.png" medium="image">
			<media:title type="html">OneDrive-Recycle-Bin</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-file-size-list_thumb.png" medium="image">
			<media:title type="html">Recycle-Bin-file-size-list</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/recycle-bin-empty_thumb.png" medium="image">
			<media:title type="html">Recycle-Bin-empty</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/second-stage-recycle-bin_thumb.png" medium="image">
			<media:title type="html">Second-Stage-Recycle-Bin</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/enable-ribbon_thumb.png" medium="image">
			<media:title type="html">Enable-Ribbon</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/ribbon_thumb.png" medium="image">
			<media:title type="html">RIbbon</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/documents-settings_thumb.png" medium="image">
			<media:title type="html">Documents-Settings</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/versioining-settings_thumb.png" medium="image">
			<media:title type="html">Versioining-Settings</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/11/security-and-privacy_thumb.png" medium="image">
			<media:title type="html">Security-and-privacy</media:title>
		</media:content>
	</item>
		<item>
		<title>Show me your imports, and I&#8217;ll tell who you are</title>
		<link>https://gyorgybalassy.wordpress.com/2018/01/04/show-me-your-imports/</link>
					<comments>https://gyorgybalassy.wordpress.com/2018/01/04/show-me-your-imports/#respond</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Thu, 04 Jan 2018 06:01:35 +0000</pubDate>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TypeScript]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=748</guid>

					<description><![CDATA[Well, maybe not, but your imports may indicate, how maintainable is your code. Have you ever written something like this: import { SomeClass } from 'somelib'; ... const s = new SomeClass(); Or this: import * as someFunc from 'somelib'; ... const s = someFunc(); Looks familiar, right? I’ve written a lot of lines like [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Well, maybe not, but your imports may indicate, how maintainable is your code.</p>
<p>Have you ever written something like this:</p>
<pre>import { SomeClass } from 'somelib';
...
const s = new SomeClass();</pre>
<p>Or this:</p>
<pre>import * as someFunc from 'somelib';
...
const s = someFunc();</pre>
<p>Looks familiar, right? I’ve written a lot of lines like these, mainly because the README in every library, package recommends them. But there are (at least) two problems with this code why I am trying to avoid them.</p>
<h2>Dependency management</h2>
<p>If you unscrupulously follow this pattern, you will write the same line of code hundred (or more) times within a single application. Why? Because we love copy-paste. Easy, convenient, and it works, right?</p>
<p>However in this way it will be very difficult to determine <strong>what your app <em>exactly</em> needs</strong>, what it depends on, what are its dependencies. What one can easily see from your code (only after using the “Find in All Files” feature of your favorite editor), is that your code references to an external package in countless places, so it needs that <em>package</em>, your app depends on it.&#160;&#160; </p>
<p>But reality is different: your application logic <strong>does not need a <em>package</em>, but a <em>functionality</em></strong>, a logic, which happens to be implemented in a third party package. But it’s not what your code shows at the first sight.</p>
<p>Here’s a more specific example with the popular <a href="https://www.npmjs.com/package/lodash" target="_blank">lodash</a> package (*):</p>
<pre>var _ = require('lodash');</pre>
<p>This package provides a number of utility functions, and it is pretty much impossible, that your app needs all of them. How can you find out what exactly you are using? Search all your files for “_”.</p>
<p>But why is that interesting?</p>
<p>For example, because you may want to replace the referenced package with something else. In the open source world, packages come and go, today this was the best, tomorrow that will be the one. Because the old package contains a bug, that will never be fixed, or because only the new package is compatible with the latest Node version that other parts of your app requires. Or simply because you want to keep your codebase fresh, and you want to use only dependencies with active community.</p>
<p>You can be sure that you will not find another library or package, that is API-compatible with the old one. You need one that is <strong><em>compatible on functionality level</em></strong>, which you can only find out if you know exactly what functionality are you referring to.</p>
<p>When you have that, you just have to change the references in as few places as possible in your code.</p>
<p>This leads to the solution: make sure, that you <strong>reference third party packages only once in your code</strong>, so wrap them into classes that publish only the functionalities your app depends on. This method can also make your code more readable, for example, instead of &quot;sha256()&quot;, you can find a much better function name, right?</p>
<p>This method works for me very well for a long time, though I have to note I don’t follow it fanatically, because it will be too much overhead for framework level libs (e.g. Angular).</p>
<h2>Testability</h2>
<p>If your class uses “import” to refer to another one, unit testing that class will be a nightmare, because you will have to hack the file loader logic to mock the class (e.g. <a href="https://github.com/request/request-promise#mocking-request-promise" target="_blank">Mocking Request-Promise</a>). </p>
<p>The solution is not new: <strong>DI</strong>. Not only does it make testing easier, but typically you just have to take a look at the constructor, and you will see on what other classes this one depends on.</p>
<p>For example, in TypeScript, we often import interfaces just to have type description, which can make import rows very verbose, and often you cannot determine at the quick glance which import brings in functionality and which one is there for type information only. DI also helps in this, if we try to use “import” only for type descriptions, and DI for everything else.</p>
<h2>Is this something new?</h2>
<p>Not at all. Really. Yet these codes continue to live, even if they are hard to maintain. READMEs, tutorials, articles, blogs will always strive for simplicity, you will find examples of them that help you understand the content and get started. Their purpose is not to blindly follow them in a more complex application where <strong>maintenance and sustainability is</strong> as important as simplicity. When you write such a line next time,<strong> think about</strong> <strong>what you&#8217;re really bringing into your codebase.</strong> Do you really gain some time with it on the long run?</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/01/programming-is-thinking_thumb.png"><img loading="lazy" title="programming-is-thinking_thumb" style="background-image:none;float:none;padding-top:0;padding-left:0;margin:0 auto;display:block;padding-right:0;border-width:0;" border="0" alt="programming-is-thinking_thumb" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/01/programming-is-thinking_thumb_thumb.png?w=590&#038;h=290" width="590" height="290" /></a></p>
<p>&#160;</p>
<p>*: The example is not perfect, because lodash provides more fine grained imports, however it is not well known or widely used.</p>
<p>&#160;</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8c2f7610-5861-4898-85c3-95a9dd3cc313" class="wlWriterSmartContent" style="float:none;margin:0;display:inline;padding:0;">Technorati-címkék: <a href="http://technorati.com/tags/JavaScript" rel="tag">JavaScript</a>,<a href="http://technorati.com/tags/TypeScript" rel="tag">TypeScript</a>,<a href="http://technorati.com/tags/DI" rel="tag">DI</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2018/01/04/show-me-your-imports/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">748</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2018/01/programming-is-thinking_thumb_thumb.png" medium="image">
			<media:title type="html">programming-is-thinking_thumb</media:title>
		</media:content>
	</item>
		<item>
		<title>Printing five-dimensional objects with a 3D printer</title>
		<link>https://gyorgybalassy.wordpress.com/2016/04/01/printing-five-dimensional-objects-with-a-3d-printer/</link>
					<comments>https://gyorgybalassy.wordpress.com/2016/04/01/printing-five-dimensional-objects-with-a-3d-printer/#comments</comments>
		
		<dc:creator><![CDATA[György Balássy]]></dc:creator>
		<pubDate>Thu, 31 Mar 2016 22:01:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D printing]]></category>
		<guid isPermaLink="false">http://gyorgybalassy.wordpress.com/?p=744</guid>

					<description><![CDATA[On this day exactly five years ago, the Volume 49, Issue 1 of the British Journal of Psychology was made available online, in which Lionel Penrose and his son, Roger Penrose published an article titled Impossible Objects, about objects that physically cannot exist. Probably the most well-known among those objects is the Penrose-triangle: The original [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>On this day exactly five years ago, the <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.2044-8295.1958.tb00634.x/abstract" target="_blank">Volume 49, Issue 1 of the British Journal of Psychology</a><em><strong> </strong></em>was made available online, in which <a href="https://en.wikipedia.org/wiki/Lionel_Penrose" target="_blank">Lionel Penrose</a> and his son, <a href="https://en.wikipedia.org/wiki/Roger_Penrose" target="_blank">Roger Penrose</a> published an article titled <em>Impossible Objects</em>, about objects that physically cannot exist. Probably the most well-known among those objects is the Penrose-triangle:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-penrose-triangle_thumb1.png"><img loading="lazy" title="5d-penrose-triangle_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-penrose-triangle_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-penrose-triangle_thumb1_thumb.png?w=200&#038;h=174" width="200" height="174" /></a></p>
<p>The original article was published much earlier, in 1958, and in the 50 years that passed since then, we learned a lot about our world. With our current knowledge we can confidently say, that the Penroses were wrong, these objects can exist, and we can create them using the modern 3D printing technology.</p>
<p>As a first step, we need a model we will print. The first problem is that traditional graphic and modeling softwares can work only with three dimensions, and to print these objects, you will need more. So you can forget SketchUP, Blender, AutoCAD, Maya, Tinkercad etc., because they understand only the 3D world.</p>
<p>The only possible option (at least I’m not aware of any other) is to describe your model in code, instead of drawing it. <a href="http://www.openscad.org/" target="_blank">OpenSCAD</a> is a wonderful tool for it! Even if you have only a little affinity to programming, I absolutely recommend you to use OpenSCAD to define your 3D models. Because we are working with code here, we are not limited by the three-dimensional space, and we can use transformations to move our objects to additional dimensions. The most important is the <strong>to5d()</strong> method here, that you can find in the Transformations group in the OpenSCAD CheatSheet:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-openscad_thumb1.png"><img loading="lazy" title="5d-openscad_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-openscad_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-openscad_thumb1_thumb.png?w=550&#038;h=316" width="550" height="316" /></a></p>
<p>After we have the model, the next step is slicing it. I mostly use <a href="https://ultimaker.com/en/products/cura-software" target="_blank">Cura</a> to slice my STL files, because its UI is very intuitive, and not too crowded with controls. Probably this is the reason why many controls are available only through the <strong>Expert config</strong> dialog:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-expert-config_thumb1.png"><img loading="lazy" title="5d-cura-expert-config_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-cura-expert-config_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-expert-config_thumb1_thumb.png?w=550&#038;h=612" width="550" height="612" /></a></p>
<p>Unfortunately you cannot find five-dimensional printing options even here by default, but if you look thoroughly, you can notice that while most labels are nicely vertically distributed, the labels in the <strong>Black Magic</strong> group are nearly touching each other. This is because if you enable both options there, a third one, called <strong>Enable more dimensions</strong> is displayed in that narrow space. Let’s enable that too:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-black-magic-settings_thumb.png"><img loading="lazy" title="5d-cura-black-magic-settings_thumb" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-cura-black-magic-settings_thumb" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-black-magic-settings_thumb_thumb.png?w=229&#038;h=94" width="229" height="94" /></a></p>
<p>With that option enabled, Cura can seamlessly open the 5D STL file created by OpenSCAD, and we can print it as usual. This is my printed Penrose-triangle:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle_thumb1.jpg"><img loading="lazy" title="5d-triangle_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-triangle_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle_thumb1_thumb.jpg?w=550&#038;h=367" width="550" height="367" /></a></p>
<p>Another photo with a classic 3D object:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle-with-pencil_thumb1.jpg"><img loading="lazy" title="5d-triangle-with-pencil_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-triangle-with-pencil_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle-with-pencil_thumb1_thumb.jpg?w=550&#038;h=494" width="550" height="494" /></a></p>
<p>I made these photos with my phone without flash, and the curvy edges of the objects are the result of the limited capabilities of my entry-level printer.</p>
<p>After I successfully printed my first “impossible” object, I wanted to print the triangle of the Swedish graphic artist, <a href="https://en.wikipedia.org/wiki/Oscar_Reutersv%C3%A4rd" target="_blank">Oscar Reutersvärd</a> (source: <a href="https://en.wikipedia.org/wiki/F%C3%A1jl:Reutersv%C3%A4rd%E2%80%99s_triangle.svg" target="_blank">Wikipedia</a>):</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-reutersvard-triangle_thumb.png"><img loading="lazy" title="5d-reutersvard-triangle_thumb" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-reutersvard-triangle_thumb" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-reutersvard-triangle_thumb_thumb.png?w=325&#038;h=282" width="325" height="282" /></a></p>
<p>The OpenSCAD model is much simpler here, I only had to create 9 cubes. After that I could open the model in Cura:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-preview_thumb1.png"><img loading="lazy" title="5d-cura-preview_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-cura-preview_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-preview_thumb1_thumb.png?w=550&#038;h=335" width="550" height="335" /></a></p>
<p>You can see a lighter region on the preview image at the second cube on the right from the bottom. To be honest I cannot explain what caused it, but thankfully it is just an error in rendering, I could successfully print this too. This is the result:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cubes_thumb1.jpg"><img loading="lazy" title="5d-cubes_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-cubes_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cubes_thumb1_thumb.jpg?w=550&#038;h=401" width="550" height="401" /></a></p>
<p>When we are talking about impossible objects, we can not talk about M.C. Escher’s famous picture with the endless staircase. This is how it looks in Cura:</p>
<p><a href="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-stairs_thumb1.png"><img loading="lazy" title="5d-cura-stairs_thumb[1]" style="background-image:none;float:none;padding-top:0;padding-left:0;margin-left:auto;display:block;padding-right:0;margin-right:auto;border-width:0;" border="0" alt="5d-cura-stairs_thumb[1]" src="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-stairs_thumb1_thumb.png?w=550&#038;h=523" width="550" height="523" /></a></p>
<p>After my printer completes the print, I will upload the photo here.</p>
<p>As you can see from these examples, 3D printers can be used to print more than three-dimensional objects, so <strong>don’t get stuck into 3D!</strong></p>
<p><strong>What will you print?</strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b87c9e07-db3b-44fe-a873-b9d664bca928" class="wlWriterEditableSmartContent" style="float:none;margin:0;display:inline;padding:0;">Technorati-címkék: <a href="http://technorati.com/tags/3d+printing" rel="tag">3d printing</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://gyorgybalassy.wordpress.com/2016/04/01/printing-five-dimensional-objects-with-a-3d-printer/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">744</post-id>
		<media:content url="https://1.gravatar.com/avatar/77ab74446a5d179d9eb71cb670651f3da89528f5e72108ada650d9085131f0a5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">balassygyorgy</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-penrose-triangle_thumb1_thumb.png" medium="image">
			<media:title type="html">5d-penrose-triangle_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-openscad_thumb1_thumb.png" medium="image">
			<media:title type="html">5d-openscad_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-expert-config_thumb1_thumb.png" medium="image">
			<media:title type="html">5d-cura-expert-config_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-black-magic-settings_thumb_thumb.png" medium="image">
			<media:title type="html">5d-cura-black-magic-settings_thumb</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle_thumb1_thumb.jpg" medium="image">
			<media:title type="html">5d-triangle_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-triangle-with-pencil_thumb1_thumb.jpg" medium="image">
			<media:title type="html">5d-triangle-with-pencil_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-reutersvard-triangle_thumb_thumb.png" medium="image">
			<media:title type="html">5d-reutersvard-triangle_thumb</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-preview_thumb1_thumb.png" medium="image">
			<media:title type="html">5d-cura-preview_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cubes_thumb1_thumb.jpg" medium="image">
			<media:title type="html">5d-cubes_thumb[1]</media:title>
		</media:content>

		<media:content url="https://gyorgybalassy.wordpress.com/wp-content/uploads/2016/04/5d-cura-stairs_thumb1_thumb.png" medium="image">
			<media:title type="html">5d-cura-stairs_thumb[1]</media:title>
		</media:content>
	</item>
	</channel>
</rss>
