Installing Meteor – First Step In Meteor Training

The first obvious step in learning the Meteor JavaScript platform is to install it on my laptop.

So I did it. The verdict – very easy and friendly. Running one console command I copied & pasted from the Installing Meteor page.

I did that on OS X and on Ubuntu Linux (14.04). On both platforms it worked smoothly. Haven’t tried Windows, since I don’t do development on Windows these days.

At the time of writing, the current Meteor version was 1.2.1.

Continue Reading…

Kambatz: The App I’m Building To Learn Meteor

So I said I want to build a utility app for myself. And do that using the Meteor JavaScript platform. While learning it. And blogging about learning it.

OK, but what’s this utility app I’m talking about? This is the topic of this post.

I’m fanatic about my digital paperwork organization system, especially when it comes to monthly bills. I have several self-imposed requirements from my bills processing workflow (beyond “pay on time” 🙂 ) that I’d like to automate as much as possible. The purpose of the app is to enable this bills processing workflow automation.

I know, this isn’t the sexiest app out there. It is, though, a real and concrete need that I have. Solving this will save me significant time. This means I’m motivated enough to build it 🙂 .

Keep reading for more details about my plans for this bills management app.

Continue Reading…

I’m Going to Teach Myself the Meteor JavaScript Platform – While Blogging the Process

I want to build a utility app for myself. It doesn’t matter what’s this app is about – I’ll get to that later. What matters is that I get a chance to start something from scratch, which is always fun 🙂 .

For this project, I decided to use Meteor – a JavaScript app platform.

The interesting thing about this project, is that I have zero experience with Meteor. Or any other JavaScript framework for that matter. I have some knowledge of JavaScript & HTML basics, but that’s pretty much it.

I see this as an opportunity to capture and document the newbie experience as I go through the learning process! As I learn the Meteor platform and build my project, I will blog about my experience as a newcomer to the Meteor platform.

This should be interesting 🙂 . Read on for more about my motivation and plans.

Continue Reading…

From Markdown To Pastable Formatted Text In OS X Terminal

By Tuesday, August 4, 2015 0 , , Permalink 3

I use Markdown a lot. I use it right now, to compose this post 🙂 . It’s my go-to syntax for quick plain text files for notes and such. It’s what I use when I code something that outputs “formatted” text to terminal.

Recently, I wanted to take Markdown output from a script I wrote, and send a nicely formatted version of it by email.

Read on for the solution I eventually came up with, after several iterations, and essential tips from Brett Terpstra, the Markdown Master.

tl;dr:

cat foo.md | \
  pandoc --from markdown --to html | \
  textutil -convert rtf -stdin -stdout -format html | \
  pbcopy -Prefer rtf

Continue Reading…

Check Out These Python Podcasts

I recently discovered two new podcasts about Python!

I think both podcasts started about the same time – 3-4 months back. I found out about them a few weeks ago, and managed to catch up on the episode backlog 🙂 .

Both are based on conversations with people from the industry and Python community.

Talk Python To Me is hosted by Michael Kennedy. At the least, check out the show theme music. Beyond that, I enjoyed the technical depth of the conversations. Especially the episodes about Netflix, Flask, and Docker. The production quality is surprisingly good for a young independent podcast.

Podcast.__init__ is hosted by Tobias Macey and Chris Patti. This show could use some nicer production-fu, as much as I enjoy a whispering guest along a shouting host. Many of the conversations on this show are interesting as well, like the one with the Python guys. Personally, I enjoyed the more technical conversations, compared to the culture-themed ones.

If you’re a Python-enthusiast, definitely look into these podcasts!

Shell Foo: Comparing the Output of Two Commands – Without Temp Files!

You probably know to use the diff file1 file2 command to compare file1 and file2 line by line.

Sometimes you don’t want to compare files, but output of commands. For example, compare sort file1 and sort file2. Or maybe compare grep foo file1 and grep foo file2.

Of course, there’s the obvious way – run the commands, redirect their output to temp files, and compare the temp files:

$ sort file1 >tmpf1
$ sort file2 >tmpf2
$ diff tmpf1 tmpf2
...
$ rm tmpf*

But, really..? 3 extra commands just for the one command you really wanted?

There must be a better way! This post is about the better way 🙂 .

