<?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/"
	>

<channel>
	<title>Technology &#8211; Carnali.com</title>
	<atom:link href="https://www.carnali.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.carnali.com</link>
	<description></description>
	<lastBuildDate>Sat, 14 Mar 2026 20:43:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">128617068</site>	<item>
		<title>Configuring N1MM Logger for use with Yaesu FTDX101D</title>
		<link>https://www.carnali.com/2026/03/14/configuring-n1mm-logger-for-use-with-yaesu-ftdx101d/</link>
					<comments>https://www.carnali.com/2026/03/14/configuring-n1mm-logger-for-use-with-yaesu-ftdx101d/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Sat, 14 Mar 2026 05:00:00 +0000</pubDate>
				<category><![CDATA[Amateur Radio]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[FTDX101D]]></category>
		<category><![CDATA[N1MM]]></category>
		<category><![CDATA[Radio]]></category>
		<category><![CDATA[Yaesu]]></category>
		<guid isPermaLink="false">https://www.carnali.com/?p=773</guid>

					<description><![CDATA[This is the second in a series of articles that I&#8217;m posting that will describe the process you need to go through to configure different programs to work with the&#8230;]]></description>
										<content:encoded><![CDATA[
<p>This is the second in a series of articles that I&#8217;m posting that will describe the process you need to go through to configure different programs to work with the Yaesu FTDX101D transceiver.  I&#8217;m doing these articles because I just recently went through the setup process on my own system and found while there&#8217;s plenty of information out there, it&#8217;s sometimes confusing and often doesn&#8217;t fully describe what is happening during configuration process.  I hope that these articles will simplify things and help other users that might be intimidated by the complexity of setting up their hardware.  Before starting the process, you should review my previous post, <a href="https://www.carnali.com/2026/03/12/installing-and-configuring-device-drivers-for-the-yaesu-ftdx101d/">&#8216;Installing and Configuring Device Drivers for the Yaesu FTDX101D&#8217;</a> to make sure your radio is configured properly.</p>



<p>N1MM Logger appears to be the logging program of choice for amateur radio contests. A lot of hams use it as a contesting log because of it&#8217;s many contesting features but after the contest is completed will export the data to another general logger that they use to log all of their contacts.</p>



<p>N1MM allows you to automate a lot of the steps when contesting. For example, when using Morse code, you can load a configuration for a state QSO party, and just press function keys to perform the contesting exchange instead of using a Morse key and doing it manually. While this may seem like cheating to some, contesters like it because of the quick turnaround of contacts, beginners like it because they are prone to making sending mistakes and other like it because it&#8217;s just easier than sending code manually. For the automatic features to work, the program needs to be able to communicate with your radio. The rest of this article will tell you how to do that.</p>



<p>Note that I&#8217;m using a Yaesu FTDX101D radio during this procedure but any Yaesu radio should have a similar setup and other non-Yaesu radios will probably work pretty much the same with some minor tweaks to the process.</p>



<p>Here&#8217;s how to do it…</p>



<ul class="wp-block-list">
<li>Launch N1MM Logger and select &#8216;Config&#8217; > &#8216;Config Ports, Mode Control, Winkey, etc…&#8217; then select the &#8216;Hardware&#8217; tab.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" width="1024" height="138" src="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-1024x138.png" alt="" class="wp-image-774" style="aspect-ratio:7.420326477596072;width:674px;height:auto" srcset="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-1024x138.png 1024w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-300x40.png 300w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-768x103.png 768w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-1170x158.png 1170w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main-585x79.png 585w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Main.png 1195w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<ul class="wp-block-list">
<li>At the top of the dialog you will see three radio boxes, these are used to select the type of hardware configuration you are using. 
<ul class="wp-block-list">
<li>&#8216;SO1V&#8217; is the simplest. It used when your radio has just one VFO that you will be using for both transmitting and receiving. </li>



<li>&#8216;SO2V&#8217; is used when your radio has two VFOs. Selecting this will configure the program to work with both and will display two separate dialogs during normal operation with each one allowing you to control a separate VFO. For example, one dialog/VFO could be used to work the 20M band, while the second could be used to work the 40M band. </li>



<li>&#8216;S02R&#8217; is similar to &#8216;SO2V&#8217; except instead of controlling to VFOs on the same radio, you are controlling to separate radios. </li>
</ul>
</li>



<li>To keep things simple, even though the FTDX101D contains 2 VFOs, I&#8217;m only using one and thus will select &#8216;SO1V&#8217;.</li>
</ul>



<ul class="wp-block-list">
<li>Next, we&#8217;ll set up CAT control for N1MM. This allows the software to control the radio and do things like change and read frequencies, modes and bands. It also enables the software to read and set many of the parameters used by the radio. On Yaesu radios, CAT control is accomplished using the Enhanced COM port and on my computer it is mapped to COM4, so on the first line we set &#8216;Port&#8217; to &#8216;COM4&#8217; and &#8216;Radio&#8217; to &#8216;FTDX101D&#8217;. The &#8216;Radio&#8217; field is used by the program so that it understands what messages to use during communications and what features are supported.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" width="561" height="714" src="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Enhanced.png" alt="" class="wp-image-775" style="width:457px;height:auto" srcset="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Enhanced.png 561w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Enhanced-236x300.png 236w" sizes="(max-width: 561px) 100vw, 561px" /></figure>
</div>


<ul class="wp-block-list">
<li>Now press the &#8216;Set&#8217; button and set the following values:
<ul class="wp-block-list">
<li>&#8216;Speed&#8217; to &#8216;38400&#8217;</li>



<li>&#8216;Parity&#8217; to &#8216;N&#8217;</li>



<li>&#8216;Databits&#8217; to &#8216;8&#8217;</li>



<li>&#8216;Stop Bits&#8217; to &#8216;2&#8217;</li>



<li>&#8216;DTR&#8217; to &#8216;Always Off&#8217;</li>



<li>&#8216;RTS&#8217; to &#8216;Always Off&#8217;</li>



<li>&#8216;Radio Nr&#8217; to &#8216;1&#8217;</li>
</ul>
</li>



<li>Select &#8216;OK&#8217; to save the changes. We use these values because they match the values we used when we configured the radio and the drivers in the previous article. They describe the speed and rules that the radio, computer an N1MM use to talk to each other. You can use different values if you like but just make sure they are consistent between all three devices.</li>



<li>In this step, we set up keying for N1MM. This allows the software to key the radio instead of you having to push a button or press a Morse key. On Yaesu radios, this is done using the Standard COM port. On the second line of the dialog, select the port that&#8217;s mapped to your standard COM port, for me it&#8217;s &#8216;COM3&#8217;, leave the &#8216;Radio&#8217; set to &#8216;None&#8217;, and check the &#8216;CW/Other&#8217; check box.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" width="559" height="717" src="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Standard.png" alt="" class="wp-image-776" style="width:463px;height:auto" srcset="https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Standard.png 559w, https://www.carnali.com/wp-content/uploads/2026/03/N1MM-Standard-234x300.png 234w" sizes="(max-width: 559px) 100vw, 559px" /></figure>
</div>


<ul class="wp-block-list">
<li>Press the &#8216;Set&#8217; button and set the following:
<ul class="wp-block-list">
<li>&#8216;DTR&#8217; to &#8216;CW&#8217;</li>



<li>&#8216;RTS&#8217; to &#8216;PTT&#8217;</li>
</ul>
</li>



<li>Select &#8216;OK&#8217; to save the changes and &#8216;OK&#8217; a second time to close the &#8216;Configurer&#8217; dialog. This setup is simpler than the one for the Advanced COM port because there&#8217;s no data transfer involved, Yaesu keys the radio based only on the state of the DTR pin or the RTS pin. So essentially, only a single line is used on this port.</li>



<li>Finally, verify that CAT control works by tuning your receiver and seeing if the N1MM frequency display in the title bar of your dialog updates. As a second check, click on one of the bands in N1MM and see if it changes the band on your radio. If these tests fail something is wrong with your enhanced com port settings you will need to troubleshoot it. You can check to make sure that keying is taking place by connecting your radio to a dummy load, turning down the power and pressing one of the function keys used during an exchange. If everything is working your radio should start transmitting and you will hear keying taking place.</li>
</ul>



<p></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2026/03/14/configuring-n1mm-logger-for-use-with-yaesu-ftdx101d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">773</post-id>	</item>
		<item>
		<title>Installing and Configuring Device Drivers for the Yaesu FTDX101D</title>
		<link>https://www.carnali.com/2026/03/12/installing-and-configuring-device-drivers-for-the-yaesu-ftdx101d/</link>
					<comments>https://www.carnali.com/2026/03/12/installing-and-configuring-device-drivers-for-the-yaesu-ftdx101d/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Thu, 12 Mar 2026 12:39:07 +0000</pubDate>
				<category><![CDATA[Amateur Radio]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://www.carnali.com/?p=741</guid>

					<description><![CDATA[Overview This document is an attempt to explain the connections that are needed to interface a computer with the Yaesu FTDX101D, what each of those connections does and what you&#8230;]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading has-text-align-center has-medium-font-size"><strong>Overview</strong></h2>



<p>This document is an attempt to explain the connections that are needed to interface a computer with the Yaesu FTDX101D, what each of those connections does and what you need to do to get your computer talking to your rig. While it&#8217;s written for the FTDX101D, I suspect the same information will apply to any modern Yaesu transceiver and with some minor changes could also be used to set up non-Yaesu rigs.</p>



<p>Connecting your computer to your transceiver allows you to do all sorts of interesting things. You can control your rig from your computer, automate the logging process, run software that allows you to communicate with others using the various digital modes and many other things.</p>



<p>While researching the connection process, I came across a lot of good information, some bad information and found that although many people were able to connect the two devices, a lot of them didn&#8217;t really understand what was going on when they did it.  I hope to clear that up here.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="285" src="https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-1024x285.jpg" alt="" class="wp-image-744" srcset="https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-1024x285.jpg 1024w, https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-300x83.jpg 300w, https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-768x214.jpg 768w, https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-1170x325.jpg 1170w, https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram-585x163.jpg 585w, https://www.carnali.com/wp-content/uploads/2026/03/Connection_diagram.jpg 1190w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>There are four different connections that need to take place when you connect to your radio with each one serving a particular purpose. </p>



<p>The first is for CAT (Computer Aided Transceiver) control. This allows the computer to send commands to the radio and receive back responses enabling you to do things like change your rigs frequency and mode and read back parameters like SWR and power, etc. </p>



<p>The second connection is for keying the rig.  You want your computer to be able to tell your transceiver when to transmit and when to stop transmitting so it can automatically send and receive data.</p>



<p>The next connection is for sending audio to your rig.  This is required to modulate the carrier for digital modes or for sending prerecorded audio. </p>



<p>The final connection is used to receive audio from your rig.  Doing this allows software on your computer to &#8216;listen&#8217; to the rig, giving it the ability to do things like decode Morse code or interpret digital mode messages.</p>



<p>In the old days, interfacing with a radio was complex and required two different cables.  CAT control took place through an RS-232 cable while RTTY/Data, audio input and output and transmitter keying were done using a special 6-pin Mini-DIN data/packet connector cable.  In modern setups, both of these cables have been replaced with a single USB cable which greatly simplifies the connection process.  Unfortunately, the connection process is a bit confusing because the industry has implemented the USB interface in a way that emulates the old two cable method making it more complex than it really needs to be.</p>



<p>On Yaesu radios, you install a set of drivers that connect to the computer hardware and present an interface through which your programs (WSJT-X, JS8Call, fldigi, Ham Radio Deluxe, etc) can talk to the radio.  The driver installation creates two virtual COM ports (Enhanced COM Port, Standard COM Port) and two audio devices (Line USB Audio CODEC), (Speakers USB Audio CODEC).</p>



<p><strong>Enhanced COM Port</strong> is used for CAT control.  It sends commands to the rig and receives back responses allowing the computer control the radio and read the various settings and parameters.  This acts as the equivalent of the RS-232 cable.</p>



<p><strong>Standard COM Port</strong> is used strictly for keying the transmitter. This takes the place of the 6-pin Mini-DIN connector cable.  One of the things that&#8217;s interesting with this connection is that only the DTR or RTS line is used for keying the rig, so it really doesn&#8217;t matter what setting you use for baud rate, parity, etc. (Even though it doesn&#8217;t matter, later in the procedure I use the same settings that I use for the enhanced port, just to make them consistent).</p>



<p><strong>Line USB Audio CODEC</strong> sends audio information from your computer to your radio allowing it to modulate the carrier and transmit information.  This connection used to be part of the 6-pin Mini-DIN connector cable.</p>



<p><strong>Speakers USB Audio CODEC</strong> receives audio from your radio allowing it to decode the audio and present it as Morse code or digital mode data.</p>



<p></p>



<h2 class="wp-block-heading has-text-align-center has-medium-font-size"><strong>Installing and Configuring the Drivers</strong></h2>



<ul class="wp-block-list">
<li>Go to the Yaesu website and navigate to the FTDX101D page.  Select &#8216;Files&#8217; and click on the &#8216;FTDX101MP/D USB Driver Virtual COM Port Driver (Windows 11/10)&#8217; link towards the bottom of the page.  This should download the file &#8216;CP210x_Universal_Windows_Driver.zip&#8217; to you computer.</li>



<li>Right-click on the file, select &#8216;Extract All…&#8217; and press the &#8216;Extract&#8217; button.</li>



<li>After the files have been extracted, right-click on the &#8216;silabser.inf&#8217; file, select &#8216;Install&#8217; and then press the &#8216;Open&#8217; button and follow the prompts to install the driver.</li>



<li>Open Windows Device Manager, click on &#8216;Ports (COM &amp; LPT)&#8217; and verify that you have two &#8216;Silicon Labs Dual CP2105 USB entries&#8217;. While doing this, take note of the COM port numbers used for each device since you will need this information later in the process. On my system &#8216;COM4&#8217; was used for &#8216;Enhanced&#8217; and &#8216;COM3&#8217; for &#8216;Standard&#8217; but your values may be different.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="664" height="107" src="https://www.carnali.com/wp-content/uploads/2026/03/Device-Manager.png" alt="" class="wp-image-755" srcset="https://www.carnali.com/wp-content/uploads/2026/03/Device-Manager.png 664w, https://www.carnali.com/wp-content/uploads/2026/03/Device-Manager-300x48.png 300w, https://www.carnali.com/wp-content/uploads/2026/03/Device-Manager-585x94.png 585w" sizes="(max-width: 664px) 100vw, 664px" /></figure>
</div>


<ul class="wp-block-list">
<li>Double-click on the &#8216;Enhanced&#8217; port entry, navigate to &#8216;Port Settings&#8217; and verify the settings are as follows, changing the values if needed. If you look around the Internet you may see many different values set for these parameters. This is because the values you use aren&#8217;t critical as long as both the radio and computer use the same values. It&#8217;s like talking to someone in French, if both of you are using speaking French, everything is fine but if one of you is speaking French while the other is speaking German, nothing good will come of it.
<ul class="wp-block-list">
<li>&#8216;Bits per second:&#8217; &#8216;38400&#8217;</li>



<li>&#8216;Data bits:&#8217; &#8216;8&#8217;</li>



<li>&#8216;Parity:&#8217; &#8216;None&#8217;</li>



<li>&#8216;Stop bits:&#8217; &#8216;2&#8217;</li>



<li>&#8216;Flow control:&#8217; &#8216;None&#8217;</li>
</ul>
</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="606" height="400" src="https://www.carnali.com/wp-content/uploads/2026/03/Enhanced-Port-1.png" alt="" class="wp-image-757" style="width:529px;height:auto" srcset="https://www.carnali.com/wp-content/uploads/2026/03/Enhanced-Port-1.png 606w, https://www.carnali.com/wp-content/uploads/2026/03/Enhanced-Port-1-300x198.png 300w, https://www.carnali.com/wp-content/uploads/2026/03/Enhanced-Port-1-585x386.png 585w, https://www.carnali.com/wp-content/uploads/2026/03/Enhanced-Port-1-263x175.png 263w" sizes="(max-width: 606px) 100vw, 606px" /></figure>
</div>


<ul class="wp-block-list">
<li>Double-click on the &#8216;Standard&#8217; port entry, navigate to &#8216;Port Settings&#8217; and enter the same values you used for the &#8216;Enhanced&#8217; port.</li>



<li>You can now delete the CP210x zip file and folder since they&#8217;re no longer needed.</li>
</ul>



<p></p>



<h2 class="wp-block-heading has-text-align-center has-medium-font-size"><strong>Configuring the Yaesu FTDX101D</strong></h2>



<ul class="wp-block-list">
<li>On the FTDX101D, press the &#8216;FUNC&#8217; button, then select &#8216;Operation Setting&#8217;>&#8217;General&#8217;.</li>



<li>Set the following parameters:
<ul class="wp-block-list">
<li>&#8216;CAT RATE&#8217;: &#8216;38400bps&#8217;</li>



<li>&#8216;CAT TIME OUT TIMER&#8217;: &#8216;100msec&#8217;</li>



<li>CAT RTS&#8217;: &#8216;OFF&#8217;</li>
</ul>
</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="800" height="480" src="https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-1.png" alt="" class="wp-image-760" srcset="https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-1.png 800w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-1-300x180.png 300w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-1-768x461.png 768w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-1-585x351.png 585w" sizes="(max-width: 800px) 100vw, 800px" /></figure>
</div>


<ul class="wp-block-list">
<li>Press the &#8216;BACK&#8217; button to back out of the current screen and the select &#8216;CW SETTING&#8217; &gt; &#8216;MODE CW&#8217;. Find &#8216;PC KEYING&#8217; and set it to &#8216;DTR&#8217;.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="800" height="480" src="https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-2.png" alt="" class="wp-image-761" srcset="https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-2.png 800w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-2-300x180.png 300w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-2-768x461.png 768w, https://www.carnali.com/wp-content/uploads/2026/03/Yaesu-Settings-2-585x351.png 585w" sizes="(max-width: 800px) 100vw, 800px" /></figure>
</div>


<ul class="wp-block-list">
<li>And you&#8217;re done. These settings should allow your radio to work with any program you install as long as the program configuration matches the values you&#8217;ve used here. I&#8217;ll soon be posting setup information for other programs like WSJT-X, N1MM Logger and N3FJP Logger which will show you how it&#8217;s done.</li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2026/03/12/installing-and-configuring-device-drivers-for-the-yaesu-ftdx101d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">741</post-id>	</item>
		<item>
		<title>Improving the Music Inventory Example from Head First Object Oriented Analysis and Design</title>
		<link>https://www.carnali.com/2022/06/13/improving-the-music-inventory-example-from-head-first-object-oriented-analysis-and-design/</link>
					<comments>https://www.carnali.com/2022/06/13/improving-the-music-inventory-example-from-head-first-object-oriented-analysis-and-design/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Mon, 13 Jun 2022 15:24:21 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://www.carnali.com/?p=696</guid>

					<description><![CDATA[I&#8217;ve been refreshing my knowledge of software design by working through the book, &#8216;Head First Object Oriented Analysis and Design.&#8217; One of the examples that they use to show how&#8230;]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve been refreshing my knowledge of software design by working through the book, &#8216;Head First Object Oriented Analysis and Design.&#8217;</p>



<p>One of the examples that they use to show how designs can evolve and be improved upon over time is an application that is used to track musical instruments inventory. The initial design of the app is poor in that it lacks maintainability and requires modification of existing classes (one of the no-no&#8217;s of SOLID design principles) and the addition of many new classes any time you want to add a new instrument type to the application. In chapter 5 of the book, they improve the design considerably by replacing unique classes for each instrument with a single class, InstrumentSpec that maintains a list of properties for the instrument that it represents. Not only does this eliminate the need for the creation of a new instrument class, it also allows you to dynamically add new properties to each class instead of having them hardwired into the class.</p>



<p>While I agree with them about the software being greatly improved, I still feel there&#8217;s one glaring problem with it. When a new property is added to the InstrumentSpec class it uses a key/value pair to store the property. For the key, they&#8217;ve chosen to use the string type. While this gives you a lot of flexibility, I feel it&#8217;s pretty much a disaster waiting to happen. Not only does the user of InstrumentSpec has to be relied upon to make sure the string is a valid value and is spelled correctly, if a mistake is made it won&#8217;t be found at compile time but instead will manifest itself at runtime. The last thing you want happening is your software to fail in the field instead of failing when you&#8217;re designing it. Granted a lot of this can be avoided by the use of appropriate test cases but that still takes a leap of faith that the error will be caught.</p>



<p>A better way to handle this is to replace the string key with an enumeration key. This prevents the user from ever using an invalid key and also prevents the code from compiling if an incorrect key is used. The only downside to this approach is that you have to modify the PropertyKey enumeration any time you add a new property to the software. To me this seems a minor tradeoff that goes a long way towards creating more robust software.</p>



<p>The following example shows the use of property keys instead of strings.</p>



<p><strong><span style="text-decoration: underline;">InstrumentSpec.cs</span></strong></p>



<pre class="wp-block-code"><code>using System;
using System.Collections.Generic;

namespace CH3_Guitar_Application
{
    internal class InstrumentSpec
    {
        private Dictionary&lt;PropertyKeys, object&gt; _properties;

        public InstrumentSpec(Dictionary&lt;PropertyKeys, object&gt; properties)
        {
            if (properties == null)
                _properties = new Dictionary&lt;PropertyKeys, object&gt;();
            else
                _properties = new Dictionary&lt;PropertyKeys, object&gt;(properties);
        }

        public object GetProperty(PropertyKeys propertyName)
        {
            return _properties&#91;propertyName];
        }

        public Dictionary&lt;PropertyKeys, object&gt; GetProperties()
        {
            return _properties;
        }

        public Boolean Matches(InstrumentSpec otherSpec)
        {
            foreach (var property in otherSpec.GetProperties())
            {
                if (!_properties.TryGetValue(property.Key, out var value))
                    return false;

                if (property.Value != value)
                    return false;
            }

            return true;
        }
    }
}</code></pre>



<p><strong>PropertyKeys.cs</strong></p>



<pre class="wp-block-code"><code>namespace CH3_Guitar_Application
{
    internal enum PropertyKeys
    {
        INSTRUMENT_TYPE,
        BUILDER,
        MODEL,
        INSTRUMENT_STYLE,
        NUM_STRINGS,
        TOP_WOOD,
        BACK_WOOD
    }
}</code></pre>



<p>A second problem that I ran into was because of my choice of rewriting the examples in C# instead of doing them in Java like the book does.</p>



<p>The original application prints out a human readable string based on the value of an enumeration. This string is different than the actual name of the enumeration and is not a problem in Java. Unfortunately, in C# the enum type is limited and if you attempt to use the ToString() method to print out the enum, it will display the actual enum text instead of something that is tailored for readability.</p>



<p>To fix this problem, I replaced the enum type with the Enumeration class written by Jimmy Bogard. https://lostechies.com/jimmybogard/2008/08/12/enumeration-classes/ Not only does this class allow you to associate a human readable string with an enumeration, it also allows you to add methods to the enumeration if you need to perform other operations when using the enum. Most of the time you won&#8217;t need all this extra functionality and regular enums will do just fine but if you ever do, it&#8217;s nice to know this class is available.</p>



<p>Here&#8217;s an example of using the Enumeration class.  Just subclass the Enumeration class, add your enumeration values with a human readable string and you&#8217;re good to go.</p>



<p><strong><span style="text-decoration: underline;">InstrumentType.cs</span></strong></p>



<pre class="wp-block-code"><code>namespace CH3_Guitar_Application
{
    public class InstrumentType : Enumeration
    {
        public static readonly InstrumentType GUITAR = new InstrumentType(0, "Guitar");
        public static readonly InstrumentType BANJO = new InstrumentType(1, "Banjo");
        public static readonly InstrumentType DOBRO = new InstrumentType(2, "Dobro");
        public static readonly InstrumentType FIDDLE = new InstrumentType(3, "Fiddle");
        public static readonly InstrumentType BASS = new InstrumentType(4, "Bass");
        public static readonly InstrumentType MANDOLIN = new InstrumentType(5, "Mandolin");
        public static readonly InstrumentType ANY = new InstrumentType(6, "Unspecified");

        private InstrumentType()
        {
        }

        private InstrumentType(int value, string displayName) : base(value, displayName)
        {
        }
    }
}</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2022/06/13/improving-the-music-inventory-example-from-head-first-object-oriented-analysis-and-design/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">696</post-id>	</item>
		<item>
		<title>Horsehead Nebula and Flame Nebula</title>
		<link>https://www.carnali.com/2021/11/15/horsehead-nebula-and-flame-nebula/</link>
					<comments>https://www.carnali.com/2021/11/15/horsehead-nebula-and-flame-nebula/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 15:08:07 +0000</pubDate>
				<category><![CDATA[Astronomy]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://www.carnali.com/?p=658</guid>

					<description><![CDATA[The Horsehead Nebula and Flame Nebula (lower left). Narrowband hydrogen-alpha, sulfur II and oxygen III data was acquired over two nights, processed using Pixinsight and the channels were mapped to&#8230;]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="749" src="https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-1024x749.jpg" alt="" class="wp-image-660" srcset="https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-1024x749.jpg 1024w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-300x219.jpg 300w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-768x562.jpg 768w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-1536x1124.jpg 1536w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-1170x856.jpg 1170w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-1920x1404.jpg 1920w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048-585x428.jpg 585w, https://www.carnali.com/wp-content/uploads/2021/11/HubblePalette_2048.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Horsehead Nebula and Flame Nebula</figcaption></figure>



<p>The Horsehead Nebula and Flame Nebula (lower left). Narrowband hydrogen-alpha, sulfur II and oxygen III data was acquired over two nights, processed using Pixinsight and the channels were mapped to the Hubble Palette. Not my favorite color combination but it does bring out a lot of detail in the image.</p>



<p>Astrophotography is tough. Before you can produce anything of interest, you first need to learn how to use your equipment to acquire images and then you need to learn how to use the software tools to process those images.</p>



<p>On the acquisition side, you&#8217;re having to master the use of a lot of different hardware. You need to understand and be able to set up a telescope, a mount, an auto-focuser and a color wheel and connect all of these to a computer so you can guide the mount and acquire your images. If you make a mistake with any of these, you have probably wasted a nights worth of work. You can look for help online but everyones setup is slightly different so you&#8217;ll probably have to do a lot of experimentation to make your own equipment work properly.</p>



<p>On the processing side, the tools are daunting. My processing tool of choice is called Pixinsight which consists of a suite of processes that you run your images through to achieve your final image. Almost all the processes have multiple parameters that you can tweek to control the mathematics behind the processing of the images. I suspect few actually understand what all of the parameters do and mostly rely on experimentation to determine the best values for their images.</p>



<p>Understanding what processes to use and the order in which to apply them is another challange. For me, as I suspect it is for most people, the path to learning was to watch lots of YouTube videos, try out the various techniques, and over time, build up a repertoire of things that work while tossing out the things that dont. This takes many hours and often ends with sub-optimal results that you end up just throwing away. It can be frustrating.</p>



<p>Unless you have lots of time and patience, you should probably consider another hobby. On the other hand, if you like challenges and are willing to put in the time, it can be really fun.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2021/11/15/horsehead-nebula-and-flame-nebula/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">658</post-id>	</item>
		<item>
		<title>Rotating Log Files with Easylogging++</title>
		<link>https://www.carnali.com/2018/12/28/rotating-log-files-with-easylogging/</link>
					<comments>https://www.carnali.com/2018/12/28/rotating-log-files-with-easylogging/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Fri, 28 Dec 2018 18:56:40 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://www.carnali.com/?p=408</guid>

					<description><![CDATA[I was looking for a logger to use in some of my C++ projects and came across Easylogging++. It&#8217;s pretty easy to use and has a decent feature set, but&#8230;]]></description>
										<content:encoded><![CDATA[
<p>I was looking for a logger to use in some of my C++ projects and came across <a href="https://github.com/zuhd-org/easyloggingpp">Easylogging++</a>.  It&#8217;s pretty easy to use and has a decent feature set, but like so many open source projects it&#8217;s a bit lacking in the documentation area.  I wanted to set it up to do log rotation when the log file exceeded a given size but how to do this was not really clear.  I played around with it this morning and finally figured out how accomplish what I wanted to do, so I&#8217;m sharing the code here in case anyone else is trying to solve the same problem.</p>



<p>First the setup process:</p>



<ol class="wp-block-list"><li>Download EasyLogging++ from the repository on GitHub at https://github.com/zuhd-org/easyloggingpp#configuration</li><li>Unzip the file and copy the easylogging++.cc and easylogging++.hh into your projects source directory.</li><li>Right-click on your project&#8217;s header file directory and select &#8216;Add &gt; Add Existing Item&#8217; and select easylogging++.hh.</li><li>Right-click on your project&#8217;s source file directory and select &#8216;Add &gt; Add Existing Item&#8217; and select easylogging++.cc. </li><li>Right-click on your project and select &#8216;Properties&#8217; then select &#8216;C/C++&#8217; &gt; &#8216;Preprocessor&#8217;.  Add &#8216;ELPP_THREAD_SAFE&#8217; to the &#8216;Preprocessor Definitions&#8217; section.  Make sure you do this for both the Debug and Release sections.</li><li>At the top of your main source file add the text &#8216;INITIALIZE_EASYLOGGINGPP&#8217; to initialize the logger.</li></ol>



<p>That&#8217;s it for the setup.  The developer did a really nice job with this.  It couldn&#8217;t be easier to setup.</p>



<p>To actually use the logger in your code, you will need to configure the logger.  That can be accomplished by loading a config file and calling reconfigureAllLoggers as follows:  </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
   const el::Configurations conf(R&quot;(logger.conf)&quot;);

   el::Loggers::addFlag(el::LoggingFlag::StrictLogFileSizeCheck);

   el::Loggers::reconfigureAllLoggers(conf);
</pre></div>


<p>The config file that I used is as follows:</p>



<ul class="wp-block-list"><li>GLOBAL:<br>
FORMAT               =  &#8220;%datetime %thread %level %msg&#8221;<br>
FILENAME             =  &#8220;D:\Win10_Workspaces\LogTest\LogTest\Logs\Logs.log&#8221;<br>
ENABLED              =  true<br>
TO_FILE              =  true<br>
TO_STANDARD_OUTPUT   =  false<br>
SUBSECOND_PRECISION  =  6<br>
PERFORMANCE_TRACKING =  false<br>
MAX_LOG_FILE_SIZE    =  2097152 ## 2MB</li></ul>



<p>I won&#8217;t describe it here because the Easylogging++ site does a pretty good job explaining it.  For the purpose of this tutorial though the important line is the MAX_LOG_FILE_SIZE.  When your log file exceeds this value a new log file will be generated and the old one will be archived.</p>



<p>To setup the software up for rotating logs you will need to install a callback function to do the job.  That&#8217;s accomplished using the call:</p>



<p>el::Helpers::installPreRollOutCallback(PreRollOutCallback);</p>



<p>This function will be called any time your file size hits the MAX_LOG_FILE_SIZE limit that you&#8217;ve set in the config file.</p>



<p>The callback function that I put together is as follows:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
void PreRollOutCallback(const char* fullPath, std::size_t s)
{
   char newPath&#x5B;256];

   ver++;

   std::string str(fullPath);

   std::string pathNoExtension = str.substr(0, str.find_last_of(&#039;.&#039;));

   sprintf_s(newPath, sizeof(newPath), &quot;%s_%s_%d.log&quot;, pathNoExtension.c_str(), GetDateTime().c_str(), ver);

   rename(fullPath, newPath);
}
</pre></div>


<p>All it really does is rename the existing log file with the date and a version number.  When the call returns Easylogging++ will generate a new log file with the default name.</p>



<p>And that&#8217;s it.  I&#8217;m including a download for a sample project that does all the above and creates three thread to demonstrate Easylogging++ multi-threading capabilities.</p>



<p>I&#8217;d like to give credit to the developers, Zuhd Web Services.  They&#8217;ve done an excellent job with this and it&#8217;s great of them to share their work with others.</p>



<p>Source Files:</p>



<p>Code is signed by <a href="https://pgp.mit.edu/pks/lookup?op=vindex&amp;search=0xD3FE1196E60697E6">Al Carnali</a></p>



<a href="https://www.carnali.com/Files/LogTest.zip" target="_blank">LogTest.zip</a>
<br>
<a href="https://www.carnali.com/Files/LogTest.zip.sig" target="_blank">LogTest.zip.sig</a>
<br>
Hash: 59AC89D5FAB6B6207F9EF81E210AF4CE3FA475A4A2A96C8297B2D61BCBC0A9DA



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2018/12/28/rotating-log-files-with-easylogging/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">408</post-id>	</item>
		<item>
		<title>Installing a Let&#8217;s Encrypt SSL Certificate</title>
		<link>https://www.carnali.com/2017/11/19/installing-a-lets-encrypt-ssl-certificate/</link>
					<comments>https://www.carnali.com/2017/11/19/installing-a-lets-encrypt-ssl-certificate/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Sun, 19 Nov 2017 22:56:25 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">http://www.carnali.com/?p=177</guid>

					<description><![CDATA[I just finished the process of installing an SSL certificate on my website and since I ran in to a few issues along the way, I thought I&#8217;d document the&#8230;]]></description>
										<content:encoded><![CDATA[<p>I just finished the process of installing an SSL certificate on my website and since I ran in to a few issues along the way, I thought I&#8217;d document the process here in the hope of saving someone some time and headaches in the future.</p>
<p>I use InMotion Hosting for my domain provider but since the majority of the install process uses CPanel, I suspect that what I&#8217;ve done will apply to other providers as well.</p>
<p>To perform the install of the certificate you will need SSH access to your site using Putty and also FTP access using the FTP program of your choice.</p>
<p>First open PuTTY and enter in the host name and port for your site.  In my case the host name was carnali.com and the port was 2222.</p>
<p>On the left side of the PuTTy dialog select Connection > SSH > Auth.  Use the browse button to load your private key file (generated while you were setting up your site for SSH access) and then press the &#8216;Open&#8217; button.</p>
<p>A console window will open and you will need to enter the user name and SSH password for your site.</p>
<p>The process is as follows:</p>
<p>Download the getssl script from github using the following command:</p>
<p>   <strong>curl &#8211;silent https://raw.githubusercontent.com/srvrco/getssl/master/getssl > getssl ; chmod 700 getssl</strong></p>
<p>Add a user agent to the getssl script using the following:</p>
<p>   <strong>sed -i &#8216;s/curl -k/curl -Aagent -k/&#8217; ./getssl</strong></p>
<p>Create a directory for the configuration files using the following command.   (Make sure you replace www.carnali.com with your own domain name)</p>
<p>   <strong>domain=www.carnali.com; ./getssl -c $domain</strong></p>
<p>Enter the following commands to generate the needed configuration files:<br />
   <strong><br />
configFile=.getssl/$domain/getssl.cfg; sed -i &#8216;s/SANS/#SANS/&#8217; $configFile</strong></p>
<p>   <strong>echo &#8216;CA=&#8221;https://acme-v01.api.letsencrypt.org&#8221;&#8216;; >> $configFile</strong></p>
<p>   <strong>echo &#8220;ACL=(&#8216;public_html/.well-known/acme-challenge&#8217;)&#8221; >> $configFile</strong></p>
<p>   <strong>./getssl $domain</strong></p>
<p>Next, launch your FTP program, navigate to the .getssl/www.carnali.com folder (again substitute your own domain wherever carnali.com occurs) and download:</p>
<p>   www.carnali.com.crt<br />
   www.carnali.com.key<br />
   chain.crt</p>
<p>Log in to your websites CPanel interface and navigate to &#8216;SSL/TLS > Manage SSL Sites&#8217;</p>
<p>Go to the &#8216;Install an SSL Website&#8217; section and do the following:</p>
<p>Select a Domain: carnali.com</p>
<p>Copy and paste the contents of www.carnali.com.crt to the Certificate section.<br />
Copy and paste the contents of www.carnali.com.key to the Private Key section.<br />
Copy and past the contents of chain.crt to the Certificate Authority Bundle section.</p>
<p>Press the &#8216;Install Certificate&#8217; button.</p>
<p>That should be it.  Open a web browser and enter https://www.carnali.com to see if you can connect without errors. </p>
<p>If you do have a problem DIgiCert has a nice page where you can enter your domain and perform a check on the newly installed certificate.</p>
<p>When I did my own certificate installation I initially could not get it to work.  When I attempted to go to my site I would see invalid certificate errors even though the certificate appeared to match the domain name.  I ended up figuring out that I needed to use www.carnali.com during the certificate generation process instead of carnali.com.  This is required because Lets Encrypt does not yet support wildcard certificates and requires an exact match for the domain name.  This also prevents you from using the certificate for subdomains on your server.  The good news is that Let&#8217;s Encrypt will start to support wildcard certificates in January of 2018 so this problem should go away.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2017/11/19/installing-a-lets-encrypt-ssl-certificate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">177</post-id>	</item>
		<item>
		<title>Creating Icons for Windows Store Applications</title>
		<link>https://www.carnali.com/2017/11/17/creating-icons-for-windows-store-applications/</link>
					<comments>https://www.carnali.com/2017/11/17/creating-icons-for-windows-store-applications/#respond</comments>
		
		<dc:creator><![CDATA[Al]]></dc:creator>
		<pubDate>Fri, 17 Nov 2017 00:39:04 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">http://www.carnali.com/?p=170</guid>

					<description><![CDATA[I ran into a strange problem today. I&#8217;m setting up a new system and I wanted to place shortcuts to Windows Store applications on the desktop. To do so, I&#8230;]]></description>
										<content:encoded><![CDATA[<p>I ran into a strange problem today.  I&#8217;m setting up a new system and I wanted to place shortcuts to Windows Store applications on the desktop.  To do so, I searched for the program in the start menu, and then attempted to drag the icon on to the screen.  When I did this I was greeted with a strange looking icon.</p>
<p><center><img decoding="async" src="http://www.carnali.com/wp-content/uploads/2017/11/badicon.jpg" alt="Bad Icon" /></center></p>
<p>Even worse, clicking on the icon would just open a folder on the desktop instead of launching the desired program.</p>
<p>With a bit of research I found that if you want to create a desktop icon for a Windows Store application you need to do things a little differently.  First, press the Windows key and the &#8216;R&#8217; key simultaneously.  This will bring up the Run dialog.  In the Run dialog enter the following: shell:AppsFolder then press OK.</p>
<p><center><img decoding="async" src="http://www.carnali.com/wp-content/uploads/2017/11/Apps.jpg" alt="Run Dialog" /></center></p>
<p>This will open the Applications folder on your desktop and from here you can just find the appropriate application icon and drag it on to the desktop.  Problem solved.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.carnali.com/2017/11/17/creating-icons-for-windows-store-applications/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">170</post-id>	</item>
	</channel>
</rss>
