<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Javier Escobar</title>
    <description>The latest articles on DEV Community by Javier Escobar (@javierx2010).</description>
    <link>https://dev.to/javierx2010</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F210713%2Fde789f1d-31d0-4b59-a8d9-390649be6052.jpg</url>
      <title>DEV Community: Javier Escobar</title>
      <link>https://dev.to/javierx2010</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/javierx2010"/>
    <language>en</language>
    <item>
      <title>My third Side Project was my BCompSc Thesis: Remote Operating Theater</title>
      <dc:creator>Javier Escobar</dc:creator>
      <pubDate>Wed, 20 May 2020 02:45:07 +0000</pubDate>
      <link>https://dev.to/javierx2010/my-third-side-project-was-my-bcompsc-thesis-remote-operating-theater-o4a</link>
      <guid>https://dev.to/javierx2010/my-third-side-project-was-my-bcompsc-thesis-remote-operating-theater-o4a</guid>
      <description>&lt;p&gt;Or, in spanish, "Sistema Quirófano Remoto".&lt;/p&gt;

&lt;p&gt;Yes, my BCompSC thesis was my side project because I started a full-time remote job by the end of college and I only could be able to work on my thesis at night and on weekends. I had a tough yet very creative tutor and this was his idea:&lt;/p&gt;

&lt;p&gt;"So, we have these analog video recording cards that we can attach to PCI ports and record the video signal of cameras and devices like laparoscopes during a surgical practice. I wonder if we can transmit it somewhere else with high quality so another surgeon could give advice or even teach remotely".&lt;/p&gt;

&lt;p&gt;Yes, PCI, not even PCI Express. It was 2008 and there was no money for advanced hardware like that. By that year, commercial internet was also really slow in this corner of the world. 1 Mbps was considered extremely fast and there was no such thing as simultaneous HQ video with that speed.&lt;/p&gt;

&lt;p&gt;"But, do you know what Internet 2 is? We have that type of Internet here and so other buildings in the city including the Urology Institute. With &lt;a href="https://www.internet2.edu/"&gt;Internet 2&lt;/a&gt; you can connect Valencia (Venezuela) and Valencia (Spain) with 56 Mbps and imperceptible delay".&lt;/p&gt;

&lt;p&gt;Woohoo! I imagined a new world with that speed! But soon a realized that it isn't commercial so I wouldn't find YouTube on it. 😞&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5d-uebAR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.quickmeme.com/img/f3/f3ac0751c0b20cd618ddcbe2425f8b0caf7ad057d44a230fbca5253924116921.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5d-uebAR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.quickmeme.com/img/f3/f3ac0751c0b20cd618ddcbe2425f8b0caf7ad057d44a230fbca5253924116921.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"So your duty, if you accept it, is to build some kind of software where you could transmit and let doctors assist, and review, remote surgeries letting them capture video signal from at least 4 cameras or equipment at the same time, hold video conferencing, and accessible through a web browser"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8shqXC9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gecon.es/wp-content/uploads/2016/11/Challenge-Accepted-Meme-3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8shqXC9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gecon.es/wp-content/uploads/2016/11/Challenge-Accepted-Meme-3.jpg" alt="Alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It took me exactly 12 months to complete what was proposed. Mainly because the lack of time, and also testing phase took longer than what was expected because surgeries can't be scheduled based on my free time so I had to quit my job by the end of the project if I was willing to get my BCompSc degree by 2010.&lt;/p&gt;

&lt;p&gt;I also wrote a paper, with my tutor, about this awesome project and you can get it &lt;a href="http://www.wseas.org/multimedia/journals/biology/2012/035702-187.pdf"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Deciding The Stack&lt;/h1&gt;

