The Rust programming language by Mozilla

The Rust programming language by Mozilla.

From the Rust home page:

Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and
semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries – both
abstract and operational – that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming
and metaprogramming, in both static and dynamic styles.

And a snippet from the Rust home page:

fn main() {
    let nums = [1, 2];
    let noms = ["Tim", "Eston", "Aaron", "Ben"];

    let mut odds = nums.iter().map(|&x| x * 2 - 1);

    for num in odds {
        do spawn {
            println!("{:s} says hello from a lightweight thread!", noms[num]);
        }
    }
}

CloudBerry Explorer for Amazon S3

I’m learning WordPress, so this is my first attempt at a image gallery post. The gallery that comes with this theme isn’t quite as nice as I would like, but I’ll fiddle around with it later. For this learning experience, I simply picked an app I had used recently and took a bunch of screenshots.

Many Markdown Editors

So I was going to write a post listing a bunch of Markdown Editors for Windows, Mac, and the web… Really. But, then I started Googling, and I came across this:

Screenshot from appstorm.com article 35+ Markdown Apps for the Mac

And this:

Screenshot from Mashable.com article 78 tools for writing and previewing Markdown

You know what. That’s just piling on. 78 tools?!?

Anyway, it just so happens that I am composing this post in an editor not mentioned in one of those massive and not at all intimidating articles. It’s called stackedit.io.

StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by
Stack >Overflow and the other Stack Exchange sites.

By default, StackEdit stores documents in your browser’s local storage, but it can sync with Google Drive or Dropbox. It can also publish directly to several different places such as WordPress, Blogger, Tumblr, Github and others.

If you want to host your own copy of StackEdit, the source is here.

StackEdit screenshot

Yes. I am sort of obsessed with Markdown

What is Markdown?

Markdown is a tool that converts text to HTML using a simple markup language. For example, this:

Formatted HTML

This sample text is bold. This sample text is italicized.

Here’s a list:

  1. List item 1.
  2. List item 2.
  3. List item 3.

Here’s a quote:

Everybody Has a Plan Until They Get Punched in the Face
– Mike Tyson

Here’s some code

if (true) {
   goto 10
}

Represented by this Markdown

**This sample text is bold.** *This sample text is italicized*.

Here's a list:

1. List item 1.
2. List item 2.
3. List item 3.

Here's a quote:
> Everybody Has a Plan Until They Get Punched in the Face

Here's some code

    if (true) {
       goto 10
    }

And this HTML

<p><strong>This sample text is bold.</strong> <em>This sample text is italicized</em>.</p>

<p>Here’s a list:</p>

<ol>
<li>List item 1.</li>
<li>List item 2.</li>
<li>List item 3.</li>
</ol>

<p>Here’s a quote:</p>

<blockquote>
  <p>Everybody Has a Plan Until They Get Punched in the Face</p>
</blockquote>

<p>Here’s some code</p>

<pre><code>if (true) {
   goto 10
}
</code></pre>

The Markdown looks like something you could paste into an email, and that’s the point. It’s human readable, but it can be converted into lovely, well-formed HTML.

Why I ♥ Markdown

Ask any one of my coworkers, and they’ll tell you that I take my documentation very seriously. One of my pet peeves is using Microsoft Word to maintain technical documentation. I think that Markdown has several advantages over Word docs:

Markdown is readable as plain text

I’m a Software Developer, and like most Software Developers, I have developed what is probably an unhealthy attachment to my text editor and to the command line. I like text documentation because it’s versatile. I can view Markdown text from the command line. I can view it in my text editor. I can view it just about anywhere.

I can view it in a web browser. No downloading necessary

We have all experienced this on the web before. You do your Google search. You see a link that looks promising and click it. Then you see this:

Word doc download dialog

If you’re like me, you immediately close that dialog and move on to search results that don’t require any friggin’ double-clickin’.

I think that one of the reasons that Github is so popular is that you can create a lovely, formatted web page by creating a file with some Markdown in it. No muss, no fuss.

It’s text, so I can version it right along with my source code

This solves a lot of problems for us at work. We use a wiki called DokuWiki with a Markdown plugin that supports my favorite flavor of Markdown called Markdown Extra.

DokuWiki diff

This is super useful because we can easily see what changed between versions, who changed it, and when.

It’s text, so I can diff it using my preferred diff tool

At work, we keep documentation on our web component in Word documents. These don’t change a lot, but when they do change, good luck figuring out exactly what has changed. If you’re lucky, the last person to edit the file turned change tracking on, but it’s nowhere near as simple as something like this:

Screenshot of a diff of a markdown file

