Jekyll2018-04-03T13:58:47+00:00http://jkirchartz.com/JKirchartz - Web Yinzer n’atMusings, Music, and More from the WebYinzer n'at.jkirchartzCaustic2017-01-18T00:00:00+00:002017-01-18T00:00:00+00:00http://jkirchartz.com/2017/01/caustic<p>Here’s a collection of actual songs I made using <a href="http://www.singlecellsoftware.com/caustic">Caustic</a>, and painstakingly exported to <code class="highlighter-rouge">*.wav</code>, and uploaded to soundcloud directly from my smart phone.<!--more-->
These have been mastered on the internal speaker of my phone, I may update these tracks after trying them with some headphones and seeing how they really sound, but until then enjoy!</p>
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/276043482&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
<p><a href="http://soundcloud.com/jkirchartz/sets/caustic">Caustic</a> by <a href="http://soundcloud.com/jkirchartz">jkirchartz</a></p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}Here’s a collection of actual songs I made using Caustic, and painstakingly exported to *.wav, and uploaded to soundcloud directly from my smart phone.Five Things I Learned Working at Google2016-12-30T00:00:00+00:002016-12-30T00:00:00+00:00http://jkirchartz.com/2016/12/5_things_i_learned_working_at_google<p>I worked at Google in 2015 and learned a great deal of things, I wrote this
shortly after; now I think it’s finally ready to publish.<!--more--></p>
<h1 id="post-mortems">Post-Mortems</h1>
<p>Failures need to be investigated so you can learn from them and avoid making
the same mistake in the future. Any time you create a program there are
eventually going to be human errors, perhaps a cavalcade of human errors.
Firing the developer for a bug after code-review and QA approved their work
isn’t going to fix anything. If there’s an error in the workflow that causes
people to step on each other’s toes or causes stress for the team it needs to
be discussed to avoid repeating the same problem in the future. If somebody
made a mistake they might not have even known, it’s just not possible to
predict everything software’s going to face in the real world. Learn from your
mistakes, don’t point fingers to find a scapegoat, and shrug — fix it.</p>
<h1 id="meetings">Meetings</h1>
<p>Meetings need itineraries, start/end times, and people need to stick to
them. Creating an agenda for a meeting in a shared doc allows everybody to put
a blurb/links to their issues to discuss during the meeting. A meeting can go
5 minutes over, but shouldn’t go much further, schedule additional meetings if
more discussion is required. This agenda can even be edited any time during
the meeting if something that warrants further discussion comes up. It’s great
for avoiding bad meeting formats like “Random Story Time” or “Pages of
Meaningless Numbers.” The agenda keeps meetings from being a waste of time, if
you want to waste time schedule a “Sync Up” meeting with a small group and enjoy.</p>
<h1 id="google-isnt-its-mythology">Google isn’t its Mythology</h1>
<p>Google is pretty much like every other company on the planet, except with more
people and more money. They make a bunch of neat tools (for themselves first
– eating their own dogfood) but don’t have anything super special to
prevent problems with clients, communication, workflow, or staffing. Managers
and teams have opportunities to discuss and modify how things work, but
everybody has their own style and they’re allowed to work with it. There were
no trick questions at my interview, they had me do FizzBuzz and some regexes.</p>
<h1 id="the-caste-system">The Caste System</h1>
<p>I’ve read things before about the heirarchy of employees at the big G, but
first-hand I saw FTEs, Interns, then there’s TVCs (Temps, Vendors, Contractors)
— each gets a different colored badge. Interns get a specific problem to
solve. FTEs get to drink beers, ride scooters, invite guests, go to off-site
events, and even get Christmas gifts. TVCs get none of that, for legal reasons.
I was a contractor, not a Google employee, as part of their orientation I was
told I worked “at” and for the benefit of Google, but very specifically not “for”
Google. At every single event that the entire office was invited to another TVC
would ask if we were allowed to be there, We were never expelled.</p>
<h1 id="its-just-business">It’s just business</h1>
<p>As a contractor, I had a pretty good idea of when a year contract would expire,
but I didn’t know if it’d be renewed or not. I was mistaken in-so-much as my
year contract was only scheduled to last 11 months, ending a little over a
month before Christmas. I’d seen contractors leave, and some return; so I
wasn’t sure what was going to happen. During my last 2 weeks the word was
funding for the next year wasn’t determined yet so my contract would not be
renewed. My last week I received applause and gratitude for my work in our
regular meetings. Not two weeks after my contract ended another staffing firm
contacted me for the same position, this time earning a little over of half what
I was making before — after all, it’s just business.</p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}I worked at Google in 2015 and learned a great deal of things, I wrote this shortly after; now I think it’s finally ready to publish.-ism2016-12-23T00:00:00+00:002016-12-23T00:00:00+00:00http://jkirchartz.com/2016/12/ism<p>There’s a 1948 American propaganda film called “Make Mine Freedom” that tells
us some of the dangers of an “imported doubletalk” called “-Ism.” Since it was
made during the Cold War it’s McCarthey-esque hamfistedness shows which ‘ism’
they were particularly concerned about without mentioning any one specifically. <!--more-->
It’s often shared by conservatives alongside accusations that some liberal is a
full-blown communist, the next Marx/Lennin/Mao, or they’re just generally
un-American. Watching this short you’ll never hear the word “capitalism,” but
after some consideration it seems the capitalistic world has turned out much
like this evil nearly-nameless ‘ism.’</p>
<iframe width="640" height="480" src="https://www.youtube.com/embed/Oz9fX_HfsXA?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen=""></iframe>
<p>“Ism will cure any ailment of the body politic,” claims Dr. Utopia, as he
presents bottles of ‘ISM’ to a laborer, a farmer, a manufacturer, a politician,
and a regular Joe. Like snake-oil salesmen of yore, Dr Utopia over-sells his
product, even going so far to claim it will improve the weather. But before
‘ism’ can cure the various characters they must sign a contract stating “I
hereby turn over to Ism, Incorporated, everything I have, including my freedom,
and the freedom of my children, and my children’s children, in return for which
said Ism promises to take care of me forever.” Wouldn’t it be nice to get the
opportunity to sign onto the existing social contract before being forced into
it? These are vague terms for a contract, but no more vague that the unsigned
social contract we’re forced to accept &amp; hear about in civics class. Some
Libertarians argue that this sort of contracting should be legal for
individuals to do, because preventing indentured servitude and paying a living
wage somehow prevents the free market from working.</p>
<p>Luckily our John Q Public shows us how freedom (i.e. capitalism) works: if you
have an idea and can convince your friends (who in this instance have never
heard of a bank) to give you money, you can start a business and possibly
become a major corporation. This freedom is terrific, because Americans in
seersucker suits are free to make more money than the next 6 stereotypical
caricatures of foreign nationals from other capitalistic countries combined!
Better yet, America’s educational system that sends more (here, conspicuously
white) people to high school and college than any other stereotypical
caricature of a nationality. John Q Public, playing the voice of reason,
suggests that just a taste will show us the dangers of Ism, immediately
plunging his peers into a totalitarian wet dream.</p>
<h3 id="factories-chain-their-workers-to-their-stations-unions-mark-their-workers-double-unluckily-1313-and-anti-strike-laws-prevent-workers-from-participating-in-collective-action">Factories chain their workers to their stations, Unions mark their workers (double-unluckily ‘1313’), and anti-strike laws prevent workers from participating in collective action.</h3>
<p>Here in the future of capitalist America, you don’t need chains when you can
have <a href="https://www.washingtonpost.com/politics/courts_law/supreme-court-rules-amazon-doesnt-have-to-pay-for-after-hours-time-in-security-lines/2014/12/09/05c67c0c-7fb9-11e4-81fd-8c4814dfa9d7_story.html">mandatory unpaid security checks</a> to waste employees free time and
<a href="http://www.cnbc.com/2016/05/12/poultry-workers-forced-to-wear-diapers-to-increase-efficiency-report.html">adult-diapers to prevent paid bathroom breaks</a>, so employees don’t waste
your time. States have prevented the danger of union membership by
implementing <a href="http://www.motherjones.com/politics/2012/03/what-are-right-to-work-laws">right-to-work laws</a> that have made membership optional, and in
some cases dismantled unions. Why spend your hard-earned money for union
membership when you can get the benefits of the Union’s collective bargaining
and have a few extra bucks to spend? If you take a Union job, in a state with
<a href="https://en.wikipedia.org/wiki/Prevailing_wage">Davis-Bacon laws</a>, and you’re not a member of the union you get the
‘prevailing wage’ which the majority of union workers earn, and you still won’t
need to unionize. However, without funding and members, Unions are dwindling
and their collective bargaining power is going with it. Impact this with
<a href="http://www.nolo.com/legal-encyclopedia/employment-at-will-definition-30022.html">at-will employment</a> and you can lose (or quit) your job at any time for any
or no reason without notice, for reasons like unionizing, going on strike, or
literally anything else. Sure it may be illegal to be fired for some things
like race, religion, and gender, but if they want you out they could find any
or no reason.</p>
<h3 id="the-state-is-the-supreme-court-no-more-private-property-no-more-you">“The State is the Supreme Court, no more Private Property, no more you.”</h3>
<p>This brief segment firstly ignores that the Judiciary Branch is part of the
trinity of vested powers in the United States. As a function of this brand of
-ism, private property and capitalist have been outlawed, preventing CEOs the
freedom of exploiting their workers to receive any profits. However, in
“Communist” China CEOs are still very much involved in <a href="https://en.wikipedia.org/wiki/State_capitalism#People.27s_Republic_of_China">State-Capitalism</a>
and are quite well-paid for their efforts.</p>
<h3 id="farmers-are-now-slaves-that-can-no-longer-vote">Farmers are now slaves that can no longer vote</h3>
<p>Another brief and terrifying segment. Fortunately voting is a fundamental right
in our democracy since 1965, although the voter rights act has been weakened since then.
We’ve dismantled chattel slavery through a civil war and reconstruction. Without the
vote, farmers can’t obtain seed, for some unspecified reason. But here in the
future we’ve proven that <a href="https://en.wikipedia.org/wiki/Agricultural_subsidy#United_States">Agricultural Subsidies</a> are a more palatable
method of controlling farm produce. Farmers are paid to grow various crops and
not others, but mostly they’re paid to grow corn; providing us with an
overabundance of cheap corn-based products such as feed, ethanol fuel additives
and high fructose corn syrup.</p>
<h3 id="politicians-and-nay-sayers-are-put-in-pens-and-replaced-by-yes-men">Politicians and Nay-sayers are put in pens and replaced by yes-men.</h3>
<p>Here’s another chilling example of how much supposed American ideals have (or
haven’t) changed. Protesters and Nay-sayers are often placed in <a href="https://en.wikipedia.org/wiki/Free_speech_zone">Free Speech
Zones</a> far from the politicians who they wish to address. Dissidents are
be corralled and <a href="https://en.wikipedia.org/wiki/Kettling#United_States">kettled</a>, far from those in positions of power who they’re
trying to reach. Unchallenged by these dissenting voices, well-paid politicians
practically live in a world of their own far disconnected from the concerns of
their constituents.</p>
<!-- In the 2016 election the only candidate who expressed concern about the
flaws of capitalism was often ignored by the media, in favor of his opponents
who believe capitalism is beyond reproach. -->
<p>John Q Public gets the last word,</p>
<blockquote>
<p>When anybody breaches unity and tried to pit one of us against the other
through class warfare, race hatred, or religious intolerance. You know that
person seeks to rob us of our freedom and destroy our very lives. And we
know what to do about it!</p>
</blockquote>
<p>Apparently what you do about it is watch this cartoon, then find a commie to
chase out of town because those ideas aren’t welcome here, free speech be
damned! In our modern political discourse it’s clear who’s winning the class
war and even the President-elect is more than welcome to stir race hatred <em>and</em>
religious intolerance, but history and this cartoon both show the dangers of
and one -Ism given totalitarian power: inevitable corruption.</p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}There’s a 1948 American propaganda film called “Make Mine Freedom” that tells us some of the dangers of an “imported doubletalk” called “-Ism.” Since it was made during the Cold War it’s McCarthey-esque hamfistedness shows which ‘ism’ they were particularly concerned about without mentioning any one specifically.Remember Mailto?2016-06-11T00:00:00+00:002016-06-11T00:00:00+00:00http://jkirchartz.com/2016/06/remember_mailto<p>“How do I send this to my Mom…” she asked herself scrolling up and down the page;
“…I can tweet or add it to pinterest,” she sighed in resignation<!--more-->,
opened a new tab, typed ‘gmail.com’ and navigated all the way to the compose pane.</p>
<p>There’s a bit of debate about what services to include when you want users to share your pages, but often the original ultimate app is forgotten, Email.
Sending an email isn’t hard, but it could be easier. It used to require a plugin or an external email app;
If you didn’t have either it would open any email app that just happens to be on your computer but probably not associated to any email account, and ask you to set it up.
(which was super annoying) Firefox, Opera, and Chrome all reportedly to take you to your web-based e-mail provider; as of right now it looks like IE is the ugly duckling, again, but I always have high hopes for the future (which may have already occurred).</p>
<p>Anyhow… Back in the day we’d use the <code class="highlighter-rouge">mailto:</code> URI scheme to let users send us emails (Uphill! Both ways! While fighting mastodons!) We’d type (By hand! Onto the cave wall!) a link like</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"> <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"mailto:webmaster@example.com?subject=Hello&amp;body=I%20like%20your%20site"</span><span class="nt">&gt;</span></code></pre></figure>
<p>And clicking that opened a new email, to <code class="highlighter-rouge">webmaster@example.com</code> with the subject
<code class="highlighter-rouge">Hello</code> and a body of <code class="highlighter-rouge">I like your site</code> but the mailto protocol is more versatile
than that,there’s <code class="highlighter-rouge">cc</code> and <code class="highlighter-rouge">bcc</code> and multiple recipients by separating addresses with commas.</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"> mailto:user@example.com,user2@example.com?cc=user3@example.com<span class="err">&amp;</span>bcc=user4@example.com</code></pre></figure>
<p>But that assumes you know who you want to send the email <code class="highlighter-rouge">To</code> which is
impossible, even for <a href="http://en.wikipedia.org/wiki/Kreskin">Kreskin</a>, good thing it’s not necessary. The protocol
alone will suffice, but you should probably include a link, the title, maybe a
byline or blurb. Watch out though, this is a URI so it generally has to be
URI encoded so: <code class="highlighter-rouge">%20</code> for space, <code class="highlighter-rouge">%3F</code> for question mark, and so on.</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"> mailto:?subject=I%20thought%20you%20would%20like%20this<span class="err">&amp;</span>body=http://example.com/some/page</code></pre></figure>
<p>URIs are already URI encoded so you don’t have to do anything special to those.
You may want to generate this server-side or via JavaScript because on some
versions of iPhone the encoding may show up in the mail app and be ugly.</p>
<h2 id="links">links:</h2>
<ul>
<li><a href="http://www.ietf.org/rfc/rfc6068.txt">RFC-6068</a></li>
<li><a href="http://www.mailto.co.uk/">mailto generator</a></li>
</ul>
<p>P.S. If you like this article you can always <a href="mailto:me@jkirchartz.com?subject=Thanks%20For%20Reminding%20Me%20About%20Mailto&amp;body=Can%20I%20have%20your%20autograph">send me an email ;)</a></p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}“How do I send this to my Mom…” she asked herself scrolling up and down the page; “…I can tweet or add it to pinterest,” she sighed in resignationThe Most Innovative Checkout Form Ever2016-05-02T00:00:00+00:002016-05-02T00:00:00+00:00http://jkirchartz.com/2016/05/most_innovative_checkout_form_ever<p>I don’t know if you’re ready for this - it might blow your mind…
<!--more--></p>
<ul>
<li>Name: [ Full Name (as seen on card) ]</li>
<li>Billing Address: [ Full Address ]</li>
<li>Shipping Address (if different): [ Full Address ]</li>
<li>Credit Card #: [ can’t you guess? ]</li>
<li>CCV: [ verification # from the back of the card ]</li>
</ul>
<p>Kablooie! That’s all you need! Seriously - Don’t take 6 pages and 23 forms - just get the sale &amp; be done with it!
One field is more than enough for each type of information, if you need it split out you can parse it on the backend (<a href="http://search.cpan.org/~timb/Geo-StreetAddress-US-1.04/US.pm">We have the technology</a>), it doesn’t have to be a front-end issue.
You can even help the user input this information in the appropriate <a href="http://firstopinion.github.io/formatter.js/">format</a> if you want, just make sure you account for all possibilities (i.e. full zipcode: #####-####)
Don’t leave room for doubt, nobody has time for that, so don’t forget to always be closing!</p>
<iframe src="//giphy.com/embed/d2ZeJSRDqd8P4RIQ" width="480" height="265" frameborder="0" class="giphy-embed" allowfullscreen=""></iframe>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}I don’t know if you’re ready for this - it might blow your mind…Randomize Cowsay Critters2015-09-29T00:00:00+00:002015-09-29T00:00:00+00:00http://jkirchartz.com/2015/09/randomize_cowsay_critters<p><a href="http://cowsay.org/">Cowsay</a> is a fun little app that draws a cow that says things, but you can do so
much more than a cow, there’s all sorts of fun ascii art critters in there; but
how do we get to them? <!--more--> Lots of solutions simply find the directory where
cowfiles (the templates that define the critters) are stored and hard-code that;
but how do you know where they are?</p>
<p>Turns out, cowsay will tell you if you pass the <code class="highlighter-rouge">-l</code> flag like so:</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp"> $</span><span class="o">&gt;</span>cowsay <span class="nt">-l</span></code></pre></figure>
<p>which outputs the directory, and a list of all available cowfiles - much simpler
than using <code class="highlighter-rouge">find</code>. But if there’s a list of cowfiles there, why bother using
<code class="highlighter-rouge">ls</code> to get the directory listing? simply trim off the first line by piping to
<code class="highlighter-rouge">sed</code>, and ask it to delete it</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp"> $</span><span class="o">&gt;</span>cowsay <span class="nt">-l</span> | sed <span class="s2">"1 d"</span></code></pre></figure>
<p>now we’ve got a nice clean list to randomize; You could use <code class="highlighter-rouge">shuf</code>, or bash’s
built-in array-mangling utilities; for sake of portability, this script uses
both:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="c">#! /bin/bash</span>
<span class="k">if </span><span class="nb">type </span>shuf <span class="o">&gt;</span>/dev/null 2&gt;&amp;1<span class="p">;</span> <span class="k">then
</span><span class="nv">cowfile</span><span class="o">=</span><span class="s2">"</span><span class="k">$(</span>cowsay <span class="nt">-l</span> | sed <span class="s2">"1 d"</span> | tr <span class="s1">' '</span> <span class="s1">'\n'</span> | shuf <span class="nt">-n</span> 1<span class="k">)</span><span class="s2">"</span>
<span class="k">else
</span><span class="nv">cowfiles</span><span class="o">=(</span> <span class="k">$(</span>cowsay <span class="nt">-l</span> | sed <span class="s2">"1 d"</span><span class="k">)</span> <span class="o">)</span><span class="p">;</span>
<span class="nv">cowfile</span><span class="o">=</span><span class="k">${</span><span class="nv">cowfiles</span><span class="p">[</span><span class="k">$((</span><span class="nv">$RANDOM</span> <span class="o">%</span> <span class="k">${#</span><span class="nv">cowfiles</span><span class="p">[*]</span><span class="k">}))</span><span class="p">]</span><span class="k">}</span>
<span class="k">fi
</span>cowsay <span class="nt">-f</span> <span class="s2">"</span><span class="nv">$cowfile</span><span class="s2">"</span> <span class="nt">-W</span> 79 <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span></code></pre></figure>
<p>store that as a script (i.e. <a href="https://github.com/JKirchartz/dotfiles/blob/master/scripts/cowsay.sh"><code class="highlighter-rouge">cowsay.sh</code></a>), put it in your path, and soon you
will find randomized cow bliss. check it out</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp"> $</span><span class="o">&gt;</span>fortune | cowsay.sh
<span class="go"> ____________________________________
/ Is that really YOU that is reading \
\ this? /
------------------------------------
\ ^ /^
\ / \ // \
\ |\___/| / \// .\
\ /O O \__ / // | \ \ *----*
/ / \/_/ // | \ \ \ |
@___@` \/_ // | \ \ \/\ \
0/0/| \/_ // | \ \ \ \
0/0/0/0/| \/// | \ \ | |
0/0/0/0/0/_|_ / ( // | \ _\ | /
</span><span class="gp"> 0/0/0/0/0/0/`/,_ _ _/ ) ;</span> -. | _ _<span class="se">\.</span>-~ / /
<span class="go"> ,-} _ *-.|.-~-. .~ ~
\ \__/ `/\ / ~-. _ .-~ /
\____(oo) *. } { /
( (--) .----~-.\ \-` .~
//__\\ \__ Ack! ///.----..&lt; \ _ -~
// \\ ///-._ _ _ _ _ _ _{^ - - - - ~</span></code></pre></figure>
<p>P.S. that <code class="highlighter-rouge">$RANDOM</code> bit looks familiar, where have I seen that before? oh yeah -
it’s the only functional part in <a href="https://github.com/JKirchartz/dotfiles/blob/master/scripts/ObliqueStrategies">“my” Oblique Strategies script</a>.</p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}Cowsay is a fun little app that draws a cow that says things, but you can do so much more than a cow, there’s all sorts of fun ascii art critters in there; but how do we get to them?Apocalypse Survival is Easy.2014-09-17T00:00:00+00:002014-09-17T00:00:00+00:00http://jkirchartz.com/2014/09/apocalypse-survival-is-easy<p>I’m surprised at how easy it is to survive the end-times as predicted by mediums, prophets, clergy, mathematicians, charlatans, and true-believers.<!--more-->
In 2012, it was the Mayan Calendar Doomsday predictions, which were ignored - and later denounced - especially by Mayans.
In 2011, it was Harold Camping predicting first May 21st, and when that fell through October 21st, would be the end-times of <a href="https://en.wikipedia.org/wiki/Book_of_Revelation#Outline">Revelations</a>.
In ancient Rome there was a prophecy that 12 eagles revealed to Romulus the lifespan of Rome.
Some believed each eagle to represent 10 years, bringing the end in 634 BCE; others that the eagles represented days in a year setting the end in 389 BCE.
Neither one were even close to being correct, <a href="https://en.wikipedia.org/wiki/Fall_of_Rome">Rome and the Roman Empire didn’t fall until the 400’s CE.</a>
These sorts of predictions are occasionally popular in some circles but so far have never come true.
Some people are unduly distressed when they find themselves soon to be facing the end of the universe as we know it in a massive cosmic event, so I’ve decided to try and quell their fears.
Maybe knowing you’ve likely survived a dozen or more moments of universal doom will also give you solace, knowing that the next time the world faces the final judgement won’t be the last.</p>
<p><a href="/demos/How_Many_Apocalypses_Have_I_Survived.html"><img src="http://i.imgur.com/JKJLRpI.png" alt="Apocalypse Survival" /></a></p>
<p>This single-page app fetches a JSON feed from wikipedia’s <a href="https://en.wikipedia.org/wiki/List_of_dates_predicted_for_apocalyptic_events">List of dates predicted for apocalyptic events</a> and parses out years,
comparing them with the input year and tallying the number of failed predictions since then.
It stores this data locally on initial load, and loads it from the local on subsequent loads.</p>
<h2 id="find-out-how-many-apocalypses-youve-survived-today-or-view-the-source-on-github">find out <a href="/demos/How_Many_Apocalypses_Have_I_Survived.html">how many apocalypses you’ve survived, today!</a> or <a href="https://github.com/JKirchartz/demos/blob/gh-pages/How_Many_Apocalypses_Have_I_Survived.html">view the source on github</a></h2>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}I’m surprised at how easy it is to survive the end-times as predicted by mediums, prophets, clergy, mathematicians, charlatans, and true-believers.Glitchy 3bit dither2014-09-01T00:00:00+00:002014-09-01T00:00:00+00:00http://jkirchartz.com/2014/09/glitchy_3bit_dither<p>I’d like to officially introduce my new pet project, <a href="http://jkirchartz.com/Glitchy3bitdither/">Glitchy 3bit Dither</a>, it’s an in-browser emulation of <a href="https://en.wikipedia.org/wiki/Glitch_art">glitch art</a> techniques.<!--more-->
In the past I’ve tried my hand at circuit bending, creatively short-circuiting and modifying physical devices.
I’ve even played with <a href="http://scadglitchart.blogspot.com/2012/10/stallio-and-wordpad-effect-nancy-olivo.html">more</a> <a href="http://www.fizzpop.org.uk/blog/an-introduction-to-databending/">traditional</a> <a href="http://www.hellocatfood.com/databending-using-audacity/">glitches</a>, but was inspired to create my own software to do so after seeing <a href="http://rumblesan.com/">rumblesan</a>.
His <a href="https://github.com/rumblesan/cuttr">cuttr</a> project glitches images from on tumblr and posts them to another <a href="http://errrord.tumblr.com/">tumblog</a>, .
I quickly created a <a href="https://gist.github.com/JKirchartz/467ec9458d975659e33e">python script</a> using PIL to start glitching images from instagram.
I started writing the tumblr code, but I didn’t like the lack of control, and I didn’t really want to make a rumblesan clone.
Besides, how can you create art without the artist’s input? After seeing <a href="http://camanjs.com/">caman.js</a>*, I knew I could do it in javascript, thanks to <a href="http://diveintohtml5.info/canvas.html">canvas</a>.
During my research I discovered <a href="https://github.com/mncaudill/3bitdither">3bitdither</a>, forked it, and <a href="https://github.com/jkirchartz/Glitchy3bitdither">bent it to my will</a>.</p>
<h1 id="glitches">Glitches</h1>
<p>Here’s a short list of some of the functions I’ve implemented.</p>
<ol>
<li><a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L448-L458">Random dithering</a> rates each pixel against a random value, if it’s higher than that value it’s a white pixel, if it’s lower it’s black.
I’ve also <a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L460-L470">colorized</a> it by rating each channel value of the pixel.</li>
<li><a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L495-L575">Color shifting</a> will play with the values by boosting or re-arranging the red, green, or blue channels.</li>
<li><a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L659-L717">Slices</a> move chunks of pixel and channel values in interesting ways, sometimes shifting colors as well.</li>
<li><a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L795-L906">Sorts</a> Sort chunks of pixels in place, producing gradient-like stripes of colors within the image.</li>
<li><a href="https://github.com/JKirchartz/Glitchy3bitdither/blob/gh-pages/GlitchyDither.js#L697-L848">Fractals</a> Create fractal-like ghosts and shadows by repeating an image on itself</li>
</ol>
<p>This is a work in progress, so all of the code is subject to change; also I’m working on updating this to work with <a href="https://github.com/JKirchartz/Glitchy3bitdither/tree/jimp">node.js on a separate branch</a>*, so all the code will have to be adjusted for that anyhow.</p>
<h1 id="example">Example</h1>
<p>The following gif was made by compositing several glitches over the original image.</p>
<div class="tumblr-post" data-href="https://embed.tumblr.com/embed/post/jOZbvQ_9njeKZIGbXljJzg/133069110694" data-did="a96321f716d4bbc5657189d828f60630e133edaa"><a href="http://glitches.jkirchartz.com/post/133069110694">http://glitches.jkirchartz.com/post/133069110694</a></div>
<script async="" src="https://assets.tumblr.com/post.js"></script>
<h1 id="interface">Interface</h1>
<p>There are 4 different interfaces here, each offering their own unique take on the task,</p>
<ol>
<li><a href="http://jkirchartz.com/Glitchy3bitdither/index.html">Demo</a> will run each function against the original image once</li>
<li><a href="http://jkirchartz.com/Glitchy3bitdither/glitch.html">Glitch Only</a> will apply a random set of glitches to the original image several times</li>
<li><a href="http://jkirchartz.com/Glitchy3bitdither/GlitchCruiser.html">Glitch Cruiser</a> When you upload an image it appears in the center surrounded by 8 glitchy alternatives. If one of these images suits your fancy, click on it and it will become the new source for the next round of glitches. If you do not like any of the suggested glitches, click on the center image, and you’ll get the next 8 glitch options, but your source will not be changed. <img src="http://i.imgur.com/UFYhyOV.png" alt="Lena, and 8 possibilities" /></li>
<li><a href="http://jkirchartz.com/Glitchy3bitdither/GlitchChooser.html">Glitch Chooser</a> this allows you to select functions from a drop-down list to apply to an image, you can either apply a tranformation, or reset it to the way it was before, you can even reset it to the original image. Unliked Glitch Cruiser, you won’t be able to see the results of a function before selecting it, but you can replace the latest image transformation again and again until you can see your desired results.</li>
</ol>
<h1 id="technical-notes">Technical Notes</h1>
<p><code class="highlighter-rouge">imageData.data</code> is a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray"><code class="highlighter-rouge">Uint8ClampedArray</code></a>, one of the new <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">Typed Arrays</a> in javascript. They’re part of the WebGL spec and should be available in all <em>modern</em> browsers.
This array holds all the data for every pixel in the image, however it’s stores 8-bit values, channel-by-channel instead of pixel-by-pixel, that is to say <code class="highlighter-rouge">Uint8ClampedArray</code> stores the image data like <code class="highlighter-rouge">[R,G,B,A,R,G,B,A,R,G...]</code>.
This means that to deal with this array, you’re going to have to increment the loop by 4, and handle the channel-values each time like this function that inverts a pixel’s color:</p>
<figure class="highlight"><pre><code class="language-javascript" data-lang="javascript"> <span class="kd">var</span> <span class="nx">Uint8Arr</span> <span class="o">=</span> <span class="nx">imageData</span><span class="p">.</span><span class="nx">data</span><span class="p">;</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span> <span class="o">&lt;</span> <span class="nx">Uint8Arr</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span> <span class="nx">i</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">){</span>
<span class="cm">/* simple invert */</span>
<span class="nx">Uint8Arr</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">-=</span> <span class="mi">255</span><span class="p">;</span>
<span class="nx">Uint8Arr</span><span class="p">[</span><span class="nx">i</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">-=</span> <span class="mi">255</span><span class="p">;</span>
<span class="nx">Uint8Arr</span><span class="p">[</span><span class="nx">i</span><span class="o">+</span><span class="mi">2</span><span class="p">]</span> <span class="o">-=</span> <span class="mi">255</span><span class="p">;</span>
<span class="p">}</span></code></pre></figure>
<p>This is a slow &amp; tedious task, but there are other typed arrays, like <code class="highlighter-rouge">Uint32Array</code> which stores 32-bit values, converting an 8-bit array to a 32-bit array would cut the size of the array by a quarter.
So as a Uint32Array color data is stored like <code class="highlighter-rouge">[ARGB, ARGB, ARGB, ARGB...</code>, inverting is now just one operation.</p>
<figure class="highlight"><pre><code class="language-javascript" data-lang="javascript"> <span class="kd">var</span> <span class="nx">Uint32Arr</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Uint32Array</span><span class="p">(</span><span class="nx">imageData</span><span class="p">.</span><span class="nx">data</span><span class="p">.</span><span class="nx">buffer</span><span class="p">);</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span> <span class="o">&lt;</span> <span class="nx">Uint32Arr</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">){</span>
<span class="cm">/* bitwise invert */</span>
<span class="nx">Uint32Arr</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="o">~</span><span class="nx">Uint32Arr</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">|</span> <span class="mh">0xFF000000</span><span class="p">;</span>
<span class="p">}</span></code></pre></figure>
<p>Here, a bitwise NOT (<code class="highlighter-rouge">~</code>) inverts the bits, and OR <code class="highlighter-rouge">|</code> applies a mask to keep the alpha channel at 100%.
You may also notice that I’m using the <code class="highlighter-rouge">imageData.data.buffer</code> to make a 32-bit view of the 8-bit data, this means that you don’t have to set the data back into the array, because it passes through to the original variable naturally.</p>
<p>While all the above is true for most personal computers which store data in Little <a href="https://en.wikipedia.org/wiki/Endianness">Endian</a>, some other machines may use Big Endian notations, which would reverse the order of the data from RGBA to ABGR.
If you were making imaging software you’d probably want to account for that, but since the point of this project is to maim images it’s only mildly important to ensure the alpha channel is applied correctly (or just set to 100%.)
* now that I’m planning to make this into a node-based tool, and eventually distribute it on NPM, I’m thinking I’d be better off making this an extension of <a href="http://camanjs.com/">camanjs</a> because they’ve already got so much figured out. Also I think by that point a name change might be in order.</p>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}I’d like to officially introduce my new pet project, Glitchy 3bit Dither, it’s an in-browser emulation of glitch art techniques.Slate, Vimium, and never touching the mouse again.2013-06-09T00:00:00+00:002013-06-09T00:00:00+00:00http://jkirchartz.com/2013/06/slate_vimium_and_never_touching_your_mouse_again<p>It’s no secret, I’m VIM fan. Any time I have to take my hands off the keyboard to mess with a GUI I have issues.
My palms get all sweaty, I break out in hives, and have a vague feeling like I’m playing a game of whack-a-mole.
Well, it may not be <em>that</em> bad, but I’m sick of it. So I decided to do something about it.<!--more--></p>
<p>I split my time almost equally been my editor and my browser, why not use the same keyboard shortcuts?
Enter <a href="http://vimium.github.io">Vimium</a>, a customizable Google Chrome extension that gives you vim-like control over your browser.
All the commands are spot on, <code class="highlighter-rouge">G</code> and <code class="highlighter-rouge">gg</code> scroll you to the bottom or top of the page, respectively.
Hitting <code class="highlighter-rouge">f</code> will display a character next to all the links on a page, hitting that letter opens the associated link.
A quick <code class="highlighter-rouge">gs</code> will allow you to view source, easier to remember than <code class="highlighter-rouge">opt+cmd+U</code> (<code class="highlighter-rouge">Ctrl+U</code> on windows, lucky bastards.)
Even marks work as expected!</p>
<p>So now I can browse without the cursor, how can I manage windows?
<code class="highlighter-rouge">Cmd+tab</code> is woefully under-powered, and windows has Aero; why not improve both?
<a href="https://github.com/jigish/slate">Slate</a> does just that by offering custom configuration and tons of options.
By <a href="https://github.com/jigish/slate/blob/master/Slate/default.slate">default</a> Slate is easy to use, but via custom configuration
you can tweak your way to the perfect environment. I’ve done everything I could come up with to
<a href="https://github.com/JKirchartz/dotfiles/blob/master/slate">my Slate config</a> to make it work more
like vim, and it’s fantastic! (I stole a lot from other’s configs, that’s the beauty of config files and sharing)
With my config <code class="highlighter-rouge">Cmd+ctrl+E</code> (default is <code class="highlighter-rouge">Cmd+esc</code>) will show a character for each open window, even if they’re hidden behind others.
<code class="highlighter-rouge">Cmd+ctrl+[hjkl]</code> uses the standard vim keys for placing a window on the half of the screen indicated by the direction (default are arrow keys, IIRC).</p>
<p>Even better, they’re BOTH free, open-source, and (the icing on the cake) hosted on github; so you can inspect the code at your leisure.</p>
<p><em>UPDATE</em>
As of August 2016, Slate hasn’t been updated in 4 years, despair not, there is an updated fork at <a href="https://github.com/mattr-/slate">mattr-slate</a>
that can be installed with homebrew via <code class="highlighter-rouge">brew cask install mattr-slate</code> :+1:</p>
<h2 id="links">links</h2>
<ul>
<li><a href="https://github.com/philc/vimium">Vimium</a></li>
<li><a href="https://github.com/jigish/slate">Slate</a></li>
</ul>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}It’s no secret, I’m VIM fan. Any time I have to take my hands off the keyboard to mess with a GUI I have issues. My palms get all sweaty, I break out in hives, and have a vague feeling like I’m playing a game of whack-a-mole. Well, it may not be that bad, but I’m sick of it. So I decided to do something about it.VIM quick-start, cheat-sheet, and links2013-04-05T00:00:00+00:002013-04-05T00:00:00+00:00http://jkirchartz.com/2013/04/vim_quick_start_cheatsheet_and_links<p>If you’ve been <a href="http://twitter.com/jkirchartz">following me</a> for a while, you might know my editor of choice is VIM,
it’s very clean. There’s nothing there to get in your way, except your own limitations, and those limitations can be
destroyed through practice. Haven’t tried vim yet? What are you waiting for? <!--more--></p>
<p>Vim is a text editor written by Bram Moolenaar and first released publicly in 1991.
It is commonly found on unix-based operating systems.
VIM is based off an older text editor, vi, and it’s name is an acronym for Vi-Improved.
With vim Your fingers never have to leave the keyboard to command great power. The learning curve is a little steep but you can very quickly pick up new skills as you need them. The basic premise is that there is an Input mode
and a Command mode. By default you start in command mode, here you can move around the document, search, and do a fair bit of editing quickly. Insert mode is designed for adding (and removing) text, it’s just like a normal text
editor.</p>
<h2 id="quick-startcheat-sheet">Quick Start/Cheat Sheet</h2>
<p>Vim commands are more of a language than a list of commands you need to use.
<!--
vim is a language of operators (like delete yank change uppercase rot13) and motions (word til X paragraph)
--></p>
<h3 id="from-the-command-line">From the Command Line</h3>
<ul>
<li>type “vim” into the command line to create a new untitled file</li>
<li>type “vim /path/to/file.name” to open an existing file. (if the file doesn’t exist, this creates it)</li>
<li>to open multiple files list them like <code class="highlighter-rouge">vim file1.txt file2.sh</code> they’re placed into buffers
<ul>
<li>you can switch to the next open file with the command <code class="highlighter-rouge">:bn</code>, or the previous one with <code class="highlighter-rouge">:bp</code>, to move to the next or previous buffer.</li>
<li>to open in a split window <code class="highlighter-rouge">vim -o file.type file2.type file3.type</code> (lower case “o” for horizontal, uppercase for vertical split)</li>
</ul>
</li>
<li>open a file &amp; jump to a particular line with <code class="highlighter-rouge">vim +10 file.type</code> for the 10th line (<code class="highlighter-rouge">+</code> alone will jump to the end of the file)</li>
<li>You can run vim functions directly from the command line <code class="highlighter-rouge">vim +FunctionName +qall</code> (<code class="highlighter-rouge">qall</code> tries to quit all, but refers to the user to accept or reject changes made with a standard <code class="highlighter-rouge">:w</code>/<code class="highlighter-rouge">q!</code>)</li>
<li>open a file &amp; jump to a particular word or phrase with <code class="highlighter-rouge">vim -c "/searchstring" file.type</code> (you can execute other commands with the <code class="highlighter-rouge">-c</code> flag too)</li>
<li>find the differences between two files with <code class="highlighter-rouge">vim -d file.v1 file.v2</code> (this works like vimdiff)</li>
</ul>
<h2 id="working-with-vim-modes">Working with VIM modes</h2>
<ul>
<li>hit “i” to switch from command mode to input mode</li>
<li>hit “v” to switch from command mode to visual mode</li>
<li>hit “esc” to switch back to command mode</li>
</ul>
<p>note: ‘i’ doesn’t mean “enter insert mode” so much as it is a command to “insert the following text until you hit <kbd>ESC</kbd>”
Also, “command mode” is often referred to as “normal mode,” because for a lot of tasks, you will probably want to use a bunch of commands, instead of writing a bunch of stuff in input mode.</p>
<h3 id="vim-commandnormal-mode">VIM Command/Normal-mode</h3>
<ul>
<li>type “:wq” or “ZZ” to save and quit</li>
<li>type “:q!” to quit without saving</li>
<li>moving the cursor (basic movements)
<ul>
<li><code class="highlighter-rouge">j</code> move down one line</li>
<li><code class="highlighter-rouge">k</code> move up one line</li>
<li><code class="highlighter-rouge">h</code> move left one character</li>
<li><code class="highlighter-rouge">l</code> move right one character</li>
</ul>
</li>
<li>to move to line 88 hit <code class="highlighter-rouge">88G</code> or <code class="highlighter-rouge">88gg</code></li>
<li>move to the begining of a file hit <code class="highlighter-rouge">gg</code></li>
<li>move to the end of the file hit <code class="highlighter-rouge">G</code></li>
<li>move one word forward with <code class="highlighter-rouge">w</code></li>
<li>move one word backward with <code class="highlighter-rouge">b</code></li>
<li>move to the end of the line with <code class="highlighter-rouge">$</code></li>
<li>move to the begining of the line with <code class="highlighter-rouge">0</code></li>
<li>move to the first character of the line with <code class="highlighter-rouge">^</code></li>
<li>hitting <code class="highlighter-rouge">%</code> while the cursor is on a bracket like <code class="highlighter-rouge">[({})]</code> will find the matching bracket</li>
<li>to delete a character hit <code class="highlighter-rouge">x</code></li>
<li>to cut a line hit <code class="highlighter-rouge">dd</code></li>
<li>to copy a line hit <code class="highlighter-rouge">yy</code></li>
<li>to cut or copy multiple lines put a number before the command like <code class="highlighter-rouge">5dd</code>
<ul>
<li>you can put a number before most commands to repeat them X many times.</li>
</ul>
</li>
<li>press <code class="highlighter-rouge">p</code> to paste after the current line</li>
<li>press <code class="highlighter-rouge">P</code> to pase before the current line</li>
<li>to delete from the cursor to the end of the line hit <code class="highlighter-rouge">d$</code>, for example, or any other movement key (wbhjkl…)</li>
<li>in command mode to search for <code class="highlighter-rouge">apple</code> type <code class="highlighter-rouge">/apple</code> and hit enter
<ul>
<li>to look for the next occurance hit <code class="highlighter-rouge">n</code></li>
</ul>
</li>
<li>in command mode to find and replace all occurances in a line type <code class="highlighter-rouge">:s/original/replacement/g</code>
<ul>
<li>when searching you can use regular expressions</li>
</ul>
</li>
<li>in command mode to find and replace all occurances in a file type <code class="highlighter-rouge">:%s/original/replacement/g</code></li>
<li>for an interactive history of commands use <code class="highlighter-rouge">q:</code></li>
<li>for an interactive history of searches use <code class="highlighter-rouge">q/</code> or <code class="highlighter-rouge">q?</code>)</li>
<li>need more info? try <code class="highlighter-rouge">:help</code> there’s a wealth of information there
<ul>
<li>you can get more details about the help command with <code class="highlighter-rouge">:help help</code></li>
<li>you can find an index of commands with <code class="highlighter-rouge">:help index</code></li>
</ul>
</li>
</ul>
<h3 id="vim-input-mode">VIM Input-mode</h3>
<p>I’m not sure how useful these are in gvim, but these should work if you’re running in a terminal.</p>
<ul>
<li>alt/meta+normal command usually works
<ul>
<li><code class="highlighter-rouge">alt+hjkl</code> offers the standard movements</li>
<li><code class="highlighter-rouge">alt+o</code> opens a new line below the current one</li>
<li><code class="highlighter-rouge">alt+A</code> appends to the end of the current line</li>
<li><code class="highlighter-rouge">alt+p</code> to paste</li>
<li><code class="highlighter-rouge">alt+R"</code> to paste from register <code class="highlighter-rouge">"</code>, for example, or use and other register.</li>
</ul>
</li>
</ul>
<h3 id="vim-tips">VIM tips</h3>
<ul>
<li>If the file is owned by root and you opened it as another user, you can escalate privileges and save with <code class="highlighter-rouge">:w !sudo tee %</code></li>
<li>You can insert a file below the cursor with <code class="highlighter-rouge">:r /path/to/file.txt</code> or if you don’t supply a file it will insert the current file below the cursor.</li>
<li>the delimiter when using <code class="highlighter-rouge">:s</code> doesn’t have to be <code class="highlighter-rouge">/</code> you can try <code class="highlighter-rouge">%</code> or <code class="highlighter-rouge">\_</code> if you want to avoid fences like in <code class="highlighter-rouge">:s/\/usr\/local\/bin/\/common\/bin/</code> you can use <code class="highlighter-rouge">:s#/user/local/bin#/common/bin#</code></li>
<li>unless you set a <code class="highlighter-rouge">equalprg</code> in your vimrc, you can auto-indent with <code class="highlighter-rouge">=</code>
<ul>
<li>to autoindent an entire file use <code class="highlighter-rouge">gg=G</code> (could have “unexpected” results)</li>
<li>to autoindent the current line <code class="highlighter-rouge">==</code></li>
<li>to autoindent this line and the one after it is <code class="highlighter-rouge">=j</code> where <code class="highlighter-rouge">j</code> is a movement key</li>
<li>if you select a section with visual mode you can indent just that selection with <code class="highlighter-rouge">=</code></li>
</ul>
</li>
<li>You can store a cursor location in a mark, you can set a mark with command <code class="highlighter-rouge">m</code> followed by a letter like <code class="highlighter-rouge">ma</code>, it accepts [A-Za-z] so you get 52 different marks.
<ul>
<li>you can move to a line containing a mark using the <code class="highlighter-rouge">'</code> (single quote) command <code class="highlighter-rouge">'a</code> moves to the line containing the mark labeled <code class="highlighter-rouge">a</code></li>
<li>you can move to the exact location of the mark using the <code class="highlighter-rouge">`</code> (backquote) command <code class="highlighter-rouge">`a</code> moves to the mark labeled <code class="highlighter-rouge">a</code></li>
<li>these are “movements” that can be combined with other statements like <code class="highlighter-rouge">d`a</code> to cut text from the cursor’s location to the mark labeled <code class="highlighter-rouge">a</code></li>
</ul>
</li>
<li>You can make macros with the <code class="highlighter-rouge">q</code> command,
<ul>
<li>hit <code class="highlighter-rouge">qa</code> to create a macro named <code class="highlighter-rouge">a</code> (should show a record indicator) enter a series of commands and hit <code class="highlighter-rouge">q</code> again to stop recording.</li>
<li>hit <code class="highlighter-rouge">@a</code> to execute the macro named <code class="highlighter-rouge">a</code>, you can execute the command multiple times in the standard way <code class="highlighter-rouge">23@a</code> will repeat it 23 times.</li>
<li>You can execute a register as a macro with <code class="highlighter-rouge">@A</code> for register <code class="highlighter-rouge">A</code>, for example, or use any other register.</li>
</ul>
</li>
<li>You can execute a register as an ex command with <code class="highlighter-rouge">:@A</code> for register <code class="highlighter-rouge">A</code>, for example, or use any other register.</li>
</ul>
<h2 id="going-further">Going Further</h2>
<p>Vim is highly customizable, you can set shortcuts and preferences in the <code class="highlighter-rouge">.vimrc</code> file, usually located in your home directory.
There are a <a href="http://www.vim.org/scripts/">ton of plugins (aka scripts)</a> available too. They’re easy to manage with other scripts
like <a href="https://github.com/tpope/vim-pathogen">Pathogen</a>, <a href="https://github.com/gmarik/vundle">Vundle</a>, or <a href="https://github.com/junegunn/vim-plug">vim-plug</a>. I just switch from vundle to vim-plug because it makes it easier to configure your plugins and does it a lot faster.</p>
<p>If you want to get a headstart, my <a href="https://github.com/jkirchartz/dotfiles">dotfiles are available on github</a>, but there are a lot of people
doing that lately, so look around. Also there’s a few very nice VIM Distributions like <a href="https://github.com/carlhuda/janus">Janus</a>, <a href="https://github.com/spf13/spf13-vim">SPF13-vim</a>, and <a href="https://github.com/bling/dotvim">dotvim</a> that have a lot of plugins and a nice vimrc right out of the box, definitely worth a look.</p>
<p>:godmode:</p>
<h2 id="links">Links</h2>
<ul>
<li><a href="http://www.openvim.com/tutorial.html">Vim Interactive Tutorial</a> (try it now!)</li>
<li><a href="http://www.vim.org/docs.php">VIM docs</a></li>
<li><a href="https://github.com/mhinz/vim-galore">Vim Galore</a> (“Everything you need to know about vim”)</li>
<li><a href="http://vimbits.com/">Vimbits</a></li>
<li><a href="http://vimcasts.org/">Vimcasts</a> (video tutorials)</li>
<li><a href="http://usevim.com/">usevim</a></li>
<li><a href="http://tilvim.com/">Today I Learned: vim</a></li>
<li><a href="http://vimawesome.com/">vim awesome</a></li>
<li><a href="http://romainl.github.io/the-patient-vimmer/">The Patient Vimmer</a></li>
<li><a href="http://michael.peopleofhonoronly.com/vim/">Michael’s VIM Cheat-sheet</a></li>
<li><a href="http://www.angelwatt.com/coding/notes/vim-commands.html">Kendall’s VIM Cheat-sheet</a></li>
<li><a href="http://walking-without-crutches.heroku.com/image/images/vi-vim-cheat-sheet.png">VIM Keyboard Cheat-sheet</a></li>
<li><a href="http://jrmiii.com/2009/03/06/learning-vim-the-pragmatic-way.html">Leaning Vim the Pragmatic Way</a></li>
<li><a href="http://csswizardry.com/2014/06/vim-for-people-who-think-things-like-vim-are-weird-and-hard/">Learning Vim for People Who Think Things Like Vim Are Weird and Hard</a></li>
<li><a href="http://vimregex.com/">VIM Regex</a></li>
<li><a href="http://vim.wikia.com/">Vim Tips Wiki</a></li>
<li><a href="http://vim.wikia.com/wiki/Best_Vim_Tips">Vim Tips Wiki’s Best Vim Tips</a></li>
<li><a href="http://zzapper.co.uk/vimtips.html">Zzapper’s Best of Vim Tips</a></li>
<li><a href="http://bencrowder.net/files/vim-fu/">Secrets of the Vim Ninja</a></li>
<li><a href="http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/">Learn Vim Progressively</a></li>
<li><a href="http://www.lagmonster.org/docs/vi.html">VI Cheat Sheet</a></li>
<li><a href="http://www.amazon.com/gp/product/059652983X">Learning Vi &amp; Vim editors (O’Reilly)</a> (prefer books?)</li>
<li><a href="http://www.vim.org/download.php">Download Vim</a></li>
<li><a href="http://derekwyatt.org/vim/tutorials/">Derek Wyatt’s Vim Video Tutorials</a></li>
<li><a href="http://vim-adventures.com/">VIM Adventures</a> (Learn VIM playing an RPG)</li>
<li><a href="http://vimgolf.com/">vimgolf</a> (find the shortest way to complete the challenges)</li>
<li><a href="https://www.shortcutfoo.com/">shortcutFoo</a> (Drills to learn your tools better)</li>
<li><a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118">Stack Overflow Question: What is your most productive shortcut with Vim?</a></li>
<li><a href="http://stackoverflow.com/questions/5288875/vimdiff-what-are-the-most-frequently-used-commands-shortcuts-that-could-get-a-n">Stack Overflow Question: What are the most frequently used vimdiff commands?</a></li>
<li><a href="http://stackoverflow.com/questions/1276403/simple-vim-commands-you-wish-youd-known-earlier">Stack Overflow Question: What simple vim commands do you wish you’d known earlier?</a></li>
<li><a href="http://www.quora.com/What-are-the-most-amazing-things-that-can-be-done-with-Vim">Quora Questions: What are the most amazing things that can be done with Vim?</a></li>
<li><a href="http://amix.dk/vim/vimrc.html">amix’s .vimrc</a> (a huge default vimrc file with lots of goodies)</li>
<li><a href="http://vimrcgenerator.appspot.com/">vimrc generator</a> (makes a simple/minimal vimrc with a nice GUI)</li>
<li><a href="https://github.com/dahu/VimRegexTutor">Vim Regex Tutor</a></li>
<li><a href="http://andrewradev.com/2011/05/08/vim-regexes/">Vim Regexes</a></li>
<li><a href="http://www.moolenaar.net/habits.html">7 habits of effective text editing</a></li>
</ul>{"picture"=>"/avatar.gif", "twitter"=>"jkirchartz"}If you’ve been following me for a while, you might know my editor of choice is VIM, it’s very clean. There’s nothing there to get in your way, except your own limitations, and those limitations can be destroyed through practice. Haven’t tried vim yet? What are you waiting for?