&lt;h2&gt;Backend&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;PostgreSQL:&lt;/b&gt; I wanted so bad to use MySQL, but public university encourage the use of PostgreSQL for reasons that nobody knew and nobody knows. NoSQL was also an option but I had 0 expertise on that field so I played it safe. A database was needed to store user and surgery information so can be acceded later to review a past procedure for teaching or reviewing purposes.
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;PHP:&lt;/b&gt; Also, playing safe. My job was about building Drupal apps. So, PHP was the smart choice.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Middleware&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Media Server:&lt;/b&gt; Well, you just can't stream video without something in the middle that could let you watch live or resume a video stream. You need a media server and there were a few options.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following benchmark exposes an assessment we made in order to select which media server will be used. The were some open source solutions like &lt;a href="https://www.red5pro.com/red5-media-server/"&gt;Red5&lt;/a&gt; and Wowza but Wowza documentation was so poor we couldn't test it without failing on every attempt. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
 &lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td width="131"&gt;&lt;p class="MsoNormal"&gt;&lt;span class="SpellE"&gt;&lt;b&gt;&lt;span&gt;Wowza&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;Red5&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;FMS&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Multiplatform&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Open Source&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Codebase&lt;/td&gt;
&lt;td&gt;Java&lt;/td&gt;
&lt;td&gt;Java&lt;/td&gt;
&lt;td&gt;C&lt;span&gt;++&lt;/span&gt;
&lt;/td&gt;
 &lt;/tr&gt;
 &lt;td&gt;Documentation&lt;/td&gt;
&lt;td&gt;Not available&lt;/td&gt;
&lt;td&gt;Poor&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
 
 &lt;tr&gt;
&lt;td&gt;Has RTMP&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Supported Video Codecs&lt;/td&gt;
&lt;td&gt;FLV, H.264&lt;/td&gt;
&lt;td&gt;FLV&lt;/td&gt;
&lt;td&gt;FLV, H.264&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Supported Audio Codecs&lt;/td&gt;
&lt;td&gt;FLV, MP3, AAC&lt;/td&gt;
&lt;td&gt;FLV, MP3&lt;/td&gt;
&lt;td&gt;FLV, MP3, AAC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;AMF0 and AMF3 Support&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Clustering&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Server Side Programming&lt;/td&gt;
&lt;td&gt;JS and limited AS3&lt;/td&gt;
&lt;td&gt;JS&lt;/td&gt;
&lt;td&gt;AS3&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Streaming&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
&lt;td&gt;Shared Objects&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Red5 worked pretty fine with low res videos but it couldn't handle 480p using OnVP6. On the other hand, we had Flash Media Server. Written in C++, it was fast and reliable even with resolutions like 720p (remember, 2008 and PIV computers). The free license of Flash Media Server only was able to handle up to 10 streams at the time and it was enough! &lt;/p&gt;

&lt;p&gt;Also, streaming isn't the only thing it was able to handle, also Shared Objects so apps like realtime chat and real time whiteboards were possible to implement with such middleware.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.silexlabs.org/amfphp/"&gt;AMFPHP&lt;/a&gt;:&lt;/strong&gt; this middleware library was responsible for serializing AS3 objects so they could be transferred from and to the backend. It still exists on &lt;a href="https://github.com/silexlabs/amfphp-2.0"&gt;GitHub&lt;/a&gt;. But why am I mentioning Action Script here? Well, you'll find why in the frontend section.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Frontend&lt;/h2&gt;

&lt;p&gt;Analogous to the media server, we benchmarked 4 scenarios or technologies HTML &amp;amp; JS, Laszlo, Silverlight, and Flex. I won't show that table here, it is bigger than the other one and I don't want to annoy you (more...) 🙈&lt;/p&gt;

&lt;p&gt;Before Angular, React or VueJS, there was something called Rich Internet Applications in a world where HTML5 &amp;amp; ECMAScript were not able to deliver desktop like solutions in your browser. Java Applets were already obsolete and Adobe and Microsoft decided to implement runtimes to fill this gap.&lt;/p&gt;

