<?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: Janos Vajda</title>
    <description>The latest articles on DEV Community by Janos Vajda (@janosvajda).</description>
    <link>https://dev.to/janosvajda</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%2F381777%2F725e3123-82ac-4104-b0f1-d361a47cb524.jpeg</url>
      <title>DEV Community: Janos Vajda</title>
      <link>https://dev.to/janosvajda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/janosvajda"/>
    <language>en</language>
    <item>
      <title>Testing coding agent on an old ZX Spectrum machine code and Rust</title>
      <dc:creator>Janos Vajda</dc:creator>
      <pubDate>Sat, 28 Feb 2026 15:00:51 +0000</pubDate>
      <link>https://dev.to/janosvajda/testing-coding-agent-on-an-old-zx-spectrum-machine-code-and-rust-5cbd</link>
      <guid>https://dev.to/janosvajda/testing-coding-agent-on-an-old-zx-spectrum-machine-code-and-rust-5cbd</guid>
      <description>&lt;p&gt;When I was a child, I had a ZX Spectrum computer (Didaktik M). I didn’t play much on it — I was more interested in programming — but there was one game I loved and spent long hours solving its various absurd, funny levels. The game was called Jet Set Willy. For a long time, I couldn’t understand how so many levels, so much movement, graphics, wit, tricks, and secrets could be packed into 48 kilobytes of code.&lt;/p&gt;

&lt;p&gt;Decades have passed since then, and I’ve often thought about that game. I still don’t really play on the computer — it doesn’t interest me. I used to play Tetris occasionally, but no other game has really engaged me. I tried several times to rewrite the game for PC, using different methods, programming languages (C, C++), and documentation and source code. There are a few websites on the internet where enthusiastic fans have published the game’s machine code, and I used those, but I didn’t get very far.&lt;/p&gt;

&lt;p&gt;Yesterday, I decided to try one of the AI-based coding agents and attempt to rewrite Jet Set Willy in Rust using the disassembled source I found online. &lt;br&gt;
It’s quite incredible, but with barely a day of work, I succeeded. It’s unbelievable, but I can play it again — and since I rewrote it in Rust, I can easily fix any bugs. The music, the graphics, and the logic are all the same because I was very careful to make the Rust version authentic. Of course, there were a couple of challenges, but I really enjoyed working on it.&lt;/p&gt;

&lt;p&gt;Unfortunately, I couldn’t make the game and its Rust code public. Even though it was created about 40 years ago, due to copyright restrictions, I’m not allowed to publish it, so I use it only privately.&lt;/p&gt;

&lt;p&gt;All 60 rooms are done and compiled in Rust; it works smoothly, and its code is entirely Rust, with no machine code.&lt;/p&gt;

&lt;p&gt;I am uploading some screenshots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3jn8qjt4v817gii8zvfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3jn8qjt4v817gii8zvfc.png" alt="Jet Set Willy - Title screen" width="800" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf878s2dr1uksrgjk7hc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf878s2dr1uksrgjk7hc.png" alt="Jet Set Willy - Room 21" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkyxg2rnxe0dtvfddtta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkyxg2rnxe0dtvfddtta.png" alt="Jet Set Willy - Game Over Screen" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, I can play with my only favourite game again after three decades :)&lt;/p&gt;

&lt;p&gt;&amp;lt;3 Jet Set Willy&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gamedev</category>
      <category>rust</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Code signing of Electron app for Windows</title>
      <dc:creator>Janos Vajda</dc:creator>
      <pubDate>Tue, 17 Aug 2021 17:26:49 +0000</pubDate>
      <link>https://dev.to/janosvajda/code-signing-of-electron-js-app-for-windows-5i4</link>
      <guid>https://dev.to/janosvajda/code-signing-of-electron-js-app-for-windows-5i4</guid>
      <description>&lt;p&gt;We have an Electron project at my current workplace, and as a team leader of this project, I am responsible for the whole deployment process, which contains the code signing as well. &lt;/p&gt;

&lt;p&gt;I want to share my experience in this short article as It might help other developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting a token.
&lt;/h2&gt;

