<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:tt="http://teletype.in/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Millennium Falcon</title><generator>teletype.in</generator><description><![CDATA[Millennium Falcon]]></description><image><url>https://teletype.in/files/a5/a5e933d7-a88d-4e4b-b2ca-0f9a19c45097.png</url><title>Millennium Falcon</title><link>https://teletype.in/@heisenbug</link></image><link>https://teletype.in/@heisenbug?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><atom:link rel="self" type="application/rss+xml" href="https://teletype.in/rss/heisenbug?offset=0"></atom:link><atom:link rel="next" type="application/rss+xml" href="https://teletype.in/rss/heisenbug?offset=10"></atom:link><atom:link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></atom:link><pubDate>Wed, 22 Apr 2026 22:06:57 GMT</pubDate><lastBuildDate>Wed, 22 Apr 2026 22:06:57 GMT</lastBuildDate><item><guid isPermaLink="true">https://teletype.in/@heisenbug/HkxENxDqr</guid><link>https://teletype.in/@heisenbug/HkxENxDqr?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><comments>https://teletype.in/@heisenbug/HkxENxDqr?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug#comments</comments><dc:creator>heisenbug</dc:creator><title>Print All Nodes that don't have Sibling</title><pubDate>Wed, 30 Oct 2019 11:29:44 GMT</pubDate><description><![CDATA[<img src="https://teletype.in/files/58/5839a7d3-b399-4d83-a480-11c7405aac82.jpeg"></img>Problem Statement:]]></description><content:encoded><![CDATA[
  <p><strong>Problem Statement:</strong></p>
  <p>Given a Binary Tree write a program to print the nodes which don’t have a sibling node. Print all the nodes separated by space which don&#x27;t have sibling in the tree in sorted order if every node has a tree than print -1.</p>
  <figure class="m_original">
    <img src="https://teletype.in/files/58/5839a7d3-b399-4d83-a480-11c7405aac82.jpeg" width="196" />
  </figure>
  <p><strong>Explanation with example:</strong></p>
  <p><strong>What is having sibling in tree?</strong></p>
  <p>A child node is said to have a sibling if the other node has the same parent as the child node. That means the nodes are siblings if they have same parent.</p>
  <p>Like in the above example ‘2’ &amp; ‘6’ are siblings as they have the same parent ‘7’.</p>
  <p>In the above example the nodes that don’t have siblings are: <strong>9, 4</strong></p>
  <p><strong>Thus output:</strong></p>
  <p>4, 9 (sorted)</p>
  <p>N.B: Root is not considered for sibling checking.</p>
  <p><strong>Solution:</strong></p>
  <p>So, clearly a child node don’t have sibling, if its parent has only one pointer, either left or the right (that’s the child of course). Then we simply store the child node value &amp; produce a sorted list to print. The traversal method we use here is <a href="https://www.includehelp.com/data-structure-tutorial/level-order-traversal-on-a-binary-tree.aspx" target="_blank">level order traversal</a>.</p>
  <p><strong>Algorithm:</strong></p>
  <pre>1. Define tree Node structure
2. FUNCTION printSibling (Node* root)
    a) Declare a queue&amp; a vector using STL 
    Queue&lt;Node*&gt;q;
    vector&lt;int&gt;store;
    b) push the root
    EnQueue(q,root);
    Node* temp;
    While(queue is not empty) //do the level order traversal &amp; check for siblings
        temp=DeQueue(q);
        //if the current node has only one child, definitely the child 
        //has no sibling, thus store the child node value
        //left child pointer in NULL, right is not
        If temp-&gt;left==NULL&amp;&amp;temp-&gt;right!=NULL  
            Addtemp-&gt;right node value in store;
        END IF
        //right child pointer in NULL, left is not
        If temp-&gt;left!=NULL&amp;&amp;temp-&gt;right==NULL 
            Add temp-&gt;left node value in store;
        END IF
        // do level order traversing
        IF(temp-&gt;right)
        EnQueue(q, temp-&gt;right);
        IF(temp-&gt;left)
        EnQueue(q, temp-&gt;left);
    END WHILE
    c) If no node found without having sibling then vector size is zero then print -1
    d) Elsesort the vector to print sorted node value
END FUNCTION
</pre>
  <h2>C++ implementation to Print All Nodes that don&#x27;t have Sibling</h2>
  <pre>#include &lt;bits/stdc++.h&gt;
using namespace std;

// tree node is defined
class tree{    
	public:
		int data;
		tree *left;
		tree *right;
};

