user7795: Is f4 a good move here?
 [Title ""] 
 [SetUp "1"]
 [FEN "r2qk1nr/pbp3pp/1p2p/4b/4P/2N/PPP2PPP/R1BQ1RK1 w - - 0 1"]

 1. f4

On the one hand, many times you would move like this way to attack some pieces - sometimes to f3 or to f4. On the other hand, I feel that I leave open my king.
What are the disadvantages/advantages of this move?

user2001: Moving f2-f4 will make your King weaker since it opens g1-a7 diagonal as well as weakening control over squares e3 and g3. Advantage of making f2-f4 is that you increase control in center by controlling e5 square, obtain f4-f5 push and take g5 square into control for your Knights.
In your position:
 [Title ""] 
 [SetUp "1"]
 [FEN "r2qk1nr/pbp3pp/1p2p/4b/4P/2N/PPP2PPP/R1BQ1RK1 w - - 0 1"]

 1. Qh5+

Qd1-h5+ is better, picking up the Bishop on e5.
Further, since black's King is weaker than yours due to missing f-pawn, there is no need for you to weaken your King. Instead, you should keep Queens on board and attack using your pieces.

user4418: There are no advantages.
The really big disadvantage is that after:
1. f4 BxN
2. bxB QxQ
3. RxQ Bxe4
you are completely lost, a clear piece down with no compensation whereas after 
1. Qh5+ Kf8 
2. QxB
you would have been a pawn up with a much better position.

7795: <p>Is f4 a good move here?</p>

<pre><code> [Title ""] 
 [SetUp "1"]
 [FEN "r2qk1nr/pbp3pp/1p2p/4b/4P/2N/PPP2PPP/R1BQ1RK1 w - - 0 1"]

 1. f4
</code></pre>

<p>On the one hand, many times you would move like this way to attack some pieces - sometimes to <em>f3</em> or to <em>f4</em>. On the other hand, I feel that I leave open my king.</p>

<p>What are the disadvantages/advantages of this move?</p>
 2001: <p>Moving f2-f4 will make your King weaker since it opens g1-a7 diagonal as well as weakening control over squares e3 and g3. Advantage of making f2-f4 is that you increase control in center by controlling e5 square, obtain f4-f5 push and take g5 square into control for your Knights.</p>

<p>In your position:</p>

<pre><code> [Title ""] 
 [SetUp "1"]
 [FEN "r2qk1nr/pbp3pp/1p2p/4b/4P/2N/PPP2PPP/R1BQ1RK1 w - - 0 1"]

 1. Qh5+
</code></pre>

<p>Qd1-h5+ is better, picking up the Bishop on e5.</p>

<p>Further, since black's King is weaker than yours due to missing f-pawn, there is no need for you to weaken your King. Instead, you should keep Queens on board and attack using your pieces.</p>
 4418: <p>There are no advantages.</p>

<p>The really big disadvantage is that after:
1. f4 BxN
2. bxB QxQ
3. RxQ Bxe4
you are completely lost, a clear piece down with no compensation whereas after 
1. Qh5+ Kf8 
2. QxB
you would have been a pawn up with a much better position.</p>
