<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Articles on Lockwood Family Having Fun Writing Code</title><link>https://lockwood.fun/post/</link><description>Recent content in Articles on Lockwood Family Having Fun Writing Code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 04 Dec 2019 00:47:57 -0700</lastBuildDate><atom:link href="https://lockwood.fun/post/index.xml" rel="self" type="application/rss+xml"/><item><title>A Curious Moon | Week 3 | Makefile &amp; Normalize Data</title><link>https://lockwood.fun/post/postgres/a-curious-moon-week-3-make-normalize/</link><pubDate>Wed, 04 Dec 2019 00:47:57 -0700</pubDate><guid>https://lockwood.fun/post/postgres/a-curious-moon-week-3-make-normalize/</guid><description>&lt;h1 id="a-curious-moon--week-3--makefile--normalize-data"&gt;A Curious Moon | Week 3 | Makefile &amp;amp; Normalize Data&lt;/h1&gt;
&lt;h2 id="apologies-its-been-a-while"&gt;Apologies, it&amp;rsquo;s been a while&lt;/h2&gt;
&lt;p&gt;We are sorry, life hit us hard in November. I always forget how quickly holidays are upon us. This year April and Kaleb took a much deserved vacation and so they were out of town for a few weeks and so we opted to wait for them instead of charging on ahead of them. I think it was a wise decision. We don&amp;rsquo;t want anyone becoming so far behind that they feel they can&amp;rsquo;t catch up. The idea is to do this together so waiting made the most sense.&lt;/p&gt;</description></item><item><title>A Curious Moon | Week 2 | Master Plan</title><link>https://lockwood.fun/post/postgres/a-curious-moon-week-2-master-plan/</link><pubDate>Wed, 06 Nov 2019 00:01:23 -0700</pubDate><guid>https://lockwood.fun/post/postgres/a-curious-moon-week-2-master-plan/</guid><description>&lt;h1 id="a-curious-moon--week-2--master-plan"&gt;A Curious Moon | Week 2 | Master Plan&lt;/h1&gt;
&lt;h2 id="create-master-plan-table"&gt;Create Master Plan table&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-postgres" data-lang="postgres"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; master_plan(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; the_date date,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; title varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;), 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; description text
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We have a table! Just as we were getting exciting we find out that we were supposed to add a primary key and also what if the table already exists? So in order to fix those things our new create table looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-postgres" data-lang="postgres"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;drop&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;exists&lt;/span&gt; master_plan;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; master_plan(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; id serial &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; the_date date,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; title varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;), 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; description text
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;serial primary key&lt;/code&gt; is some postgres shortcode that will add a column of integer type that can&amp;rsquo;t be NULL and will auto increment.&lt;/p&gt;</description></item><item><title>A Curious Moon | Week 1 | Getting Setup</title><link>https://lockwood.fun/post/postgres/a-curious-moon-week-1-setup/</link><pubDate>Wed, 30 Oct 2019 23:12:30 -0600</pubDate><guid>https://lockwood.fun/post/postgres/a-curious-moon-week-1-setup/</guid><description>&lt;h1 id="a-curious-moon--week-1--getting-setup"&gt;A Curious Moon | Week 1 | Getting Setup&lt;/h1&gt;
&lt;p&gt;After completing our Python course, &lt;a href="https://www.udemy.com/share/100058A0cdcVZbR34=/"&gt;Complete Python Bootcamp: Go from zero to hero in Python 3 at Udemy&lt;/a&gt;, we decided the next thing we would like to learn more about would be databases. At work I&amp;rsquo;ve been participating in a course in PostgreSQL called &lt;a href="https://bigmachine.io/products/a-curious-moon/"&gt;A curious Moon&lt;/a&gt; and I suggested that to the group. They have agreed and so we have begun.&lt;/p&gt;
&lt;h2 id="setting-up-its-never-easy"&gt;Setting up; It&amp;rsquo;s never easy&lt;/h2&gt;
&lt;p&gt;We actually started a week or maybe 2 ago and ran into more issues that I care to cover trying to get April and Kaleb up and running on their Windows laptops. So many, in fact, that we decided instead that we would install Ubuntu on their laptops and dual-boot so that we could have them inside a Linux environment where I could better help them as issues come up. I, and my brother Austin, are both working on Mac OSX and so this will make a more consistent environment. One that I hope means any issues they come across I will have also and will therefore be able to assist them. (I&amp;rsquo;m still debating if I should install Ubuntu, I do have it on a VirtualBox VM if I absolutely need it&amp;hellip;).&lt;/p&gt;</description></item><item><title>Zero to Hero Python 3 Certificate Ammon</title><link>https://lockwood.fun/post/python/zero-to-hero-python-3-certificate-ammon/</link><pubDate>Tue, 22 Oct 2019 15:46:10 -0600</pubDate><guid>https://lockwood.fun/post/python/zero-to-hero-python-3-certificate-ammon/</guid><description>&lt;h2 id="congratulations"&gt;Congratulations!&lt;/h2&gt;
&lt;figure&gt;&lt;img src="https://lockwood.fun/images/certificates/zero-to-hero-ammon.png"&gt;&lt;figcaption&gt;
 &lt;h4&gt;Certificate of Completion. Zero to hero python 3 for Ammon Lockwood&lt;/h4&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&amp;#x1f389; &amp;#x1f44f; &amp;#x1f44d; Way to go Ammon! Congratulations on completing the Zero to Hero Python 3 course on Udemy!&lt;/p&gt;</description></item><item><title>Penpal Finishing Touches</title><link>https://lockwood.fun/post/python/penpal-finishing-touches/</link><pubDate>Wed, 16 Oct 2019 23:45:28 -0600</pubDate><guid>https://lockwood.fun/post/python/penpal-finishing-touches/</guid><description>&lt;h2 id="let-the-labels-be-selectable"&gt;Let the labels be selectable&lt;/h2&gt;