&lt;p&gt;If you or your company want to sign their application, you first need to buy a signing certificate token. There are many companies in this business, and they can manage the whole process and provide you with a token. They have very different prices and services quality, but I would instead not mention a company name here as this article is not an advert, but I can share some information about the process.&lt;br&gt;
The ordering procedure is quite simple, but the delivery can take longer. We waited about a month after the ordering, but everything was ok. The token is a simple USB pen drive. It should be stored in a safe place as without it signing is not possible, and you will have to ask for a replacement, and this can take a month. &lt;/p&gt;
&lt;h2&gt;
  
  
  Tools we can use.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;SafeNet Authentication Client Tools -  You can download it from its official website: &lt;a href="https://knowledge.digicert.com/generalinformation/INFO1982.html" rel="noopener noreferrer"&gt;https://knowledge.digicert.com/generalinformation/INFO1982.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is a Windows 32 and 64-bit version, and also Mac and Linux version. However, I tried it only on Windows, so I do not know how they work under other OS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Digicert Certificate Utility - You can download it from the official website:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.digicert.com/kb/util/ssl-certificate-installation-using-digicert-utility-for-microsoft-servers.htm" rel="noopener noreferrer"&gt;https://www.digicert.com/kb/util/ssl-certificate-installation-using-digicert-utility-for-microsoft-servers.htm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;OpenSSL - this is for generating PFX files. If you do not have it, You can download it from here: &lt;a href="https://kb.firedaemon.com/support/solutions/articles/4000121705" rel="noopener noreferrer"&gt;https://kb.firedaemon.com/support/solutions/articles/4000121705&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Some console. You can use the default Windows command line, which is good enough for generating the PFX file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Code signing process
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install SafeNet Authentication Client Tools&lt;/li&gt;
&lt;li&gt;Download Digicert Certificate Utility. This is one single .exe file, so It has no installer. I copied it to my Documents directory for this example, but You can copy it to any directory.&lt;/li&gt;
&lt;li&gt;Open the SafeNet Authentication Client Tools from the Start menu, and follow the steps in screenshots.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uirnh05ymlo9wgh3nb2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uirnh05ymlo9wgh3nb2.jpg" alt="Step 1 click on the gear icon."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sql2xozvi435vk8qenb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sql2xozvi435vk8qenb.jpg" alt="Step 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qhkjm61bxadu4nfawf8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qhkjm61bxadu4nfawf8.jpg" alt="Step 3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbocjigc7zz6g1s59a17.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbocjigc7zz6g1s59a17.jpg" alt="Step 4"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8srlxplc3u3cgqrdb79f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8srlxplc3u3cgqrdb79f.jpg" alt="Step 5"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwnunpqoh09o2cmr5ah6p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwnunpqoh09o2cmr5ah6p.jpg" alt="Step 6"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumvpko8sy552ma1tlrz3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumvpko8sy552ma1tlrz3.jpg" alt="Step 7"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the Finish button, and it imports the certificate.&lt;/p&gt;

&lt;p&gt;Now open Digicert Certificate Utility (single .exe file - DigiCertUtil.exe) that was copied in your Documents directory, and follow these steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5of722sqeerbbenexcak.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5of722sqeerbbenexcak.jpg" alt="Step 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkm6mij32clffnrfucynt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkm6mij32clffnrfucynt.jpg" alt="Step 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now You have a .cert file. You can use this file for creating a .pfx file that Electron can use for signing your application.&lt;/p&gt;

&lt;p&gt;Open the console and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl pkcs12 &lt;span class="nt"&gt;-export&lt;/span&gt; &lt;span class="nt"&gt;-in&lt;/span&gt; TestLtd.cer &lt;span class="nt"&gt;-out&lt;/span&gt; TestLtd.pfx &lt;span class="nt"&gt;-nokeys&lt;/span&gt; &lt;span class="nt"&gt;-password&lt;/span&gt; pass:YOUR_TOKEN_PASSWORD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TestLtd.cer is the .cer file you exported by Digicert Certificate Utility&lt;/p&gt;

