1. ## Turing Machine

How to process the function
Code:
first : {a,b}^*
which determines the first symbol of words in the language L = {a,b}^* ?

2. You could use an online Java Turing machine simulator, like this or this. The first one, unfortunately, does not show the current state during execution, so one has to keep track of it manually.

Speaking of Turing machines simulators, I am surprised I could not find a more professional-looking one...

3. I would like to understand what I have to do to handle this function

It would be something like this:

q0 => (I,I,R) to q0
q0 => (P,P,L) to q1
q1 => (I,I,R) to q2
q2 => (P,P,L) to q1
q0 => (a,a,R) ???
q0 => (b,b,R) ???

I is symbol initial tape
P is symbol white