<?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: Josh Cook</title>
    <description>The latest articles on DEV Community by Josh Cook (@jhrcook).</description>
    <link>https://dev.to/jhrcook</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%2F241021%2Fd56da93e-a012-43dd-9322-4aa9d2aac9ed.jpeg</url>
      <title>DEV Community: Josh Cook</title>
      <link>https://dev.to/jhrcook</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jhrcook"/>
    <language>en</language>
    <item>
      <title>My Hacktoberfest journey with Appwrite</title>
      <dc:creator>Josh Cook</dc:creator>
      <pubDate>Sun, 17 Oct 2021 22:18:13 +0000</pubDate>
      <link>https://dev.to/jhrcook/my-hacktoberfest-journey-of-with-appwrite-1k52</link>
      <guid>https://dev.to/jhrcook/my-hacktoberfest-journey-of-with-appwrite-1k52</guid>
      <description>&lt;h1&gt;
  
  
  My Hacktoberfest journey with Appwrite
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Some self-reflection
&lt;/h2&gt;

&lt;p&gt;This is my third &lt;a href="https://hacktoberfest.digitalocean.com"&gt;Hacktoberfest&lt;/a&gt; after completing the challenge in 2019 and 2020. I began programming in April of 2018 when I made the switch from an experimental biologist to a computational one. I remember the feeling of learning so much every day – "like drinking out of a firehose" was how I described it to my new graduate research advisor. I began with R, a common language in computational biology, but began picking up pieces of Python, too. Eventually, as I began to realize the power of being able to arbitrarily control computers, I began also dabbling in more diverse areas such as learning Swift to build macOS, iOS, and watchOS apps. As I learned one thing, I ran across ten more technologies that I wanted to use! Still, it took over a year for me to be truly comfortable with a programming language, where the syntax becomes second nature and the coding flows more fluidly. Every now and then, I look back to see how far I have come; this Hacktoberfest was a great opportunity for such reflection because I can compare one year to another.&lt;/p&gt;

&lt;p&gt;Last year, my pull requests were on my own projects: two to for my Apple Watch telemetry recording app, one was for a workout Watch app, and the third was for the research project I was working on at the moment (this paper has since been published, &lt;a href="https://www.nature.com/articles/s41467-021-22125-z"&gt;"The origins and genetic interactions of &lt;em&gt;KRAS&lt;/em&gt; mutations are allele- and tissue-specific"&lt;/a&gt; and the code is &lt;a href="https://github.com/Kevin-Haigis-Lab/kras-allele-genetic-interactions"&gt;open source&lt;/a&gt;). This year, in order to enhance my learning, I challenged myself to contribute to others' projects. In my opinion, I have been quite successful with contributions to &lt;a href="https://github.com/withfig/autocomplete"&gt;Fig&lt;/a&gt;, &lt;a href="https://github.com/tldr-pages/tldr"&gt;tldr&lt;/a&gt;, &lt;a href="https://github.com/snakemake/snakemake"&gt;snakemake&lt;/a&gt;, and &lt;a href="https://github.com/pymc-devs/pymc-examples"&gt;pymc3-examples&lt;/a&gt;. In addition, I have also taken up the challenge of learning about &lt;a href=""&gt;Appwrite&lt;/a&gt;, one of the sponsors of this year's Hacktoberfest, and producing educational content about the service. (With some encouragement by the offer of free stickers 🙃) I found this a great opportunity to learn about an essential world of programming that I had yet to deal with: backend services.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Appwrite?
&lt;/h2&gt;

