These days, it seems harder and harder to be civil and open minded on nearly any topic. Despite being more digitally connected than ever before, we as a society appear to have groups of people who are more apart on ideology than ever before.
I am sure you've heard of confirmation bias--our inate need to find proof of our own beliefs. While this cognitive bias has been known for quite some time, I don't think we've fully grasped its potentially disasterous impact when modern machine learning techniques are applied to virtually all online experiences.
Recommendation engines used by Amazon, Netflix, YouTube, etc. all feed off your activity. When you see a link that seems interesting to you and click on it, that event is recorded. The information about what you just read/watched/bought is now used by that company's recommendation engine to populate their "Up next" or "Others also bought" or "You may also be interested in" feeds. Now you may think, "oh this is great, this service knows what I like", and click on another link in that recommended feed. This generates another data point for the recommendation engine. When you do this over and over, over the course of days and months, various backend services build up a very comprehensive profile of who you are and what you like. Since each one of these companies' main goals is to get you to either consume more of their content or buy more things, its recommendation engine is quite happy to continue to pump more and more things you will like into your feed. Afterall, optimizing profits is the name of the game.
This is not so bad when it comes to online shopping, because if I buy diapers and baby food, you are probably right to guess that I may also want baby clothes and baby bath toys. The trouble comes when this same system is applied to news and other media that is suppose to be fact reporting. Suddenly that one article you clicked on that seemed interesting has resulted in your feed overflowing with stories about alien abductions and what not. Since you don't want that, you end up clicking on articles or videos that confirm what you already think. And because of that, more and more, all you see day in and day out are such articles and videos. Now add a global pandemic to this already poor diet of information where everyone is locked indoors with nothing but a continuous feed of recommended and urgent breaking stories to consume, and you end up with a very unhealthy situation.
As if this isn't already a big enough dumpster fire, you also need to add all the tricky marketing tactics that is on every website these days. Every click and even non-click is tracked and sold to the highest bidder, cross companies, cross geographic boundaries. All that information is fed into more and more optimization algorithms designed to sell you ideas or products, pushing you further and faster down a path you are already on.
So, what can you do to break this cycle? I definitely don't have all the answers, but maybe when you are looking for news, do so in your browser's incognito mode. You should definitely be running an ad block plugin in your browser. And if you are more technical, run Pi-Hole to black hole all ad servers. Also, maybe try visiting different news sites, not only ones you always read stories from. Maybe best of all, have a good old fashioned (virtual) discussion with some of your friends who are a little different than you, especially those who don't agree with everything you say.
It is easy to fall into the trap of confirmation bias, it is a lot harder to challenge your own preconceptions and see the world from someone else's perspective. If we don't start doing this, there is a real chance we end up recommending ourselves into clusters of extremism.
enjoy the ride
an athlete, an engineer, a woman's journey through sport, work, and life
Thursday, 9 April 2020
Thursday, 16 January 2020
A woman walks into a Honda dealership...
On a cold snowy Thursday afternoon, a tall asian woman walks into a Honda dealership.
I walk into the show room, go directly to the Honda HRV, get inside, and start checking out the interior of the car.
On my way in, I see the show room is pretty empty, no other customers in sight. There are a few male staff at their desks, doing various paperwork like things. I walk by the female receptionist, she says hello, I reciprocate.
After a few minutes, I am surprised at the lack of attention I am getting, then I see the receptionist come to me, she asks "do you need any help?"
I respond that I am interested in the HRV. She says if I need any help, she can get one of the sales people. I say OK, she goes away.
I continue to checkout the car, I get out, open up the rear seat, try out the magic seats. They are actually really cool, why doesn't every SUV/CUV have them? They are so useful!
Anyway, I get into the back seat, check out the leg room, head room, etc.
I am out again, checking out the trunk and what not. I take a moment to look up. While I am all for low pressure sales, but I've been in the dealership for nearly 10 minutes, with no other customers in sight, I'd figure even out of boredom, one of the salesman would've come over to me to chat by now.
Nop, all the guys are, doing something. I am not sure what it is they are doing, but they are avoiding eye contact and looking busy. Oh also, while walking around the car, the showroom etc, the female receptionist is the ONLY person who has even acknowledged my presence. Did I wear my Harry Potter invisibility cloak? Apparently it doesn't work on women, I must make a note of this.
I look at the car more, getting into the passenger side, checking out the sticker details etc..
Finally I am bored, I have specific questions that I cannot answer myself (or else I would have), so I go back to the receptionist lady. She is talking to a customer on the phone, but she tells me "be with you in a momemnt".
A few minutes she was off the phone, and comes to me, I tell her I have specific questions. She responded she will get one of the sales reps.
The rest of the experience was pretty standard, nothing terribly good or bad to report. I've already done a bunch of research on the HRV, so I had very specific questions, which it turns out the sales person couldn't answer, and even his manager didn't seem to be certain.
The salesman who helped me was nice and friendly. We took the car for a test drive, he was surprised I knew a lot about the car already. I told him, I am an engineer, it's what I do.
I walk into the show room, go directly to the Honda HRV, get inside, and start checking out the interior of the car.
On my way in, I see the show room is pretty empty, no other customers in sight. There are a few male staff at their desks, doing various paperwork like things. I walk by the female receptionist, she says hello, I reciprocate.
After a few minutes, I am surprised at the lack of attention I am getting, then I see the receptionist come to me, she asks "do you need any help?"
I respond that I am interested in the HRV. She says if I need any help, she can get one of the sales people. I say OK, she goes away.
I continue to checkout the car, I get out, open up the rear seat, try out the magic seats. They are actually really cool, why doesn't every SUV/CUV have them? They are so useful!
Anyway, I get into the back seat, check out the leg room, head room, etc.
I am out again, checking out the trunk and what not. I take a moment to look up. While I am all for low pressure sales, but I've been in the dealership for nearly 10 minutes, with no other customers in sight, I'd figure even out of boredom, one of the salesman would've come over to me to chat by now.
Nop, all the guys are, doing something. I am not sure what it is they are doing, but they are avoiding eye contact and looking busy. Oh also, while walking around the car, the showroom etc, the female receptionist is the ONLY person who has even acknowledged my presence. Did I wear my Harry Potter invisibility cloak? Apparently it doesn't work on women, I must make a note of this.
I look at the car more, getting into the passenger side, checking out the sticker details etc..
Finally I am bored, I have specific questions that I cannot answer myself (or else I would have), so I go back to the receptionist lady. She is talking to a customer on the phone, but she tells me "be with you in a momemnt".
A few minutes she was off the phone, and comes to me, I tell her I have specific questions. She responded she will get one of the sales reps.
The rest of the experience was pretty standard, nothing terribly good or bad to report. I've already done a bunch of research on the HRV, so I had very specific questions, which it turns out the sales person couldn't answer, and even his manager didn't seem to be certain.
The salesman who helped me was nice and friendly. We took the car for a test drive, he was surprised I knew a lot about the car already. I told him, I am an engineer, it's what I do.
Tuesday, 19 March 2019
Engineering Lead series, Chapter 2 - Deep Dives
It seems like my previous post was liked by a number of people, maybe this is a topic I will continue writing about. Here is Chapter 2...
Today I had a team member tell me during stand up that he couldn't figure out the ticket he was working on, so he decided to just work on something else. Then, our team's coop piped in and said he too looked at the same ticket, and couldn't figure out how to replicate the bug (which clearly still exist in our production and staging environment), so he put it back into the Ready column of our Jira board.
This, got me rather upset.
It would have been perfectly acceptable if they had said, "Hey, I need hand with this", but to just give up? And worse, give up and put the ticket back in to Ready state? What sort of solution is that? How is this going to help any of the other team members? How is this going to help our customers? No, giving up is simply not acceptable.
I imagine one of the reasons we get into the field of technology is we like problem solving. While we may not admit it, the most odd duck weird one off bugs are the stuff that we enjoy digging at the most (sometime at the frustration of our PMs since these tickets take far longer than expected to resolve). It should be that professional curiosity that drives us to think, "hey, I don't understand why this is happening, but the code is all there, and the problem clearly exists, so I am going to figure this one out!"
I wonder if perhaps, stubbornness is a trait that is actually is helpful in our field. Unless you aspire to be a mindless code monkey and never want to tackle any real tough problems in our field, there will be plenty of times where something just doesn't work the way you expect it to work, and it's going to take a lot of time and energy to figure it out. I honestly think these are character building moments and opportunities for real learning. When you do finally get the breakthrough "aha" moment, it will be well worth the effort. Sure, there will some occassions where that "aha" moment also came with the sudden realization that it was some terrible typo that caused the whole thing, but there are also many other moments when you really learn about how something works under the hood. When you get that sort of a moment, it feels immensely satisfying to have done the deep dive.
I think it was this stubbornness that drove me to spend thousands of hours honing my skills in the shooting sports. Standing on top of the podium and having "O'Canada" played for me isn't something that comes easily. It is the same stubbornness that when I encounter technical situations like what my team member ran into today, that I will dive in with both feet with the aim of getting to the bottom of the issue!
Today I had a team member tell me during stand up that he couldn't figure out the ticket he was working on, so he decided to just work on something else. Then, our team's coop piped in and said he too looked at the same ticket, and couldn't figure out how to replicate the bug (which clearly still exist in our production and staging environment), so he put it back into the Ready column of our Jira board.
This, got me rather upset.
It would have been perfectly acceptable if they had said, "Hey, I need hand with this", but to just give up? And worse, give up and put the ticket back in to Ready state? What sort of solution is that? How is this going to help any of the other team members? How is this going to help our customers? No, giving up is simply not acceptable.
I imagine one of the reasons we get into the field of technology is we like problem solving. While we may not admit it, the most odd duck weird one off bugs are the stuff that we enjoy digging at the most (sometime at the frustration of our PMs since these tickets take far longer than expected to resolve). It should be that professional curiosity that drives us to think, "hey, I don't understand why this is happening, but the code is all there, and the problem clearly exists, so I am going to figure this one out!"
I wonder if perhaps, stubbornness is a trait that is actually is helpful in our field. Unless you aspire to be a mindless code monkey and never want to tackle any real tough problems in our field, there will be plenty of times where something just doesn't work the way you expect it to work, and it's going to take a lot of time and energy to figure it out. I honestly think these are character building moments and opportunities for real learning. When you do finally get the breakthrough "aha" moment, it will be well worth the effort. Sure, there will some occassions where that "aha" moment also came with the sudden realization that it was some terrible typo that caused the whole thing, but there are also many other moments when you really learn about how something works under the hood. When you get that sort of a moment, it feels immensely satisfying to have done the deep dive.
I think it was this stubbornness that drove me to spend thousands of hours honing my skills in the shooting sports. Standing on top of the podium and having "O'Canada" played for me isn't something that comes easily. It is the same stubbornness that when I encounter technical situations like what my team member ran into today, that I will dive in with both feet with the aim of getting to the bottom of the issue!
Labels:
deep dive,
engineering,
problem solving,
stubbornness,
team lead
Monday, 28 January 2019
I am an Engineering Team Lead, but what do I actually do?
My title is Engineering Team Lead, but what does that
actually mean, what do I actually do?
I am Project Manager
Nearly every business request impacts multiple components, front
end, back end, and various other subsystems.
I receive business requirements from the Product Manager and break down
the request into workable chunks. I translate business requirements to engineer
speak, and create "ready to be worked" on Jira tickets. I make sure each
ticket has as much background information as possible so the individual working
on this ticket can have some perspective of the larger picture. When multiple Jira tickets are required to
implement a business change, I have organize them so tickets are put into the
sprints without unmet external dependencies. In order to do this, often I have to actually dig into the code bases, roughly plan out the changes that would be required, sometimes testing some rough ideas before I can confidently write a Jira ticket. It is either that, or every ticket is going to be an “Investigate”, which often results in no actual value to customers.
Most of the time there are also multiple
projects running simultaneously. This means I have to mentally organize and
prioritize them into our sprints, manage their progress against their due
dates, and communicate both up and down to make sure everyone is on the same
page. I also run all of our backlog grooming, sprint planning, and retrospective
sessions. I collect metrics on team as well as our product performance, track
and plot them over time so the team can continue to be diligent on improving
quality.
I am Gate Keeper
Since I’ve been at the company the longest, and know how all
the small tiny gears fit together to make this giant colossus work, I review
almost every bit of code that is in our team’s various repositories. While
other reviewers pick out style or syntax improvement opportunities, I am often
the person who discovers larger issues in logic, data flow, deployment
considerations, or sometimes simply the wrong implementation in the wrong place.
In order to do this, I often have to dig deep into the code base, thinking
about what a good technical solution would be, and then evaluate that against
the diff I am actually reading. Of
course I don’t always come up with the best solution. I am ecstatic when I see
a better solution implemented, but even then, there are often rough edges that
must be smoothed out before it can go to production. Larger code reviews have
to wait for the weekend because it is the only quiet time I have, it is either
that, or staying late at the office long after everyone has left.
I work on guiding our team towards higher test coverage, more
robust fault tolerance, better documentation and easier to read code. Rarely am
I able to just accept a patch as is, since often my younger team members due to
lack of knowledge or experience have written code that would have broken one
part of the system or another. When something fails in production, upper management
come to me to demand answers. As such, I suppose these efforts are as much for self
preservation as it is for team improvement. We do also require two reviewers
approval before any change is accepted, on a small team, it pretty much means I
have to look at every diff.
I am Quality
Assurance
After code changes are finalized and landed on the master
branch, individual contributors are happy to move on to the next bit of work. I
on the other hand, have to do another two rounds of checks, once when the
changes are released to our staging environment, and a final round when it makes
it to production. Thankfully most of the
time these checks do not reveal problems, but there certainly has been cases
when bugs have been discovered due to subtle environment differences.
I am Customer Support
When something breaks in production, other teams and upper
management come to me for answers. So even
when I am not on triage duty for the week, I am still on. This can be as innocuous
as a “can we do this?” question. This will usually lead me to dig into our code
bases, looking at logs, thinking about potential conflicts with other systems,
and then offering an answer or alternative solutions. It may seem innocent, but
a few of these questions in a day, and there will be little time to do anything
else. Have I mentioned that we have offices around the globe and operate in
numerous time zones? Yes, so that means in order to provide a high level of
service to all of my team’s customers (not only the end clients, but the other
offices that depend on our services), I find myself responding to
email/slack/Jira messages at all sorts of odd times of the day.
I am Mentor, Psychiatrist,
and Jury
I have a lot of young developers on my team. Some find the
day to day work dull, others try to come up with complicated solutions. I try
to mentor and help them achieve their best, offering support and guidance along
the way. When a team member is not engaged, I have to figure out what the issue
is, and how I can get them back on track. I do this by day to day working alongside
my team members, with lunch time conversations, and with my bi-weekly one on
ones with them. I am always listening, I
am always watching. When it comes time to do performance reviews, I have to assemble
everything I know about a person’s contributions, and try to come up with constructive
advice to help improve their future performance.
I am Visionary and
Architect
On top of all the day to day work, I also have to keep up
with the industry’s latest trends, in order to offer my team a glimpse of the future
to look forward to. This means I spend my holidays and weekends reading and
learning about new tech that’s always coming out faster than I can
consume. I honestly wish I could be in
the Matrix and just download the latest flight program to a Huey directly to my
brain. I also have to think about how to improve our processes, technology, and
architecture in order to better our customer experience, both internal and
external.
I am Talent
Acquisition
Since our team’s small size often causes problems in availability
of resources, we’ve ramped up hiring. This means I need to go through resumes of potential
candidates and go through rounds of interviews. Thankfully a team member has
stepped up to significantly reduce my effort in this task. Ultimately however, if
I hire someone who doesn’t meet expectations, then I will have another problem
on my hands.
These are the things that I do nearly on a daily basis. Most
days I feel like I am being pulled in a hundred different directions. It is exhausting.
Labels:
architect,
customer support,
engineering,
management,
mentor,
project manager,
quality assurance,
talent acquisition,
team lead
Tuesday, 6 September 2016
Step by step Ansible and Vagrant quick start tutorial
I am learning Ansible and Vagrant, and had a lot of issues getting things running on Ubuntu 14.04.
I did manage to get a simple playbook working with Vagrant. Hopefully, the entries below will save you some hair pulling and cursing.
For a quick intro of what Ansible can do, watch this video https://www.ansible.com/get-started
In order to run Vagrant, you will need to install a virtual machine provider, such as virtualbox.
You can install virtualbox with:
You can download the latest Vagrant from: https://www.vagrantup.com/downloads.html
Then to install:
This gets me the latest Ansible:
Now let's see if we can SSH into the VM the normal way. Note that in the output of the "vagrant up", it told us the SSH port for this VM is 2200. The default password for the "vagrant" user is, you guessed it, "vagrant"! (no quotes of course)
Note: Please do not put your password into your hosts file. I've done it here only because this is just a test VM's password.
Now that we have the hosts file, let's do a ping test:
Edit Vagrantfile and add Ansible playbook and port forward
Now do a vagrant reload to restart the VM. After the VM restarts, you can see the hello world page from your localhost by visiting:
You don't have actually to destroy the VM actually, you can run vagrant provision at any time, and as many times as you want.
I did manage to get a simple playbook working with Vagrant. Hopefully, the entries below will save you some hair pulling and cursing.
For a quick intro of what Ansible can do, watch this video https://www.ansible.com/get-started
First things First: Install Vagrant
I want to use Ansible to set up nginx on a Vagrant VM. So first, we need to install both Ansible and Vagrant.In order to run Vagrant, you will need to install a virtual machine provider, such as virtualbox.
You can install virtualbox with:
On my 14.04 machine, this got me virtualbox 4.3.36. It is not the latest (5.1), but it seems to work fine.$ sudo apt-get install virtualbox
You can download the latest Vagrant from: https://www.vagrantup.com/downloads.html
Then to install:
The Vagrant quick start says:$ sudo dpkg -i vagrant_1.8.5_x86_64.deb
That didn't work for me, I found I had to add the full precise64 virtualbox image's URL:$ vagrant init hashicorp/precise64
$ vagrant box add precise64 https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/virtualbox.box
Install Ansible
To install the latest Ansible on Ubuntu 14.04, I had to add some additional repositories.$ sudo apt-get install software-properties-common $ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update $ sudo apt-get install ansible
This gets me the latest Ansible:
$ ansible --version
ansible 2.1.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
Start up Vagrant
Let's bring up your Precise VM and see if the basics of Vagrant are working.
$ vagrant init precise64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Bring up the VM:Let's see if we can get into the VM:$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'precise64'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: test_default_1473215023932_83230 ==> default: Fixed port collision for 22 => 2222. Now on port 2200. ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2200 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2200 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.2.0 default: VirtualBox Version: 4.3 ==> default: Mounting shared folders... default: /vagrant => /tmp/test
Excellent!$ vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '14.04.5 LTS' available. Run 'do-release-upgrade' to upgrade to it. Welcome to your Vagrant-built virtual machine. Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2 vagrant@precise64:~$
Now let's see if we can SSH into the VM the normal way. Note that in the output of the "vagrant up", it told us the SSH port for this VM is 2200. The default password for the "vagrant" user is, you guessed it, "vagrant"! (no quotes of course)
There we go, now we can SSH into the VM directly, we are ready for Ansible.$ ssh vagrant@127.0.0.1 -p 2200 The authenticity of host '[127.0.0.1]:2200 ([127.0.0.1]:2200)' can't be established. ECDSA key fingerprint is 11:5d:55:29:8a:77:d8:08:b4:00:9b:a3:61:93:fe:e5. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[127.0.0.1]:2200' (ECDSA) to the list of known hosts. vagrant@127.0.0.1's password: Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '14.04.5 LTS' available. Run 'do-release-upgrade' to upgrade to it. Welcome to your Vagrant-built virtual machine. Last login: Wed Sep 7 02:29:18 2016 from 10.0.2.2
Getting Ansible to talk to the VM
In order to get Ansible to access the VM, you will need to create a hosts or inventory file telling it what user, port, IP to access the VM. So use your favourite editor and make a file "hosts" with the following contents:Now, you can put this into your global /etc/ansible/hosts file, but having it locally gives you more options down the road. Consider, if you have all your hosts in the global file, and then you use the "hosts: all" command in an Ansible playbook, it will literally run against ALL the hosts defined in that global file. The downside of having separate hosts (or inventory) files is you do have to always use the "-i <filename>" running any Ansible command. Otherwise Ansible will default to only looking at hosts defined in the global hosts file.[vagranthost] 127.0.0.1 ansible_port=2200 ansible_user=vagrant ansible_password=vagrant
Note: Please do not put your password into your hosts file. I've done it here only because this is just a test VM's password.
Now that we have the hosts file, let's do a ping test:
Voila!$ ansible vagranthost -i hosts -m ping 127.0.0.1 | SUCCESS => { "changed": false, "ping": "pong" }
Simple Playbook
Let's make a simple playbook that does a ping, updates apt cache, and then installs nginx, copies over a hello world html file, and starts nginx. Again, use your favourite editor and create playbook.yaml with the following contents:
---
- hosts: vagranthost
tasks:
- name: test ping
ping:
- name: apt update
become: yes
apt: update_cache=yes
- name: install curl
become: yes
apt: name=curl state=latest
- name: install nginx
become: yes
apt: name=nginx state=latest
- name: start nginx
become: yes
service: name=nginx state=started
- name: copy index
become: yes
copy: src=hello.html dest=/usr/share/nginx/www/index.html
Let's also make hello.html in this same directory:<html> <body> <h1>Hello world from inside the vagrant vm!</h1> </body> </html>
Run the Playbook!
Moment of truth, let's run this against our VM:$ ansible-playbook -i hosts playbook.yaml PLAY [vagranthost] ************************************************************* TASK [setup] ******************************************************************* ok: [127.0.0.1] TASK [test ping] *************************************************************** ok: [127.0.0.1] TASK [apt update] ************************************************************** ok: [127.0.0.1] TASK [install curl] ************************************************************ changed: [127.0.0.1] TASK [install nginx] *********************************************************** changed: [127.0.0.1] TASK [start nginx] ************************************************************* changed: [127.0.0.1] TASK [copy index] ************************************************************** changed: [127.0.0.1] PLAY RECAP ********************************************************************* 127.0.0.1 : ok=6 changed=4 unreachable=0 failed=0
Let's check that nginx is actually started and serving the hello world homepage by using curl.
That's nice, but how do we access this nginx server hosted inside the VM? Simple, let's make Vagrant forward that port.$ ansible vagranthost -i hosts -m shell -a "curl -s http://127.0.0.1" 127.0.0.1 | SUCCESS | rc=0
Edit Vagrantfile and add Ansible playbook and port forward
You can put this anywhere in between "Vagrant.configure .... end".config.vm.network :forwarded_port, guest: 80, host: 12345
Now do a vagrant reload to restart the VM. After the VM restarts, you can see the hello world page from your localhost by visiting:
Try visiting http://localhost:12345 from your browser, hurray!$ curl -s http://localhost:12345 <html> <body> <h1>Hello world from inside the vagrant vm!</h1> </body> </html>
Even faster way, using Vagrant Provisioning
So far, we've set up this VM by using Ansible directly. But Vagrant actually can do much of this behind the scenes. Add the following to your Vagrantfile, again you can put this anywhere in between "Vagrant.configure .... end".Also change the playbook.yaml's hosts value from vagranthost to all:config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yaml" end
$ head playbook.yaml
---
- hosts: all
tasks:
- name: test ping
ping:
- name: apt update
become: yes
apt: update_cache=yes
Destroy the old VM:
$ vagrant destroy -f
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Now, when you ask Vagrant to up the machine, it will also run the Ansible playbook!
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: test_default_1473218743683_49067
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 (guest) => 12345 (host) (adapter 1)
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders...
default: /vagrant => /tmp/test
==> default: Running provisioner: ansible...
default: Running ansible-playbook...
PLAY [all] *********************************************************************
TASK [setup] *******************************************************************
ok: [default]
TASK [test ping] ***************************************************************
ok: [default]
TASK [apt update] **************************************************************
ok: [default]
TASK [install curl] ************************************************************
changed: [default]
TASK [install nginx] ***********************************************************
TASK [start nginx] *************************************************************
changed: [default]
TASK [copy index] **************************************************************
changed: [default]
PLAY RECAP *********************************************************************
default : ok=7 changed=4 unreachable=0 failed=0
Tada! Great success!You don't have actually to destroy the VM actually, you can run vagrant provision at any time, and as many times as you want.
$ vagrant provision ==> default: Running provisioner: ansible... default: Running ansible-playbook... PLAY [all] ********************************************************************* TASK [setup] ******************************************************************* ok: [default] TASK [test ping] *************************************************************** ok: [default] TASK [apt update] ************************************************************** ok: [default] TASK [install curl] ************************************************************ ok: [default] TASK [install nginx] *********************************************************** ok: [default] TASK [start nginx] ************************************************************* ok: [default] TASK [copy index] ************************************************************** ok: [default] PLAY RECAP ********************************************************************* default : ok=7 changed=0 unreachable=0 failed=0
Final Tips and Lessons Learned
- You can always use "-vvvv" in an Ansible command to get really really verbose debug output to see behind the scenes what is happening.
- The Ansible commands "become_user" and "become_method" don't do anything unless you have "become: yes" in the playbook (either that task, or globally)!
- Some Ansible commands are not backward compatible, for the many tutorials on the web, always note the version of Ansible they are running. The above is for Ansible v2.1.1.0, Vagrant 1.8.5, Virtualbox 4.3.36_Ubuntur105129 on Ubuntu 14.04.
- Ansible and Vagrant are awesome and very powerful, but there are a lot of growing pains and the devil is always in the details. I hope this entry has helped you in some small way, cheers!
Labels:
ansible,
tutorial,
ubuntu,
vagrant,
virtualbox,
vm provisioning
Saturday, 14 May 2016
Volkswagen, do you get customer service at all?
In the summer of 2015 my husband and I bought a certified 2012 VW Golf TDI. It is great on gas, and has lots of torque which makes it fun to drive, not to mention it is very practical and can hull a tonne of stuff. Then in the fall of 2015, the VW Dieselgate happened. In the following months, my coworkers made fun of me and accused me of being a planet hater and a squirel killer, because of my VW TDI's terrible terrible emission lies.
Like many unfortunate TDI owners, I was waiting to see what VW was going to do with our now unresellable and potentially uncertifiable cars.
Sometime in the Winter of 2015, I get a letter from my VW dealership, "You've been specially selected to receive a $1000 credit at this particular VW dealership!" Wow, how nice of them I thought. I can get at least get some winter tires for free I guess. Then I read the fine print, which told me that I can only use 10% of this card at a time towards my bill at the dealership. So if I spend $1000, I'd get $100 off, and have to pay $900 out of pocket. That means in order to get the full amount of credit on this card, I'd have to spend $9000 at this dealership! Wow, what a great deal! Thanks VW!
By the time I got this offer, I'd already heard of rumours of US TDI owners may be getting $5K back and what not. So when I got this offer and saw the deal it presented us, I was pretty disgusted. I thought VW Canada was really screwing us over on this one. But the Internet didn't explode with anger, so I soon realized this must have been just my particular VW dealership trying to make me feel better. Haha, with an offer that good, I wish they didn't "specially" select me at all!
Then, about a month ago, I got the official VW Canada offer, $500 credit for use at any VW dealership, and $500 on a prepaid credit card. Alright, it isn't $5K, but I guess it's better than nothing. I signed up for it online, filled in my VIN, the car's mileage, etc.
I receive the credit package in the mail some days later, and once again, there is some fine print.
This time it says you have to bring these cards in to the dealership to get them activated (why?!?) and you must bring the title, proof of registration or lease agreement. I thought, yeah but this dealership is just around the corner from me, I bought the car from them. They have me in their system, they know who I am, I think it'll be fine, they don't really need all those things. That's probably just in case you go to some random VW dealership. I'll just drive in and activate the cards. Now the reason I don't have things like the title/registration with me is because the VW is actually my husband's primary car, so the title is in the car and not in my hands.
I drive to the dealership today, thinking it'll be easy. They can just look me up in their system, I was happy to provide my driver's license to prove my identity.
The place is pretty empty, only one representative at the customer counter. Okay, he asks me how he can help me. I tell him I am there to activate the cards. He says okay, show me the blah blah blah documents. I tell him I don't have them with me, I say you have the information in your system, and you can just look me up. He says no, in fact, they need to see the car, verify the VIN, check the mileage, etc. I am like, I already told you the mileage when I filled in the online form, and check the VIN? What for? I bought the car here, you know who I am, I am in your system, the car, the VIN, everything. No maam, there are certain rules to this offer, and you have to show the documents. I ask, can my husband come in and do it, since he is the primary driver of the VW? Nop, he cannot, because I signed up for the offer (cause my husband could care less about this stuff!)
Ugh... thank you VW for making this potentially good will buying offer, now a PAIN IN THE ASS. Oh yeah, I told the service rep this, and he throws back, in the coldest, least interested manner, "I am sorry if you feel that way". Yup, I am sorry too, sorry I ever bought a VW.
You know VW, I can apply for a platinum credit card online, without ever having to drive anywhere, and the cards will show up at my door, and I can call a number, and activate it over the phone. Why in the world do I need to physically go into the dealership when they already have my information?
Volkswagen Canada, what is it you are trying to do with this credit offer? Are you trying to get some good will with your customers? Or are you trying to piss them off even further? Because you are certainly achieving your goals on the latter.
Like many unfortunate TDI owners, I was waiting to see what VW was going to do with our now unresellable and potentially uncertifiable cars.
Sometime in the Winter of 2015, I get a letter from my VW dealership, "You've been specially selected to receive a $1000 credit at this particular VW dealership!" Wow, how nice of them I thought. I can get at least get some winter tires for free I guess. Then I read the fine print, which told me that I can only use 10% of this card at a time towards my bill at the dealership. So if I spend $1000, I'd get $100 off, and have to pay $900 out of pocket. That means in order to get the full amount of credit on this card, I'd have to spend $9000 at this dealership! Wow, what a great deal! Thanks VW!
By the time I got this offer, I'd already heard of rumours of US TDI owners may be getting $5K back and what not. So when I got this offer and saw the deal it presented us, I was pretty disgusted. I thought VW Canada was really screwing us over on this one. But the Internet didn't explode with anger, so I soon realized this must have been just my particular VW dealership trying to make me feel better. Haha, with an offer that good, I wish they didn't "specially" select me at all!
Then, about a month ago, I got the official VW Canada offer, $500 credit for use at any VW dealership, and $500 on a prepaid credit card. Alright, it isn't $5K, but I guess it's better than nothing. I signed up for it online, filled in my VIN, the car's mileage, etc.
I receive the credit package in the mail some days later, and once again, there is some fine print.
This time it says you have to bring these cards in to the dealership to get them activated (why?!?) and you must bring the title, proof of registration or lease agreement. I thought, yeah but this dealership is just around the corner from me, I bought the car from them. They have me in their system, they know who I am, I think it'll be fine, they don't really need all those things. That's probably just in case you go to some random VW dealership. I'll just drive in and activate the cards. Now the reason I don't have things like the title/registration with me is because the VW is actually my husband's primary car, so the title is in the car and not in my hands.
I drive to the dealership today, thinking it'll be easy. They can just look me up in their system, I was happy to provide my driver's license to prove my identity.
The place is pretty empty, only one representative at the customer counter. Okay, he asks me how he can help me. I tell him I am there to activate the cards. He says okay, show me the blah blah blah documents. I tell him I don't have them with me, I say you have the information in your system, and you can just look me up. He says no, in fact, they need to see the car, verify the VIN, check the mileage, etc. I am like, I already told you the mileage when I filled in the online form, and check the VIN? What for? I bought the car here, you know who I am, I am in your system, the car, the VIN, everything. No maam, there are certain rules to this offer, and you have to show the documents. I ask, can my husband come in and do it, since he is the primary driver of the VW? Nop, he cannot, because I signed up for the offer (cause my husband could care less about this stuff!)
Ugh... thank you VW for making this potentially good will buying offer, now a PAIN IN THE ASS. Oh yeah, I told the service rep this, and he throws back, in the coldest, least interested manner, "I am sorry if you feel that way". Yup, I am sorry too, sorry I ever bought a VW.
You know VW, I can apply for a platinum credit card online, without ever having to drive anywhere, and the cards will show up at my door, and I can call a number, and activate it over the phone. Why in the world do I need to physically go into the dealership when they already have my information?
Volkswagen Canada, what is it you are trying to do with this credit offer? Are you trying to get some good will with your customers? Or are you trying to piss them off even further? Because you are certainly achieving your goals on the latter.
Labels:
bad customer service,
customer service,
dieselgate,
good will,
tdi,
volkswagen,
vw,
vw canada,
vw credit offer,
vw dealership
Monday, 6 July 2015
Ready for the Pan Am Games
It's great to see the number of radio interviews, articles, and TV appearances about our Pan Ams Shooting athletes in the media these days. I wish the media cared this much about our beloved sport outside of a major Games. Regardless, I want to offer some of my experiences that, hopefully, will help you attain your highest level of performance at the upcoming competition.
Shoot for yourself
In Canada, shooting is truly an amateur sport. You are self funded, you work a 9-5 job, you train in your spare time for the love of the sport. Just because you are heading into a Games doesn't change that. Don't let the media put any additional burdens on you. You shoot now, and always, for self improvement: to be the best shooter you can be.
Have a plan, be ready for anything
With a few shots to go in the 2003 Pan Am finals, on my first year on the National Team, I suddenly realized in those few seconds between shots that I was doing well, and that I could earn a quota spot for the 2004 Athens Olympics. Guess what? I didn't make it, my focus moved away from shooting and my mind wondered down the path of "what ifs".
Entering the finals in 2007 Pan Ams, I knew how strong the shooters on the line with me were. I just wanted to do my best and keep up with the pack. I absolutely did not allow myself to think about anything other than shooting the next shot. I kept myself occupied and distracted from the score using whatever methods possible, visualizing how I wanted the front sight, singing to myself, closing my eyes except when aiming, chanting a Buddhist rhyme, whatever it took to keep the focus on shooting. What happened? I won the Gold and earned a quota spot for the Beijing Olympics.
What's the difference? I wasn't ready to win in 2003. I didn't have a plan of what to do if I was doing really well. In contrast, in 2007, I knew what I had to do. I knew what going down the "what ifs" path would lead me, so I used all my energy to stay in the moment and focus on shooting the next shot.
So, do you have a plan for what to do when things are going well? Do you have a plan for what to do when things aren't going their best?
Best of the day
As with any competition, it is always the best of the day. Maybe you feel like you are not having your best performance; but, what you don't know is, others may not be having a PB day either. You are a shooter: you do the shooting. Let the bean counters worry about the score. Do what you've always done, concentrate on your lane, shoot one shot at a time.
Manage your energy
As exciting as a multi-event Games experience is, it can be exhausting. I think many of us shooters have solitary personalities and enjoy the quietness of our own space and thoughts. That can be difficult to find at a Games. This is especially true since this time the Games are at home. There will be many more demands from friends, family, media etc. All of these groups will want your attention and your energy.
It can be especially difficult to manage family or close friends. While you are a seasoned competitive athlete, able to cope with competition stress, your family and friends most likely don't know how to deal with the added adrenaline and stress. Your goal at the Games is not to satisfy their needs. You must act according to your own needs and energy level, including saying no if needs be.
It is especially important for athletes competing later in the Games to manage their energy level effectively. Spending days shooting minimal training sessions and the rest of the time waiting in the village can be very challenging to manage. With excessive time the mind tends to wonder. I've seen many fall ill from something they ate, catch a cold, get intoxicated from too much partying, or otherwise not be at their physical and mental best when it finally came time to compete.
So what's your plan to fill the time between training and competition? Maybe bring some books? If you have a Muse, bring that and do some sessions to focus your mind. If not, that's okay: find a quiet spot, sit down and close your eyes. Do some deep belly breathing and focus on counting your out breaths. When you lose count, acknowledge it, and start back at 0. It's just like shooting, we are always starting at 0.
Manage your energy levels is key. Have fun, enjoy the whole Games experience, but know when you need to bow out and get some quiet time for yourself.
It's just one step
As amazing as it is to compete in a Major Games on home soil is, life will go on after the Games. Whether or not you shoot a PB, win a medal, or earn a quota spot, life will go on the day after. The earth will continue to spin, the sun come up and set, the summer breeze blow by and the fall leaves cover the roads. This competition is just one stepping stone along your path of becoming the best shooter you can be. So don't treat it as anything bigger than that: it is merely one step among many.
That turned out to be a lot longer than I expected, I hope you found some useful ideas in there. Good luck, and may all your shots be centres :-)
Subscribe to:
Posts (Atom)