<?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: drew</title>
    <description>The latest articles on DEV Community by drew (@andevr).</description>
    <link>https://dev.to/andevr</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%2F252348%2F2050d7b0-52b8-4a83-818c-50a97ab5e8f9.png</url>
      <title>DEV Community: drew</title>
      <link>https://dev.to/andevr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andevr"/>
    <language>en</language>
    <item>
      <title>TIL: adding asdf to arch</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Tue, 30 May 2023 18:24:17 +0000</pubDate>
      <link>https://dev.to/andevr/til-adding-asdf-to-arch-9nl</link>
      <guid>https://dev.to/andevr/til-adding-asdf-to-arch-9nl</guid>
      <description>&lt;p&gt;The instructions on the &lt;a href="https://asdf-vm.com/guide/getting-started.html#_3-install-asdf"&gt;asdf&lt;/a&gt; website are mostly complete. The things that are missing are how to add the line "source /opt/asdf-vm/asdf.fish" to your config.fish file. If you know how to open the file in the terminal it will be easy for you, but for newbies like myself I had to do some google search to figure it out. &lt;/p&gt;

&lt;p&gt;In my case, I used vim. &lt;br&gt;
Open a terminal, type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.config/fish/config.fish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, scroll (use arrow keys) to move your cursor all the way down to the bottom of the file(not sure if it matters where you put it, but that's where I did).&lt;/p&gt;

&lt;p&gt;Press the "i" key to allow you to insert/edit&lt;/p&gt;

&lt;p&gt;paste in&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;source /opt/asdf-vm/asdf.fish&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;type&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;:wq&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 to save and exit. &lt;/p&gt;

&lt;p&gt;restart your terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;asdf --version&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;You should see a version now which means it has been added properly.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TIL: How to Access the Inside of a Map in Elixir</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Wed, 22 Feb 2023 15:48:56 +0000</pubDate>
      <link>https://dev.to/andevr/til-how-to-access-the-inside-of-a-map-in-elixir-g42</link>
      <guid>https://dev.to/andevr/til-how-to-access-the-inside-of-a-map-in-elixir-g42</guid>
      <description>&lt;p&gt;This is one of those things that had slipped my mind. We covered it earlier in the Dockyard Academy, had to use it later so I had to look it up the syntax. Hopefully I'll remember it now :)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;game = %{&lt;br&gt;
  team1_name: "Team Team",&lt;br&gt;
  team2_name: "Exersport",&lt;br&gt;
  round1: %{&lt;br&gt;
    team1: 10,&lt;br&gt;
    team2: 20&lt;br&gt;
  },&lt;br&gt;
  round2: %{&lt;br&gt;
    team1: 30,&lt;br&gt;
    team2: 10&lt;br&gt;
  },&lt;br&gt;
  round3: %{&lt;br&gt;
    team1: 25,&lt;br&gt;
    team2: 30&lt;br&gt;
  }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;use dot(.) notation to access an element in a map:&lt;/p&gt;

&lt;p&gt;`game.team1_name &lt;br&gt;
"Team Team"&lt;/p&gt;

&lt;p&gt;game.round2.team2&lt;br&gt;
10&lt;/p&gt;

&lt;p&gt;game.round1.team1 + game.round2.team1 + game.round3.team1&lt;br&gt;
65&lt;br&gt;
`&lt;br&gt;
Hopefully this helps me (and maybe you!) remember.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>codenewbie</category>
      <category>python</category>
      <category>javascript</category>
    </item>
    <item>
      <title>TIL: How to build Elixir From Source and install Livebook</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Tue, 13 Dec 2022 09:45:10 +0000</pubDate>
      <link>https://dev.to/andevr/til-how-to-build-elixir-from-source-and-install-livebook-33kk</link>
      <guid>https://dev.to/andevr/til-how-to-build-elixir-from-source-and-install-livebook-33kk</guid>
      <description>&lt;p&gt;EDIT: Must have erlang installed for this to work. on garuda arch, type sudo pacman -S erlang.&lt;/p&gt;

&lt;p&gt;Short and sweet:&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/elixir-lang/elixir.git --branch v1.14.2
$ cd elixir
$ make
$ export PATH="$PWD/bin:$PATH"
$ elixir --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that I had to add escripts to path. I'm on Garuda Linux, so this was what I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set PATH /home/drew/.mix/escripts $PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make it permanent run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fish_add_path /home/drew/.mix/escripts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mix escript.install hex livebook
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Get Started With Rayex(Raylib for Elixir)</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Thu, 10 Nov 2022 08:18:36 +0000</pubDate>
      <link>https://dev.to/andevr/get-started-with-rayexraylib-for-elixir-53gl</link>
      <guid>https://dev.to/andevr/get-started-with-rayexraylib-for-elixir-53gl</guid>
      <description>&lt;p&gt;This is a getting started guide for Rayex, an Elixir implementation of the Raylib games library written in C, which you can find &lt;a href="https://www.raylib.com/index.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This guide currently only works on linux, I haven't worked through the steps for mac or windows yet. I might just do separate guides for those to keep this one from getting bloated. &lt;/p&gt;

&lt;p&gt;Some of this guide will be copied from Raylib sources and other places, primarily because I had to dig to find everything to make it work, and I wanted it all in one place so I don't have to hunt for it next time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;NOTE: Rayex is very much still being worked on and is not fully implemented.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List of things you'll need: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Erlang&lt;/li&gt;
&lt;li&gt;Elixir&lt;/li&gt;
&lt;li&gt;pkg-config&lt;/li&gt;
&lt;li&gt;Raylib &lt;/li&gt;
&lt;li&gt;glibc&lt;/li&gt;
&lt;li&gt;clang-tools(formatter)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Instructions
&lt;/h2&gt;

&lt;p&gt;Hopefully if you're wanting to do this, you already have Elixir/Erlang already installed so I won't go through that.&lt;br&gt;
I used asdf to install Erlang and Elixir on Fedora, as that seems to be the easiest way to get the latest version of Elixir on linux, since most of the distros include old versions. You can use asdf on other linux distros also.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/asdf-vm/asdf-erlang" rel="noopener noreferrer"&gt;https://github.com/asdf-vm/asdf-erlang&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;For pkg-config run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update -y
sudo apt-get install -y pkg-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;C Tools&lt;/strong&gt;&lt;br&gt;
Run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#check if Clang is installed
clang --version
# If not run this:
sudo dnf install clang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install cmake
sudo dnf install clang-tools-extra
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Required Libraries&lt;/strong&gt;&lt;br&gt;
Run these commands depending on your distro:&lt;/p&gt;

&lt;p&gt;Ubuntu:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fedora:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel libatomic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pacman -S alsa-lib mesa libx11 libxrandr libxi libxcursor libxinerama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Glibc:&lt;/p&gt;

&lt;p&gt;Check if glibc is installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ldd --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if not installed, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## ubuntu:
sudo apt install glibc-source -y

# Fedora:
dnf install glibc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After all that, it's time to build Raylib. I recommend using cmake as it's the easiest way, so I'll only include those instructions. If you want to do it another way, you can check out the Raylib github.&lt;/p&gt;

&lt;p&gt;paste these into the terminal line by line:&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/raysan5/raylib.git raylib
cd raylib
mkdir build &amp;amp;&amp;amp; cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run make install, be sure to note where it installs to, you'll need it later. In my case it was installed to&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;but for you it might just be:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;After all that, you can try one of two things: you can try to run an example, or you can add your lib to path. I'd suggest adding to path, because I tried to install this on two different linux versions(Ubuntu and Fedora) and ran into the same problem.&lt;/p&gt;

&lt;p&gt;paste this line into terminal and replace usr/local/lib with whatever location your make install showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My experience was that it installed to /usr/local/lib64, so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This only adds it for the current terminal window. You can append this command to the end of your ~/.bashrc or ~/.zshrc or other user login script, to make the change permanent.&lt;/p&gt;

&lt;p&gt;After that, it's time for Rayex!&lt;/p&gt;

&lt;p&gt;Fork the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://github.com/shiryel/rayex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;clone your fork:&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/your username/rayex.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;cd into the rayex folder and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mix deps.get
iex -S mix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should start an iex. Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Import all modules
iex&amp;gt; use Rayex

# open new window
iex&amp;gt; init_window(200, 200, "window name")

# draw a line
iex&amp;gt; begin_drawing()
iex&amp;gt; draw_line(10, 10, 50, 51, %{r: 255, g: 161, b: 0, a: 255})
iex&amp;gt; end_drawing()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can try one of the 3d examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd examples/3d_picking/
mix deps.get
iex -S mix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in iex run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; The3dPicking.run()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you should see this: &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%2Fbf8gz6ztyb09r4r58cpt.png" 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%2Fbf8gz6ztyb09r4r58cpt.png" alt="Image of a 3d render running in Raylib"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're good to go!&lt;/p&gt;

&lt;p&gt;Ping me on twitter @andevrs if you find any mistakes or issues, or you can message me here. Thanks!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Headfirst Guide to Learning Elixir Part 1: Maths, Strings</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Wed, 19 Oct 2022 19:32:26 +0000</pubDate>
      <link>https://dev.to/andevr/headfirst-guide-to-learning-elixir-part-1-maths-strings-4mp7</link>
      <guid>https://dev.to/andevr/headfirst-guide-to-learning-elixir-part-1-maths-strings-4mp7</guid>
      <description>&lt;p&gt;&lt;em&gt;Note: This guide is a work in progress. I'm partly writing it to help me remember things, and partly to help anyone who comes across it while searching for the basics of Elixir. This is not meant to be a comprehensive guide. If you go through this and need more, I'll list some learning material at the end.  I will continue to add to this as I go. As it is, it's not currently complete. Thanks for reading.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you're reading this, you're probably interested in learning Elixir. Maybe You've had some experience programming, and maybe you haven't. Maybe you've decided to try it out but you bought a book or a course that assumes you already know something, and you wanted something a little more simpler to start with. There's already a good book you can read free &lt;a href="//www.joyofelixir.com"&gt;here&lt;/a&gt;. Consider this guide getting in the kiddie pool without any adults around. I'm not going to bore you with a bunch of information, just straight to the point. I also won't bore you with details of the history of Erlang, the BEAM etc. Elixir was written by José Valim and made to run on the BEAM, the Erlang virtual machine that was made to support millions of connections at once. You can get more info on it at (link)There. Now, on to the good stuff.&lt;/p&gt;

&lt;p&gt;Elixir has a lot of other features that other languages do. However, since I'm writing this as if you've never programmed before. Hopefully when you're done with this guide, you can go off and learn from any Elixir course or book or academy and know enough to not get lost out of the gate.&lt;/p&gt;

&lt;p&gt;Before we dive in, caveat: I'm not an Elixir expert. I'm still learning. This is just a super basics guide that I would have wanted to get rolling without too much fuss. &lt;/p&gt;

&lt;p&gt;Here we go!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Setting up Elixir and the Erlang Virtual Machine(from here out referred to as the BEAM) is stupidly easy compared to a lot of other languages. It's even easy to install on Windows. Go &lt;a href="https://elixir-lang.org/install.html"&gt;here&lt;/a&gt; for walkthrough instructions. Seriously. Installing is easy. &lt;/p&gt;

&lt;p&gt;Once you're done setting up, open a terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Drew-desktop-$ iex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above, the Drew-desktop -$ is just what I see at my terminal prompt. Yours will be different. From here out I'll tell you what to write and omit that part. You'll just type iex and that will start an environment that looks 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;Interactive Elixir (1.14.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This guide will only use this interactive environment throughout, and when you see iex&amp;gt;  as we go further, you'll type just what is on the right side of it.&lt;br&gt;
The number contained within parentheses (1) is just a line number. You'll continue to see those in your terminal as you type, but I won't be showing them as your line numbers may different from mine and I don't want to confuse you.&lt;/p&gt;

&lt;p&gt;If you're following this to learn, I expect you to type in every single example. Repetition builds muscle/brain memory. Otherwise, feel free to skim if you're just using it for reference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maths&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As with every other language, Elixir can do math. You love math, right? Even if you don't, that's okay too. You don't need to be an expert. Math was my least favorite subject in school. Here's some math:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex(1)&amp;gt; 50 + 85
135
iex(2)&amp;gt; 359 * 95847
34409073
iex(3)&amp;gt; 4459 / 2245
1.9861915367483296
iex(4)&amp;gt; 225 - 50
175
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the number in () ex. iex(3)&amp;gt; that is just a line number the iex puts there. From here on out I'll omit the numbers in the prompt all together to make it easier for me to write.&lt;br&gt;
As you do the exercises it shows the output underneath:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; 50 + 85
135
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some more math exercises:&lt;/p&gt;

&lt;p&gt;Multiply 3743 by 2.6&lt;br&gt;
Divide 38473.4 by 88&lt;br&gt;
Add 64422 and 998223&lt;/p&gt;

&lt;p&gt;Elixir Math particulars: &lt;/p&gt;

&lt;p&gt;Dividing two integers using the / operator will result in a float:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; 3456 / 45
76.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If want an int instead of a float when dividing, you can use div():&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; div(3456, 45)
76
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result is an integer. If you want the remainder you can use rem():&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; rem(3456,45)
36
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some more maths. Use both / and div() and rem() and see what you get: &lt;br&gt;
divide 2089504 into 22. &lt;br&gt;
divide 482039489 by 4444444&lt;/p&gt;

&lt;p&gt;Through Erlang, you have an entire math library to use. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A string is just some text. Any text. Text is surrounded by " " marks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex&amp;gt; "This is some text."
"This is some text."

iex&amp;gt; "this is a sentence I forgot to capitalize the first letter of."
"this is a sentence I forgot to capitalize the first letter of."

iex&amp;gt; "Where did I put my keys?"
"Where did I put my keys?"

iex&amp;gt; "Oh, I left them over there."
"Oh, I left them over there."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to always type the " " marks when writing text or you will get errors. &lt;/p&gt;

&lt;p&gt;More strings:&lt;/p&gt;

&lt;p&gt;"Where is my cheese?"&lt;br&gt;
"That was a really good show." &lt;br&gt;
"Oh, you have seen that one?"&lt;/p&gt;

&lt;p&gt;Concatenation is where strings can be linked together to form one string. concatenation can be done with a greater than and less than symbol, like so: &amp;lt;&amp;gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; iex&amp;gt; "John " &amp;lt;&amp;gt; "Brown"
"John Brown"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can't concatenate anything but strings using the &amp;lt;&amp;gt; operator.&lt;/p&gt;

&lt;p&gt;concatenate these strings:&lt;br&gt;
I love&lt;br&gt;
jumping on the bed&lt;br&gt;
some time in june&lt;br&gt;
but I hit my head.&lt;/p&gt;

&lt;p&gt;This climb is tough&lt;br&gt;
but I've not had enough&lt;br&gt;
so I'll keep on climbing&lt;br&gt;
while the sun is up.&lt;/p&gt;

&lt;p&gt;Don't forget the quotes around the strings. you can insert a space at either the beginning of a string "like this " or inserting a space by itself " " like this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This guide is not complete. I will add more as I go along.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>learn</category>
      <category>beginners</category>
      <category>programming</category>
      <category>elixir</category>
    </item>
    <item>
      <title>Elixir Powered Dreams</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Tue, 27 Sep 2022 13:28:51 +0000</pubDate>
      <link>https://dev.to/andevr/elixir-powered-dreams-21e7</link>
      <guid>https://dev.to/andevr/elixir-powered-dreams-21e7</guid>
      <description>&lt;p&gt;I joined the DockYard Academy as part of the beta cohort. To someone outside looking in, it probably looks like a fluke. Maybe chance, maybe a little luck. I started learning to code in the early months of 2016 with only the thought of getting a better job. While I still haven't landed that coding job, That dream continues to stalk me, almost drags me along at times, even when I've burned out or lost some faith in myself. Now though, something has changed. &lt;/p&gt;

&lt;p&gt;I'm really excited about the opportunity to participate in this, and my words can't really convey the rush I feel being able to do this. One of the things that this experience has taught me so far is that I really needed structure in my learning. It's one thing to go through a Udemy course and work through material, it's quite another to have daily access to an instructor who is just as passionate about teaching as we (myself and the people in the cohort) are about learning. Not only do we have really high quality instruction, but we also have each other to push each other/practice with. &lt;/p&gt;

&lt;p&gt;I am no longer alone.&lt;/p&gt;

&lt;p&gt;Some of us are coming to this as our first language, some of us have been programming/learning to program for a bit. We all bring things to the table that help each other. Some with knowledge of elixir, others their enthusiasm and super powered willingness to learn.&lt;/p&gt;

&lt;p&gt;Each of us have different challenges learning a functional language. For me, getting used to a different style of syntax has been a little bit of a challenge, as well as some of the concepts. My gray matter automatically attempts to use the knowledge of other languages and apply it to Elixir, even when that doesn't work.&lt;/p&gt;

&lt;p&gt;Day 4(today) has been a bit of a "aha!" moment for me though, as things are starting to click, and I'm able to work through the exercises a bit more, even if it takes me slightly longer than I would like, though speed will come with more practice. It's only been 4 days :D&lt;/p&gt;

&lt;p&gt;I've been in "learning to code" mode for 4 - 5 years, and I can honestly say this is the first time I've been truly excited about learning a language and I sincerely hope that at the end of these three months I'll have the chance to work in the Elixir space.&lt;/p&gt;

&lt;p&gt;What brought me to this opportunity would seem to be a series of fumbles. From trying my first language, trying and failing at a dozen more, to starting a podcast (thanks for the inspiration, Eric Van Johnson and crew! I owe you one!) which eventually led me to the Elixir Newbies podcast and interviewing Brooklin and getting involved with the Dockyard Academy. For me, I don't believe that it's been fumbles, but a subconscious searching for an opportunity. &lt;/p&gt;

&lt;p&gt;I don’t believe in complete chance. I believe that when one door closes, another opens. I can’t get into what door closed to bring me here, not at the moment at least. But the one that opened has shown me a wide world of dreams. I don’t dream in code, but I dream of it. The initial dream that started me on this journey, -getting a dev job to support my family- is still there, just as strong as the day it was born. But it’s also not the entire dream anymore. &lt;/p&gt;

&lt;p&gt;Now I also dream of building stuff. Bringing all the ideas that my brain constantly throws at me to life. Show my son that not only can he dream, but he can build too. Show my wife that the man she puts her trust in is worthy of it. Not that she’s ever doubted me. She’s the one that has always stuck by me and cheered me on despite my failings.&lt;/p&gt;

&lt;p&gt;All these thoughts and more have flooded my head as I sit down at my computer each morning, wrestling with the excitement of starting each day’s session.&lt;/p&gt;

&lt;p&gt;Maybe, just maybe, the Elixir that powers the software I log into every day to learn to code will be the Elixir that powers my dreams.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>beginners</category>
      <category>devjournal</category>
      <category>programming</category>
    </item>
    <item>
      <title>Signal Five: Monetization</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Tue, 12 Jan 2021 07:45:52 +0000</pubDate>
      <link>https://dev.to/andevr/signal-five-monetization-2ji1</link>
      <guid>https://dev.to/andevr/signal-five-monetization-2ji1</guid>
      <description>&lt;p&gt;In my last post, I mentioned ideas to monetize a social platform. Today I'm going to highlight some of those, and ask for feedback, but first an update on whats been happening.&lt;/p&gt;

&lt;p&gt;Since my last post, a lot has happened. More planning, more work. My partner in crime Michael finally got out of the hospital (yay!) and he's started working on a landing page. I've been working on the back end of things for the last 2ish weeks. Writing tests, building backend stuff out. In case anyone is wondering we are using Ruby on Rails for backend and (most likely) some sort of framework for the front end, but we aren't quite there yet.&lt;/p&gt;

&lt;p&gt;I've wanted to talk about some ideas for business structure/ monetization and get some feedback on them, so here goes.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Structure&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I've thought long and hard about this, and I've come to the conclusion that we will most likely set up a non-profit(501C). Any money after salaries/operating costs that we make(assuming we make any of course) we will donate to various charities. I can't think of any other social platform that does this (at least none I've heard of).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Monetization&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;So how will we make any money at all? My initial thoughts in no particular order, and remember these are just ideas, not set in stone. &lt;/p&gt;

&lt;p&gt;-1. Patreon. We could have several different tiers that includes various rewards, both physical and digital. &lt;br&gt;
-2.Micro-transactions. A store for things such as digital items, stickers/emotes, backgrounds, and physical items such as mugs/shirts/etc.&lt;br&gt;
-3. Charging a small subscription.(something like a couple bucks.) When I first started brainstorming ideas, this was one of the first things I thought of, although I'm not sure I'd do it now. I like the "subscribe if you want to support us" option, or if you don't want to sub you can buy backgrounds/stickers/etc.&lt;/p&gt;

&lt;p&gt;I really tend to think a micro transaction economy would work here, as long as it doesn't detract ANYTHING from the main user experience, i.e. making customers pay for features that should already be in the service.&lt;/p&gt;

&lt;p&gt;Nothing is set in stone yet, feel free to give me any thoughts or comments of your own. Anything would be helpful at this point. &lt;/p&gt;

&lt;p&gt;If you'd like to follow our progress, we are social:&lt;br&gt;
twitter @andevrs, @sig_five, @mikemaitoza&lt;br&gt;
we also have a facebook page: &lt;a href="https://www.facebook.com/signalv"&gt;https://www.facebook.com/signalv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Signal Five, a social platform</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Fri, 25 Dec 2020 10:10:25 +0000</pubDate>
      <link>https://dev.to/andevr/signal-five-a-dev-blog-450b</link>
      <guid>https://dev.to/andevr/signal-five-a-dev-blog-450b</guid>
      <description>&lt;p&gt;I've been thinking. For at least the past few months, but probably longer. I think about it every time I travel around the web and see an ad for something I looked up on another platform. I think about it when I buy something online and see ads for it everywhere, or I'm watching a YouTube video and the ad is for the same thing I'm doing online.&lt;/p&gt;

&lt;p&gt;I think about all the invasions of privacy by companies we are supposed to be able to trust, and I watch them bash each other over the same things they each are doing. Kind of ironic. &lt;/p&gt;

&lt;p&gt;I realize that companies have to make money. I'm not one of those "tech should be free" guys, or everything should be open source. But I've definitely become one of those who hates that fact that the vast majority of "free" platforms online track my every move, and monetize me along the way. I don't see any of the revenue they make from showing me ads. I don't get any value from them. You could argue, probably rightfully, that I've gotten a lot of value from Facebook and you tube and Google over the years. You could also argue that hey, I signed up for it. Of course, trying to read and understand the legalese contained in the EULA or user agreements can be pretty difficult. Most of us just click OK, assuming, not really reading, we just want to sign up. &lt;/p&gt;

&lt;p&gt;At the time of signup we aren't concerned with what companies are doing with our stuff. And that's bad. We should care a lot more about this than we do, although I think that the more privacy is in the news, and the more these companies continue to screw up and wind up getting sued, the more people are going to think about these things and wonder if there's another alternative. &lt;/p&gt;

&lt;p&gt;I know there's already some alternative tech out there, but more is better, right?&lt;/p&gt;

&lt;p&gt;All of this just to say, I started a project with a friend of mine. It's probably going to be a large one, a ton of work. It may not be successful. Hell, It may not get any users at all. I don't really know. But over the last few months I've been planning. Literally. Brainstorming, writing it all down, trying to encapsulate what it is I want out of a social media platform. And also, what I don't want. &lt;/p&gt;

&lt;p&gt;There's three things I know for sure that I want from my social platform: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;b&gt;A way to keep up with friends and family.&lt;/b&gt; The only reason I use FaceBook at all is keeping up with my family and all their kids, and a few friends that aren't using twitter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;b&gt;An ad free experience.&lt;/b&gt; This is actually more my second number one, because I'm tired of ads and I don't want to see them anymore. I think I'm getting ad burn-out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;b&gt;Privacy minded.&lt;/b&gt; I want my social platform to consider what kind of data it collects and to limit it. And also not sell it, share it, or otherwise give it to another company. Period.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You probably have questions about monetizing a platform like this. I have a few ideas, and I'll go over them in another post. &lt;/p&gt;

&lt;p&gt;Meanwhile I need coffee.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build in public question</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Mon, 21 Dec 2020 19:24:11 +0000</pubDate>
      <link>https://dev.to/andevr/build-in-public-question-76c</link>
      <guid>https://dev.to/andevr/build-in-public-question-76c</guid>
      <description>&lt;p&gt;I'm one half of a two person team that is planning out and building a social platform that will be ad-free and privacy-minded. I'm thinking of maybe blogging about it. Not so much code (though maybe a little bit) but more just other aspects of building a big project in chunks, etc. Is that something people might be interested in reading?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Coding_at_43.rb</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Wed, 02 Dec 2020 05:14:16 +0000</pubDate>
      <link>https://dev.to/andevr/codingat43-rb-56pd</link>
      <guid>https://dev.to/andevr/codingat43-rb-56pd</guid>
      <description>&lt;p&gt;I just looked, and I haven't written anything here since July. That's crazy to me. A lot has happened since then. I finally moved out of the house that I'd rented when working in the oil field. After being laid off, $1200 a month just wasn't affordable anymore, especially in the tiny town I live in. I did manage to find something more affordable, but still a pretty high price range as there wasn't much available. I'd relocate somewhere, but first I need to find a job that pays a living wage(my wife has health issues and can't work, plus taking care of our 4 year old).&lt;/p&gt;

&lt;p&gt;I was able to land another job after the oil field. I'm currently working at Baxter Healthcare, a company that makes various medical equipment. I'm not making near the money I was(we are still scraping by for now), and things are still a struggle especially with covid, but I'm proud to say I'm making some headway with programming. &lt;/p&gt;

&lt;p&gt;Recently I started talking to one of my followers on twitter, Michael Maitoza, and for the last month he and I both started the Ruby content on &lt;a href="http://www.learnenough.com"&gt;www.learnenough.com&lt;/a&gt;. Michael Hartl was kind enough to give us both scholarships, and we are going through it together.&lt;/p&gt;

&lt;p&gt;Today I finished the Ruby course, and I must say it is one of the most rewarding things I've done to date (aside from actually finishing a course, but that's a story for another time). I worked really hard on it, and put in the time, and I feel I have a decent grasp of the language. I'm no expert, but I learned enough to be dangerous :D &lt;/p&gt;

&lt;p&gt;Next on my list is completing the Ruby on Rails Tutorial. I'm shooting for maybe another month for that, but I'm going for better understanding vs just finishing, so if it takes longer I'm good with that. I'm probably going to rebuild my website as I did it in Jekyll and really didn't have a good understanding of Ruby at the time. After that, I have some ideas for some things to build, possibly a team project with Michael Maitoza, so we'll see how things go.&lt;/p&gt;

&lt;p&gt;Glad to be back, thanks for reading!&lt;/p&gt;

&lt;p&gt;PS. If you're like me and are struggling and would like a shot at getting a scholarship for Learn Enough, you can apply here: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://news.learnenough.com/learn-enough-scholarship-program"&gt;https://news.learnenough.com/learn-enough-scholarship-program&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you get in let me know, I'd love to add a few people to my discord to talk Ruby with :)&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>codenewbie</category>
      <category>ruby</category>
      <category>rails</category>
    </item>
    <item>
      <title>It's been awhile.</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Thu, 16 Jul 2020 06:48:09 +0000</pubDate>
      <link>https://dev.to/andevr/it-s-been-awhile-17j7</link>
      <guid>https://dev.to/andevr/it-s-been-awhile-17j7</guid>
      <description>&lt;p&gt;Hello again,&lt;/p&gt;

&lt;p&gt;It's been nearly 4 months since my last post. I'm not really sure how to say this, but I know I need to admit it to someone, even if the someones are behind a digital device somewhere. &lt;/p&gt;

&lt;p&gt;I hit a brick wall about 4 months ago, during the first months of the 'rona. I was laid off, as those of you who have read my posts know. I was doing great, programming my butt off, posting every day. Then some things kind of happened back to back that derailed me. My computer died, and I went a few weeks or so trying to carry on without it. &lt;br&gt;
Then I hit a huge wall of depression. &lt;br&gt;
Those who know me know I'm super upbeat, pretty stable guy. I'm not known for falling down when life hits me, I just roll with it and keep going.&lt;/p&gt;

&lt;p&gt;This time, I took the hits hard. I'm honestly not sure where the depression came from, it felt like out of nowhere and I struggled to shake it. &lt;/p&gt;

&lt;p&gt;I turned off all social media. I deleted facebook, signed out of twitter, linkedin, etc. I struggled to get up during the day. I slept extremely long hours. If it wasn't for my wife's patience I probably would have drove her nuts. I was a mess.&lt;/p&gt;

&lt;p&gt;Honestly being on social media probably contributed some, with the constant bombardment. Pulling away from it was probably the best thing I could have done for my mental health. &lt;/p&gt;

&lt;p&gt;Because I'm generally strong mental health wise, I ignored the feelings I was having and hoped they would go away. I wasnt suicidal or anything, but now I'm much more aware of my mental state from day to day. I'm still taking things day to day. I started programming again, although I'm trying to not pressure myself too much. I don't know if that contributed, but I'm not ruling anything out. &lt;br&gt;
If I've learned anything from this, it's to not take my mental health for granted.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>mentalhealth</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Looping Back(to Web Development)</title>
      <dc:creator>drew</dc:creator>
      <pubDate>Fri, 10 Apr 2020 21:20:18 +0000</pubDate>
      <link>https://dev.to/andevr/looping-back-to-web-development-1nek</link>
      <guid>https://dev.to/andevr/looping-back-to-web-development-1nek</guid>
      <description>&lt;p&gt;First I just want to say thank you.&lt;/p&gt;

&lt;p&gt;Recently I've had a great interaction with someone on one of the social media platforms I frequent, that led them to become my mentor. Sort of like a Jedi of coding, if you will, taking on a young(old) padawan :D &lt;/p&gt;

&lt;p&gt;We've had two video chats so far (he's in another country) but he's taken time out of his busy schedule with work, family, life, to give me time. To help guide and teach me as I head towards a career as a dev, and I just wanted to give him a hearty thank you for all the advice and mainly just for giving your time. I won't let you down.&lt;/p&gt;