&lt;p&gt;TestLtd.pfx is the name of the PFX file.&lt;/p&gt;

&lt;p&gt;YOUR_TOKEN_PASSWORD is that password that your certificate company provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  Electron app's config changes
&lt;/h2&gt;

&lt;p&gt;That's all. After this you have a PFX file. Now You can add the certificate to your Electron app's config. Your config can be very different so I can give you just an example. My Electron app's config file is something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;win:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;icon:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"public/icons/icon.ico"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;target:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nsis"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;certificateSubjectName:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'TestLtd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;publisherName:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'Test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Ltd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;signingHashAlgorithms:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;'sha&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//sha&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;used&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;only&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Windows&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;here&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;should&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;sha&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;sha&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;breaks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;win&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;auto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;here&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;without&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;testing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;auto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;update!&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;verifyUpdateCodeSignature:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;signAndEditExecutable:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;certificateFile:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;process.env.CERTIFICATE_PFX_FILE_PATH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="err"&gt;certificatePassword:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;process.env.CERTIFICATE_PASSWORD&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I use the &lt;strong&gt;Vue CLI Plugin Electron Builder&lt;/strong&gt;, so this config is in the &lt;strong&gt;vue.config.js&lt;/strong&gt;, but Your config and tools might differ.&lt;/p&gt;

&lt;p&gt;In my project the &lt;strong&gt;process.env.CERTIFICATE_PFX_FILE_PATH&lt;/strong&gt; and the &lt;strong&gt;process.env.CERTIFICATE_PASSWORD&lt;/strong&gt; variables are coming from an &lt;strong&gt;.env&lt;/strong&gt; file, of course as these &lt;strong&gt;never should commit to Git&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;My &lt;strong&gt;process.env.CERTIFICATE_PFX_FILE_PATH&lt;/strong&gt; has this value in my .en file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;CERTIFICATE_PFX_FILE_PATH &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Users&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;janos&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Documents&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;TestLtd.pfx"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The process.env.CERTIFICATE_PASSWORD value is super-secret, of course. However, it is the same password that you used in OpenSSL command. The token provider company provided this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding and signing.&lt;/strong&gt; :)  I hope this article can help You if you face any issue in the signing process of the Electron app under Windows.&lt;/p&gt;

</description>
      <category>electron</category>
      <category>signing</category>
      <category>windows</category>
      <category>token</category>
    </item>
    <item>
      <title>Should we dig deeper into the development tools we use?</title>
      <dc:creator>Janos Vajda</dc:creator>
      <pubDate>Sat, 08 May 2021 01:41:23 +0000</pubDate>
      <link>https://dev.to/janosvajda/should-we-dig-deeper-into-the-development-tools-we-use-5gne</link>
      <guid>https://dev.to/janosvajda/should-we-dig-deeper-into-the-development-tools-we-use-5gne</guid>
      <description>&lt;p&gt;If I want to answer concisely, then I can write only that: yes, we should.&lt;/p&gt;

&lt;p&gt;But, of course, this topic is much more complicated because we are usually busy and cannot check out our dev tool's source code. Furthermore, developers are humans, so we can be lazy or think digging in a big codebase is useless and tiring. &lt;/p&gt;

&lt;p&gt;I share a story that happened about 7-8 years ago, and it might be able to explain what I exactly mean. &lt;/p&gt;

&lt;p&gt;I usually start to work very early (between 2 am and 5 am), so before the Covid era, I quite often was that person who opened the office. &lt;/p&gt;