Formatting options are limited so I don’t spend time puttering around with formatting

I think everyone has gone to battle with Microsoft Word over positioning a line break, or numbering a list, or indenting a block of text.

More Markdown for your editing pleasure

I will be posting links to a few Markdown tools and sites throughout the week. For now, here are some links to get you started.

xip.io

xip.io/

This would have come in handy when I was doing a lot of testing of our mobile
apps. At work we have a “live” silo and a “dark” silo. For large deployments,
we stage the new builds in the “dark” silo and test it there. Then when it’s
time to go live with the new builds, we update the load balancers to swap the
silos and make the new code live. Pointing native apps to the dark silo
is kinda tricky since there is no /etc/hosts/ file to edit. I have been
testing by running my own DNS server on my laptop, but that is a pain. I’m
going to play with xip.io to see if it can help me with this kind of
testing.

From the website:

xip.io is a magic domain name that provides wildcard DNS
for any IP address. Say your LAN IP address is 10.0.0.1.
Using xip.io,

          10.0.0.1.xip.io   resolves to   10.0.0.1
      www.10.0.0.1.xip.io   resolves to   10.0.0.1
   mysite.10.0.0.1.xip.io   resolves to   10.0.0.1
  foo.bar.10.0.0.1.xip.io   resolves to   10.0.0.1

…and so on. You can use these domains to access virtual
hosts on your development web server from devices on your
local network, like iPads, iPhones, and other computers.
No configuration required!

GitList

GitList

Another team at work has begun using GitList as their Git repository
viewer.

It looks like a nice self-hosted alternative to GitHub

From the GitList website:

GitList allows you to browse repositories using your favorite browser,
viewing files under different revisions, commit history and diffs. GitList is
free and open source software, written in PHP, on top of Silex and the Twig
template engine.

WinSCP

WinSCP Screenshot

I’m a command-line guy, but lots of people on my team perfer graphical tools.
WinScp is a really useful piece of software. From the WinScp website:

WinSCP is an open source free SFTP client, SCP client, FTPS client and FTP
client for Windows. Its main function is file transfer between a local and a
remote computer. Beyond this, WinSCP offers scripting and basic file manager
functionality.

Docco & Docco Next

Docco screenshot

I’ve been looking for tools to help facilitate code reviews, and one of the
candidates I’m considering is Docco. From Docco’s website:

Docco is a quick-and-dirty documentation generator, written in Literate
CoffeeScript. It produces an HTML document that displays your comments
intermingled with your code. All prose is passed through Markdown, and code
is passed through Highlight.js syntax highlighting.

By default, it takes comments from your source file and displays them next to
the code they are related to. In my case, I modified the config to leave
regular comments intact, but to display any comments /*! like this one */ off
to the side. This has two advantages:

  1. Reviewers can annotate code inline.
  2. A reviewer can see other review comments.

I am actually using docco-next instead of the original docco since it
allows more fine-grained control over which typed of comments to process.

Google Guava

Google Guava

One of my favorite college professors once said that the best software
developers are often lazy software developers. They work really hard to not
have to work really hard. I am definitely a lazy programmer. One of the ways
that I like to avoid hard work is to avoid writing code in the first place, and
that means finding high quality code libraries and using them instead of
re-inventing the wheel. At work we use the Apache Commons libraries a lot.

Google Guava

…contains several of Google’s core libraries that we rely on in our
Java-based projects: collections, caching, primitives support, concurrency
libraries, common annotations, string processing, I/O, and so forth.

It looks similar to the Apache Commons libraries, but several of the packages
are intriguing to me. Check out the User Guide. There is also an
Apache Commons equivalents page that helps you “translate from code using
Apache Commons” packages.

MarkdownPad

Screenshot from MarkdownPad

As some of my co-workers know, I am a huge fan of Markdown. From the
Markdown website:

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you
to write using an easy-to-read, easy-to-write plain text format, then convert
it to structurally valid XHTML (or HTML).

The overriding design goal for Markdown’s formatting syntax is to make it as
readable as possible. The idea is that a Markdown-formatted document should be
publishable as-is, as plain text, without looking like it’s been marked up with
tags or formatting instructions. While Markdown’s syntax has been influenced by
several existing text-to-HTML filters, the single biggest source of inspiration
for Markdown’s syntax is the format of plain text email.

I love the fact that documents formatted using Markdown are readable even as
plain text.

MarkdownPad is a Windows Markdown editor with live preview. It allows you to
see how your document is formatted as you type. The free version supports
vanilla markdown syntax, and the Pro version adds some additional features
such as support for Markdown Extra syntax.