Honestly, though, TV writing isn't written by the writer (in general). I mean, so-and-so may have the script credit of "written by", but, that's mostly meaningless in the TV world. At best, that writer is the one assigned to write the first draft of a script. But, often, the entire thing is re-written by committee with all the writers on staff together, in a conference room, going through the script line-by-line and page-by-page.
What usually happens is that a series is picked up for a certain number of episodes in a season. Say, 13 for the year. The writing staff is assembled, with a show runner and seven or eight other slotted writers (when I say slotted writers, a writing duo is counted as one writer. They work as a team, but are paid half-shares each and share half credit equally. They are noted with "&" between the names. When a script might share credits, such as: Written By Tom and **** & Harry (usually Tom on one line, then "and", then **** on a line, then "&" on a line, then Harry on a line) that means that Tom gets 50% of the pay and credit as one individual writer, and **** & Harry are a duo that split the rest 25-25). By WGA rules, one of 13 episodes and 2 of 22 are automatically farmed out to non-staff writers. This is for new writers writing on spec or otherwise not part of the staff.
Of the 12 episodes left, the showrunner will probably claim 3 "Written by"'s for himself, with his choice of which stories of the season he wants (the structure and plot of then entire season is laid out first (or, "broken") before any single script is written, so he knows which are the episodes he wants most to have his name on). The co-executive producers (probably 2 have that title) will get 2 scripts each, and each co-producer will get 1. So you've got the show runner, co-executive producer slot #1, co-executive producer slot #2, and co-producer slot #3 accounting for 8 of the 12 scripts, with four left for the remaining four slots, which range in title from 'producer' down to 'staff writer' and 'story editor'. They are basically getting the stories assigned in draft format, the show runner making all the picks, with your story editor getting the lamest story of the season all for himself.
Anyway, these are just handed out on personal politics and thank yous more than anything. Each writer does his first draft but there's no obligation to use it. It's all re-written by committee. Some showrunners do all the re-writing themselves, some let a co-executive producer run "the room" and manage things without him. But it's really hard to say who actually deserves the credit for any one script.
There's a great bit in Permanent Midnight, Jerry Stahl's memoir of being a Hollywood TV writer and drug junkie, where's he's farmed out one of the non-staff scripts for Northern Exposure, and spends his whole advance on heroin. So much so that he loses all track of time and never actually gets around to writing the script. Weeks fly by and he's too high to tell time. Finally, a PA knocks on his door to pick up the script he hasn't written, and he says "OK, just wait a sec" while he panics, closes the door on the kid, and hurries to his desk to start banging out some kind of script on the back of takeout menus. He turns over six soiled pages of dialogue, apologizes, and sinks back into his junkie hole. He gets full credit (and pay) for the script, of course, and his agent immediately sells him on another project. "He just wrote an episode of Northern Exposure!"
Directing is a little different in TV. The director does have a lot of influence, but, still, not that much as in features. Kevin Smith talks about this a lot now that he's guest-directing CW superhero shows like Supergirl. The job of a TV director is to match the tone of all the other episodes so that it's invisible (although, it isn't always, I used to have a pretty good eye for TV directors and could correctly identify who directed each episode of The West Wing by just watching the first few minutes and getting it right before the credit came up on screen). He does have some freedom for camera shots, and making things interesting, but, it's more to manage actors and be the leader of the team, rather than be an innovative creative person trying something new and different.