&lt;p&gt;So as we stated in the previous episode, there are a couple of features that we still need to add. We really wanted the user to be able to copy+paste the decoded or encoded message so that they can send it to their penpal. Turns out that this is a very easy thing to do. &lt;code&gt;Gtk.Label&lt;/code&gt; has a method &lt;code&gt;set_selectable()&lt;/code&gt; and we just needed to pass true to that method.&lt;/p&gt;</description></item><item><title>Penpal Connecting Modules to UI</title><link>https://lockwood.fun/post/python/penpal-connecting-modules-to-ui/</link><pubDate>Wed, 09 Oct 2019 23:45:11 -0600</pubDate><guid>https://lockwood.fun/post/python/penpal-connecting-modules-to-ui/</guid><description>&lt;h2 id="give-it-a-gui"&gt;Give it a GUI&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;ve been following along, you know that we are using GTK for our GUI. It took us a bit of time to get comfortable with it. I come from a web background and so I wanted to be able to create a &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; for the user to enter the message that they wanted to encode or decode. All that I could find was the the &lt;code&gt;Gtk.Entry&lt;/code&gt;. It was an input, and it would work, but I wanted a larger space for text. I didn&amp;rsquo;t like that lots of text would get cut off in the &lt;code&gt;Gtk.Entry&lt;/code&gt; widget. I found &lt;code&gt;Gtk.TextView&lt;/code&gt; and I thought, &amp;ldquo;This is it! I think this will do what I want.&amp;rdquo;. However, it was not as easy to do what I wanted. I thought I would be able to just add the TextView to the flowbox and be done. I did this and it did work, however it was small and didn&amp;rsquo;t really look like the &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; that I&amp;rsquo;m familiar with. I spent a lot of time on Google trying to find an example of how to change the size. I must have been really off my game because I wasn&amp;rsquo;t having any luck finding an example. Sadly, I don&amp;rsquo;t recall where I finally found the answer. I feel like it was on the official documentation that I found &lt;code&gt;set_size_request&lt;/code&gt; on the &lt;code&gt;Gtk.TextView&lt;/code&gt;. I tried it out and was happy that it worked nicely for me.&lt;/p&gt;</description></item><item><title>Penpal Decode &amp; Encode Modules</title><link>https://lockwood.fun/post/python/penpal-decode-encode-classes/</link><pubDate>Mon, 07 Oct 2019 23:41:35 -0600</pubDate><guid>https://lockwood.fun/post/python/penpal-decode-encode-classes/</guid><description>&lt;h1 id="creating-the-decode--encode-modules"&gt;Creating the Decode &amp;amp; Encode Modules&lt;/h1&gt;
&lt;p&gt;Life got really busy for a bit and so it took some time for us to get things rolling again. Thankfully April was able to get some work done on the decoder module and I, Ammon, was able to get a little work on the UI done.&lt;/p&gt;
&lt;h2 id="decoder-module"&gt;Decoder Module&lt;/h2&gt;
&lt;p&gt;April selected the task of creating the decoder class. Her and Kaleb were able to create a file that would shift an alphabet and then find the correct letter by shifting the index of the encoded letter to output the correct letter. It works well in jupyter, but it&amp;rsquo;s not yet able to receive any user input, nor is it part of the UI.&lt;/p&gt;</description></item><item><title>Penpal Cipher Project - GUIs</title><link>https://lockwood.fun/post/python/penpal-cipher-project-guis/</link><pubDate>Wed, 11 Sep 2019 23:41:35 -0600</pubDate><guid>https://lockwood.fun/post/python/penpal-cipher-project-guis/</guid><description>&lt;h1 id="project-guis-with-gtk3"&gt;Project GUIs with GTK3+&lt;/h1&gt;
&lt;p&gt;We are working on the final project to complete our &lt;a href="https://www.udemy.com/share/100058A0cdcVZbR34=/"&gt;Complete Python Bootcamp: Go from zero to hero in Python 3 at Udemy&lt;/a&gt;. We have decided that we will build a simple Caesar Cipher application that we are calling &lt;a href="https://github.com/sumnercreations/penpal"&gt;Penpal&lt;/a&gt;. During our conversation we decided that we would really like to try to make a GUI. We&amp;rsquo;ve taken inspiration from this online &lt;a href="https://cryptii.com/pipes/caesar-cipher"&gt;cipher tool&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="research"&gt;Research&lt;/h2&gt;
&lt;p&gt;We started with Google, you know, like you do, and found a lot of options for GUIs with python. 2 of them stood out.&lt;/p&gt;</description></item></channel></rss>