&lt;p&gt;Adobe was saying that they Open Sourced an Object-Oriented framework (Adobe Flex) that would let you write amazing apps, using a language very similar to Java (Yes, Action Script 3) and style them using its API or CSS. Also, it would integrate flawlessly with Flash Media Server so we got a winner!&lt;/p&gt;

&lt;p&gt;The following code shows how we use AMFPHP inside one of the classes of the project written in AS3. Follow the comments to understand it better.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;assets&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;flash.events.*&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;flash.net.NetConnection&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;flash.net.Responder&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PGDBConexion&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//The file gateway.php has a class with a set of public methods prepared to receive an object&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="nl"&gt;gateway:&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://127.0.0.1/amfphp/gateway.php"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="nl"&gt;conexion:&lt;/span&gt;&lt;span class="nc"&gt;NetConnection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;NetConnection&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;PGDBConexion&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;         
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;conexion&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addEventListener&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NetStatusEvent&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;NET_STATUS&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;netStatusHandler&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;conexion&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;connect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;gateway&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;netStatusHandler&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;event:&lt;/span&gt;&lt;span class="nc"&gt;NetStatusEvent&lt;/span&gt;&lt;span class="o"&gt;):&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="o"&gt;...&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

     &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;funcion:&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;responder:&lt;/span&gt;&lt;span class="nc"&gt;Responder&lt;/span&gt;&lt;span class="o"&gt;):&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
       &lt;span class="c1"&gt;//The variable 'funcion' is the name of the method inside the php class in gateway.php&lt;/span&gt;
       &lt;span class="c1"&gt;//and responder is the callback function that will receive the response&lt;/span&gt;
       &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;conexion&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;call&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;funcion&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;responder&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
     &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And when we need to call a particular endpoint or method we can do something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;assets&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="o"&gt;...&lt;/span&gt;
  &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;flash.net.Responder&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SelectorStream&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Panel&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;       
    &lt;span class="o"&gt;...&lt;/span&gt;     
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="nl"&gt;conexion:&lt;/span&gt;&lt;span class="nc"&gt;PGDBConexion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PGDBConexion&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="nl"&gt;responder:&lt;/span&gt;&lt;span class="nc"&gt;Responder&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;...&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;SelectorStream&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;super&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;  
      &lt;span class="o"&gt;...&lt;/span&gt;       
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;responder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Responder&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;onResult&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;onFault&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
      &lt;span class="c1"&gt;//This is were we invoke the getStreams method from gateway.php&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;conexion&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;call&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"pgDB.getStreams"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;responder&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;onResult&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;data:&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt;&lt;span class="o"&gt;):&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;//The object 'data' will contain the response already serialized to be used in AS3&lt;/span&gt;
      &lt;span class="o"&gt;...&lt;/span&gt;   
    &lt;span class="o"&gt;}&lt;/span&gt;       

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;onFault&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;fault:&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt;&lt;span class="o"&gt;):&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="o"&gt;...&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;Formal Software Engineering&lt;/h2&gt;

&lt;p&gt;Let's remember this was a formal software engineering challenge so we had to documentate professionally everything so I'm sharing a few diagrams that describe the overall architecture of the solution. I used UML, of course. 🤓&lt;/p&gt;

&lt;h3&gt;Use Case Diagram&lt;/h3&gt;

&lt;p&gt;This is the Use Case diagram of one of the three possible roles that a user could have inside the system.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KAA9aO6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0alhip5avs29027y5i6q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KAA9aO6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0alhip5avs29027y5i6q.png" alt="Use case diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Entity-Relationship Diagram&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kMHngASe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mtn6ea0gnzsmr6pm0ajr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kMHngASe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mtn6ea0gnzsmr6pm0ajr.png" alt="Entity-Relationship diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Class Diagram&lt;/h3&gt;