&lt;p&gt;Once, I sat in the office and watched a Linux kernel's source code as I tried to understand how its process scheduler works. I did not want to do with it anything. It just came to my mind, and I would have liked to know it a bit deeper. Also, looking at it was fun as that piece of code runs on a billion and billion different kinds of devices, which is amazing. I wanted to learn something from its code. So firstly, I investigated where it is in the kernel's code. When you try to find something in a huge codebase, this investigation is one of the useful things because, during this process, you can learn something new about the structure of the codebase, for instance. &lt;br&gt;
When I found that file which seemed to be the scheduler's code, I went through it and tried to understand what it does. Of course, I did not understand it deeply enough, but It was a good adventure. The main thing for me was the learning. Learning something about that clever code, and also learning the history of that file. Who created its first version? When was created? How was changed? Why was changed? Is it still in the kernel or deprecated? And many more questions. &lt;br&gt;
Once, after this, when one of my colleagues arrived at the office, we started to talk about totally other things, and suddenly I mentioned to him that the Linux source code is so beautiful, and I looked into it this one and that one. He smiled, but I saw on his face that he did not understand why I spent time on this weird thing. I presumed he thought it was wasting of time. He also might have thought I was crazy. Could be :) &lt;br&gt;
Anyway, I enjoyed it, and I usually still do it. Yep, I am aware that we are different, so in my ex-colleague world, he was right. In that world, developers use their tools and do not care too much about how their tools, programming languages, frameworks work. We use them. But, I am in a different galaxy, and here knowing my tools is important to me. Not just because of the learning. I also want to give respect to those fantastic developers who created my tools. The source code created by them usually is fantastic, and digging these codebases a bit more deeply can improve my knowledge. But, also, we can find funny and surprising things in their source code. Anyway, I like to pull down my tools' source codes and try to understand them. &lt;/p&gt;

&lt;p&gt;Ok, let's try to find some interesting examples. &lt;/p&gt;

&lt;p&gt;I like the language-agnostic development paradigm, so I always try to use that programming language appropriate for a particular task. One of my favourite languages is JavaScript and TypeScript. I really love TypeScript, so if I have a new project, I usually try to use it. I know there are plenty of developers who do the same as TypeScript seems to be very popular. But the question here is: do we know TypeScript? I mean, yeah, of course, we know its syntax. We can keep telling all obvious facts about it: we can use interfaces in TypeScript so our core can be more generic and SOLID, we can encapsulate our classes properly and many more things. But do we know how TypeScript works? How does its codebase look like? How does it start when you type in your console: &lt;code&gt;tsc --help&lt;/code&gt;, for example? Or what programming language is it written? Is its codebase fully tested? Do its developers follow the SOLID principle? I might be weird, but I want to know the answer to these questions, so this is why I cloned its code from GitHub, compiled it and investigated all answers I needed. It's not always easy but almost always fun. How can we do it? Honestly, there is no exact methodology for this because every single codebase is different. This is a learning mechanism and adventure. So, yep let's see TypeScript as an example. &lt;/p&gt;

&lt;p&gt;I presume you have Node and NPM installed in your machine. If you have, then please, open your console and clone TypeScript's repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/microsoft/TypeScript.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you do not have Gulp, you should install it as they use Gulp for the building process. So, firstly change the directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd TypeScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and install Gulp (I installed it with -g parameter, which installs it globally.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g gulp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and after this, you can run;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, let's try to find which part of the code handles the --help parameter. This sounds very trivial, but it can be a good starting point for getting more familiar with the code.&lt;/p&gt;

