<?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>Forem: Dasun Sameera Weerasinghe</title>
    <description>The latest articles on Forem by Dasun Sameera Weerasinghe (@dasun).</description>
    <link>https://forem.com/dasun</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%2F936907%2Fa8d01c0c-8129-401c-9bb0-31962f0f7aa9.png</url>
      <title>Forem: Dasun Sameera Weerasinghe</title>
      <link>https://forem.com/dasun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dasun"/>
    <language>en</language>
    <item>
      <title>IT Playground: Where ASD and Introversion Excel</title>
      <dc:creator>Dasun Sameera Weerasinghe</dc:creator>
      <pubDate>Thu, 06 Jul 2023 08:24:37 +0000</pubDate>
      <link>https://forem.com/dasun/it-playground-where-asd-and-introversion-excel-4cbh</link>
      <guid>https://forem.com/dasun/it-playground-where-asd-and-introversion-excel-4cbh</guid>
      <description>&lt;p&gt;In general, about 1% of people without Autism Spectrum Disorder (ASD) fall into the autism spectrum. However, within the IT industry, if we take a group of 100 people, 4 of them would have ASD. This means that the ASD population among IT workers is four times higher than in the general population.&lt;/p&gt;

&lt;p&gt;It has been observed that many programmers are highly introverted, although an exact percentage is difficult to determine. If you want to advance in the IT industry, you need to study, read, and learn new things every day. These activities often take place outside of working hours, requiring you to spend more time staring at a screen than you might expect.&lt;/p&gt;

&lt;p&gt;For an extrovert, this can be their worst nightmare. However, for introverts, it may not be a big problem. Yet, introverts still have desires beyond work. On the other hand, an extrovert might find this situation bit more intimidating. However, individuals with ASD often develop intense interests and obsessions. They may enthusiastically share their knowledge about a specific topic, such as dinosaurs, with anyone they meet as long as they are ready to listen. Therefore, if a person with ASD develops an interest in IT, it means they may excel while others lag behind.&lt;/p&gt;

&lt;p&gt;Despite these advantages, individuals with ASD face certain challenges in the IT industry. Due to limited social and communication skills, their true potential often goes unrecognised. Convincing them to consider alternative perspectives or ideas can be difficult, as they tend to have firm beliefs. Additionally, individuals with ASD may struggle to effectively market themselves, leading to prolonged employment in the same position with low remuneration. It is worth noting, historical figures like Einstein faced similar challenges but were able to negotiate better salaries with the support of their partner.&lt;/p&gt;

&lt;p&gt;However, these challenges should not discourage extroverts from pursuing a career in IT. Their social skills can be advantageous, allowing them to thrive and lead fulfilling lives in the industry. Extroverts are better at marketing them self. After all, a world with only introverts would be quite boring.&lt;/p&gt;

&lt;p&gt;The characteristics that may be considered disadvantages in other fields actually work to the advantage of introverted and ASD individuals in IT, particularly in programming. That's why, in popular culture, the image of the best programmer or IT expert often depicts someone who prefers solitude and guards their workspace.&lt;/p&gt;

&lt;p&gt;In the IT industry, introverts may be more prevalent, but there is still a significant presence of extroverts, accounting for approximately 40% of professionals (This is just an educated guess). This diverse mix of personalities and working styles contributes to the dynamic nature of the field.&lt;/p&gt;

&lt;p&gt;In conclusion, the IT industry provides a playground where individuals with ASD and introverted tendencies can thrive. By embracing their strengths and unique perspectives, they can excel in this ever-evolving field.&lt;/p&gt;

</description>
      <category>autistic</category>
      <category>extroverts</category>
      <category>introverts</category>
      <category>programming</category>
    </item>
    <item>
      <title>Advice for Newbies: From a Self-Taught Programmer</title>
      <dc:creator>Dasun Sameera Weerasinghe</dc:creator>
      <pubDate>Mon, 06 Mar 2023 09:32:24 +0000</pubDate>
      <link>https://forem.com/dasun/advice-for-newbies-from-a-self-taught-programmer-o25</link>
      <guid>https://forem.com/dasun/advice-for-newbies-from-a-self-taught-programmer-o25</guid>
      <description>&lt;p&gt;The world is constantly changing at a rapid pace and there are many distractions that can divert our attention from our goals. When I first entered the programming world, things were different. Although the internet already existed, resources such as Stack Overflow were not yet available. Instead, we relied on books, IRC, documentation and Lynda to learn. Often times, in order to understand a concept or fix an issue, I had to read an entire book or documentation.&lt;/p&gt;

