<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ben Kingston on Medium]]></title>
        <description><![CDATA[Stories by Ben Kingston on Medium]]></description>
        <link>https://medium.com/@rocknrollnut?source=rss-7932f247fee2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_F5PT3-gTo6r4KGHZ5VSjQ.jpeg</url>
            <title>Stories by Ben Kingston on Medium</title>
            <link>https://medium.com/@rocknrollnut?source=rss-7932f247fee2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 21:14:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rocknrollnut/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Attacking Python]]></title>
            <link>https://medium.com/@rocknrollnut/attacking-python-6ac05275a897?source=rss-7932f247fee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ac05275a897</guid>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Ben Kingston]]></dc:creator>
            <pubDate>Sat, 18 Feb 2017 03:20:50 GMT</pubDate>
            <atom:updated>2017-02-18T03:20:50.580Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is taken from my blog (palukingston.com) where I’m writing about my learning process as a software tester and developer. Thanks for taking a look!</em></p><p>February 13, 2017</p><p>About a week ago, I decided to learn python. I’ve been looking at some tutorials, getting through the basics and all. A few days in though, I hit a wall in my learning progress. After giving up, I slept on it, and decided well if one tutorial’s approach is not driving it home, then why not switch it up! I decided to look for a tutorial on building a simple app so that I could get some practical experience. I pretty quickly decided on a YouTube tutorial from 2012. I knew this could potentially lead to headaches — since the guy in the tutorial was using an older version of python, as well as a different IDE. But hey — that’ll just make it more interesting!</p><p>So — I found my first discrepancy in python syntax between versions. In the tutorial, we were writing a “random” number guessing game. There was a variable integer of 35 (randomNumber = 35) declared. The tutorial had you write the statement userGuess = input(“Your guess: “). When I ran the program this was the outcome:</p><pre>Guess a number between 1 and 100.</pre><pre>Your guess:1</pre><pre>Traceback (most recent call last):</pre><pre>File &quot;C:/Users/paluk_000/PycharmProjects/SimplePythonProgram_excercise/First.py&quot;, line 24, in &lt;module&gt;</pre><pre>main()</pre><pre>File &quot;C:/Users/paluk_000/PycharmProjects/SimplePythonProgram_excercise/First.py&quot;, line 16, in main</pre><pre>elif userGuess &gt; randomNumber:</pre><pre>TypeError: unorderable types: str() &gt; int()</pre><p>I banged my head against the wall for about 3 minutes and decided, rather than embrace my frustration, why not ask the Google oracle? One quick search and an entry on stackoverflow.com shed light on my problem. Apparently on my version of Python, you must declare the variable input as an int data type as well as put brackets around your print statement. Sweet, problem surmounted with relative ease and speed!</p><p>Ok, another discrepancy — the statement in this tutorial</p><pre>print random.randint(1,10)</pre><p>.. uses improper syntax. The correct statement ended up being this:</p><pre>print(random.randint(1,10))</pre><p>Gotta remember those darn brackets!</p><p>Aha! Another bug:</p><pre>C:\Python34\python.exe C:/Users/paluk_000/PycharmProjects/SimplePythonProgram_excercise/First.py</pre><pre>Guess a number between 1 and 100.</pre><pre>Your guess:1</pre><pre>Guess higher!</pre><pre>nnnnn</pre><pre>Thanks for playing our game.</pre><pre>Your guess:t</pre><pre>Traceback (most recent call last):</pre><pre>File &quot;C:/Users/paluk_000/PycharmProjects/SimplePythonProgram_excercise/First.py&quot;, line 30, in &lt;module&gt;</pre><pre>main()</pre><pre>File &quot;C:/Users/paluk_000/PycharmProjects/SimplePythonProgram_excercise/First.py&quot;, line 16, in main</pre><pre>userGuess = int (input(&quot;Your guess:&quot;))</pre><pre>ValueError: invalid literal for int() with base 10: &#39;t&#39;</pre><pre>Process finished with exit code 1</pre><p>Good times!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ac05275a897" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Imperfect Casting]]></title>
            <link>https://medium.com/@rocknrollnut/imperfect-casting-1481d12707a6?source=rss-7932f247fee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1481d12707a6</guid>
            <dc:creator><![CDATA[Ben Kingston]]></dc:creator>
            <pubDate>Thu, 02 Jan 2014 05:00:09 GMT</pubDate>
            <atom:updated>2014-01-02T05:00:09.874Z</atom:updated>
            <content:encoded><![CDATA[<h4>My foray into the land of podcasting</h4><p>Preston: “We’re going to make an app to promote the Dojo”</p><p>Me: “That’s cool, but maybe we could do a podcast first”</p><p>Ok, this isn’t a direct quote from a conversation, just my approximation. Anyhow, about a month ago I arrived to my Escrima class. Class attendance has been low lately, which is fine for us students, but it has made it difficult for my instructor to pay the rent at our Dojo. Hence the idea to build an app to promote the class, and increase attendance. I liked the idea, but I was unsure of how it could be implemented and suspicious as to how how effective it would be in promoting our class. I’m a big fan of the podcast medium, have been for several years, so I suggested that option. I explained to my instructor that you don’t actually need an iPod or anything to listen to a podcast, just a computer, and some headphones or a set of speakers.</p><p>I knew that my instructor Preston had hosted a radio show at some point at KAOS, one of the local community radio stations here in Olympia, so I knew that with my (limited) experience recording music and doing live sound would probably interface nicely with his experience on the microphone. Still, I had my doubts about how much production time this endeavor might suck up. I, being slightly obsessive and meticulous, worried about production values. There is definitely something to be said for having a relatively painless and clean production, something that doesn’t hurt to listen to. Not a bad thing.</p><p>Well, today we did it. First podcast, recorded, down-mixed, and <em>almost</em> ready for upload to the world! We did one long take, had some background noise from my laptop’s cooling fan that made itself apparent upon listening afterwards. But we both agreed that it was more important to live with an imperfect product than to get it perfect. I recorded a nice little introductory musical soundbite (a guitar chord on my guitar, simple), as well as a brief intro and apology for our technical shortcomings, down-mixed it from Garage Band, and I’m done! Yes, yes, its not really done.</p><p>Still got to follow through with uploading the podcast, creating a feed, getting the word out, etc. That’s all pretty crucial stuff, I mean, the whole point of this is to reach an audience and hopefully attract a few new students for my instructor’s school. But I feel like most of the hard stuff is done, and tech wise, I already know now I’m going to improve the next recording. I’m looking forward to it. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1481d12707a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>