Monday, April 18, 2016

Physique Swimming: Lesson 6

We had a pretty big group today! Got moved to beginners level 2 with Fru. We worked on ...

  • Exhaling. Breathing under water. Turns out, most of us were breathing out way too quickly and we were NOT taking very relaxed breaths. 
  • Streamline arms. My head was not tucked in tnough, my arms were too far out front, and my wrist point TOO far down so I have trouble staying above water. 
  • Backfloats. Here's the trick to head positioning: face the ceiling and DON'T move your head. Kick one feet up when your shoulders and head are in the water then kick the other feet up. Keep your belly up. Don't arch your back too much or you'll start drinking water. 
  • Deep end jumping. Jump in, then breathe out while kicking vertically. 
Feedback:
  • She said my kicks are small and fast. Good for racing. However, she thinks I'm kicking slightly from my knees so it's better to practice wider kicks.Weird, I feel like I'm getting contradicting feedback about my kick. Anthony thinks my kick is awesome, but she thinks I'm still kicking from my knees. 
  • There should be no gap between my arm and head when I'm in streamline. Tuck that shit together.
    • Make sure one hand is directly on top of the other. 
  • Relax. Relax. Relax.
Jospeh says that I've improved a lot. I feel it! I'm still struggling with sidekicks and I can still feel tension here and there but I do feel like I'm making progress so that feels good. I'll keep working on my kicks and breathing in the pool this week.

Sunday, April 17, 2016

Why won't you take my cookie? Cover domain and public suffixes ...

Recently at work we were have issues with cookies while trying to setting up docker for a bunch of apps. 

We had five applications running on five docker containers. 

Container A: authentication back-end
Container B: authentication front-end 
Container C: app front-end
Container D: app back-end
Container E: nginx

We were expecting this flow:
  1. Navigate to docker.local 
  2. Authentication front-end loads on client with signup page
  3. Fill out signup form and submit
  4. Authentication back-end creates account, returns success response and sets a session cookie on client
  5. Client redirects to app front-end
  6. App front-end does a GET on a protected resource in app back-end, passes session cookie along
  7. App back-end authenticates with authentication back-end using session cookie from request and returns the protected resource
  8. App front-end loads the resource and renders the page
We ran into problems at step #4. The session cookie was never being set. We were not using a secure cookie or a httponly cookie. Every time we submitted the form, we got a 200 response from the authentication back-end server with a Set-Cookie header that attempted to set a cookie named session_id. However, every time we logged the client cookie information after the server response, it was missing the session_id cookie. 

After reading more about cookies, we learned that the problem had to do with the value of the cookie domain attribute value (also known as the cover domain). In our case, the cookies cover domain was set to .local. The purpose of the cover domain is security - it tells the browser client whether or not to set the cookie as well as whether it should send the cookie. The basic rule of thumb is that if the client domain matches the cover domain or is a subdomain of the cover domain, the cookie will be set / sent. 

The exception to this rule are public suffixes.

For most modern browsers, any top level domain is considered a public suffix. A public suffix is a domain that anyone can register a domain with (there is an official list). For example, ".com" is considered a public suffix. You can have "bob.com" and I can have "alan.com". Since all subdomain of a public suffix have different owners, it's not safe for cookies set by "bob.com" to be passed along to "alan.com". 

Since, ".local" is a top level domain, it is considered a public suffix. Therefore, the cookie is not set! We changed it to "docker.local" and that solved our issue. 


Monday, April 11, 2016

What's the Tribeca Film Festival?

Every year I'm in New York I seem to hear about the Tribeca Film Festival. For a long time I just assumed that this was some event that was only interesting to film makers or film critics and not ordinary movie watchers like myself. I heard about it again early this year and decided to challenge that assumption by doing a bit of research into what it is and then taking part in it. Who knows? It could be fun.

My first stop was the website. It looks great but it didn't seem like it was designed with the "uninitiated" in mind. There wasn't even a button to some "about" page. So I looked at Wikipedia. 

"To enable the international film community and the general public to experience the power of film by redefining the film festival experience."

I had to really unpack that.

A festival is an organized series of events over some period of time to celebrate something. I learned that a film festival is a festival where the series of events are film screenings in multiple theaters and its celebration are the many aspects of film making and film watching. 

There are many different film festivals that take place all over the world (Sundance Film Festival, Venice Film Festival). Aside from the obvious difference of where these screenings take place and over what period of time, they can also differ based on the kinds of films they choose to screen. In some festivals, there may be a special focus on a particular genre or film maker. 

