The Knicks entered 2015 having been swept during a three-game West Coast trip, part of an eventual 16-game losing streak that would define their inept season, which they finished at 17-65.  Almost 12 months later, the Knicks have developed into a much sounder unit — maybe not a team destined for the playoffs, but one that has energized its fan base and largely caused last season’s disaster to be forgotten.  Recently, though, as the team headed toward the end of this calendar year, bad habits resurfaced. The Knicks had lost four straight entering Tuesday’s game against the Detroit Pistons — one of three four-game losing streaks this season — and after starting the season 8-6, the team was 14-18.  “I know with a little bit of early success, the excitement has grown, and maybe the expectations have grown, but the reality is, we’re still very much a work in progress in terms of where we are right now,” Coach Derek Fisher said before the game. Then his team earned a 108-96 victory at Madison Square Garden.  Last season, on nights when Carmelo Anthony struggled early, as he did Tuesday, there were few options to keep the Knicks afloat; Jose Calderon, for instance, the team’s big off-season acquisition in 2014, played in only 42 games last season.  But even though these Knicks, for a second season trying to master the intricacies of the triangle offense, were again inaccurate at times against Detroit, they stayed competitive with precise shooting from Calderon, who scored 8 first-quarter points.  Before the game, Fisher addressed the absence of the team president, Phil Jackson, the foremost authority on the triangle offense, who was thought to be taking on a more public role this season. Fisher said there had been little change in their communication, but he vaguely indicated that more people within the organization were now involved in setting the Knicks on the proper course.  A more obvious key to the team’s turnaround has been improved bench play, with reserves like Kyle O’Quinn and Lance Thomas taking on increased roles. Before the game, Pistons Coach Stan Van Gundy called Thomas “one of the most improved players in the league.”  O’Quinn helped the Knicks pull ahead in the second quarter, scoring 10 points in the first half. Robin Lopez — another new addition who has been a steadying presence, if not a dazzling one, as the starting center — had perhaps his most complete half of the season, recording 8 points, 5 rebounds and 4 blocks. Lopez also neutralized Andre Drummond, one of the best interior forces in the N.B.A. this season, holding him to 4 points and 3 rebounds in the first half.  Lopez’s play overshadowed another quiet start from Kristaps Porzingis, who has seemed to regress since being named November’s Eastern Conference rookie of the month.  From Nov. 21 to Dec. 7, Porzingis scored at least 10 points in nine straight games, but he had failed to do so again in a second consecutive game until Tuesday night, when he finished with 10. Fisher has indicated that Porzingis needs to be more assertive, and his naïveté still showed at times in the first half.  Midway through the second quarter, as Porzingis faced Marcus Morris, he took two lethargic dribbles, pulled up and was stripped of the ball. A few possessions later, Porzingis was beaten on an entry pass and grabbed Drummond’s arm, drawing a foul and providing a 3-point-play opportunity. Drummond missed the free throw, but Porzingis was called for a lane violation.  Porzingis atoned in the second half, displaying more patience. In the third quarter, after scoring 4 quick points, Porzingis posted up Ersan Ilyasova and backed him down until finding a spot for an easy fadeaway jumper, finishing the play with a move reminiscent of Hakeem Olajuwon’s so-called dream shake. That gave the Knicks their largest lead to that point, 63-54.  Porzingis did not play in the fourth quarter, but the Knicks pulled away with more inspired play from their reserves. With an 85-79 lead, Thomas got loose on a fast break and avoided a defender by pirouetting in front of the basket for a layup. Two of the Knicks’ next three field goals came on thunderous dunks by Derrick Williams, including a reverse slam on a backdoor feed by Langston Galloway for a 93-83 advantage. Williams scored 16 of his 18 points in the quarter, sending the Knicks toward a positive conclusion to 2015.  “It’s always opportunity for growth in every year,” Fisher said. “You think about where we were January the first of 2015, and where we’ll be January the first of 2016 — I’d say we’ve grown. But I don’t think anybody’s ever tired of growing. Hopefully, 2016 will be more growth.”  Anthony, whom some fans singled out as a symbol of the Knicks’ inefficiencies earlier this year, scored a game-high 24 points. Afterward, he reflected on the past 363 days, often reiterating how much the team had matured.  “We came a long way,” Anthony said, smiling and drawing out the word “long.” “We came a long way, man. I try to forget about kind of what happened at the beginning of this year, this calendar year, and kind of just focus on right now, the present moment. But we’ve come a long way with just the additions that we made on this team, the type of team that we have.  “We’ve come a long way.”  A version of this article appears in print on December 30, 2015, on page B9 of the New York edition with the headline: ‘Work in Progress’ Knicks Beat Pistons to End Another Four-Game Skid. Order Reprints| Today's Paper|Subscribe
Carmelo Anthony scored 24 points, and Jose Calderon added 15 as the Knicks topped Detroit at Madison Square Garden on Tuesday night.