void printSibling(tree* root)
{
	//Declare queue using STL 
	queue&lt;tree*&gt; q;
	//enqueue the root
	q.push(root);
	vector&lt;int&gt; store;

	tree* temp;
	//do the level order traversal &amp; check for siblings
	while(!q.empty()){
		//dequeue
		temp=q.front();
		q.pop();
		//if the current node has only one child 
		//definitely the child has no sibling
		//store the child node value
		if(temp-&gt;left==NULL &amp;&amp; temp-&gt;right!=NULL){
			store.push_back(temp-&gt;right-&gt;data);
		}

		if(temp-&gt;left!=NULL &amp;&amp; temp-&gt;right==NULL){
			store.push_back(temp-&gt;left-&gt;data);
		}
		// do level order traversing
		if(temp-&gt;right)
			q.push(temp-&gt;right);
		if(temp-&gt;left)
			q.push(temp-&gt;left);
	}
	//if no node found without having sibling
	//vector size is zero
	//print -1
	if(store.size()==0){
		printf(&quot;-1, no such  node\n&quot;);
	return;
	}
	//sort the vector to print sorted node value
	sort(store.begin(),store.end());
	//printing
	for(auto it=store.begin();it!=store.end();it++)
		printf(&quot;%d &quot;,*it);
}

tree* newnode(int data)  // creating new node
{ 
	tree* node = (tree*)malloc(sizeof(tree)); 
	node-&gt;data = data; 
	node-&gt;left = NULL; 
	node-&gt;right = NULL; 

	return(node); 
} 


int main() 
{ 
	//**same tree is builted as shown in example**
	cout&lt;&lt;&quot;same tree is built as shown in example\n&quot;;
	tree *root=newnode(2); 
	root-&gt;left= newnode(7); 
	root-&gt;right= newnode(5); 
	root-&gt;right-&gt;right=newnode(9);
	root-&gt;right-&gt;right-&gt;left=newnode(4);
	root-&gt;left-&gt;left=newnode(2); 
	root-&gt;left-&gt;right=newnode(6);
	root-&gt;left-&gt;right-&gt;left=newnode(5);
	root-&gt;left-&gt;right-&gt;right=newnode(11);

	cout&lt;&lt;&quot;printing the nodes that don&#x27;t have sibling...\n&quot;&lt;&lt;endl; 
	printSibling(root);

	return 0; 
} 
</pre>
  <p><strong>Output</strong></p>
  <pre>same tree is built as shown in example
printing the nodes that don&#x27;t have sibling...

