Abraão Lourenço

Software development and other interesting tidbits. (abraao@alourenco.com)

Leancamp Wrap-up

One of my goals in attending Leancamp Barcelona was to meet people in the software development and startup communities in Barcelona and around the world. To prepare for that, I compiled a list of blogs, startups, and Twitter accounts that I found interesting from the list of attendees posted before the event, where everyone posted their blog, website, or Twitter account. I also included people, startups, and organizations I met at Leancamp, as well as recommendations from a friend.

Enjoy! If I missed anyone just shoot me message at @alourenco or abraao@alourenco.com.

Events and meetups

Barcelona

Spain

Europe

People: blogs & Twitter accounts

Barcelona

Europe & world

Local startups

Barcelona

Europe & world

Organizations supporting startups

Barcelona

Europe

Creating a Secure Web Proxy With an AWS EC2 Instance in the Free Usage Tier

Amazon Web Services(AWS) offers a free usage tier that includes a free Amazon EC2 Micro Instance for a year (among other benefits) to help new customers get started with the service.

Limitations

Cost

The EC2 Micro Instance is available for 750 hours during the year, thus it doesn’t cover using the instance continuously for an entire year. Running the instance continuously for an year would cost approximately $160.20: 365 days * 24 hours - 750 hours = 8010 hours * $0.02 / hour = $160.20 / year.

Location

The location of your proxy is limited to the regions available through EC2, which are currently US East (Northern Virginia), US West (Oregon), US West (Northern California), EU (Ireland), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (Sao Paulo).

New to AWS

You must be a new customer of AWS. If you are already an AWS customer, you don’t get access to the Free Usage Tier.

Convenience

Setting up the AWS instance is a one time setup cost, but starting and stopping it is not convenient, and may not be possible if AWS is not reachable and you didn’t start the instance beforehand. The method described here could (and should) be automated.

Creating an AWS account

This is easy, just go to http://aws.amazon.com/ and sign up for an AWS account.

Creating an EC2 Micro Instance

  1. Navigate to the EC2 console.
  2. Click on “Launch Instance”.
  3. Select “Quicklaunch”.
  4. Pick a meaningful name for your instance.
  5. Name your key pair and download it. You’ll need it later to set up key based SSH authentication against the machine.
  6. Select your launch configuration. e.g. Amazon Linux (64 bit).
  7. Click on “Continue”.
  8. On the next screen, click on “Launch”.

Once you have your instance up and running, you can create an encrypted tunnel through which you can transfer your browsing traffic to the instance.

Using your instance as a proxy

To use your instance as a proxy, you’ll need to start it, get its public IP address, and establish a SSH connection to it, which we’ll use to proxy traffic from your browser, instant messenger client, etc.

Finding your instance’s IP address

Your instance will receive a new public IP every time that it’s launched. To get its IP address:

  1. Log in to the EC2 console
  2. On the left hand navigation menu, pick Instances.
  3. Select your instance.
  4. Click on “Instance Actions” and then on “Start”.
  5. Click on “Yes, Start” on the confirmation dialog that opens.
  6. Once the instance has started, select it again, and scroll the bottom part of the EC2 console until you see the Public DNS entry for your instance. This is the address you’ll use to connect to your instance via SSH.

Configuring a SSH client in Windows with PuTTY

To establish a connection to your instance you’ll need a SSH client. For Windows platforms I recommend PuTTY. If you’re using PuTTY, go ahead and download the installer that is labelled A Windows installer for everything except PuTTYtel. You’ll need PuTTYgen (a SSH key pair generator and converter) and Pageant (an SSH authentication agent that holds your private keys in memory so you don’t have to type the key password repeatedly) later on.

Converting your EC2 key to PuTTY (PPK) format

In order to connect to your EC2 instance with PuTTY, you’ll need to convert your EC2 key pair to the PuTTY PPK format.

  1. Start PuTTYgen and select Load, then browse to your PEM file. This will automatically convert it to the PPK format.
  2. Click on Save private key.
  3. You can enter a passphrase if desired, but it’s not necessary.
    • If you enter a passphrase, you’ll need to input the password every time you use the key file. This can be avoided by using Pageant.
    • If you don’t enter a passphrase (i.e. you have a blank passphrase), you won’t need to enter a password every time.

Setting up PuTTY

  1. Start up PuTTY, place the IP address for your instance in the text input, and set the port number to 22.
  2. If you want, you can give your session a name in the Saved Sessions input box. This will allow you to save the PuTTY configuration (i.e. IP address, port number, SSH tunnel configuration).
  3. In the left hand navigation, expand the SSH node and click on Auth.
  4. Click on Browse and select your private key file.
  5. In the left hand navigation, under the SSH node, click on Tunnels.
  6. Set Source port to 7070, Destination to localhost, and pick Dynamic and Auto. This will set up a SOCKS proxy to which you can connect through port 7070 on your local computer.
  7. On the left hand navigation, click back to Session, save your session if desired, and click on Open to start the connection to your EC2 instance.
  8. When prompted for an username, enter ec2-user and press enter.