&lt;p&gt;Let's open the source code in your preferred editor and try to find it. We can do it in many ways. We can search the string "--help" (we can bet it won't work :)), we can search for a "help" word without dashes (it won't work either as it would provide too many search results). How can we do it? I would recommend another way. Firstly, I would build the application and try to run it, and after this, we should be able to do debugging. TypeScript is written in TypeScript, and we can build it by Gulp. So you can run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gulp local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This builds the app into a built/local directory. So, if you run it and the building process is done, then you should be able to run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node ./built/local/tsc.js --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, so now we can try to add some console.log to src/tsc/tsc.ts, and we will see what is happening. Of course, It does not work. We will get an error message during the building process.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the &lt;code&gt;lib&lt;/code&gt; compiler option to include 'dom'.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I did not install @types/node (&lt;code&gt;npm install @types/node&lt;/code&gt;), so I cannot find console definitions. Moreover, using console logs is not the most sophisticated way how can debug TypeScript code. &lt;em&gt;Instead of using console logs, we should use a debugger in our source code editor.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Let's have a look at this debugging process now. So how can we debug the TypeScript source code? &lt;/p&gt;

&lt;p&gt;I use VS Code for TypeScript code editing, and it has its own Run &amp;amp; Debug function. Please, open your editor, and open the TypeScript directory in it. &lt;/p&gt;

&lt;p&gt;So, we want to debug the tsc command's --help parameter. Firstly, you need to create or edit the &lt;code&gt;.vscode\launch.json file&lt;/code&gt;. I share that file I created for this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "version": "0.1.0",
    "configurations": [
      {
        "type": "node",
        "protocol": "inspector",
        "request": "launch",
        "name": "Testing of debugging",
        "program": "${workspaceFolder}/built/local/tsc.js",
        "args": [
          "--help"
        ],
        "env": {
          "NODE_ENV": "develop"
        },
        "sourceMaps": true,
        "smartStep": true
      }
    ]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you should open src\tsc\tsc.ts file and go to this line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ts.executeCommandLine(ts.sys, ts.noop, ts.sys.args);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Ok, now you can add a breaking point to this line, and you can step into the next operation with the debug toolbar's "Step into" button. You can see this on the next two screenshots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lvzh9sj5sv7is7jw4b9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lvzh9sj5sv7is7jw4b9.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77af0djsjhwoidrgv3gc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77af0djsjhwoidrgv3gc.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you hover over your mouse pointer on any variable, it shows you the current value of the variable. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i9gs5capvww592po8hf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i9gs5capvww592po8hf.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can easily investigate what happens with the --help parameter or any other parameter when you run the tsc command. Is it easy and super useful, I think.&lt;/p&gt;

&lt;p&gt;Anyway, at this point in the article, we can say that we learnt something new. I reckon this is a fun learning process. We just opened the TypeScript source code and have not even looked at any real code; despite this, you have learned something new: how can you debug TypeScript code. This is why I do the same thing. I can learn new things, and also I am getting more familiar with those developer tools I use every day.&lt;/p&gt;

&lt;p&gt;Of course, &lt;strong&gt;this was just an example&lt;/strong&gt;, as you might have already know how you can do TypeScript debugging, but this does not matter as I am sure you can find other things in TypeScript source code that can be a piece of new information for you. And this is why I like browsing my tools source codes. It is a big learning journey. &lt;/p&gt;

&lt;p&gt;Let's take the other investigation. What happens in TypeScript if tsc runs a HelloWorld.ts?&lt;/p&gt;

&lt;p&gt;I created a HelloWorld.ts out of the TypeScript directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ..
touch HelloWorld.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open it in your editor, and its content should be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let message: string = 'Hello world!';
console.log(message);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I changed the .vscode/launch.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "version": "0.1.0",
    "configurations": [
      {
        "type": "node",
        "protocol": "inspector",
        "request": "launch",
        "name": "Testing of debugging",
        "program": "${workspaceFolder}/built/local/tsc.js",
        "args": [
          "../HelloWorld.ts"
        ],
        "env": {
          "NODE_ENV": "develop"
        },
        "sourceMaps": true,
        "smartStep": true
      }
    ]
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, now you can see what is happening in TypeScript source code if you Start debugging and step into code. &lt;/p&gt;

&lt;p&gt;If you click on the Run And Debug icon on VS Code, you can see the whole call stack, all used variables, and those scripts loaded. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3is03i31hi7yeydizdet.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3is03i31hi7yeydizdet.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup of debugging can always be a starting point if we want to be more familiar with any codebase; if it works, then we can check everything: structure, coding style, name conventions - everything. The other meaningful thing is looking at the project's unit tests and running them as they can tell us a lot of new information.&lt;/p&gt;

&lt;p&gt;Browsing our tools/programming languages/frameworks source codes is useful, I think. These examples were minor things, but anyway, this is just for learning.&lt;/p&gt;

&lt;p&gt;Thanks for reading this. Have a great day. :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>learning</category>
      <category>debugging</category>
    </item>
  </channel>
</rss>