The films that are screened are independent films. That means these films are all produced outside of the major studio system. In other words, they are not created by the companies that create blockbuster movies like Spiderman or big name directors like Steven Spielberg. It's likely you've never heard of these films or film makers before if you're not part of the film making community.

The Tribeca Film Festival is held in Tribeca, NYC and the focus, like any other film festival, is on independent films (documentaries, fiction films, and short films). There is no particular film theme. In addition to the film screenings, the festival also puts on panel discussions with well known actors and actresses (this upcoming one features a panel discussion with Ethan Hawke), live music and comedy performances, interactive activities, and even major studio premieres (Star Wars: Attack of the Clones).

Questions about the upcoming TFF

When is it?

This year, the TFF runs from April 13-24.

How do you participate? 

The TFF is run as a business by a company called Tribeca Enterprises. None of these events are free. You have to get tickets for them. You can get two types of tickets: a festival pass or individual tickets. A festival pass costs between $550 - $1250. The $1250 pass pretty much gives you access to everything. Your other option is to buy individual tickets. That's a much better option if you only want to buy tickets to a few events. For example, maybe you only want to see one panel discussion and two films. That will probably be less than $100. 

Where do the events take place?

The films are all shown in select theatres in the Tribeca area. You can see the specific location on the actual event page. You can get more information here.

My Plans

I plan on checking out 2-3 events at this years festival with my girlfriend this year. I'll probably look at one or two films and maybe a couple of non-film watching activities. The festival officially begins tomorrow so I better start looking! I hope the tickets don't get sold out.

Physique Swimming: Lesson 5

I worked with Anthony again today!


Skills


Fetal position float

  • This is the same exercise we did last week. You inhale, then you enter the water slowly into a fetal position. Exhale the whole time and if you're sinking just allow yourself to sink until you're almost out of air.

Backstroke kick

  • Keep your neck back and stomach up. Kick and remember not to bend your knees. We did this with a kick board.
Streamline with one arm stroke
  • Using a kickboard, we do streamline and then perform a stroke with one arm. Then we take a breath by tilting our head up and then perform the other stroke with the other hand. 
    • The issue I had with this is I felt like I wasn't going in a straightline. I felt very unbalanced. Also, I felt like I was taking smaller and smaller breaths each time. 
Anthony recommended that I work on two things:
  • To maintain balance, pull your arm towards your chest but don't let it cross the mid-line (go diagonal) or else you'll start moving in a zig-zag (could be what I was doing). 
  • Remember to exhale and then when your head is out to take a big breath. Don't hold your breath and remember to take as big of an exhale you can. 
Other than those things, he said that my kicks look great (I was doing a good job not bending my knees and kicking from the hip). Next week, he said I'll be ready for beginners level 2!

Next steps:
  • Use a pullbuoy to practice your strokes (http://www.swimsmooth.com/catch.html)
    • https://www.youtube.com/watch?v=ZTQpF_mmg44
    • Early vertical forearm. Imagine your arms pushing against a block that's sitting at eye level!
  • Relaxation exercises. I still feel a bit of tension when I'm in the water. I need to stop holding my breath!



Physique Swimming: Lesson 4

We first started with bubbles, Joseph has us do streamline and then we got split into two groups: beginners 1 and beginners 2. I stayed in beginner 1 with and got a new instructor, Anthony.

My biggest pain point: staying buoyant

We worked on floating.
  • Fetal position, rest until still. rotate to right using left arm. Rotate toe left. Go right then stop and go other direction. 
  • Rest and then slowly open body to find natural buoyancy
  • My legs sink because ... too much muscle mass in the legs
I was actually able to float! Even though my legs were going down. I just had to relax, keep my belly up (engage the core) and remember to breath but don't breathe everything out. 

We then did streamline on our backs. I drank water the first two times.
  • Keep your arm above water. I had it too much in the water and this created an arch that pushed my head too far into the water. 
We then did an exercise that my girlfriend taught me. One hand on board, swim. Pull with one arm. Breath. Pull with other arm. Breath (head tilt up). I did it pretty well the first time but it got harder and harder over time because:

1) I was pushing my arms DOWN which caused my legs to sink
2) I was running out of air completely so started to sink
3) My sinking legs caused me to tilt my head higher to get water. Tilting higher caused body to sink even more. Vicious cycle.

Both of my instructors said that I'm still muscling my way through the water. I'm working too hard. Need to work with the water / buoyancy. 

I need to work on:

Staying Afloat


