RobertMeta.com - Thoughts about programming and life

21 Apr (Sat)

Ting & Google Voice == Perfection for Me

There are a lot of great reasons to give Google Voice a try, I am entirely dependent on it now.  Those two links give you a lot of great reasons, but neither of them hit on the reason I love Google Plus — it allows me to make and take phone calls right from in gmail.  As gmail is already a cornerstone of my workflow, this is FANTASTIC for me.  It allows me to leave my headphones on and continue working away.  The spam feature is a nice benefit too, never get a telemarketer call twice.

But, despite having most of my calls go over the internet, and the vast majority of the time being on wireless of some sort, I was still paying a great deal (~$125 a month) for my minutes / text messages / data… better way to think about it… a little over $1500 dollars a year.

Enter Ting a tiny little wireless phone carrier piggy-backing on Sprint.  I look at some of my bills and find out what I would be paying for my monthly bill with all the service I need via Ting… 38 bucks (including taxes) … saving over $1000 bucks a year ($1044 to be precise)…. but there is a catch, you buy the devices virtually outright (slightly discounted, more if you go to http://ting.com/twig) .. but even after dropping $350 on a phone… it pays for itself in 4 months.

Anyway, the point of this little post was to explain how I setup everything to work automatically using Google Voice whenever I am on wireless, and using standard 3G/4G coverage when I am away from a Hotspot/Home/Work. 

  1. Google Voice (free)
  2. GrooveIP ($4) 
  3. AutoAir (free)

The setup (parts lifted from here…)

  1. Google Voice # forwarded to my Ting #
  2. Google Voice # forwarded to Google Chat
  3. Ting device has voice-mail disabled rely on Google Voice instead and forward notifications via e-mail or SMS
  4. Ting device has “busy” and “no answer” calls forwarded to my  Google Voice #
  5. Ting device has “hide your Caller ID from others” option enabled
  6. GrooveIP installed on my handset (uses the Google Chat forward)
  7. GrooveIP 3G/4G calling disabled
  8. GrooveIP accept calls on answer enabled
  9. GrooveIP built-in dialer preference set to use GrooveIP on WIFI only
  10. GrooveIP native fallback enabled
  11. Hide the native phone app on the handset, it just gets in the way
  12. Hide the GrooveIP app also
  13. Use the GV app for texting and voicemail retrieval
  14. Use AutoAir to automatically disable the radio when you are on Wifi, this stops the phone from ringing in two different ways (One via standard phone forwarding, one via GrooveIP) … 

26 Mar (Mon)

From C to C++11

This article is a fun little view on the way code has change from C to C++11: http://blog.feabhas.com/2012/03/on-the-evolution-of-programming-style/

24 Mar (Sat)

Migrating Git Repo

This article was absolute gold for when I had to migrate a git repo at work. 

http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/

23 Aug (Tue)

Build Erlang From Source on Ubuntu 11.04 (Quickstart)

sudo apt-get -y install build-essential m4 libncurses-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu-dev fop xsltproc default-jdk tk8.5

Then download the tar.gz from http://www.erlang.org and simply “tar -zxvf ERLANG.tar.gz” then switch to the ERLANG directory and do a simple

./configure && make && sudo make install

and you are all set! 

28 Jul (Thu)

Mistakes, Failures and Progress

Currently, in my day job I am working on a project that has hit a bit of a chicken and egg research loop.  This loop seems to be centered on mistake avoidance, which at that scale of this project makes sense, but our lack of ability to even guess use cases make our time investment dubious at best.  

Anyway, this dove tailed well with me seeing a TED talk by Tim Harford on Trial and Error, and it set of a bit of a chain reaction reminding me of other great TED talks I had seen that touched on this topic, and related topic of risk versus reward and top down versus bottom up engineering.  

Burt Rutan talks about the future of spaceflight, and in the talk is some amazing statistics on the success versus failure rates of early airplanes (30,000 attempts, a handful of successes).  He calls this ‘Natural Selection’ — but it is basically just another person talking about the importance of Trial and Error.  

One more for the stack, Kathryn Schulz talks about being wrong, not in abstract terms, but in personal terms.  In the present tense, can you think of anything you are wrong about?  It talks about the importance of stepping back from an idea, and detaching from the emotional impact of being wrong.

4 Apr (Mon)

Twitter Post

As much as there can be a “Best” version of “Friday” — Stephen Colbert, The Roots and Taylor Hicks comes close: http://j.mp/f1dSNW

30 Mar (Wed)

Moving Backward

After working some contracts using Erlang and Cassandra (Thrift) going back to PHP/MySQL has been a bit painful.  The laid back client, and someone interesting work has made it bearable, but I am missing OTP profoundly.

A few months ago, I had not touched Erlang/OTP, yet it rapidly took the number one slot in my kit.  It isn’t all roses, but what it brings is huge, and for me has been game changing:

  • Ultra cheap processes and message passing allows me break the application on logical boundaries, rather than performance driven ones. 
  • Built in clustering support, share nothing design and let it fail principals allow me to change the way I build applications, and allow me to easily (lazily) take advantage of multiple cores. 
  • With the kit I get via Erlang, I am finding myself with far less throw away code, I am moving from proof of concept rapidly and directly, a refreshing experience.  
  • Take the above three points and add in OTP and some very good guidelines for building complex applications, as well as one of the best online communities I have been a part of, with resources like this: http://learnyousomeerlang.com/ (which has my favorite art ever) and you have a winner.  

I realize Erlang doesn’t have much popular support, and will probably never get mainstreamed, but at this point that just feels like a competitive advantage.  The experience for me has been profound, and very different than my experience with Scala, which felt to me like more of the same (lots of other java platforms, but now with Actors!)… I didn’t feel the radical shift I felt with Erlang. 

30 Mar (Wed)

Twitter Post

http://j.mp/hkRM3p <- absolutely cracked me up. Molestation Nursery!

25 Mar (Fri)

Twitter Post

*sigh* @DellHomeus new policy on shipping delays seems to be to withhold all information. Day 23 “In Production” on my L702X. #dell #sucks

17 Dec (Fri)

Twitter Post

If you are worried about delicious (bookmarks) going offline, switch to http://ping.fm/HXCKt — does FULL imports of tags and bookmarks

15 Dec (Wed)

Windows Software - The List (updated)

List is a bit of a disaster, but I will get it fixed up in the next couple of days. 

This is an update and refactoring of my big software list for Windows.  Now I will offer a couple options for a few categories, as well as add a few new categories all together.  All the software unless otherwise marked is free (as in beer, sometimes as in speech).

The organization of this list will be a bit different now, as I am using external tools to help you quickly get up and running with these apps.  I absolutely love Ninite, so if you want to get a jump-start, use this

Ninite Package

(contains: Runtimes for Flash, Air, Java, Silverlight and .NET (not on apps list), Chrome, Firefox, Skype, Pidgin, Thunderbird, VLC, Audacity, Paint.NET, Picasa, OpenOffice, SumatraPDF, Microsoft Essentials, Steam, KeePass, Inkscape, uTorrent, Dropbox, Everything, TeamViewer, ImgBurn, Evernote, CCCleaner, Defraggler, Teracopy, TrueCrypt, Launchy, WinSCP, Putty and Notepad++).  

Two other things, the first is you will notice I removed all the highly developer specific items, as I think these really deserve there own list.  Secondly, I will be highlighting some cloud computing applications that have crept into my daily usage and replaced some of these apps. 

Not In Ninite (for those looking to get up and running as quickly as possible)

VimAbiwordLastPassX-ChatWinDirStateFreemindDexpotSysinternals SuiteVirtual ClonedriveXML NotepadBeyond Compare($30)

Text / Idea Editors

Email Clients

Virus / Malware Protection

Web Browsers

    Office Products

    • Google Docs - My preferred way to work with documents is now docs.google.com, but since the rest of the world doesn’t agree yet, we sill have the below options. (online only)
    • Abiword - A lightweight, full featured editor that has full support for lots of text document formats… with a collaborative editing feature built in via Abicollab.  Doesn’t feel as slick as a Google Docs for collaboration, but close. (download here)
    • Open Office - Rapidly closing the gap with Microsoft Office, already good enough for most users. (in ninite package)
    • Sumatra PDF - Replacing Foxit on my list due to its small size, lack of nags, and / based searching.  (in ninite package)

    Compression

    Password Management

    • Lastpass - Amazing, secure, end to end encypted, cross-platform with plugins most browsers and most platforms.  Where I personally keep my information. (download it)
    • KeePass - While I prefer LastPass for personal passwords, KeePass is often the best solution for shared / work environments.  (in ninite package)

    Messaging

    • Skype - Video-conference and VOIP, great software. (in ninite package)
    • Pidgin - IM client that supports dozens of networks, AIM, ICQ, MSN, etc.  (in ninite package) | Alternative: Meebo.com - I warned you that cloud options might be on here.  
    • X-Chat - Great open-source IRC client.  If you need a high degree of mobility and/or use many computers. (download it) | Alternative: Use Pidgin to get access to IRC, could look at IRCCloud, but coming out of beta, the pricing structure doesn’t work for me. 

    Imaging / Vector / Photography

    Windows Improvements

    General Utilities

    Video

    Audio

    • Grooveshark.com - This is where I listen to 90% of my music, it has Pandora basically built in (pick a song you like, then hit Radio to hear more like it)… and now HTML and not flash, bonus points. 
    • Foobar2000 - Best local media player, not that I play much local media anymore. (in ninite package)
    • Audacity - Sound editor. (in ninite package)

    CD Burning / ISO Mounting

    Internet Misc

    Commercial Applications

    • Beyond Compare - The best diff tool for directories and files on windows, absolutely top notch, the only piece of commercial software I recommend on this list. (download here)

    Anything I am missing, leave a comment.

    12 Dec (Sun)

    Erlang version of Nodejs.org frontpage

    So, I saw and played with node.js, and one of the things that impressed me was the nice clean website.

    This is just a tongue in cheek clone of the node.js website but focused on Erlang.  

    An example of a web server written in Erlang which responds with “Hello World” for every request.  Uses misultin as the web server library. 

    -module(example).
    -export([start/0]).
    start() ->
        code:add_patha(“misultin/ebin”), % web-server library
        misultin:start_link([{loop, fun handle_http/1},{ip, “127.0.0.1”},{port, 8124}]),
        io:format(“Server running at http://127.0.0.1:8124/~n”),
        receive _ -> ok end.
    handle_http(Req) ->
        Req:respond(200, [{“Content-Type”, ”text/plain”}], ”Hello World”).

    To run the server, put it into a file called example.erl, then compile and run it. 

    erlc example.erl

    erl -s example

    Here is an example of a simple TCP server that listens on port 8124 and echoes whatever you send it. 

    -module(example).
    -export([start/0]).
    start() ->
        {ok, LSocket} = gen_tcp:listen(8124, [binary, {packet, 0}, {active, false}, {reuseaddr, true}]),
        accept(LSocket).
    accept(LSocket) ->
        {ok, Socket} = gen_tcp:accept(LSocket),
        spawn(fun() -> loop(Socket) end),
        gen_tcp:send(Socket, ”Echo server\r\n”),
        accept(LSocket).
    loop(Socket) ->
        case gen_tcp:recv(Socket, 0) of
            {ok, Data} -> gen_tcp:send(Socket, Data), loop(Socket)
            {error, closed} -> ok
        end.

    Download

    git repo, website

    Stable: R13B04 (win32)

    Unstable: R14B01 (win32)

    Historical: versions, docs

    Build

    Erlang is tested and used on LinuxMacintosh, Solaris, Windows (Natively), as well as FreeBSD and OpenBSD.

    About

    Erlang’s goal is to provide an easy way to build scalable, distributed, highly concurrent, functional programs. In the “hello world” web server example above, many client connections can be handled concurrently. Erlang spawns a new Erlang process to handle each connection, these are ultra-light weight processes designed with high concurrency in mind, they are not to be confused with OS processes.  

    This is in contrast to today’s more common concurrency model where OS threads are employed. Thread-based networking is relatively inefficient and very difficult to use. See: this and this. Erlang will show much better memory efficiency under high-loads than systems which allocate 2mb thread stacks for each connection. Furthermore, users of Erlang are free from worries of dead-locking the process—there are no locks. Almost no function in Erlang directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems.

    Erlang was designed for concurrency - having multiple tasks running simultaneously - from the ground up it was a central concern when the language was designed. Its built-in support for concurrency, which uses the process concept and message passing to get a clean separation between tasks, allows us to create fault tolerant architectures and fully utilize the multi-core hardware and distributed systems that is available to us today. 

    TCP handling in Erlang is easy, so by extension processing HTTP becomes straightforward.  Erlang’s HTTP libraries have grown out of the authors experiences developing and working with web servers. For example, streaming data through most web frameworks is impossible. Erlang attempts to correct these problems via its process oriented nature and support for concurrency.  Having the freedom to spawn a long-lived process to communicate with a single client via comet or websockets makes Erlang a delight to work with. 

    But what about multiple-processor concurrency? Aren’t threads necessary to scale programs to multi-core computers? Processes are necessary to scale to multi-core computers, not memory-sharing threads. The fundamentals of scalable systems are fast networking and non-blocking design—the rest is message passing. Erlang has a -smp option, which allows it to take full advantage of multiple processors with near linear scaling, and has support for distributed process built right in.

    See Also:

    Links

    Contributing

    Erlang has a detailed contribution page, but I will summarize it here.  Please read the entire thing before attempting to get patches mainlined.

    1. Get a git repo somewhere publicly accessible, use proper git settings.
    2. Send an email to the list with the git repo location and branch, so discussion can start on your patch. 

    More detailed/specific edition:

    1. Setup a github account (they are free)
    2. Fork the official repo from the dev branch.
    3. Set up consistent user information before starting with your real name and working email on all your computers.  (git config —global user.name “Your Name Comes Here”, git config —global user.email you@yourdomain.example.com)
    4. If you got this far, you really need to read the contribution page on the wiki. 

    11 Dec (Sat)

    The golden age of the autodidact

    Autodidact: A self-taught person.

    We are living in a golden age for those willing to take the time to educate themselves. The resources available free of charge are astounding. There are more than you can imagine online.

    Access to video lectures from many colleges and institutions available via Academic Earth and YouTube EDU. As well as some of the worlds brightest putting up short videos on TED.

    Educators resources (which can make fantastic learning tools) available via Connexions and OER Commons.

    Beyond all that, some of the most prestigious schools in the world are putting their content online. Including MIT, CMU, Stanford and Berkley.

    If I am missing a great resource please contact me and let me know about it.

    The List (from Delicious)