&lt;p&gt;Having access to a wealth of information does not necessarily make someone a bad developer. However, lacking fundamental skills can hinder one’s progress. With so many distractions available it’s important to stay focused on what truly matters.&lt;/p&gt;

&lt;p&gt;In this article I will outline some key areas that developers should focus on in order to improve their skills. If you are an experienced developer feel free to share your thoughts and feedback.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don’t be hard on yourself
&lt;/h3&gt;

&lt;p&gt;When you start learning something new, everything can feel overwhelming. Everything is new when you start out. You might wonder if you’re smart enough to keep up with all the information. But trust me, things will get easier as you go. As time goes on, you’ll encounter less new information and it will become easier to understand.&lt;/p&gt;

&lt;p&gt;This is true for any new thing you learn, even if it’s not about programming.&lt;/p&gt;

&lt;h3&gt;
  
  
  Focus on the basics
&lt;/h3&gt;

&lt;p&gt;It’s important to have a solid foundation of knowledge in any field. So make sure you focus on learning the basics before moving on to more advanced topics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Find your niche
&lt;/h3&gt;

&lt;p&gt;Choose a language or framework that aligns with your future goals. Look for popular and trending options in your area of interest. For example, if you’re interested in game programming or web development, find out what’s best for those fields and stick with it. &lt;/p&gt;

&lt;p&gt;Keep in mind that popularity doesn’t always mean something is good, but it can make it easier to find help when you’re starting out.&lt;/p&gt;

&lt;h3&gt;
  
  
  No one is stupid.
&lt;/h3&gt;

&lt;p&gt;You don’t have to be a genius to learn something new. Being able to read and do simple math is enough! People have different IQ levels and some may understand things quicker than others. Don’t compare yourself to others - everyone has their own strengths and weaknesses. I’ve seen all kinds of people working side by side in this field for over a decade. Sometimes people who may not seem as “smart” are actually more determined and pay closer attention to details because they have tremendous self-discipline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don’t overthink your choice of language/framework
&lt;/h3&gt;

&lt;p&gt;Select a language that will not die in a few years and stick to it. Use the language as a tool to solidify your basics; after you get comfortable in one language, you will find learning another language much easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set small goals and work on small projects
&lt;/h3&gt;

&lt;p&gt;Completing something can be very motivating. When you’re starting out, you might have lots of great project ideas. It’s good to work on them, but start with small things that you can complete within a few days or a week. This will give you the motivation to keep going. If you set goals that take too long to achieve at the beginning, it can negatively impact your self-esteem. If you really want to work on something big, go for it! But make sure to also work on some smaller projects along the way to keep your motivation up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security is no joke.
&lt;/h3&gt;

&lt;p&gt;No matter what niche you’re in, security is something you can’t ignore. Companies lose millions of dollars due to security issues caused by programmers’ ignorance. Make sure to stay up-to-date with security issues and learn how to protect against data leaks and comply with data privacy laws. If this seems overwhelming, consider taking a course like &lt;a href="https://training.linuxfoundation.org/training/developing-secure-software-lfd121/"&gt;Developing Secure Software&lt;/a&gt; from the Linux Foundation. It’s a good starting point and it’s free. &lt;/p&gt;

&lt;h3&gt;
  
  
  Improve your communication and people skills
&lt;/h3&gt;

&lt;p&gt;This can be challenging for some people, especially introverts like me. Yet, it’s important to be able to communicate effectively and work well with others. I’ve seen many good developers get rejected because they lacked these skills. You need to know how to accept other people’s opinions and disagree without hurting their feelings. There are many little things that can make a big difference when working with others from different backgrounds. Being able to see things from their perspective will make you a better team player. Even if you plan on being an indie developer, you’ll still have to deal with clients or customers. Trust me - having good communication and people skills can have a huge impact on your income.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stay up-to-date
&lt;/h3&gt;

&lt;p&gt;Technology is constantly evolving and it’s important to keep up with the latest developments in your field. Make sure to stay informed about updates to your core language and framework features. It’s also a good idea to keep an eye on new tools, trends, and competitive technologies. If you’re just starting out, don’t worry too much about this yet - focus on building a solid foundation first.&lt;/p&gt;

&lt;p&gt;They says, it's not about the destination but the journey it self is matter. Remember to have fun along the way. Keep up-to-date with the latest developments in your field and strive for quality over speed. &lt;/p&gt;

