<?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: GW</title>
    <description>The latest articles on DEV Community by GW (@gwsounddsg).</description>
    <link>https://dev.to/gwsounddsg</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%2F514113%2F6e5106a7-a3be-4b24-9a97-7043278ad96d.jpeg</url>
      <title>DEV Community: GW</title>
      <link>https://dev.to/gwsounddsg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gwsounddsg"/>
    <language>en</language>
    <item>
      <title>My Favorite Design Pattern</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Wed, 06 Jan 2021 15:33:36 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/my-favorite-design-pattern-11dh</link>
      <guid>https://dev.to/gwsounddsg/my-favorite-design-pattern-11dh</guid>
      <description>&lt;p&gt;I don't know what it is, but I really enjoy writing recursive methods. There's something magical about having a method call itself and how that potentially creates an infinite loop until it hits some condition and then goes all the way back up.&lt;/p&gt;

</description>
      <category>oop</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Let's stop saying technologies are easy</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Tue, 22 Dec 2020 17:11:30 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/let-s-stop-saying-technologies-are-easy-4o1k</link>
      <guid>https://dev.to/gwsounddsg/let-s-stop-saying-technologies-are-easy-4o1k</guid>
      <description>&lt;p&gt;I've been programming for about ten years mostly in a desktop environment. About eight months ago I started getting into web development which is mostly me consuming loads of articles and videos to learn all these different technologies (html, css, javascript, react, angular, electron, wasm, bulma, etc).&lt;/p&gt;

&lt;p&gt;There's one major thread I've noticed in all the different content I've been consuming to learn everything. At some point in the article I'll read about how easy X technology is. Or in watching a video you'll hear, "I use X because it's easy". Then the proverbial, "Wow! That's amazingly easy!". And of course, "I'll show you the easy way to do...".&lt;/p&gt;

&lt;p&gt;Over and over again I hear the word easy. When I'm trying to learn something new and it doesn't come to me easily, simply, or it doesn't "just work", I'm left with two options. Either the technology isn't that "easy", which I have no way as a beginner to evaluate that. Or I'm just dumb for not getting it.&lt;/p&gt;

&lt;p&gt;Easy is not objective, it's subjective and sometimes relative.&lt;/p&gt;

&lt;p&gt;In rock climbing there's a beautiful philosophy where the amount of effort it takes an amateur to ascend a low difficulty rated climb is the same amount of effort an expert climbing a high difficulty rated climb. Both pursuits are just as exemplary as the other, and the accomplishment is in the individuals personal growth.&lt;/p&gt;

&lt;p&gt;Could our resources for providing new information to those that do not yet have that information not be trivialized? Of course there is an understandable comparison between a basic example of something and a complex one. Or providing a generalized summary of a difficult topic to make it more understandable for a beginner or "noob" (which is obviously a pejorative).&lt;/p&gt;

&lt;p&gt;Creating a function react component for one person may be just as difficult to someone as managing raw pointers in c++ to another.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Help using Node addons to call c++</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Fri, 27 Nov 2020 18:48:32 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/help-using-node-addons-to-call-c-5eao</link>
      <guid>https://dev.to/gwsounddsg/help-using-node-addons-to-call-c-5eao</guid>
      <description>&lt;p&gt;I'm currently working with trying to call c++ in js. I've been successful using &lt;a href="https://www.npmjs.com/package/nan"&gt;nan&lt;/a&gt; for passing and returning primitives.&lt;/p&gt;

&lt;p&gt;But when I tried passing/returning &lt;code&gt;std::string&lt;/code&gt; it got harder. I &lt;a href="https://nodejs.org/api/addons.html"&gt;read in the addon docs&lt;/a&gt;, "Unless there is a need for direct access to functionality which is not exposed by N-API, use N-API."&lt;/p&gt;