4 9
</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@heisenbug/SJHAygD5B</guid><link>https://teletype.in/@heisenbug/SJHAygD5B?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><comments>https://teletype.in/@heisenbug/SJHAygD5B?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug#comments</comments><dc:creator>heisenbug</dc:creator><title>Cheap Architecture vs Clean Architecture</title><pubDate>Wed, 30 Oct 2019 11:11:08 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/2c/2c5c2d7c-febc-4b8f-873d-b6315e14fe33.jpeg"></media:content><description><![CDATA[<img src="https://teletype.in/files/2c/2c5c2d7c-febc-4b8f-873d-b6315e14fe33.jpeg"></img>Enterprise software development tends to be riddled with abstract patterns and concepts. You can master the pillars of Object Oriented Programming — polymorphism, inheritance, encapsulation, and abstraction. You can learn about ]]></description><content:encoded><![CDATA[
  <figure class="m_original">
    <img src="https://teletype.in/files/2c/2c5c2d7c-febc-4b8f-873d-b6315e14fe33.jpeg" width="750" />
  </figure>
  <h2>How abstract is too abstract?</h2>
  <p>Enterprise software development tends to be riddled with abstract patterns and concepts. You can master the pillars of Object Oriented Programming — polymorphism, inheritance, encapsulation, and abstraction. You can learn about </p>
  <p><a href="https://exceptionnotfound.net/tag/design-patterns/?source=post_page---------------------------" target="_blank">Design Patterns</a></p>
  <p> such as the Strategy pattern and the Decorator pattern. You can apply </p>
  <p><a href="https://medium.com/@dhkelmendi/solid-principles-made-easy-67b1246bcdf?source=post_page---------------------------" target="_blank">SOLID principles</a></p>
  <p> so that your code is loosely coupled, highly cohesive, and as extensible as possible.</p>
  <p>But why? What benefits do the businesses actually receive when we apply all of these patterns and concepts to their software?</p>
  <p>It’s not that these things don’t supply any value, because they certainly can and do when done right. However, as a developer it’s far too easy to become so involved with learning and applying these abstract concepts that the reason </p>
  <p><em>why</em></p>
  <p> they’re being applied gets lost. And when that happens, the actual value in learning and applying these concepts can also be lost.</p>
  <p>In order to realize why we do these things, we’ll need to take a step back and find some common ground between some of the concepts.</p>
  <h2>Recognizing a pattern</h2>
  <p>A couple of years ago, I read Domain Driven Design by Eric Evans(the ). Being relatively new to software development, reading the concepts in this book and seeing how they applied to real world software stood out to me. I then began seeking out ways to design an elegant domain model. Trying to force these abstract concepts into existing enterprise applications is not easy, and you can easily end up with scattered remnants of Aggregate Roots and Value Objects that don’t fit in with anything else.</p>
  <p>More recently, I’ve read by Robert C. Martin. While reading this, it was almost impossible to not recognize the similarities of the concepts with DDD.</p>
  <p>From crafting a well encapsulated model that enforces the invariant constraints of the business, to defining separate layers of code such that high-level enterprise policies are not impacted by changes to low-level application details, both of these ideas ultimately focus on one thing: isolating the code that’s important to the business from the code that’s not (determining what code is “important” is the hard part).</p>
  <h2>Back to business</h2>
  <p>With that similarity uncovered, it allows us to see some general value behind all of these concepts.</p>
  <p>When you can have a system where the important code is truly encapsulated from the rest of the system, a number of benefits will unfold:</p>
  <p>The critical components of the business can now be easily tested.You can make cross-cutting changes to the core behavior of the system quickly and confidently.You can change underlying details (infrastructure, frameworks, etc.) of the application without affecting the behavior of the system.</p>
  <p>These are all wonderful, but there is yet one underlying benefit that they all provide for the business: They make the software cheap.</p>
  <p><strong>Cheap to test. Cheap to extend. Cheap to optimize.</strong></p>
  <h2>Win, Win</h2>
  <p>When looking for new patterns to learn and concepts to apply in enterprise software, it helps to keep this in mind. Because if you’re able to learn and build great software while simultaneously creating future business value, then everybody wins.</p>
  <p>https://hackernoon.com/cheap-architecture-0ju438xc</p>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@heisenbug/SJxfjG4cr</guid><link>https://teletype.in/@heisenbug/SJxfjG4cr?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><comments>https://teletype.in/@heisenbug/SJxfjG4cr?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug#comments</comments><dc:creator>heisenbug</dc:creator><title>C# vs. C++: Which Language is Right for Your Software Project?</title><pubDate>Mon, 28 Oct 2019 07:38:47 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/15/159827cb-849f-4e99-9f06-0ce0ec9120c0.png"></media:content><description><![CDATA[<img src="https://teletype.in/files/15/159827cb-849f-4e99-9f06-0ce0ec9120c0.png"></img>In an age where you have plenty of programming languages to choose from, it’s difficult to figure out which language to use when you set up your projects. Once you choose a language, it can be extremely difficult to switch to a new one, so consider your options carefully. You can work closely with your developer to choose a language for your application(s), but to help you make the right decision, here are some similarities and differences between two common programming languages, C# and C++.]]></description><content:encoded><![CDATA[
  <figure class="m_retina">
    <img src="https://teletype.in/files/15/159827cb-849f-4e99-9f06-0ce0ec9120c0.png" width="940" />
  </figure>
  <p>In an age where you have plenty of programming languages to choose from, it’s difficult to figure out which language to use when you set up your projects. Once you choose a language, it can be extremely difficult to switch to a new one, so consider your options carefully. You can work closely with your developer to choose a language for your application(s), but to help you make the right decision, here are some similarities and differences between two common programming languages, C# and C++.</p>
  <h3>THE BASICS</h3>
  <p>At a very basic level, both C# and C++ have similar code. C# is much newer to the game, however. It was introduced by Microsoft as a Java competitor in 2000. C++ has been a foundation language for many other languages, and it was introduced way back in the 1980s. Consequently, C++ has a much more prominent appearance in applications.</p>
  <p>Both C++ and C# are <a href="https://www.upwork.com/hiring/development/object-oriented-programming/" target="_blank">object-oriented languages</a>, although C++ is considered a harder language to work with. Both of them can be used in web and desktop applications, but C# is much more popular now for both applications. C++ is considered a more prestigious language used for applications such as games, operating systems, and very low-level programming that requires better control of hardware on the PC or server.</p>
  <p>If your application is a simple web or desktop application, most developers will urge you to work with C# if it’s their language of choice. If you want an application that works directly with computer hardware or deals with application development that C# is not efficient with, your developer will likely urge you to go with C++.</p>
  <h3>C# vs. C++: Major Similarities</h3>
  <p>C# is a C-based language, so it makes the two syntaxes similar. The developer uses brackets to segment coding structures, and the C-style object-oriented code that includes dependencies and libraries are very similar. If the coder is familiar with Java or C++, it’s very easy to move on to C#. However, moving from C# to C++ is likely more difficult for a <a href="https://www.upwork.com/hire/c-sharp-developers/" target="_blank">C# developer</a> because it’s a much more low-level language. C# handles much of the overhead that must be considered in a C++ program. This is just one reason C++ is considered a <em>more difficult language to learn</em> in the development world.</p>
  <p>Because <a href="https://www.upwork.com/hiring/development/c-vs-java/" target="_blank">C# was developed to compete against Java</a>, it’s much more similar to the Java language, but it still has similarities with C++ which include:</p>
  <ul>
    <li><strong>Object-oriented:</strong> Although the syntax is slightly different, the concept of classes, inheritance and polymorphism.</li>
    <li><strong>Compiled languages:</strong> Unlike Java which is an interpreted language, both C# and C++ are compiled languages. This means that before an application is launched on a PC or the server, the code must be converted to binaries. An executable EXE file is an example of a compiled file that could be written in C++ or C#.</li>
  </ul>
  <h3>C# and C++ Differences</h3>
  <p>The similarities of C++ and C# are few, because the languages are much more different than they are similar. Although the syntax is similar, don’t assume that the languages are similar behind the scenes.</p>
  <figure class="m_retina">
    <img src="https://teletype.in/files/91/9176e657-68fc-4ef1-963e-205c896ffef2.png" width="567.5" />
  </figure>
  <p><strong>A list of differences between the two languages include:</strong></p>
  <ul>
    <li><strong>Size of binaries:</strong>We mentioned that the two languages are compiled languages that turn your code into binary files. C# has a lot of overhead and libraries included before it will compile. C++ is much more lightweight. Therefore, C# binaries are much larger after it compiles compared to C++.</li>
    <li><strong>Performance:</strong> C++ is widely used when higher level languages are not efficient. C++ code is much faster than C# code, which makes it a better solution for applications where performance is important. For instance, your network analysis software might need some C++ code, but performance is probably not a huge issue for a standard word processing application coded in C#.</li>
    <li><strong>Garbage collection:</strong> With C#, you don’t have to worry much about garbage collection. With C++, you have no automatic garbage collection and must allocate and deallocate memory for your objects.</li>
    <li><strong>Platform target:</strong> C# programs are usually targeted towards the Windows operating system, although Microsoft is working towards cross-platform support for C# programs. With C++, you can code for any platform including Mac, Windows and Linux.</li>
    <li><strong>Types of projects:</strong> <a href="https://www.upwork.com/hire/c--freelancers/" target="_blank">C++ programmers</a> generally focus on applications that work directly with hardware or that need better performance than other languages can offer. C++ programs include server-side applications, networking, gaming, and even device drivers for your PC. C# is generally used for web, mobile and desktop applications.</li>
    <li><strong>Compiler warnings:</strong> C++ will let you do almost anything provided the syntax is right. It’s a flexible language, but you can cause some real damage to the operating system. C# is much more protected and gives you compiler errors and warnings without allowing you to make some serious errors that C++ will allow.</li>
  </ul>
  <h3>WHICH LANGUAGE SHOULD YOU USE FOR YOUR PROJECT?</h3>
  <p>C# developers and C++ developers have different skill sets, so you can post a project and determine which platform is the most efficient for your project after discussing it with both sides.</p>
  <p>A general rule of thumb is that web and desktop development is done using a higher level language such as C#. C# is a part of the <a href="https://www.upwork.com/hiring/development/dot-net-developer-job-description/" target="_blank">.NET language</a>, which is especially targeted for web development, but it also works easily with a Windows-based program. Although Microsoft is trying to port their language to Linux systems, it’s best to stick with C# and Windows environments.</p>
  <p>C++ is a lot more well-rounded in terms of platforms and target applications, but the developer pool is more limited since it’s not as popular for web and mobile applications. If your project is focused on extremely low-level processing, then you may need a C++ developer. You can also use C++ to create efficient, fast applications for server-side software. Ultimately, you can use C++ for much more than C# but it’s not always the most cost-efficient way to handle your project.</p>
  <p>The best way to decide on the right language is to post your project and ask developers for their opinion. Developers and advocates for both languages will pitch their ideas and give you more information on your specific project to help you decide.</p>
  <p>https://www.upwork.com/hiring/development/c-sharp-vs-c-plus-plus/</p>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@heisenbug/HyufNwf9S</guid><link>https://teletype.in/@heisenbug/HyufNwf9S?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><comments>https://teletype.in/@heisenbug/HyufNwf9S?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug#comments</comments><dc:creator>heisenbug</dc:creator><title>10 Tricky Interview Questions for Java Devs</title><pubDate>Sun, 27 Oct 2019 00:26:02 GMT</pubDate><description><![CDATA[Here's a list of ten popular interview questions that Java developers are likely to be asked in an interview, as well as links to relevant explanations for more details.]]></description><content:encoded><![CDATA[
  <p>Here&#x27;s a list of ten popular interview questions that Java developers are likely to be asked in an interview, as well as links to relevant explanations for more details.</p>
  <p>Here is a list of 10 tricky/popular interview questions and answers for Java developers. I got these questions out from StackOverflow. You are a junior or intermediate level Java developer and are planning to appear for interviews in the near future, you would probably find these questions to be useful enough.</p>
  <p><strong>Q1: Is Java “pass-by-reference” or “pass-by-value”?</strong></p>
  <p>Ans: Java is always “pass by value”. Read the details on this page, <a href="https://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value" target="_blank">Is Java “pass-by-reference” or “pass-by-value”?</a></p>
  <p><strong>Q2: How can you create a memory leak in Java?</strong></p>
  <p>Ans: This is possible by making use of a class loader and ThreadLocal. Read the details on this page, <a href="https://stackoverflow.com/questions/6470651/creating-a-memory-leak-with-java" target="_blank">Creating a memory leak in Java</a></p>
  <p><strong>Q3: What is the difference between package private, public, protected, and private?</strong></p>
  <p>Ans:</p>
  <ul>
    <li>A private member variable is accessible within the same class.</li>
    <li>A package private variable (member variable with no access specifier) is accessible within all classes in the same package.</li>
    <li>A protected variable is accessible within all classes in the same package and within subclasses in other packages.</li>
    <li>A public member is accessible to all classes.</li>
  </ul>
  <p>Read more details on this <a href="https://stackoverflow.com/questions/215497/in-java-difference-between-package-private-public-protected-and-private" target="_blank">page</a>.</p>
  <p><strong>Q4: What are two differences between a HashMap and a Hashtable?</strong></p>
  <p>Ans: A Hashtable is synchronized and does not allow null keys or values. Read more details on this page: <a href="https://stackoverflow.com/questions/40471/differences-between-hashmap-and-hashtable" target="_blank">differences between HashMap and Hashtable</a>.</p>
  <p><strong>Q5: What are different techniques for avoiding != null statements (Not Null Check)?</strong></p>
  <p>Ans: Usage of <em>assert</em> statements is one way. Custom annotations can also be defined for NotNull checks. See more details on this page: <a href="https://stackoverflow.com/questions/271526/avoiding-null-statements" target="_blank">How to avoid != null Statements</a>.</p>
  <p><strong>Q6: Does “finally” always execute in Java?</strong></p>
  <p>Ans: Not in a scenario such as an invocation of a “System.exit()” function, an infinite loop, or system crash, etc. More details can be found here: <a href="https://stackoverflow.com/questions/65035/does-finally-always-execute-in-java" target="_blank">Does finally always execute in Java?</a></p>
  <p><strong>Q7: Is it possible to call one constructor from another in Java?</strong></p>
  <p>Ans: Yes, but one can only chain to one constructor — and it has to be the first statement in your constructor body. More details can be found on this page: <a href="https://stackoverflow.com/questions/285177/how-do-i-call-one-constructor-from-another-in-java" target="_blank">How do I call one constructor from another in Java?</a></p>
  <p><strong>Q8: Which one should be used, “implements Runnable” vs. “extends Thread”?</strong></p>
  <p>Ans:“Implements Runnable” is the preferred way. Read further details here: <a href="https://stackoverflow.com/questions/541487/implements-runnable-vs-extends-thread" target="_blank">Implements Runnable vs. Extends Thread</a></p>
  <p><strong>Q9: Is it possible to break out of nested loops in Java?</strong></p>
  <p>Ans: Yes, and here is an example of how to do it: <a href="https://stackoverflow.com/questions/886955/breaking-out-of-nested-loops-in-java" target="_blank">Breaking out of nested loops in Java</a>.</p>
  <p><strong>Q10: What is reflection and why is it useful?</strong></p>
  <p>Ans: Reflection is used to describe code that is able to inspect other code in the same system. Read the reasons for doing so here: <a href="https://stackoverflow.com/questions/37628/what-is-reflection-and-why-is-it-useful" target="_blank">Why Reflection is useful</a>.</p>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@heisenbug/H1mvPEl5B</guid><link>https://teletype.in/@heisenbug/H1mvPEl5B?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug</link><comments>https://teletype.in/@heisenbug/H1mvPEl5B?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=heisenbug#comments</comments><dc:creator>heisenbug</dc:creator><title>Catalina’s Sidecar Turns an iPad into a Second Mac Monitor</title><pubDate>Fri, 25 Oct 2019 08:52:54 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/32/32171e9c-3231-4216-b97c-38dc3140e7a4.jpeg"></media:content><description><![CDATA[<img src="https://teletype.in/files/32/32171e9c-3231-4216-b97c-38dc3140e7a4.jpeg"></img>One marquee feature in macOS 10.15 Catalina is Sidecar, which enables the use of an iPad as a second Mac monitor. That is handy for extending the Mac desktop to gain added workspace, or for mirroring a Mac’s desktop on a second screen to share information with others more conveniently.]]></description><content:encoded><![CDATA[
  <figure class="m_retina">
    <img src="https://teletype.in/files/32/32171e9c-3231-4216-b97c-38dc3140e7a4.jpeg" width="900" />
  </figure>
  <p>One marquee feature in macOS 10.15 Catalina is Sidecar, which enables the use of <a href="https://www.apple.com/macos/catalina/docs/Sidecar_Tech_Brief_Oct_2019.pdf" target="_blank">an iPad as a second Mac monitor</a>. That is handy for extending the Mac desktop to gain added workspace, or for mirroring a Mac’s desktop on a second screen to share information with others more conveniently.</p>
  <p>Turning an iPad into a secondary display is not a new idea. Third-party software, such as <a href="https://www.duetdisplay.com/" target="_blank">Duet Display</a> and <a href="https://avatron.com/introducing-air-display-3/" target="_blank">Air Display</a>, has turned iPads into Mac monitors for years. <a href="https://blog.astro-hq.com/" target="_blank">AstroHQ</a> even came up with a hardware approach, in the form of its $69.99 <a href="https://lunadisplay.com/" target="_blank">Luna Display</a> dongles for Mac, to provide better performance and reliability (see “<a href="https://tidbits.com/2018/12/07/luna-display-turns-an-ipad-into-a-responsive-mac-screen/" target="_blank">Luna Display Turns an iPad into a Responsive Mac Screen</a>,” 7 December 2018).</p>
  <p>AstroHQ recently <a href="https://blog.astropad.com/sherlocked-by-apple/" target="_blank">lamented</a> that it had been “<a href="https://www.howtogeek.com/297651/what-does-it-mean-when-a-company-sherlocks-an-app/" target="_blank">Sherlocked</a>” by Apple and Sidecar, but insisted it was <a href="https://lunadisplay.com/pages/message-from-luna-founders/" target="_blank">still in the game</a>. Indeed, the Luna can do things Sidecar cannot. Most recently, AstroHQ announced a <a href="https://lunadisplay.com/pages/meet-mac-to-mac-mode" target="_blank">Mac-to-Mac mode</a> for Luna Display that can turn one Mac into a second display for another. That’s something TidBITS has been interested in for years—see “<a href="https://tidbits.com/2007/02/05/build-your-own-23-inch-macbook/" target="_blank">Build Your Own 23-inch MacBook</a>” (5 February 2007) and “<a href="https://tidbits.com/2007/08/27/tools-we-use-teleport/" target="_blank">Tools We Use: Teleport</a>” (27 August 2007)—and we hope to evaluate Luna Display’s Mac-to-Mac mode soon.</p>
  <p>Apple’s Sidecar feature, though, is free (assuming users already have all the hardware pieces). The fact that it’s built into macOS means it may relegate some third-party competitors to niche status (or the pursuit of other markets, such as Windows and Android.)</p>
  <p>With Sidecar, Apple mostly delivers on its promise to readily transform an iPad into a Mac screen with little fuss and a grab bag of unique capabilities. Be warned, though, that Sidecar is still a bit rough around the edges, so expect to see glitches.</p>
  <h2>Attaching the Sidecar</h2>
  <p>Sidecar isn’t for everyone, thanks to stringent hardware requirements. You need a Mac with a <a href="https://en.wikipedia.org/wiki/List_of_Macintosh_models_grouped_by_CPU_type#Skylake" target="_blank">Skylake processor</a> or newer running Catalina—this leaves out plenty of older Catalina-ready Macs—along with an Apple Pencil-compatible iPad, which also must be running iPadOS 13.</p>
  <p>Sidecar works over a wired or wireless connection. Tethering the tablet to the Mac via a USB-C or Lightning cable provides the best performance and reliability. The wireless option isn’t bad, though—when it works at all.</p>
  <p>For a wireless connection, your Mac and iPad must be using the same iCloud account. Both devices must have Bluetooth, Wi-Fi, and Handoff (in Settings &gt; General &gt; Handoff) enabled. In wireless mode, Sidecar uses Bluetooth for initial iPad detection and a point-to-point hookup for data transfers once connected, with an effective range of about 10 feet (3 meters).</p>
  <p>If the wireless mode doesn’t work for you, try a physical cable. I resorted to this approach on a number of occasions when the wireless option inexplicably failed me. The USB-C or Lightning cable must connect directly to a Mac, not indirectly via a hub.</p>
  <p>Regardless of the connection method, to begin using Sidecar, click the Display icon in the menu bar, and choose your iPad from the menu. The Mac’s screen will blink momentarily, and then the iPad’s screen will be replaced by an extension of the Mac desktop, just as you’d expect.</p>
  <figure class="m_retina">
    <img src="https://teletype.in/files/5c/5cc281e4-3683-4f5f-bf80-546d18c2da47.jpeg" width="445.5" />
  </figure>
  <p>If that doesn’t work, open System Preferences &gt; Display, and make sure that your iPad is the designated AirPlay display via the pop-up menu at the bottom.<br /></p>
  <figure class="m_retina">
    <img src="https://teletype.in/files/52/528c762e-08a4-48fc-a105-f9b22caf2146.jpeg" width="668" />
  </figure>
  <p>Once everything is set up properly, you can use the iPad with your Mac just as you would any dual-display setup. For instance, in System Preferences &gt; Display, you can turn screen mirroring on and off or adjust how your Mac and iPad displays are arranged in relation to each other.</p>
  <p>Now you can decide which apps appear on the iPad screen. This can be as simple as dragging windows from one display to the other. Better yet, click the Window menu available in many apps, and you’ll see an option to move windows with one click: Move to iPad or Move Window Back to Mac, depending on which device contains the window. Some apps lack a Window menu, but similar window-moving options appear when you hover the Mac’s pointer over the window’s green zoom button.</p>
  <figure class="m_retina">
    <img src="https://teletype.in/files/1e/1ea6df08-dda0-4fdf-820d-a1734cbe6347.jpeg" width="780" />
  </figure>
  <h2>Special Sidecar Features</h2>
  <p>Sidecar offers several unique features that make it interesting if a bit quirky. For instance, the iPad Sidecar’s tablet interface displays two optional control strips—one running horizontally on the iPad display, the other vertically—that respond to finger control.</p>
  <p>The horizontal strip, called the Touch Bar, should be instantly familiar to anyone who has used the physical Touch Bar on a MacBook Pro, and it looks and works much the same. Different control options appear depending on which app you are using, just as on the MacBook Pro. The physical Touch Bar has received lukewarm reviews, and I’m not sure the Sidecar equivalent will be any more popular, but some people might like it.</p>
  <figure class="m_original">
    <img src="https://teletype.in/files/63/63b3007e-a4c1-451e-9c75-57524159cd9c.jpeg" width="640" />
  </figure>
  <p>The vertical strip, called the Sidebar, does a number of things:</p>
  <ul>
    <li>The top two buttons show or hide the Mac menu bar on the iPad screen when a Mac app is in full-screen mode and shift the Dock between the Mac and iPad screens.</li>
    <li>In the middle of the strip is a quartet of modifier keys: Command, Option, Control, and Shift. These are mostly for specialized users, like artists who need to engage a modifier key with one hand while using an Apple Pencil with the other. Apple provides an example:</li>
  </ul>
  <blockquote>While sculpting a model in ZBrush, an artist can use the modifier keys in the sidebar to zoom, rotate, and pan around their model as they draw with Apple Pencil. Double-tapping a modifier key will keep it active, allowing more prolonged work without the need to hold it down. An additional tap will deactivate the key.</blockquote>
  <ul>
    <li>At the bottom of the Sidebar are an Undo button, a Keyboard button to show and hide a small floating keyboard (which appears to be the stock iPadOS 13 virtual mini-keyboard), and a Disconnect button to end a Sidecar session.</li>
  </ul>
  <p>You can configure these control strips in System Preferences &gt; Sidecar. It lets you toggle the Sidebar and Touch Bar on or off. It also enables you to move the Sidebar to the left or right of the screen, and put the Touch Bar on the top or bottom. The pane also lets you initiate or end a Sidecar session, as an alternative to using the Display menu in the menu bar or the Disconnect button on the Sidebar.</p>
  <figure class="m_retina">
    <img src="https://teletype.in/files/3f/3f96aae7-1107-48ca-84d8-f7ff8a48287e.png" width="600" />
  </figure>
  <p>Honestly, I never found the Sidebar or Touch Bar particularly useful, and mostly kept them hidden to maximize the usable screen real estate on the iPad.</p>
  <h2>Using the Apple Pencil</h2>
  <p>Sidebar and Touch Bar aside, you largely can’t use the iPad via finger input during a Sidecar session, which is confusing since the iPad is fundamentally a touch-driven device. For the most part, you’ll use the mouse cursor on the iPad screen, like any other display.</p>
  <p>There are a few ways of interacting with Mac apps on Sidecar using your fingers. Use vertical two-finger swipes to scroll through long Web pages and documents. When you are working in text documents, you can use iPadOS 13’s three-finger actions to copy (pinch), cut (pinch twice), paste (pinch out), undo (swipe left or double-tap) and redo (swipe right), much as you would using native iPad apps.</p>
  <p>Sadly, inconsistent fingers-on-iPad responsiveness kept me from relying on these actions in Sidecar as routine alternatives to Mac mouse and keyboard input.</p>
  <p>If you have an Apple Pencil, you can also use it to tap Mac interface elements on the iPad screen and to control pointer and cursor positioning. Swiping with the Apple Pencil selects text.</p>
  <p>As with finger input, I found Apple Pencil support to be unreliable. Sometimes it worked, but it often failed, for reasons I couldn’t discern. I gave up and relied on my Mac input devices most of the time.</p>
  <p>Sidecar also supports several everyday tasks via Continuity features, which work independently from Sidecar. One of these, <a href="https://support.apple.com/guide/mac-help/insert-sketches-from-iphone-or-ipad-mchl74e7c6df/mac" target="_blank">Continuity Sketch</a>, lets you sketch with an Apple Pencil on your iPad and insert the sketch into a Mac document. Similarly, <a href="https://support.apple.com/guide/mac-help/mark-up-files-mchl1fd88863/10.15/mac/10.15" target="_blank">Continuity Markup</a> lets you sign Mac documents, correct papers, or circle details in images using an Apple Pencil on the iPad.</p>
  <p>More sophisticated Apple Pencil actions are possible when using Sidecar with <a href="https://apps.apple.com/us/story/id1479231062" target="_blank">a variety of third-party apps</a>—including productivity apps, such as BusyCal, Evernote and PDFpen, as well as apps for drawing, design, and photo or video editing, such as Adobe Illustrator, Affinity Photo, Final Cut Pro and <a href="https://www.pixelmator.com/blog/" target="_blank">Pixelmator Pro</a>. Note the ZBrush example above.</p>
  <p>A double-tap on the side of the Apple Pencil 2 engages particular features in some apps. If this is the case with apps you are using, enable double-tap functionality via the Sidecar pane in System Preferences. Otherwise, keep it deactivated.</p>
  <h2>Other Features</h2>
  <p>Here are a few other Sidecar features and quirks to keep in mind:</p>
  <ul>
    <li><strong>Sidecar and iPadOS:</strong> Sidecar doesn’t prevent you from using iPadOS when Sidecar is engaged. Swipe up from the bottom of the iPad screen, and the Home screen reappears, with a Sidecar icon on the far right of the iPad’s Dock. Tap the icon to re-engage Sidecar. You can even have iPadOS Slide Over windows floating atop Sidecar—just swipe left from the right side of the iPad screen. (Apple <a href="https://www.apple.com/macos/catalina/docs/Sidecar_Tech_Brief_Oct_2019.pdf" target="_blank">claims</a> you can position Sidecar and an iPad app next to each other via Split View, but I couldn’t get this to work.)</li>
    <li><strong>Sidecar with other external displays:</strong> Sidecar supports only one iPad at a time. However, it has no problem working in tandem with a conventional secondary monitor that is also hooked up to the Mac, for a total of three active screens operating as a single, extended display.</li>
    <li><strong>Limited display settings:</strong> You can’t change display scaling and color profiles on the iPad. My 11-inch iPad Pro’s screen is stuck at a pixel-doubled resolution of 1116-by-756 on the Mac (which doesn’t look bad), compared to the IPad’s native resolution of 2388-by-1668 pixels.</li>
    <li><strong>Sidecar and external keyboards:</strong> Although it’s possible to use Sidecar’s cramped on-screen keyboard, it’s not suitable for extended interaction, and the full system keyboard is not available. You can use an external keyboard, such as Apple’s Smart Keyboard for the iPad, perhaps when moving away from the Mac and using your iPad and Sidecar on the couch. Prepare for wonkiness, though. I’ve already noted issues with finger and Apple Pencil screen interaction that would cripple such work sessions even with an attached keyboard. Also, Command+Q does not work with a physical keyboard. Command+Tab during a Sidecar session does not bring up the Mac’s app switcher, as you might expect, but the iPad app switcher. Command+Space won’t open Spotlight on the Mac, which would make the most sense during a Sidecar session, but iPadOS search.</li>
  </ul>
  <h2>Sidecar Upshot</h2>
  <p>Sidecar does not yet match third-party alternatives feature for feature, as Luna Display maker AstroHQ <a href="https://www.apple.com/macos/catalina/docs/Sidecar_Tech_Brief_Oct_2019.pdf" target="_blank">takes pains to note</a>. But the fact that Sidecar is free and built into the latest version of macOS and iPadOS means it automatically has a broad audience.</p>
  <p>Apple has aspired to make Sidecar dead simple to use, which adds to its appeal. It largely succeeds in its goal of transforming an iPad into a Mac screen.</p>
  <p>But, as I discovered, the technology is still glitchy and unreliable. Feel free to give it a try, but temper your expectations for now.</p>
  <p>https://tidbits.com/2019/10/21/catalinas-sidecar-turns-an-ipad-into-a-second-mac-monitor/</p>

]]></content:encoded></item></channel></rss>