&lt;p&gt;Appwrite is a free, open-source, and secure "Backend as a Service". It provides necessary functions such as user and account management, databases, file storage, etc. In addition, it is incredibly easy to get up and running with a local development server or a cloud server as the entire service runs on a collection of Docker containers. Appwrite has a natural ability to scale, making it easy for small and large apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Because my programming background is primarily for scientific purposes, I really had little experience with servers and backends. Until now, my only real experience was with my Coffee Counter web application that is hosted on &lt;a href="https://www.deta.sh"&gt;Deta&lt;/a&gt;, a great service for beginners. This app (which is still running and I use everyday through a &lt;a href="https://swiftbar.app"&gt;SwiftBar&lt;/a&gt; app in my Mac's menu bar) technically has a backend database, but it is relatively rudimentary and completely managed by Deta – a great option for getting started, but the constraints mean that I cannot get a deeper understanding of the technology. Thus, many of the features of Appwrite were completely novel to me.&lt;/p&gt;

&lt;p&gt;I began by reading the &lt;a href="https://appwrite.io/docs"&gt;documentation&lt;/a&gt; and various &lt;a href="https://github.com/appwrite/awesome-appwrite"&gt;tutorials&lt;/a&gt; including the &lt;a href="https://30days.appwrite.io"&gt;#30DaysOfAppwrite&lt;/a&gt; series. While it was definitely fun to take a deep dive into this new territory, the complexity was also intimidating. After I had read enough and was beginning to put the pieces together, I knew it was time to start trying my hand at using Appwrite.&lt;/p&gt;

&lt;h2&gt;
  
  
  My journey
&lt;/h2&gt;

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

&lt;p&gt;One piece of the backend puzzle that I was really keen to learn about was deployment. I had many questions about the process, the complexity, how to use the final product once it is setup, security, etc. I decided, therefore, to begin with learning how to deploy an Appwrite server on the cloud and documented the process as a &lt;a href="https://joshuacook.netlify.app/post/appwrite-digital-ocean/"&gt;tutorial&lt;/a&gt; on my website.&lt;/p&gt;

&lt;p&gt;I was a bit nervous at first as I imagined all of the things that could go wrong including racking up a sizable bill from the cloud provider to opening a security hole in my computer when connecting to the world wide web. (The first issue was assuaged by a promotional offering from &lt;a href="https://www.digitalocean.com"&gt;DigitalOcean&lt;/a&gt; of $100.)&lt;/p&gt;

&lt;p&gt;I played around with DigitalOcean, creating a new Droplet, destroying it, rebuilding a new one, and so on. As I played around on the servers and did some research when I came across parts of the process I wasn't familiar with, my confidence grew. In the end, I found that Appwrite had actually published a ready made Droplet on the DigitalOcean Marketplace, making setup (and, admittedly, my tutorial) much easier. Further, accompanied by the post &lt;a href="https://dev.to/appwrite/30daysofappwrite-appwrite-for-production-56hi"&gt;"Appwrite for Production"&lt;/a&gt;, the pre-configured security settings on the Marketplace offering were great for learning about the various pieces of a server that need to be locked down. I was also thrilled to see how simple Appwrite made this process, meaning that I could defer to people far more knowledgeable than I on these topics.&lt;/p&gt;

&lt;p&gt;When all was said and done, I learned a lot about deploying a service to a cloud server and about how simple it was to accomplish with Appwrite. While I am still somewhat intimidated by the complexity, I am far more comfortable with the basics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demo
&lt;/h3&gt;

&lt;p&gt;With a better understanding of deployment, I was content to begin experimenting with using Appwrite. I had some confidence that if I would build something worth using, I could actually send it off to the cloud for real use.&lt;/p&gt;

&lt;p&gt;To get me feet wet, I made a &lt;a href="https://github.com/jhrcook/coffee-counter-appwrite-demo"&gt;demo app&lt;/a&gt; describing how to interact with an Appwrite-managed database in a Python application. As I have been considering upgrading my Coffee Counter application mentioned earlier, I thought it would be a good starting location for a theme for the app.&lt;/p&gt;

&lt;p&gt;It took some playing around with simple code, but I eventually got the hang of making read and write requests through Appwrite's &lt;a href="https://github.com/appwrite/sdk-for-python"&gt;Python SDK&lt;/a&gt;. The GUI Console from Appwrite makes this trial-and-error process &lt;em&gt;much&lt;/em&gt; easier than just blindly guessing at bugs. I could make a write request and actually see the results. Also, I could make a filtered query and ensure that all of the correct results were returned.&lt;/p&gt;

&lt;p&gt;With an understanding of how to interact with the Appwrite database, I wrote up a few primary API endpoints using &lt;a href="https://fastapi.tiangolo.com/"&gt;FastAPI&lt;/a&gt; then set to combining the two – a user makes a request to the FastAPI endpoints, the requests get processed into a database query, and the query gets made. I came up with a system of using &lt;a href="https://pydantic-docs.helpmanual.io/"&gt;pydantic&lt;/a&gt; as a layer between my web API and Appwrite's return type. I discuss this more in the README of the demo, but I was very happy with the usability and safety of using this validation layer to communicate between the two halves of the app.&lt;/p&gt;

&lt;p&gt;In the end, this demo app was much easier to build than I had suspected, in part due to how much complexity Appwrite deals with on my behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;My ability to learn about and use a new technology as complex as Appwrite would have likely been to large a task last year. While I am far from an expert, the fact that I could demonstrate the ability to use it sufficiently for simple applications is quite thrilling. I think this is one of the main goals of Hacktoberfest and for this opportunity I am very grateful. Overall, this learning process itself gave me more confidence in handling this part of a project and I look forward to using these skills and knowledge in my future work.&lt;/p&gt;

</description>
      <category>appwrite</category>
      <category>python</category>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