&lt;p&gt;Any advise on how to proceed? Should I stick with &lt;code&gt;nan&lt;/code&gt; or switch to &lt;code&gt;N-API&lt;/code&gt;? I'm eventually going to work with c++ classes and structs.&lt;/p&gt;

</description>
      <category>help</category>
      <category>node</category>
      <category>cpp</category>
      <category>addon</category>
    </item>
    <item>
      <title>I'm making a desktop app using Web Technologies. Any Advise?</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Wed, 25 Nov 2020 23:09:52 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/i-m-making-a-desktop-app-using-web-technologies-any-advise-pjm</link>
      <guid>https://dev.to/gwsounddsg/i-m-making-a-desktop-app-using-web-technologies-any-advise-pjm</guid>
      <description>&lt;p&gt;Hey folks,&lt;/p&gt;

&lt;p&gt;I've decided to build my next project using web technologies for the frontend. I've picked &lt;a href="https://www.electronjs.org/"&gt;Electron&lt;/a&gt; and &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt; to be the main tech to accomplish it.&lt;/p&gt;

&lt;p&gt;This is going to be an audio application, so the backend is going to be a c++ library that I'm writing. &lt;a href="https://nodejs.org/api/addons.html"&gt;Node addon's&lt;/a&gt; are how I'm going to call my library in js.&lt;/p&gt;

&lt;p&gt;Any advise? Should I build a &lt;a href="https://nordicapis.com/building-a-backend-for-frontend-shim-for-your-microservices/"&gt;BFF&lt;/a&gt; to handle the addon? Any pitfalls to be aware of?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>electron</category>
      <category>react</category>
      <category>help</category>
    </item>
    <item>
      <title>Coding in Film</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Mon, 23 Nov 2020 18:05:07 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/coding-in-film-4djn</link>
      <guid>https://dev.to/gwsounddsg/coding-in-film-4djn</guid>
      <description>&lt;p&gt;Every time I see a movie or show that has someone "hacking", coding, or programming, it's never anything realistic. &lt;/p&gt;

&lt;p&gt;What are the most accurate entertainment representations of coding you've seen?&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>What I've learned switching from desktop to web programming</title>
      <dc:creator>GW</dc:creator>
      <pubDate>Wed, 18 Nov 2020 16:51:12 +0000</pubDate>
      <link>https://dev.to/gwsounddsg/what-i-ve-learned-switching-from-desktop-to-web-programming-nh</link>
      <guid>https://dev.to/gwsounddsg/what-i-ve-learned-switching-from-desktop-to-web-programming-nh</guid>
      <description>&lt;h1&gt;
  
  
  Back Story
&lt;/h1&gt;

&lt;p&gt;I got into programming while I was in graduate school for sound design. There's this graphic programming language used by many experimental sound artists called &lt;a href="https://cycling74.com/"&gt;Max&lt;/a&gt;. Back then it was called Max/MSP and now it's exploded to do video/image manipulate and has direct integration with a widely used audio app call &lt;a href="https://www.ableton.com/"&gt;Ableton Live&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As a sound designer and composer, there wasn't a tool for someone like me to create sound art for theatre. I had to come up with quite a few tricks to get close to what I wanted. So I decide to learn computer programming and build the ideal tool for me.&lt;/p&gt;

&lt;p&gt;This lead me to build programs in Objective-C, C++, and Swift. Some fully fledged standalone applications, and some that were audio plugins.&lt;/p&gt;

&lt;h1&gt;
  
  
  Switching to Web
&lt;/h1&gt;

&lt;p&gt;As I have very recently switched to web programming, mostly backend work, I've noticed a few major differences.&lt;/p&gt;

&lt;h3&gt;
  
  
  Micro Services
&lt;/h3&gt;

&lt;p&gt;Most programs on platforms are entirely self contained. Sure there's the occasional program that does a web call, or uses a dynamic library on your computer. And of course there are projects that are modularly built, in a very SOLID principle kind of way. But for the most part, everything is right in front of you and usually in the same language.&lt;/p&gt;