Even better, the solution is more general than diff. It allows using the STDOUT of any command as a “file” input for other commands!

Shell-Foo is a series of fun ways to take advantage of the powers of the shell. In the series, I highlight shell one-liners that I found useful or interesting. Most of the entries should work on bash on Linux, OS X and other UNIX-variants. Some probably work with other shells as well. Your mileage may vary.

Feel free to suggest your own Shell-Foo one-liners!

Continue Reading…

Shell Foo: Subtracting Lists With comm

The comm utility is powerful, yet not well known.

Named after the word “common”, you can use the comm utility to select or reject lines common to two files.

Practically, once I learned about this tool, I use it often to:

  1. Get all lines that exist in both files (“select common” lines).
  2. Find lines that are missing from one file compared to another (“reject common” lines).

Just don’t forget that comm requires that the input files are sorted lexically! That shouldn’t be a problem, since you can always use sort before calling comm. But you do need to remember to do this, otherwise you might get unexpected results (which may or may not happen to me on a regular basis).

Shell-Foo credit for this one: Eyal Fink.

Shell-Foo is a series of fun ways to take advantage of the powers of the shell. In the series, I highlight shell one-liners that I found useful or interesting. Most of the entries should work on bash on Linux, OS X and other UNIX-variants. Some probably work with other shells as well. Your mileage may vary.

Feel free to suggest your own Shell-Foo one-liners!

Continue Reading…

When Audible Meets Google: Cool or Creepy?

By Saturday, July 4, 2015 0 No tags Permalink 0

Last week, I finished listening to the audio book version of All the Light We Cannot See, by Anthony Doerr.

The book is wonderful, and I warmly recommend it. In the book, we go back and forth between the stories of the blind french girl Marie-Laure, and the orphan german boy Werner, as they grow up with the second world war shaping their lives.

This is not a summary or a review of the book, so I will not go further into describing the story. I would like to show you a random digest email I got from Google+, a few days after finishing the book:

Oh, have I mentioned that a significant part of the story takes places in Saint-Malo?? 🙂

Take notice – I used Audible to buy and listen to the audio book, using my Amazon account. I got this Airbnb G+ post from Google+, urging me to explore a place I just “experienced” through a book!

Yes, I understand it was easy for Google to know that I bought the book, because I got the receipt to my Gmail. I’m not surprised that they knew. I’m surprised that they were able to time it so well with when I finished the book. I have many books in my Audible libraries. I don’t listen to all of them immediately after purchasing them…

Anyway, I thought it was cool. I believe many will find this more creepy than cool. I think it’s generally a good thing, if it allows Google to show me things that might interest me, when those things may be relevant for me. What do you think? Cool or creepy?

Happy Leap Second!

By Tuesday, June 30, 2015 0 Permalink 0

Are you ready for tonight’s leap second?

No idea what I’m talking about? tl;dr – once in a while, an extra second is added to synchronize coordinated universal time (UTC) with mean solar time. This is needed because, generally, the Earth’s rotation slows down over time. Leap seconds, unlike leap years, do not occur in regular intervals, because the variation in the Earth’s rotation speed varies irregularly. An example of such irregularities is the 2011 Japan earthquake, that increased the Earth’s rotation speed a bit.

If you’re thinking “what’s an extra second once in a while?”, and “why should anyone care about it?” – feel free to spend that extra second in a productive way 😉

A little extra thought can uncover the potential complexities entailed in such time manipulations.

How do banks and stock markets agree on exchange rates? If you make a deposit and a withdrawal, does the order matter? In a distributed compute cluster, how do compute nodes elect a leader? In cryptographic protocols, how do Alice and Bob verify that Eve isn’t tampering with their connection? How does a control tower in a busy airport is able to coordinate hundreds of incoming landings?

These examples, and many others, all rely on the ability to know the time, have a good estimate about the time on “other sides”, and being able to order events sequentially. Manipulating with time itself, in an irregular way, can cause a lot of chaos… It actually did cause chaos the previous time we experienced a leap second, back in 2012!

This is quite an interesting subject, and I encourage you to go deeper 🙂 .

If you decide to read just one more thing, let it be Google’s post on the subject, mentioning their elegant “smear window” solution. It’s pretty cool.