&lt;p&gt;Wish you all the best!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>programmer</category>
    </item>
    <item>
      <title>Why I Moved from Qt to Plain C++ and Electron</title>
      <dc:creator>Dasun Sameera Weerasinghe</dc:creator>
      <pubDate>Wed, 01 Mar 2023 09:42:59 +0000</pubDate>
      <link>https://forem.com/dasun/why-i-moved-from-qt-to-plain-c-and-electron-5blc</link>
      <guid>https://forem.com/dasun/why-i-moved-from-qt-to-plain-c-and-electron-5blc</guid>
      <description>&lt;p&gt;Don’t get me wrong, I am still a fan of Qt, and it was my first choice before I moved to other options. At the time, around 2013, when I started developing my desktop application, Qt was the most mature option available. Although Electron was introduced around the same time, I might have missed it, or perhaps I did not see its potential. Regardless, I chose Qt, and it worked well for about a year.&lt;/p&gt;

&lt;p&gt;The application I am referring to was originally written in VB6 + C++. One reason I chose Qt was that I needed a cross-platform solution. VB6 was promoting a migration to .NET framework, but I did not feel comfortable with that approach, even though I was a C# developer during that time.&lt;/p&gt;

&lt;p&gt;Over time, I found that creating GUIs in Qt became more challenging and time-consuming, even for a simple task. Therefore, I started looking for alternative options. Additionally, I needed to expose my application as a Web API, which was not an area in which Qt could assist. However, I still believe that Qt is one of the best options if you need to develop GUI applications for embedded systems.&lt;/p&gt;

&lt;p&gt;The first step I took was to rewrite my core code in plain C++ instead of relying on the Qt framework. With the new features introduced in C++14 and C++17, this was straightforward. In my opinion, no one should write core application Qt code unless they have a really good reason to do so.&lt;br&gt;
To make things simple, I will list my migration path in point form:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I moved the core business logic to plain C++.&lt;/li&gt;
&lt;li&gt;I created a Node.js N-API module that wrapped up the core features I wrote (reference: &lt;a href="https://nodejs.org/api/n-api.html" rel="noopener noreferrer"&gt;https://nodejs.org/api/n-api.html&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;I compiled that Node.js wrapper into an Electron-supported plain native Node.js add-on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Electron Application:
&lt;/h2&gt;

&lt;p&gt;After writing the core logic in C++ and importing it as a JS library into an Electron + Angular setup, the development was relatively easy. Now, I am not limited to the components provided by the Qt widgets. Some of you might think that Qt Quick (QML) serves this purpose. I also tried QML before moving to Electron, but, for me, it was still a lot of work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web API:
&lt;/h2&gt;

&lt;p&gt;I wrote a NestJS wrapper for authorization and deployed it as a Lambda function. One difficulty I faced was having to compile my C++ Node.js module in the exact same kernel version that Lambda uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges I faced:
&lt;/h2&gt;

&lt;p&gt;It’s not all sunshine and rainbows. There are things I don’t like about the Electron + node addon approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Electron has limitations
&lt;/h3&gt;

&lt;p&gt;Some may argue that Electron is just a glorified Chromium with some extended abilities. There is some truth in that argument. Before you move on, you may have to look for Electron limitations. Electron can sometimes be too heavy for simple applications. For my personal project, one of the biggest drawbacks was Electron’s lack of ability to show print preview out of the box. I used a workaround.&lt;/p&gt;

&lt;p&gt;What I did was create a PDF print in memory and pass that byte stream to the PDF.js and show it in a new Electron window as a print preview. I know some of you may feel this is too hacky. Still, I like the outcome. The best part is that designing a printout with HTML and CSS is too easy compared to doing it with QtWidget, QPrintPreviewDialog, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why didn’t I rewrite my code in PlainJS?
&lt;/h2&gt;

&lt;p&gt;My application was a bit CPU intensive when it came to core business logic. However, this may not be the case for your specific application. Alternatively, you could consider using WebAssembly instead of writing a Native Addon. This would save you the trouble of having to compile the Node Addon for all platforms if you’re starting from scratch.&lt;br&gt;
Apart from these considerations, I already had existing code written in C++, so all I needed to do was remove all QT-related libraries.&lt;/p&gt;

&lt;p&gt;I hope this personal experience is helpful to you. It’s important to remember that there’s no one-size-fits-all solution to every problem, and each problem has its unique perspective. You may still choose to use Qt over other options for desktop application development.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