&lt;p&gt;This is a small subset showing only two types of relationships and methods&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fe89L1sS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/p81ebzxfl00xwn3btdsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fe89L1sS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/p81ebzxfl00xwn3btdsk.png" alt="Class diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Deployment Diagram&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g2L3XoH4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bejj6yc198jjt46qdpgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g2L3XoH4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bejj6yc198jjt46qdpgw.png" alt="Deployment Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;Final words&lt;/h1&gt;

&lt;p&gt;This Side Project was software engineering as its finest for me!&lt;/p&gt;

&lt;p&gt;I did love this project, I researched, I tested, I delivered small increments using the MVP approach without knowing it was called that way.&lt;br&gt;
I did something nobody has done before and that system is still running on a Sun Server at the Urology Institute here, in Valencia, Venezuela.&lt;/p&gt;

&lt;p&gt;This was my last side project until 2020, where I started two new side projects. Now I have 10 additional years of experience and technology has changed. I'm willing to share more side projects with you guys!&lt;/p&gt;

&lt;p&gt;Unlike the other ones, I do have the source code and binaries of this gem. 💎&lt;/p&gt;

&lt;p&gt;Thanks for reading! And if you like it, then like it, clap it or share it! 😜&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>software</category>
      <category>engineering</category>
      <category>thesis</category>
    </item>
    <item>
      <title>My second Side Project: Monopoly Game</title>
      <dc:creator>Javier Escobar</dc:creator>
      <pubDate>Tue, 19 May 2020 01:07:35 +0000</pubDate>
      <link>https://dev.to/javierx2010/my-second-side-project-1mbc</link>
      <guid>https://dev.to/javierx2010/my-second-side-project-1mbc</guid>
      <description>&lt;p&gt;This is the second post of a series that will tell a story of my evolution as a programmer. After Visual Basic, I coded in C no-stop for about two years.&lt;/p&gt;

&lt;p&gt;It happened &lt;a href="https://dev.to/javierx2010/my-first-side-project-42f0"&gt;again&lt;/a&gt;, I could not find the code, screenshots or the binaries of these projects. ☹&lt;/p&gt;

&lt;p&gt;I was freshmen in college when I was introduced to the C programming language, the one that was taught by the moment before learning C++ or Java in the advanced courses.&lt;/p&gt;

&lt;p&gt;Learning C was not as straightforward as I though... I had a hard time dealing with malloc, calloc and pointers. But I got the trick eventually.&lt;/p&gt;

&lt;p&gt;I also managed to be placed as 2nd in a programming marathon. The winners were from advanced courses.&lt;/p&gt;

&lt;p&gt;At summer vacations, I wanted to challenge myself coding something cool and then I remembered my algorithm teacher told us we can do anything with C. Everything is C, our PlayStation games, Linux and Windows so if you get to learn C in depth, you could be able to do amazing stuffs.&lt;/p&gt;

&lt;h1&gt;A Monopoly Game&lt;/h1&gt;

&lt;p&gt;I build a console game. The famous Monopoly/Tourist game:&lt;/p&gt;