Kicking
  • Perform ankle stretches with Yoga Block (2 sets of 15 seconds at night and 2 sets in morning)
  • Visualize quarter in butt (kick from hips)
    • "A good way to think about kicking from your hips is to squeeze your bum when you kick. It's a bit crude, but imagine you have a large coin between your butt cheeks and you're trying to hold it there whilst you swim. Keep your knees relaxed and drive the kick from the hips."
  • toes. Use fins and remember to keep them pointed. 
  • Kick off the wall drill. Torpedo off and go as far as possible with hands out.
  • More information: http://www.swimsmooth.com/kick.html
Getting more relaxed through Breathing:
  • Not relaxed. Practice sink downs (http://www.swimsmooth.com/exhalation.html).
    • Exhale immediately
    • Exhale completely and pay attention to your threshold. 

Physique Swimming: Lesson 2

Today we ...


We started by blowing bubbles. Then we moved on to everyone doing a single glide as far as possible using one breath. Then we swam streamline with a single breath to the deep end.

On Kicking

He said the only issue with my kicking is that they were too wide and too slow. Better faster and closer together than slow and far apart.

Skills


Sidekick

We first did single arm pull with water dumbbells and then we came back and did side kicks with the dumbbells. I had a really hard time balancing. He said I wasn't relaxed, that my kicking was not balanced (did not kick towards back), my head wasn't resting, and my other arm was too far on my back so it was tipping me on my back.

I also asked another dude if it's true that I can't float. He said that it was just more difficult because I have to learn a diff technique like arching my back more.  In other words, I may need to adjust my technique but it's not hopeless for me.

Freestyle

This is the combination of streamlining and breathing with a sidekick. You begin swimming in streamline with your legs kicking, then you rotate your body into a sidekick in order to breath and then back into streamline.

Lessons Learned

* I've been getting some help from my girlfriend and she's been hugely helpful. She says that my arms should be slicing the water. No dead fish action b.c that creates drag. Your elbows should go up high and then your hand and form arms should be aligned going straight into the water.
* I swim like I'm holding a quarter b/w my butt-crack. I should relax my hip flexors.
* Start rolling the second you start pulling and don't be afraid to stay there for a bit for air.

Resources



Physique Swimming: Lesson 1

I had my first swim lesson with Joseph at Physique Swimming. It was a group of four. Me and three girls. We started off by standing near the shallow end of the pool (3 feet deep) and he had us swim as far as we could. The girls all looked a little hesitant because none of them actually knew how to swim. I immediately started making my way to the other end (in ugly fashion) and they all looked at me with mouths gaping like what are you doing here dude. I told them that I'm not much more advanced than they are because my form is awful and I can't swim very far at all before I start to drop / sink like a stone.

Skills


Bubbles

You just take a normal breath and then put your head under the water and immediately starting exhaling throw your mouth. Pretend like you're just doing a normal exhalation - only this is underwater.

Streamline

This is where we put our backs to the wall with one foot bent and pressed against the wall. We raised our arms high and behind our heads with one hand over the other. Like you're hanging from a bar. Then we put our heads into the water and then kicked of the wall and exhaled for as long as we could while kicking.

This was when I first discovered that me and another girl possessed a unique kind of kick known as the bicycle kick. we were both bending our knees too much and flexed rather than pointed our feet. I stopped doing the bicycle kick immediately. The key is to initiate the kick from the hips rather than the ankles. When I resurfaced, they were all giggling because apparently I splashed water all over everyone as I went. He told me I had a very powerful kick and I needed to take it down a notch.

I did this like 4 times and my kick was still too strong. He said it was a sign that my legs were too stiff. I needed to let them bend but only slightly. I also had to make sure my feet didn't come out of the water completely - only my ankles should. There shouldn't be too much splashing.

We did a few variations of this. The next one was with a board. We held on to a board and then kicked while trying to keep the board up. I had trouble keeping it up and he said it was because I wasn't reaching with my arms.

We then did it with the board but with our heads down, almost tucking into our chin. This really helped me with my kick because when I had my head out it was too far out and I had a lot of trouble kicking from the hip. Then we did it without the board and kicked as far as possible. Finally, we went to the center and did our best to streamline towards the deep end (6 feet).

Streamline has to do with how your arms are folded.

Lessons learned:
  • Exhale until you're almost out of breath but not completely out when doing bubbles. Just like normal breathing.
  • Initiate the kick from your hips. Don't do it too hard - try not to kick your feet outside of the water completely only the ankles should break the surface. 
  • Point your toes!
  • Keep your head down, hands behind the head, and tucked behind your ears while streamlining. This helps your legs go up. 
  • My girlfriend is a fantastic swimmer and advised me to keep my legs above the surface and paddle my feet like flippers.
Resources: