Stratus3D

A blog on software engineering by Trevor Brown

Google Hangouts With Offline Users

Often times during a video chat one or more participants will be offline and unable to join. If the person offline has access to a cell or landline phone during the video call the organizer can “invite” their phone number to the call and they can participate using their cell or landline phone. In this post I will provide step-by-step instructions on how to do this. In this post I am assuming you are using Google Chrome as your web browser and Mac OSX as your operating system. However, most things in Google Hangouts should work the same across different operating system. I will also be assuming you are the organizer of the call. (the one sending the invites).

  1. First open up Google Chrome and then open Google Hangouts. Google Chrome Google Hangouts App

  2. A new Google Hangouts window should open. Begin the video call as you normally would by inviting other Hangout users (type their email address into the box invite box). Google Hangouts Invite

  3. To invite a phone user click invite people (during the call this should be a button in the bar that appears at the top of the video when moving the mouse towards the top of the window). The window allowing you to invite more people should appear. Towards the bottom of it, near the green “Invite” button you should see an “+ Add telephone” link. Click on the link and another window asking you to agree to their terms of service should appear. Click “Agree” and a window with a field for a telephone number should appear. Enter the phone number of the person you want to call and click the “Call” button. Calls to the US and Canada should be free. Google Hangouts Empty Call Invite Highlight Google Hangouts Call

  4. Google Hangouts should make a call to the number you entered. It usually takes a couples seconds for the call to be routed. During the time call is being routed Google Hangouts should be playing the “phone ringing” sound. If the person you called does not answer the call, Google Hangouts will hang up and you will be notified that the call failed. If they do answer you should be able to speak to them as you would any other person in the hangout (just make sure you aren’t muted). The participant on the phone should be able to participate in the Hangout as if it was a regular conference call. Google Hangouts Calling Phone
  5. When the call is over simply hangup like you normally would.

I put this post together so that I wouldn’t forget how to do this in the future. If you know of any ways to make this process simpler I would love to hear from you!

Foray Into Functional Programming With Elixir

  • Abstract: Functional programming languages provide many advantages over traditional OO languages. Functional languages make data manipulation (e.g. parsing binary data) easier. Their lack of mutable state (all data is immutable) also makes functional applications simpler than their OO counterparts. Learning how to solve problems and write software in functional languages like Elixir can be difficult at first. Writing real-world applications in functional languages requires a different approach to problem solving. In this talk I cover core concepts specific to functional programming required to start writing simple Elixir applications quickly. I will also share some things I have discovered over the past year that have helped me make the transition from OO to functional programming. Focusing on data and data manipulations is key to being productive in a functional language.
  • Slides: https://speakerdeck.com/stratus3d/foray-into-functional-programming-with-elixir

Everything You Need to Know About Erlang's Magic _ Variable

I had someone ask me what happened to values assigned to the underscore variable in Erlang. I realized I didn’t have a clear understand of the way variables beginning with an underscore handled. I decided to re-read the Erlang documentation on variables.

To summarizing what the documentation says, all variables could be put into three groups:

  • Normal variables
  • Normal variables prefixed with with an underscore
  • The anonymous variable (a single underscore)

###Erlang Variables All types of variables must start with either an uppercase letter or an underscore. They may contain alphanumeric characters, the underscore and the @ symbol. All variables are bound via Pattern Matching. At runtime no variables are special except for the anonymous variable.

##Normal variables Normal variables start with an uppercase letter. Pattern matching and all the compile time warnings work normally. Example:

1> {First, Second} = {foo, bar}.
{foo, bar}
2> First.
foo
3> Second.
bar

##Normal variables prefixed with an underscore When a variable is prefixed with an underscore pattern matching and everything at runtime works like a normally. Values are still bound as they normally would and patterns such as this fail like they normally would. {_Val,_Val} = {foo,bar} fails because the first and second items in the tuple are different. The only difference is at compile time. Normally the compiler generates a warning when a value is bound to a variable and the variable is not later used. Often an important value is returned from a function call but the value is unused. By prefixing the variable with an underscore, the variable retains it’s useful name and does not generate any compile time warnings. Example:

1> {_First, _Second} = {foo, bar}.
{foo, bar}
2> _First.
foo
3> _Second.
bar

##The anonymous variable The anonymous variable is denoted by a single underscore (_). The anonymous variable is used when a variable is required but the value needs to be ignored. When a value is assigned to the anonymous variable the value is never bound to the variable. Since the value is never bound it can be used multiple times in a pattern and each time it is allowed to match a different value. Example:

1> {_, _} = {foo, bar}.
{foo, bar}
2> _.
* 1: variable '_' is unbound 
4> {_, Second} = {foo, bar}.
{foo, bar}
5> _.
* 1: variable '_' is unbound 
6> Second.
bar

For more information check out the Erlang documentation on variables