&lt;p&gt;These were the features and challenges that this game supposed to me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Game logic:&lt;/strong&gt; I had to learn the basics of gaming. A game is usually an infinite loop asking for input, making random or programmed logic, and constantly giving a motivation to continue playing. A do-while loop and a bunch of stuff inside.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choosing between console or 3D:&lt;/strong&gt; At the time, I was experimenting with the &lt;a href="https://liballeg.org/"&gt;Allegro&lt;/a&gt; gaming library. I tried every sample and tutorial and managed eventually to make a few scenes. I remember I got to render a Yu-Gi-Oh pyramid using textures and background sound. And I thought that maybe I could do a 3D version of the Monopoly game. But before that, I'd make the console version to learn and limit the basics and then port it to a 3D version. Challenge accepted!
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The monopoly version:&lt;/strong&gt; There must be hundreds of versions of the game so I implemented a customizable one. The properties, currency denomination, limits, prizes, cards, and everything else could be loaded from a configuration file. I built a common Caracas (Venezuela) edition of the game with Bolivares as its currency. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real Artificial Intelligence:&lt;/strong&gt; And by real AI, I meant making the game the less predictable and challenging possible with real random number generation for the dice 🎲 and cards. Also, I implemented some logic to try to make the game the most perpetual I could evaluate if a card could give a player far more advantage over the other players. So before flipping it, the game could try to flip another one less 'benevolent'. 🤭&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stunning graphics:&lt;/strong&gt; Those were not that stunning, but they were great! I used the stdio.h from Borland C which had the ability to print colored text in the console so the dice, the player figurines, and the board would change among blue 💙, red ❤, green 💚 or yellow 💛 depending whose player is its turn. In order to provide the maximum resolution possible using only ASCII code, I managed to render only the portion of the board where the player was passing through. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 3D version:&lt;/strong&gt; I could not complete the 3D version. I manage to code the dice, the board and the moving figurines but I needed time to add the game logic and design the money and cards bitmaps. College started again, and I had to deal with a lot of math, statistics and course projects. I also got a boyfriend so when I was not studying, I was enjoying his company. 👨🏽‍🤝‍👨🏽🌈&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the time I was very happy with C. I thought it was pretty awesome and that I could build better apps than I could with Visual Basic. I felt like I were coding the Matrix! 🤣&lt;/p&gt;

&lt;p&gt;I knew the existence of C++ and got some ideas of what OOP actually was but I knew I would learn it in the next courses so I took my time to master C properly before that.&lt;/p&gt;

&lt;p&gt;Thanks for reading! I may update this post later with references and images of what I was talking about.&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>memories</category>
      <category>c</category>
    </item>
    <item>
      <title>My first Side Project: Windows Desktop Assistant</title>
      <dc:creator>Javier Escobar</dc:creator>
      <pubDate>Mon, 18 May 2020 00:00:35 +0000</pubDate>
      <link>https://dev.to/javierx2010/my-first-side-project-42f0</link>
      <guid>https://dev.to/javierx2010/my-first-side-project-42f0</guid>
      <description>&lt;p&gt;This is the first post of a series that will tell a story of my evolution as a programmer through all the side projects I've made since I started coding when I was 13, 20 years ago, in Basic. &lt;/p&gt;

&lt;p&gt;I spent hours trying to find code, binaries, or screenshots of the older ones but they were lost maybe once when I cleaned my email or on those old desktops PCs which died without backups. Hopefully, I'll transmit my passion and images through my words. Even when I am not a native English speaker.&lt;/p&gt;

&lt;h1&gt;WinQSpeaker&lt;/h1&gt;

&lt;p&gt;My first side project was a desktop assistant. I named it WinQSpeaker because it was a Windows App, which let you quickly perform common and repetitive tasks, and it could talk! Or at least, speak a few words 🤣&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;
I was in 10th grade when I asked my father if he could buy me a programming book. I saw one in the library called "Building Solutions with Visual Basic .Net". At that time, I was learning Visual Basic 6.0 at school. That was the first time I coded something bigger than a Hello World or 2 + 2. 
&lt;/td&gt;
&lt;td&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ALo7Wc-8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://images-na.ssl-images-amazon.com/images/I/71XQWDDW9RL._AC_SX342_.gif"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The teacher did not teach us what is Object Oriented Programming, neither the book. But I learnt about variables, functions and methods, and because of that it is why my code usually was everything in one file, a unique class for the whole project.&lt;/p&gt;

&lt;p&gt;At vacations, I managed to read the entire book without coding anything and I was really anxious to program everything but I didn't have a Windows Computer nor Internet.&lt;/p&gt;