&lt;p&gt;I also want to say thanks to another guy I've talked to on twitter a bunch. I'm not sure if he reads my posts, but he's answered a ton of questions I've had in the past, and continues to offer me support when I need it.&lt;/p&gt;

&lt;p&gt;Which brings me to the title. I call it looping back because When I first started learning to code, I did what every person trying to learn how to code does. I jumped on Udemy. (I'm kidding, but seriously) I went for web development like probably 2958395835.3333 other people. Rounded to the nearest decimal point.&lt;/p&gt;

&lt;p&gt;The point is, after having tried a few languages and frame works (and a lot of thinking and several good conversations) I realized my interests still lie in more of the visual aspects, although (obviously) having knowledge of backend won't hurt either.&lt;/p&gt;

&lt;p&gt;So with that in mind, I picked up the web development basics again, and added React. &lt;/p&gt;

&lt;p&gt;If you've been reading my posts, you know I was laid off a few weeks (I think?) ago. I decided a few days ago to spend 4 - 8 hours studying each day. It's not a hard number, obviously depending on what I have going on that day, but with all this free time in between family time and job applications I have a ton of spare time that I feel it would be a travesty to waste doing things that won't get me to the career I want. someone said that you can do anything you want, have anything you want, as long as you're willing to pay the price. For me, the price is time, and I'll gladly pay it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The plan Part 1: Finish two courses&lt;/strong&gt;&lt;br&gt;
The courses: &lt;br&gt;
Andrew Mead's Modern JavaScript Bootcamp&lt;br&gt;
30% Complete&lt;br&gt;
Andrew Mead's The Complete React Developer Course (w/ Hooks and Redux)&lt;br&gt;
5% Complete&lt;br&gt;
&lt;strong&gt;The plan Part 2: Build Small Projects&lt;/strong&gt;&lt;br&gt;
I don't have a hard list of things to build yet. I'm doing a couple apps in the javascript boot camp that I'll most likely try to convert to react when I'm finished. &lt;/p&gt;

&lt;p&gt;The main point will though, will be to have an "end" point to the initial tutorials, and build stuff. That way instead of hopping from course to course, learning material to learning material, I will start using the skills I gain in order to solidify them and build solid portfolio projects that I can speak to.&lt;/p&gt;

&lt;p&gt;Obviously both of these courses are project based, and have more than a few projects in them to sharpen the skills/learn how to put projects together.&lt;/p&gt;

&lt;p&gt;I know I haven't posted much recently, so I'll go back to trying to post something maybe once a week as an update. Thanks for reading.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>codenewbie</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