&lt;p&gt;This was difficult for me at first to wrap by brain around: micro services. Granted I'm very new to web programming and may be wrong about this, but it seems that all web sites are built this way. Separate parts are completely different projects, often in different languages, and even on different machines, all communicating via web calls.&lt;/p&gt;

&lt;p&gt;You have your UI project(s), which calls a &lt;a href="https://nordicapis.com/building-a-backend-for-frontend-shim-for-your-microservices/"&gt;BFF&lt;/a&gt;, which calls a backend or backends, which may call other backend APIs and may call a database. These are all separate projects, some of which you may be consuming and not building yourself. For example, there are a ton of technologies you can use for styling so you don't have to write any css yourself.&lt;/p&gt;

&lt;p&gt;Not only are sites separated this way, there are developers that strictly only work on that part of the tech stack (eg: backend, devops, frontend, etc). You can work exclusively on one of those parts and know absolutely nothing about the others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Languages
&lt;/h2&gt;

&lt;p&gt;In most platform programs, you write it in a single language. Granted there are many UI's built with XML and many IDE's have some graphic programming environment for building out the interface (eg: Xcode).&lt;/p&gt;

&lt;p&gt;When it comes to web programming, the number of languages stacks up quickly. You have your backend in C#, frontend in typescript (which is just javascript with extra features), JSON for setting environment variables, yml for IaC/SaaS. Oh and don't forget: javascript, markdown, html, and css.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data
&lt;/h3&gt;

&lt;p&gt;In most desktop/mobile applications your data is generally in memory. Sometimes you access data via a file, but for the most part that's for loading/saving your data. There's also user preferences, which can be handled a few different ways, but ultimately it's a file somewhere on your hard-drive.&lt;/p&gt;

&lt;p&gt;With web programming, I've found this to be very different. Your data is usually on some database (MongoDB, DynamoDB, SQL, etc) that is located on some server (depending on what solution you're using).&lt;/p&gt;

&lt;p&gt;Using a simplistic example, you have an endpoint that you call to get data. Your endpoint becomes an abstraction for calling your database and returns the data. In a .NET API, you would get the data as a JSON, converted to a model class in C#, then converted back to JSON for the return.&lt;/p&gt;

&lt;h3&gt;
  
  
  Abstraction
&lt;/h3&gt;

&lt;p&gt;This was the most difficult part for me. If you have a C++ program, you know exactly where the program starts and can follow the flow of execution fairly easily (granted game loops, callbacks, and the like can make this much more complex).&lt;/p&gt;

&lt;p&gt;When I started learning .NET and C#, I kept getting tripped up with one question, "How/Where did [this method or class] get called?". In the platform world &lt;a href="https://en.wikipedia.org/wiki/Singleton_pattern"&gt;Singletons&lt;/a&gt; are frowned upon. But in the backend .NET world, they're a necessity.&lt;/p&gt;

&lt;p&gt;You can have an API with multiple controllers that almost work like independent entities that have a selection of CRUD endpoints for a client to call. Depending on the API, you can think about the controllers in isolation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technologies/Options
&lt;/h3&gt;

&lt;p&gt;After seven months of web programming, I've noticed that there are soooooo many tech options for doing any one thing. Many developers have very strong opinions about which of these technologies are better than the others.&lt;/p&gt;

&lt;p&gt;I've spent much more time learning different libraries/frameworks/tools then learning different programming languages.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Web programming has been really daunting for me. I've been able to rely on my programming chops, problem solving, and eagerness to learn. Maybe it's no different than when I first wanted to learn programming and had to sift through the different languages then.&lt;/p&gt;

&lt;p&gt;Ultimately, I find the difference to be with platform programming I'm focused on the how, while with web I'm focused on the what. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do I make X happen? &lt;/li&gt;
&lt;li&gt;What do I use to make X happen?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>audio</category>
    </item>
  </channel>
</rss>