&lt;p&gt;Then, my dad with &lt;a href="https://twitter.com/Javierx2010/status/1262152548158517256?s=20"&gt; hard work was able to bough me a computer&lt;/a&gt;, an AMD Athlon, but he could not afford a Visual Studio .Net License. I was talking to my teacher about that and he told me "take this, it is not Visual Studio .Net, but it is the standard version of Visual Studio 6.0. You can use the license; it is legal for teaching purpose"&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;
With my new computer, basic knowledge of Visual Basic, and the dial up internet account of my neighbor, I read and try so many tutorials and one day I discovered the Microsoft Text To Speech API which was used by &lt;a href="https://en.wikipedia.org/wiki/Office_Assistant"&gt;MS Agent&lt;/a&gt; API. Do you remember Clippo and Merlin?
&lt;/td&gt;
&lt;td&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G3EKCkyR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media.tenor.com/images/a079b675056f213aacfa851a4d377b78/tenor.gif" width="200"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So, these were the features this app had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System tray icon. The app was placed in the system tray to save space in the task bar. With contextual menu, you could launch it to the windowed version.&lt;/li&gt;
&lt;li&gt;Always on top and transparency. As an assistant, it should not interrupt what you are doing 
 but some functions only could be accessed by the main window so you could activate always on top with transparency.&lt;/li&gt;
&lt;li&gt;Music Player and smart Playlist. The first function I added to the app was to locate music anywhere on my PC, index it, and analyze which song I like the most based on replays. It used Music Player API and the playlist algorithm was implemented by me.&lt;/li&gt;
&lt;li&gt;Cartoonish. I edited every single element of the window version, and icons, with paint. So the progress bar of the music player, the slider of the bar, the buttons, everything was images edited pixel by pixel by me. I wanted to incorporate skin functionality like WinAmp used to but I remembered I could not finish that feature.&lt;/li&gt;
&lt;li&gt;Speech recognition and text to speech (TTS) using MS APIs at the moment. It was a hidden feature embedded in Windows 98 SE, ME and XP. Voice recognition was there at least in English and worked pretty fine. I used the text to speech API through MS Agent so an animated character responds with phrases like "Ok", and ask "What do you want to do?". A modern version of the TTS API can be found &lt;a href="https://docs.microsoft.com/en-us/windows/win32/lwef/using-speech-engines-with-microsoft-agent"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Command Library. Any command that you could execute through Win + R. This library let you organize your favorite commands and named it, or associate a phrase to launch them. At that moment, it was hard for me to implement an smart voice recognition system to understand natural speech to choose which action execute. The most advanced configuration I did was to index the music songs every time it finds a new one so you could say "Play Baby One More Time" and it would understand. But if you say "I want to listen Baby One More Time" it could not do anything. A modern version of the Microsoft Speech recognition API can be found &lt;a href="https://docs.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/dd146758(v%3Doffice.14)"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;What did I learn&lt;/h1&gt;

&lt;p&gt;I can't believe that I did all that without knowing OOP, I only followed tutorials and I realized that after assigning something with the word "new" to a variable, that variable would show me a universe of options after placing the dot "." immediately after typing it. I didn't know it was the IDE helping me. Didn't know also what was an IDE 🤣.&lt;/p&gt;

&lt;p&gt;I remember I implemented the bubble-sort algorithm without knowing it was called bubble-sort when I tried to order alphabetically the items of the playlist.&lt;/p&gt;

&lt;p&gt;And also, it was the first time I started to think in optimizing stuffs because of redundant processes that I did not need to run constantly. Or freeing memory after it is no longer needed through emptying the auxiliary arrays.&lt;/p&gt;

&lt;p&gt;I worked in this side project for about two years, then I went to college and learnt C, C++, Java and PHP, so I was formally introduced to OOP.&lt;/p&gt;

&lt;p&gt;I haven't use VB again since then but I remember it with some nostalgia.&lt;/p&gt;

&lt;p&gt;Thanks for reading! I may update this post later with references and images of what I was talking about.&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>memories</category>
      <category>visualbasic</category>
    </item>
  </channel>
</rss>
