My first Side Project: Windows Desktop Assistant
Tags: sideprojects, memories, visualbasic
Published: 2020-05-18 00:00:35

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. 

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.

<h1>WinQSpeaker</h1>

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 🤣

<table cellspacing="0" cellpadding="0" style="border:none;">
<tr>
<td>
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. 
</td>
<td>
<img src="https://images-na.ssl-images-amazon.com/images/I/71XQWDDW9RL._AC_SX342_.gif"/>
</td>
</tr>
</table>

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.

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.

Then, my dad with <a href="https://twitter.com/Javierx2010/status/1262152548158517256?s=20"> hard work was able to bough me a computer</a>, 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"

<table>
<tr>
<td>
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 <a href="https://en.wikipedia.org/wiki/Office_Assistant">MS Agent</a> API. Do you remember Clippo and Merlin?
</td>
<td>
<img src="https://media.tenor.com/images/a079b675056f213aacfa851a4d377b78/tenor.gif" width="200"/>
</td>
</tr>
</table>

So, these were the features this app had:
<ul>
<li>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.</li>
<li>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.</li>
<li>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.</li>
<li>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.</li>
<li>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 <a href="https://docs.microsoft.com/en-us/windows/win32/lwef/using-speech-engines-with-microsoft-agent">here</a>.</li>
<li>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 <a href="https://docs.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/dd146758(v%3Doffice.14)">here</a>.</li>
</ul>

<h1>What did I learn</h1>
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 🤣.

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.

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.

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.

I haven't use VB again since then but I remember it with some nostalgia.

Thanks for reading! I may update this post later with references and images of what I was talking about.