Optional: running PuTTY from a USB pen drive

If you’d like to have access to your instance from any Windows computer, you can download a portable version of PuTTY to an USB pen drive and configure PuTTY as earlier in the article.

Configuring a SSH client in Linux

Just follow Amazon’s instructions in the AWS documentation.

Configuring Firefox to use your encrypted connection

  1. Start Firefox.
  2. Click on Tools, then Options.
    • If you have an older version of Firefox, click on Edit then Preferences.
  3. Click on the Advanced tab, then on the Network sub-tab.
  4. In the Connection area, click on the button that says Settings.
  5. On the Connection Settings screen, select Manual proxy configuration.
  6. For SOCKS Host, enter localhost. For Port, enter 7070.
  7. Click on OK until you get back to the browser.

Now the web traffic between your computer and the EC2 instance will be encrypted and you will have the IP address of the region where your EC2 instance is located.

Optional: running Firefox from an USB pen drive

Similarly to PuTTY, you can download a portable version of Firefox to an USB pen drive and use it on any PC.

Como Usar VirtualBox Para Um Ambiente De Desenvolvimento Linux

VirtualBox é uma ferramenta para criar e executar máquinas virtuais. É oferecida por Oracle e esta disponivel gratuitamente.

Criando uma máquina virtual

  1. Baixe o VirtualBox
  2. Clique em “Machine > New”, e depois, “Next”.
  3. Coloque um nome para a sua máquina virtual.
  4. Selecione “Linux” e “Ubuntu” e clique em “Next”.
  5. Selecione o tanto de memoria que você quer usar para a máquina virtual. Eu recomendo utilizar o máximo possível, mas não mais que (RAM total) - (mínimo para rodar o sistema operacional do computador). Por exemplo: 12GB - 4GB (mínimo para Windows 7) = 8GB máximo para a máquina virtual.
  6. Na tela de “Virtual Hard Disk”, selecione “Create new hard disk”. Depois clique em “Next”.
  7. Selecione “Fixed-sized storage” e no mínimo 4GB para o disco duro. A instalação do Ubuntu requer 4GB de disco duro, mas é recomendável utilizar mais (8GB por exemplo).
  8. Clique em “Finish” e espere que a máquina virtual seja criada.

Instalando Ubuntu

  1. Depois da máquina ser criada, baixe o .iso do Ubuntu.
  2. Agora é necessário configurar o .iso do Ubuntu como um cd virtual.
  3. Clique em Settings e depois em Storage.
  4. Clique em IDE Controller e depois no icone do CD perto disso.
  5. Procure a .iso and selecione-la.
  6. Selecione a sua máquina virtual e clique na seta verde que diz Start.
  7. Agora é inicie a sua máquina virtual e faça a instalação do Ubuntu normalmente.

Book Review: The Pragmatic Programmer

Programming is a craft that involves more than coding, and The Pragmatic Programmer gives developers advice on how to improve those other areas. Its suggestions should already be common practice in a decent software shop; check it to see if there’s anything you need to improve in your work environment.

The technology referenced in the book needs to be updated to reflect the current state of the art. While this doesn’t negate the points made by the authors, listing CVS and RCS as options for source code control systems but omitting distributed version control options such as git and mercurial would be unconscionable in a new volume.

The sections The Requirements Pit and Pragmatic Teams stood out from the rest in their applicability to improving my skill set. In The Requirements Pit the authors explain how to find requirements that may be “buried beneath deep beneath layers of assumptions, misconceptions, and politics” and how to document them properly. It’s very tempting to code to spec and dismiss complaints of “that’s not what I meant” variety, but it’s the responsibility of every professional developer (see The Clean Coder) to deliver what the user needs. The key point in this chapter is that “it’s important to discover the underlying reason why user do a particular thing, rather than just the way they currently do it.”

Pragmatic Teams covers how to apply the pragmatic methods to teams:

  • Teams should not tolerate broken windows.
  • Someone should be in charge for guarding against scope creep or changes that weren’t captured in the original agreement.
  • How a team should communicate with the rest of the organization.
  • Splitting teams functionally.
  • Automate as much as possible.

One of the roles described in Pragmatic Teams, the project librarian, seems antiquated in a time when source code indexing and search tools are available and when good documentation is available on existing code. I’d be curious to hear from a team who uses this role to deliver what the user needs

The team that is described in Pragmatic Teams is a group that works together within the organization and moves from project to project together. I haven’t had the opportunity to be part of such a team (i.e. teams are assembled for each project), but it’s an approach that I think would be build a sense of unity between the members.

Overall this book is a good addition to any developer’s library, but more modern alternatives should be used instead of the tools and technologies mentioned.