Cyprich.com

Occasionally Relevant Insights from a Software Builder

By

Real Time Code Compiler from Skype

Screen sharing apps are commonly used in business meetings where people aren’t sitting next to each other in a boardroom. Another use I have for them is in technical support for software where your client shows you on their computer what bug they discovered in your software.

Skype created an interesting way to do screen sharing. They created a real time code compiler where you can edit and compile code in C, C++, C#, Java, JavaScript, Python, or Ruby. This can be used for showing your programming skills during a job interview without being there in person. The site also shows a video of the people in the session so you can see the shocked look of the interviewer when they see brilliant code like my swap function (see below).

Screenshot 2017-09-01 21.22.53

The screen sharing compiler can be found at www.skype.com/interviews. I’m guessing by the name its meant for job interviews Smile but there are other uses as well, such as students helping each other code.

This is a very useful site and it will probably wind up in the Skype application itself. It will run much better as an app than a web site when it comes to streaming audio and video.

By

C#: Bonjour Monde!

This is the Canadian version of the “Hello World! program that every programmer learned in the first 5 minutes of their schooling. Compile this as a console project to test if your compiler is working.

ConsoleApplication1
{
  class Program
  {
    static void Main (string [] args)
 
   {
      Console.WriteLine (“Bonjour Monde!”);
 
     Console.ReadKey ();
 
   }
  }
}

By

How to Copy Contents of HTML Textbox to Another

I recently made changes to a web form that populated a PDF through an XFDF file. In the new code, instead of outputting to an XFDF, the page outputs to an HTML file. Everything worked great, except the HTML page lacked one feature the PDF did. If you have 2 fields with the same name on a PDF, when you update one field, the other field automatically gets the same content. This naming trick won’t work in HTML.

The sample code below will copy the contents of a textbox to another textbox without using JavaScript. The updates occur during each key press. I’ve include examples in standard HTML and ASP.NET. The red text is the code you use to copy one textbox to another.

HTML:

<form name="aForm" action="" method="" />
  <input type="text" name="TextBox1" onkeyup="document.aForm.TextBox2.value = this.value" />
  <input type="text" name="TextBox2" />
 </form>

ASP.NET:

<asp:TextBox ID="TextBox1" runat="server" onkeyup="document.aForm.TextBox2.value = this.value"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>