<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[base pi]]></title>
  <link href="http://blog.basepi.net/atom.xml" rel="self"/>
  <link href="http://blog.basepi.net/"/>
  <updated>2012-08-23T21:15:35-06:00</updated>
  <id>http://blog.basepi.net/</id>
  <author>
    <name><![CDATA[Colton Myers]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Why I switched to Octopress]]></title>
    <link href="http://blog.basepi.net/2012/02/09/why-i-switched-to-octopress/"/>
    <updated>2012-02-09T18:33:00-07:00</updated>
    <id>http://blog.basepi.net/2012/02/09/why-i-switched-to-octopress</id>
    <content type="html"><![CDATA[<h2>The Problem</h2>

<p>Last week I received an e-mail from the RSA Anti-Fraud Command Center.
It related to <a href="http://blog.cmyers.net/">my personal blog</a>:</p>

<blockquote><p>It appears that your website cmyers.net has been hacked by a fraudster.  It
is now hosting a phishing attack against RBC.  Please remove the fraudulent
folders/files as soon as possible and secure your website as it has been
compromised.  Please note that it is possible that the fraudulent content is
embedded in your website&#8217;s legitimate files.</p></blockquote>

<p>Great.</p>

<p>It turns out the claim was in fact true.  There were new files in my wp-admin
folder for my wordpress install.  When I loaded these files in a browser, it
looked like the home page for a bank.</p>

<p>I had been hacked.</p>

<p>Turns out it&#8217;s actually quite a common thing.  WordPress is a common (and
apparently quite easy) target for these types of hacks.  It comes down to a
combination of it&#8217;s popularity, lack of really security-centric design, and the
fact that it&#8217;s written in PHP.</p>

<p>I considered a few options.  Do I take the time to properly harden my PHP5
install and reinstall wordpress?  Or do I change systems?</p>

<h2>Enter Jekyll</h2>

<p><a href="http://blog.errstr.com/">My friend Andrew generates his blog</a> using jekyll.  <a href="https://github.com/mojombo/jekyll/wiki">Jekyll</a> is a
&#8220;simple, blog aware, static site generator.&#8221;  It&#8217;s super-cool, check it out.
However, unlike WordPress, it doesn&#8217;t have a bunch of built-in themes, or even
a theme directory that I could find.  You have to write your own CSS and HTML
templates, which it uses to generate the site.  But it generates an almost
completely static site &#8211; the exception would be if you build in functionality
for <a href="http://disqus.com/">Disqus</a> comments or put your Twitter roll in the sidebar.</p>

<p>If I was going to switch systems, static is what I was looking for.  The
resulting site is much faster than a WordPress site, and much more secure.  But
I didn&#8217;t have the time, knowledge, or creativity to create a theme from
scratch, and porting my theme from WordPress would be a many hour project.</p>

<h2>Enter Octopress</h2>

<p>Then I received a tweet from my friend <a href="https://twitter.com/#!/julio_menendez">Julio</a> that said to check out
<a href="http://octopress.org/">Octopress</a>.  It&#8217;s built on top of Jekyll with built-in support for great
syntax highlighting, Disqus comments, social integration &#8211; everything I was
looking for.  And a great default theme, which I could use as a jumping point
for my own.  I was sold.</p>

<p>The rest is history.  I&#8217;ll spell out the details in my next post.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Minecraft!!!]]></title>
    <link href="http://blog.basepi.net/2012/01/05/minecraft/"/>
    <updated>2012-01-05T18:00:00-07:00</updated>
    <id>http://blog.basepi.net/2012/01/05/minecraft</id>
    <content type="html"><![CDATA[<p>I finally did it.  I broke down and rented a Minecraft server.</p>

<p>Previously, I had hosted a Minecraft server pretty successfully on my personal
web server.  The problem became two-fold:  it was a huge time-sink, as updating
all the plugins that I was running took a long time at each release.  Also,
while hosting the Minecraft server, my server would often become unresponsive,
requiring a restart.  This was unacceptable, as I also host a Teamspeak 3
server, an IRC bouncer, and multiple websites from my server.  I needed maximum
uptime!  So I finally shut down my Minecraft server for good.</p>

<p>But now it&#8217;s back!  OK, it&#8217;s not the exact same server &#8211; I didn&#8217;t bring the
old world over.  I wanted a fresh start.  But it&#8217;s a Minecraft server, and it&#8217;s
all mine for the building!  OK, not all mine:  I want you to come too!  If you
already have a Minecraft account, post it in the comments so I can add you to
the user list.  (Otherwise you won&#8217;t be able to build)  If you&#8217;ve never played
Minecraft, head on over to <a href="http://minecraft.net">minecraft.net</a> and buy the game.  Just do it,
it&#8217;s worth it.</p>

<p>My server is at mc.basepi.net.  Come and join us in building something awesome!
=)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Slide Design for Developers]]></title>
    <link href="http://blog.basepi.net/2011/12/24/slide-design/"/>
    <updated>2011-12-24T18:00:00-07:00</updated>
    <id>http://blog.basepi.net/2011/12/24/slide-design</id>
    <content type="html"><![CDATA[<p><a href="http://zachholman.com/posts/slide-design-for-developers/">This is a great article</a> by a guy over at <a href="https://github.com/">Github</a> about slide design.  He
makes some really good points, and his slides <a href="http://zachholman.com/talk/how-github-uses-github-to-build-github">really are beautiful</a>.  I
want to see more presentations with these design pointers in mind.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[More on SOPA and Protect-IP (Don't break the internet!)]]></title>
    <link href="http://blog.basepi.net/2011/12/22/dont-break-the-internet/"/>
    <updated>2011-12-22T18:00:00-07:00</updated>
    <id>http://blog.basepi.net/2011/12/22/dont-break-the-internet</id>
    <content type="html"><![CDATA[<p>More on SOPA and Protect-IP (Don&#8217;t break the internet!)</p>

<p>As I said in my previous post, SOPA (the Stop Online Piracy Act) and Protect-IP
are both very bad pieces of legislation.  They are not only technically damning
for the internet, but they are unconstitutional.  When I started doing my due
diligence the other day with regards to these bills, I didn&#8217;t know much about
them.  After some research, though, I have discovered just how bad these bills
are.  Here&#8217;s some more information, in a <a href="http://www.popularmechanics.com/science/mythbusters/articles/mythbuster-adam-savage-sopa-could-destroy-the-internet-as-we-know-it-6620300">post by Adam Savage</a> (from
MythBusters).</p>

<p>That article is not that technical and doesn&#8217;t really quote the bills much.
For the full story on the bills and just how technically bad they are, as well
as how unconstitutional they are, read <a href="http://www.stanfordlawreview.org/online/dont-break-internet">the Standford Law Review&#8217;s take on the
bills</a>.</p>

<p>These bills are being pushed by the entertainment industry pretty hard, and not
necessarily for bad reason &#8211; piracy is an issue. But these bills are
technically stupid, won&#8217;t actually solve anything (the second link addresses
this &#8211; it would just force piraters to use alternate services from DNS, which
is just bad for the internet at a whole and won&#8217;t stop their activities), and
puts the US on a slippery slope towards censorship like Iran or China.  The
bills are being fought by every single major tech company.  (And probably all
the non-major tech companies as well &#8211; they&#8217;re just not as visible)</p>

<p>Leave your thoughts in the comments.  And speak up to stop SOPA and Protect-IP!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Stop SOPA (Stop Online Privacy Act)]]></title>
    <link href="http://blog.basepi.net/2011/12/19/stop-sopa/"/>
    <updated>2011-12-19T18:00:00-07:00</updated>
    <id>http://blog.basepi.net/2011/12/19/stop-sopa</id>
    <content type="html"><![CDATA[<p>I&#8217;ve heard a lot of chatter about SOPA (the Stop Online Privacy Act), which is
currently going through congress.  However, today I finally decided to look
into it.  And I definitely didn&#8217;t like what I found.  Here&#8217;s a video summing up
the problems (the video is for the Protect IP act, which was introduced earlier
this year, but most of the same problems apply to both bills).  (Found via
<a href="http://www.mattcutts.com/blog/internet-censorship-sopa/">Matt Cutt&#8217;s Blog</a></p>

<iframe src="http://player.vimeo.com/video/31100268?byline=0&amp;portrait=0"
width="400" height="225" frameborder="0" webkitAllowFullScreen
mozallowfullscreen allowFullScreen></iframe>


<p><a
href="http://vimeo.com/31100268">PROTECT IP / SOPA Breaks The Internet</a> from
<a href="http://vimeo.com/fightforthefuture">Fight for the Future</a> on <a
href="http://vimeo.com">Vimeo</a>.</p>


<p>Watch the video.  Then Google &#8220;SOPA&#8221; for more information.  You can also sign a
petition against the act <a href="https://wwws.whitehouse.gov/petitions/%21/petition/veto-sopa-bill-and-any-other-future-bills-threaten-diminish-free-flow-information/g3W1BscR?utm_source=wh.gov&amp;utm_medium=shorturl&amp;utm_campaign=shorturl">here</a>.  Visit <a href="http://www.mattcutts.com/blog/internet-censorship-sopa/">Matt Cutt&#8217;s Blog Post</a> for some
more links to information and ways you can get involved.  Join with me and so
many others in speaking out against SOPA!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[VPS.net -- An easy-to-use, scalable VPS system]]></title>
    <link href="http://blog.basepi.net/2011/11/02/vps-net/"/>
    <updated>2011-11-02T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/11/02/vps-net</id>
    <content type="html"><![CDATA[<p>A couple of years ago, I decided I needed hosting space, because I wanted my
own website.  I started out with some basic hosting on Dreamhost, and then
later upgraded to their VPS (virtual private server) system, in order to host a
Minecraft server.  That was my initial reason for switching to a VPS:  for the
dedicated resources (&#8216;cause let&#8217;s face it &#8211; Minecraft is not very efficient).</p>

<p>However, it started to get really expensive, and I could only define dedicated
RAM on Dreamhost &#8211; there was no dedicated CPU time, etc.  So I decided to make
a switch.  I shopped around for awhile, and then found <a href="http://vps.net/">VPS.net</a>.  Here&#8217;s the
idea behind it:  you rent a series of nodes, each of which represents a
specific amount of dedicated CPU, RAM, hard drive space, and bandwidth.  You
can then create/remove different VPSs easily (and for free), using these nodes.
You can even resize a given VPS, and there will only be a little downtime for
the hard drive re-sizing.  It was a dream come true.  I got full root access,
and could give my Minecraft server as much dedicated resources as it needed.</p>

<p>Fast-forward a little.  Today I no longer run a Minecraft server.  It was just
too unstable and I didn&#8217;t like the time I had to spend upgrading it all the
time.  However, I am still a 4-node subscriber on VPS.net.  Why?  Because it&#8217;s
still the best value, and gives me the most freedom.  Nowadays I use it to host
a number of different websites/blogs, including my own URL forwarding service,
as well as a Teamspeak 3 server and a series of other small utilities.  And
I&#8217;ve had very few problems with it.  My VPSs have restarted unexpectedly from
time to time, but those are few and far between.  Otherwise, it&#8217;s been a very
good experience.  They also have snapshot backup services for a small fee,
rsync storage space on a remote server for a small fee, they have good web
control panel options (though I don&#8217;t use a control panel &#8211; my servers are all
CLI-based), and very prompt and thorough customer service.</p>

<p>Oh, and I almost forgot, they have a wide variety of supported operating
systems ready for 1-click install.  I run Ubuntu 10.04, but if that&#8217;s not your
flavor of choice, they have something for everyone.  I think they even support
Windows Server, but don&#8217;t quote me on that.  ;-)</p>

<p>Anyway, I highly recommend <a href="http://vps.net/">you check them out</a>!  =)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Android vs. iOS]]></title>
    <link href="http://blog.basepi.net/2011/11/01/android-vs-ios/"/>
    <updated>2011-11-01T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/11/01/android-vs-ios</id>
    <content type="html"><![CDATA[<p>My iPhone 4S came this last week.  Previously, I was a proud owner of the HTC
Evo 4G, a great phone.  But still I switched.  Since I&#8217;ve had a few people ask
me why, I decided I&#8217;d better just blog it.  Sorry for my rambling.</p>

<p>Both platforms have their advantages.  I suppose I&#8217;ll go platform by platform
and examine some pros and cons:</p>

<h2>iOS</h2>

<p>With iOS 5, an iPhone was finally a valid alternative to my Android phone.
Previously, I never would have switched, because of the lack of a good
notifications system.  If a push notification came in, it would interrupt
whatever you were doing, sometimes to the effect of restarting your progress
in a game or something.  This in and of itself was an annoyance, but could be
overlooked.  The main problem was that once a notification popped, if didn&#8217;t
immediately go to that app and take care of it, it was gone.  Poof.  You
couldn&#8217;t decide to leave this or that notification for later, because they
weren&#8217;t being stored anyplace.  That all changed with Notification Center in
iOS 5.</p>

<p>This was basically just a modified copy of Android&#8217;s version of notifications,
which they got right from the beginning.  Drag from the top of the screen and
you have a list of all the notifications which you have not yet acted upon.  In
my opinion, Apple did it even better than Android &#8211; you can define the order
in which notifications are shown manually, or you can have it based on the time
of the notification.  You can also act on the notification straight from the
lock screen by sliding-to-unlock using the notification icon.  (Hard to
explain, ask someone with an iPhone to show you if you don&#8217;t know what I mean)
It&#8217;s a pretty schweet feature.</p>

<p>Other things iOS has going for it:</p>

<ul>
<li>Very stable (rarely crashes, almost never have to reboot, etc)</li>
<li>Very clean (everything is hardware accelerated, so every action is smooth out
of the box)</li>
<li>Higher resolution screen than most Android phones, even the ones with bigger
screens.  People complain about the screen size on iPhones, but you don&#8217;t even
notice because of how clear the retina display is.</li>
<li>More secure (all apps are sandboxed, making malware pretty much nonexistent)</li>
<li>More polished apps (I don&#8217;t know why this is the way it is &#8211; perhaps because
of Apple&#8217;s app store policies, but apps are so much polished on average.  It&#8217;s
true of both OSX and iOS)  This is a huge one.  The general level of quality,
both of games and of daily-use apps, is much higher on iOS than on Android.</li>
<li>Better hardware, with very little fragmentation.  You have great battery life,
on every iPhone.  It&#8217;s very compact for its power.  You almost never have to
worry about your phone not meeting &#8220;minimum requirements.&#8221;  This is probably a
large part of what makes the previous statement (polished apps) true &#8211;
developers can focus on the quality of the app, rather than focusing on making
the app work for hundreds of different phones.  You&#8217;re also guaranteed to get
all the iOS updates for at least a couple of years, something which 99% of
Android users do NOT get.</li>
<li>Great camera.  Yes, some Android phones also have great cameras, but many of
them are pretty much junk.</li>
</ul>


<p>The iPhone is a pretty great phone, but it does have some cons:</p>

<ul>
<li>Limited customization.  Can&#8217;t replace the stock keyboard, very few homescreen
customization options, etc.</li>
<li>Sandboxed apps.  This is both a pro and a con.  Apps can&#8217;t really interact
because they&#8217;re sandboxed.  You also don&#8217;t have a file system in the classic
sense, which makes it more limited for a computer replacement.  Most people
don&#8217;t care about this con, but it&#8217;s still there.</li>
</ul>


<p>Those are the only cons I can think of right now, leave a comment if you find
one I missed.</p>

<h2>Android</h2>

<p>Android is also a great platform.  I love Google, and love their products.
Things Android has going for it:</p>

<ul>
<li>The same type of notification system, tried and true.</li>
<li>Tons of customization options.  There are many great options for homescreen
apps which can change the look and functionality of your homescreen and app
drawer drastically</li>
<li>Separation between homescreen and general apps.  This means you can use your
homescreen more like the desktop on your computer, with only apps you use often
showing there, and the rest hidden in the &#8220;app drawer,&#8221; which you can open at
will from your homescreen.</li>
<li>True multitasking.  This means that apps can run in the background and perform
tasks without being open, which is very uncommon in iOS, which utilizes push
notifications.  However, it can have performance and battery ramifications,
which we will explore in the cons section.</li>
<li>Apps have more freedom.  This means that you can have Google Voice, for
example, seamlessly integrate with the phone app, as opposed to being separate.
It also allows problems like malware.</li>
<li>Dedicated menu and back buttons.  This is both a pro and a con, but I find
myself missing a dedicated back button on iOS, and having these buttons as
hardware buttons saves space on the screen which would be taken up by these
buttons.</li>
<li>Much better integration with the Google-sphere.  Since everything I use is
Google, (Gmail, Calendar, Contacts, Voice, Talk), having this integration is
really nice.  You can get pretty decent integration in iOS, but it takes more
setup and is not as seamless.</li>
</ul>


<p>Here are some cons:</p>

<ul>
<li>Instability.  I had to restart my phone every few days because it would become
unresponsive or strange bugs would rear their heads.  A pain when your phone
takes a few minutes to restart.</li>
<li>Reliance on phone manufacturer for operating system updates.  This is a big
one &#8211; unless you&#8217;ve rooted your phone and are using custom roms, most OS
updates either never come, or are 6 months to a year late, and by then a new
version has been released.  This also causes problems with app requirements.</li>
<li>Inconsistent hardware quality.  Another big one.  Most Android touch screens
are not as precise or as quick to respond as the iPhone screens.  In addition,
some of the Android phones are cheaply made, and/or have really bad battery
life.</li>
<li>True multitasking.  Like I said, this is a pro and a con.  The con is that a
frozen or buggy app can rampage in the background, sucking battery power and
processing power.  Even the ones that don&#8217;t act up can continually such battery
life in the background.  In addition, apps are much harder to kill on Android,
since you have to go into system settings and wade through the list of apps to
do it.</li>
<li>Malware.  Without Apple-esque restrictions on apps, there is much more danger
of malware.  This is becoming an increasing issue as Android becomes more
popular.</li>
<li>Lower app quality standard.  We&#8217;ve visited this already.</li>
</ul>


<h2>Summary and Other Resources</h2>

<p>I decided to switch from one of the better Android phones to an iPhone 4S.  And
unless something big changes in the future, I&#8217;ll never go back.  The stability
and polish is important to me, as is battery life.  I also will get the newest
versions of iOS right as they are released for at least a few years, where
Android users are often left out in the cold when new versions of Android come
out.  What you get will depend on what&#8217;s most important to you.  But even as a
power user, I chose iPhone.</p>

<p>Here&#8217;s a recent article on the subject: <a href="http://www.foxnews.com/scitech/2011/10/26/iphone-4s-vs-android-phones-whats-better-for/">Link</a></p>

<p>Sorry for my rambling, be sure to leave a comment below with your opinions.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[More on Python]]></title>
    <link href="http://blog.basepi.net/2011/08/01/more-on-python/"/>
    <updated>2011-08-01T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/08/01/more-on-python</id>
    <content type="html"><![CDATA[<p>My good friend <a href="https://profiles.google.com/u/0/106066712316258581810/about">Chad</a> recently started learning about Python.  After getting
a fair bit into a book on the subject, he posted on <a href="http://plus.google.com">Google+</a>:</p>

<blockquote><p>Language seems cool, though I haven&#8217;t found a compelling reason to need it. I
think Django is the main reason I want to use it. Calling upon the powers of
+Julio Carlos Menendez and +Colton Myers to give me some examples where using
Python is WAY better than another language.</p></blockquote>

<p>I decided to try to collect some of the research that I found while selecting
Python as my latest language-of-choice, and post it here.  Hopefully it will be
helpful to anyone who&#8217;s trying to decide if Python is worth picking up.  Be
aware, though, this is going to be more a random collection of thoughts and
links rather than a linear blog post on the awesomeness of Python.</p>

<hr />

<h2>Community</h2>

<p>I suppose one of the first things I should point out, before we get into any
language specifics, is the community.  I love the Python community.  Whether
it&#8217;s the mailing list(s), or the #python channel on Freenode, the community is
very active and very helpful.  In fact, the #python channel is one of the most
active on my IRC client.  With all that help available, solving problems
becomes much less daunting than in other languages.</p>

<hr />

<h2>Indentation as Syntax</h2>

<p>One of the most immediately obvious things people notice about Python is the
significance of whitespace.  This is in contrast to most every other modern
programming language, and often throws people when they first discover it.  I
think of this part of Python as a very positive <em>feature</em> of the language:
having indentation as part of the actual <strong>syntax</strong> of the language makes for
very consistent code &#8211; across almost every Python program, control structures
look the same, because the indentation delimits code blocks, rather than
braces.  If this feature seems weird or unnatural to you, I suggest you try
writing in Python for your next project &#8211; the initial &#8220;weirdness&#8221; of this
feature rapidly fades away, and if you&#8217;re like me, you find yourself
appreciating the innate readability that it gives Python code.</p>

<hr />

<h2>Intuitive Language Design</h2>

<p>For this next section, I&#8217;ll quote an <a href="http://www.linuxjournal.com/article/3882">article</a> by Eric Raymond, where he
details his early experience with Python:</p>

<blockquote><p>My second [surprise] came a couple of hours into the project, when I
noticed (allowing for pauses needed to look up new features in <em>Programming
Python</em>) I was generating <em>working</em> code nearly as fast as I could type. When
I realized this, I was quite startled. An important measure of effort in
coding is the frequency with which you write something that doesn&#8217;t actually
match your mental representation of the problem, and have to backtrack on
realizing that what you just typed won&#8217;t actually tell the language to do
what you&#8217;re thinking. An important measure of good language design is how
rapidly the percentage of missteps of this kind falls as you gain experience
with the language.</p>

<p>When you&#8217;re writing working code nearly as fast as you can type and your
misstep rate is near zero, it generally means you&#8217;ve achieved mastery of the
language. But that didn&#8217;t make sense, because it was still day one and I was
regularly pausing to look up new language and library features!</p>

<p>This was my first clue that, in Python, I was actually dealing with an
exceptionally good design. Most languages have so much friction and
awkwardness built into their design that you learn most of their feature set
long before your misstep rate drops anywhere near zero. Python was the first
general-purpose language I&#8217;d ever used that reversed this process.</p></blockquote>

<p>I&#8217;ve experienced this myself &#8211; Python&#8217;s design is such that it works much more
fluidly with the solutions as they live in my head.  I can just start coding
and the solution flows easily from my brainwaves to working Python code.  Try
it, I think you&#8217;ll be surprised.</p>

<p>While on the topic of Python&#8217;s intuitiveness, I think we should talk about
IDEs.  C# is one of my favorite languages.  Using Visual Studio, you can create
very advanced and full-featured GUI applications on Windows with relative ease.
However, they key part of that last statement is &#8220;Using Visual Studio&#8221;.  I find
when I&#8217;m writing in Java, C#, Objective-C, etc, I end up relying heavily on
intellisense to help me recall syntax and method names.  In contrast, Python is
designed so intuitively that I find that I am able to write full-featured
programs with only Vim and a few trips to the Python documentation to refresh
the name of a certain function within a certain module.  I think that&#8217;s another
testament to the great design of Python, and just how intuitive it is.</p>

<p>In addition, though C# can be used to create great Windows GUIs, Visual Studio
is again used to abstract away thousands of lines of GUI code which is
generated by Visual Studio as you code the GUI.  Have you ever tried to write a
C#, Java, or Objective-C GUI in a non-IDE text editor such as Vim?  It&#8217;s nigh
unto impossible, because the syntax is so verbose and not intuitive enough to
easily remember.  Contrast this with Python&#8217;s Tkinter toolkit, which allows one
to create GUIs with relative ease, and with no reliance on an expensive IDE.
And the Python GUIs look native on each platform.</p>

<hr />

<h2>Java vs. Python</h2>

<p>Might as well throw in a side-by-side comparison of Java vs. Python.  Shows
some of the differences in verbosity and complexity between the two languages,
even if only in small examples.</p>

<p><a href="http://pythonconquerstheuniverse.wordpress.com/category/java-and-python/">Java vs. Python</a></p>

<hr />

<h2>Conclusion</h2>

<p>Obviously Python is not perfect.  There are definitely downsides to having a
completely dynamically-typed language like Python &#8211; if you&#8217;re not careful, you
can have difficult-to-find bugs crop up.  And the task at hand can sometimes
require the speed of C, for example, or features from other languages &#8211; Python
is not a cure-all, and I don&#8217;t pretend that it is.  But for me, it&#8217;s pretty
close.</p>

<p>What it comes down to is that I&#8217;ve come to really enjoy programming in Python,
finding it intuitive, straightforward, and full of features that make my job
easier as a programmer.  And I hope that it treats you as well.  =)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Vim -- why???]]></title>
    <link href="http://blog.basepi.net/2011/07/03/vim-why/"/>
    <updated>2011-07-03T05:59:00-06:00</updated>
    <id>http://blog.basepi.net/2011/07/03/vim-why</id>
    <content type="html"><![CDATA[<p>I use vim.</p>

<p>Vim is a 20-year-old text editor, based on the 35-year-old &#8220;vi&#8221; editor
(pronounced vee-eye, not vie).  vi and emacs are both part of an editor holy war
that has been going on for decades.  I discovered this holy war years ago,
mentioned on some website or another, and started to research.  I tried both
editors briefly, and then decided to take vim&#8217;s side of the holy war.  At the
time, this pick was kind of arbitrary &#8211; I really didn&#8217;t know enough about the
two editors to make a truly educated decision.  I think I saw vim as the
underdog in the war, and as the more interesting of the two editors, with it&#8217;s
strange idea of separate modes for text entry and for commands.</p>

<p>I&#8217;ve never looked back.  When I first picked up vim, it was mainly so I&#8217;d have
bragging rights that I could program in a crazy-old terminal editor.  However, a
few years later and I do everything I can to work in vim as exclusively as
possible, whether for school, work, or personal projects.</p>

<p>People often comment on my choice.  Why am I not using the feature-rich IDEs
available for the language in which I&#8217;m coding?  Why am I using such an <em>old</em>,
out-dated piece of software?  (This question just shows ignorance &#8211; the latest
version of vim, 7.3, was released Aug 2010)  What&#8217;s so great about vim?</p>

<p>That&#8217;s what this article is about.  Just as John Beltran de Heredia did in his
<a href="http://www.viemu.com/a-why-vi-vim.html" title="Why vi/vim?">article</a>, I&#8217;m going to try to break some of the misconceptions surrounding
vi/vim, and show you why vim is king.  For those who already are convinced and
are looking for some vim resources, jump to the resources section at the bottom.</p>

<h2>Normal vs. Insert Modes</h2>

<p>The first time you try vi/vim without any real introduction to it, the result is
almost always the same.  First, there&#8217;s the disgust that you feel when you find
out that to even enter any text, you have to hit &#8216;i&#8217; to enter insert mode.  The
normal and insert modes of vim are probably its most misunderstood feature, and
what makes vim so powerful.  But misunderstood, the result usually is that you
get into insert mode, use the arrow keys to navigate around, and do everything
you can to stay in insert mode.  That&#8217;s how we&#8217;ve been trained &#8211; if we enter a
letter, that letter should appear on the screen.  So you stay in insert mode,
dink around for a few minutes, then throw your arms in the air, yell &#8220;What&#8217;s the
point???  This is so stupid.&#8221;, and then never come back.</p>

<p>It turns out that this is not the way to use vim at all.  The key thing to
remember with vim is that you stay in normal mode almost all the time, entering
insert mode for <em>short bursts</em> of typing text, only to return immediately to
normal mode.  John Beltran hits the concept on the head in the article I linked
to earlier:</p>

<blockquote><p>Thus, the remembering-the-mode problem just doesn&#8217;t exist: you don&#8217;t answer the
phone in insert mode to get back to vi and not remember where you were. If you
are typing text and the phone rings, you exit insert mode and then answer the
phone. Or you press &#8217;<Esc>&#8217; when you come back. But you never think about insert
mode as a mode where you stay.</p></blockquote>

<p>He continues:</p>

<blockquote><p>Let me explain the philosophy behind this.</p>

<p>Commands in vi/vim are meant to be combined - &#8216;d&#8217; means delete, &#8216;e&#8217; means &#8216;move
to end of word&#8217;, then &#8216;de&#8217; is a complete command that deletes to the end of the
current word (something like Ctrl-Shift-Right, Left, Del in most regular
editors).</p></blockquote>

<p>When you compare &#8216;de&#8217; to the &#8216;Ctrl-Shift-Right, Left, Del&#8217; in most regular
editors, you start to see the beauty of the system.</p>

<p>Interestingly enough, inserts are considered commands as well.  If you type &#8216;i&#8217;
to begin inserting text before the current character, type a word or two, and
then hit &#8216;Esc&#8217;, that entire operation is a command.  This is important to
remember because of another key piece of functionality:  the &#8216;.&#8217; key.  When in
normal mode, the &#8216;.&#8217; key will repeat the last complete, combined editing command
you executed.  This could be the &#8216;de&#8217; command we mentioned earlier, or it could
involve inserts.  For example, if you typed &#8216;iHello<Esc>&#8217;, then it would insert
the word &#8220;Hello&#8221; before the starting location.  Then, if typed a &#8216;.&#8217;, it would
repeat that operation.</p>

<p>The interesting thing is that you can also add a number argument before almost
any command (whether movement command or editing command), and that command will
be repeated that many times.  All these concepts can be combined to result in
incredibly flexible editing power.  Jon Beltran does a good job of a more
in-depth exploration of the power of vim, so I&#8217;ll link you over to <a href="http://www.viemu.com/a-why-vi-vim.html" title="Why vi/vim?">his
article</a> again if you want to learn more.</p>

<h2>Go Explore!</h2>

<p>Vim is generally known for it&#8217;s very steep learning curve.  I won&#8217;t deny, the
learning curve is definitely there.  However, I will say that if you can stick
with it, you&#8217;ll never regret it.  Vim key bindings allow you to basically ditch
your mouse, as well as carpal-tunnel inducing crazy key bindings for basic
operations.  Everything is at your fingertips, and it&#8217;s so powerful!  You can
also find vim emulation plugins for many modern IDEs, such as Eclipse, Visual
Studio, etc.  Another interesting fact is that the default shortcut keys in
Gmail are vim-inspired!</p>

<p>If you really want to try to learn vim, head over to Jon Beltran&#8217;s site and get
his <a href="http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html" title="vi/vim Graphical Cheat Sheet">vi/vim graphical cheat sheet</a>.  I found this invaluable as I learned
vim.  You&#8217;ll also find many good books on vim.  Just follow the reviews on
Amazon or a similar site, and you&#8217;ll find them.</p>

<p>Once you have the basics down, you can start exploring ways to extend and
customize vim.  You&#8217;d be amazed to find out how truly customizable it is.  In
fact, if you&#8217;re interested, <a href="http://github.com/crakdmirror/dotfiles" title="Colton's dotfiles">check out my dotfiles!</a>  This is a collection
of my various configuration files, including my vim configuration files.  I&#8217;ve
tried to comment everything thoroughly enough that you&#8217;ll be able to follow
what purpose each command serves, but feel free to use the issue tracker to ask
questions!  You can even fork the repository (it&#8217;s on Github), and modify to
suit your needs!  It&#8217;s designed to be cross-platform (it requires one small
change in the .vimrc to define the platform), so it should be pretty easy to
incorporate.</p>

<h2>Enjoy!</h2>

<hr />

<h1>Resources</h1>

<p><a href="http://www.viemu.com/a-why-vi-vim.html" title="Why vi/vim?">Why vim is the &#8220;Killerest&#8221;</a></p>

<p><a href="http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html" title="vi/vim Graphical Cheat Sheet">vi/vim Graphical Cheat Sheet</a></p>

<p><a href="http://github.com/crakdmirror/dotfiles" title="Colton's dotfiles">My dotfiles</a></p>

<p>I&#8217;d love to add to this list of resources, so if you have a good one, leave a
comment!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Python:  My Language of Choice]]></title>
    <link href="http://blog.basepi.net/2011/07/01/python/"/>
    <updated>2011-07-01T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/07/01/python</id>
    <content type="html"><![CDATA[<p>I recently found a &#8220;poem&#8221; about the philosophies of Python.  It pretty well
embodies the reasons behind my recently acquired love of Python:</p>

<blockquote><h2>The Zen Of Python</h2>

<p>Beautiful is better than ugly.<br>
Explicit is better than implicit.<br>
Simple is better than complex.<br>
Complex is better than complicated.<br>
Flat is better than nested.<br>
Sparse is better than dense.<br>
Readability counts.<br>
Special cases aren&#8217;t special enough to break the rules.<br>
Although practicality beats purity.<br>
Errors should never pass silently.<br>
Unless explicitly silenced.<br>
In the face of ambiguity, refuse the temptation to guess.<br>
There should be one—and preferably only one—obvious way to do it.<br>
Although that way may not be obvious at first unless you&#8217;re Dutch.<br>
Now is better than never.<br>
Although never is often better than <strong>right</strong> now.<br>
If the implementation is hard to explain, it&#8217;s a bad idea.<br>
If the implementation is easy to explain, it may be a good idea.<br>
Namespaces are one honking great idea &#8211; let&#8217;s do more of those!</p></blockquote>

<p>This poem was actually immortalized in Python&#8217;s <a href="http://www.python.org/dev/peps/pep-0020/">PEP 20</a>, where the abstract
reads:</p>

<blockquote><p>Long time Pythoneer Tim Peters succinctly channels the BDFL&#8217;s guiding
principles for Python&#8217;s design into 20 aphorisms, only 19 of which have been
written down.</p></blockquote>

<p>For those who might not be familiar, BDFL stands for Benevolent Dictator For
Life, a title which belongs to Guido van Rossum, the creator of Python.  PEPs
are Python Enhancement Proposals.</p>

<p>Now that we have the lingo out of the way, we can talk about the language
itself, and how I was introduced to it.</p>

<p>I had spent a fair number of hours fighting to write shell scripts to handle a
few tasks on my web server.  After tearing a few handfuls of hair out in
frustration, I shot an e-mail to my good friend Andrew, who works as a
programmer and sysadmin for a local company.  He told me that he avoid shell
scripts where possible, writing scripts instead in Perl.  I had heard of these
so-called scripting languages, Perl, Python, and Ruby being the most prominent
in my mind, so I decided to look into them.  I did a lot of research into these
languages, and eventually settled on Python, primarily because of the
principles in the poem above.</p>

<p>These principles just completely jive with my thoughts on programming.  Python
is designed such that most people that haven&#8217;t ever written any Python code can
read it and understand what&#8217;s going on.  Some have referred to Python as
executable pseudo-code, and it&#8217;s almost true!  I found a quote which supports
the idea of human-readability in code perfectly:</p>

<blockquote><p>&#8220;Programs must be written for people to read, and only incidentally for
machines to execute.&#8221;</p>

<p>&#8211;Abelson &amp; Sussman, <em>Structure and Interpretation of Computer Programs</em></p></blockquote>

<p>This is just one of the many reasons for which I chose Python as the language I
would attempt to master.  Another was the community &#8211; the #python channel on
Freenode is almost never quiet &#8211; there are always people asking for help with
some issue or another, and always people there to answer.  I&#8217;m sure there are
similar communities with Ruby and Perl, but so far I really like the community
that comes with Python.</p>

<p>The thing that surprised me as I continued to learn about Python is that it is
much more than a scripting language &#8211; it is powerfully object-oriented, and
even has very powerful GUI toolkits such as <a href="http://wiki.python.org/moin/TkInter">Tkinter</a>.</p>

<p>I keep discovering more and more exciting things as I continue to learn about
Python, and look forward to leveraging it&#8217;s power more in my own personal
projects.  Now I just need to slowly work at getting it introduced at work&#8230;</p>

<p>What&#8217;s your language of choice, and why?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[...and again.]]></title>
    <link href="http://blog.basepi.net/2011/04/02/and-again/"/>
    <updated>2011-04-02T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/04/02/and-again</id>
    <content type="html"><![CDATA[<h2>Here we go again.</h2>

<p>I mean, seriously.  You&#8217;ve gotta be wondering, &#8220;Why does he even keep trying?&#8221;
This has to be my 6th or 7th attempt at a blog.  Shouldn&#8217;t I just give up
already?</p>

<p>Well this time I&#8217;m trying something a little bit different.  I&#8217;m going to blog
about technology, rather than my personal life.  Obviously I&#8217;ll try to throw
some personal life stuff in there, but the problem is, I don&#8217;t feel like my life
is interesting to write about, and thus I have a hard time staying interested in
the writing, and I assume others have a hard time staying interested in the
reading.  Those of you who aren&#8217;t &#8220;techies&#8221; out there, I hope you&#8217;ll still come
read a little.  I think you&#8217;ll find some interesting stuff.  And who knows, if I
can keep up interest in a tech blog, maybe I&#8217;ll be able to make and keep a
personal blog too.</p>

<p>More to come.  I&#8217;m going to post a little on the reasoning behind this post a
little later.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Always and Forever...]]></title>
    <link href="http://blog.basepi.net/2011/04/01/always-and-forever/"/>
    <updated>2011-04-01T18:00:00-06:00</updated>
    <id>http://blog.basepi.net/2011/04/01/always-and-forever</id>
    <content type="html"><![CDATA[<p>Like I mentioned in the last post, I&#8217;m taking a little bit of a different
approach with this blog. Rather than try to blog about my life, which, in my
opinion, leads to rapid loss of interest both on my part and the part of my
readers, I&#8217;ve decided to focus on something that I&#8217;m actually interested in
(and I hope interests a few of you):  technology.  Specifically, computers.</p>

<p>I got pulled in at a pretty young age.  First it was the computer games &#8211; <em>Load
Runner</em> on our black-and-white Macintosh; later, <em>Warcraft 2</em> on our 486.  It
just escalated from there.  I still play a lot of video games (my parents will
tell you that I play way too much, and they&#8217;re probably right), but the less&#8230;
flashy end of computing pulled me in, slowly but surely, as time went on.</p>

<p>My Dad taught me some basic DOS commands as we installed Doom from about nine
floppies.  I learned how to install and uninstall programs, tweak the operating
system to gain more performance, mess with the registry enough to need a Windows
reinstallation&#8230; (not very hard, that last one &#8211; but a rant on the Windows
registry should be a topic for another day)</p>

<p>I downloaded tool after tool, tinkering with different things.  I discovered the
editor wars (Vim vs. Emacs), and decided I wanted to take a side in that war.
(Vim, by the way&#8230;..it&#8217;s where I&#8217;m editing this article right now!)  I
eventually took a large course in C# and Java my senior year in high school, and
that&#8217;s when the fun really began.</p>

<p>Along this journey I discovered a few things.</p>

<ul>
<li><p>The ability to build a computer from components means nothing.  Anyone who
claims they&#8217;re computer-savvy because they built their own computer is naïve
and generally <em>not</em> computer-savvy at all. Computer-savvy people know that
building computers means basically nothing.</p></li>
<li><p>Nobody knows everything about computers.  It&#8217;s true.  This ties in nicely with
the previous point in that if someone claims they know everything about
computers, they probably know next to nothing.</p></li>
<li><p>&#8220;Computer genius&#8221; is not defined by the knowledge you have &#8211; it&#8217;s defined by
the ability to successfully find, interpret, and apply the information needed
to solve a problem.  99% of the time, any problem you&#8217;re having has been
solved by someone else.  Finding that information is an art, however.  Anyone
can type things into Google.  But how many people do you know who always find
the answer they&#8217;re looking for from Google?</p></li>
</ul>


<p>The point is, I don&#8217;t claim to know everything.  In fact, I generally know just
enough to (1) be dangerous, and (2) have an idea of how much I do <em>not</em> know.
But I do know a few things, and hope to be able to share some of them.  I also
hope to be able to learn a few things in turn from you, the reader.  So please,
comment!  I love questions, and I&#8217;ll do my best to find the answer for you, and
I love it when people give new ideas/tricks, or yes, even when they correct
errors in my knowledge.</p>

<p>So let&#8217;s get to it!  =)</p>

<hr />

<p>PS:  Now that you know the topic of this post, props to whoever can guess the
reference in the title.  Party on.</p>
]]></content>
  </entry>
  
</feed>
