ConVersion Version – The Daily WTF

Date:

Share:

Mads introduces today’s code sample with this line: ” this was before they used git to track changes”.

Note, this is not to say that they were using SVN, or Mercurial, or even Visual Source Safe. They were not using anything. How do I know?


public void fromHtmlToPdfOld(PrintlogEntry printlogEntry, byte[] inBytes, final OutputStream outPDF) throws IOException, ParseException
	{...}


public void fromHtmlToPdfNew(PrintlogEntry printlogEntry, byte[] inBytes, final OutputStream outPDF) throws IOException, ParseException
	{...}

Originally, the function was just called fromHtmlToPdf. Instead of updating the implementation, or using it as a wrapper to call the correct implementation, they renamed it to Old, added one named New, then let the compiler tell them where they needed to update the code to use the new implementation.

Mads adds: “And this is just one example in this code. This far, I have found 5 of these.”

[Advertisement]
ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.

Source link

Subscribe to our magazine

━ more like this

Escape the competition, with Peter Thiel

DARYL WOODSON: Speed is not manufactured by how fast the feet move, but how much force per step. REID HOFFMAN: That’s Darryl Woodson, a...

‘People Who Go In That Locker Room Come Out…Different,’ Jets Custodian Warns Aaron Glenn

EAST RUTHERFORD, NJ—Speaking grimly as he mopped the floor beneath flickering fluorescent lights, longtime MetLife Stadium custodian Keith Browning reportedly approached first year New...

18 Chic Pieces From Boden’s Autumn Edit—All Editor Approved

Humaa is the Junior Branded Content Editor at Who What Wear UK, where she specialises in paid-for and affiliate content across beauty and fashion....

Analog(ue) #227: It’s Gonna Go How It’s Gonna Go

#227: It's Gonna Go How It's Gonna Go July 7th, 2024 · 80 minutes Casey's back from California, and soon he'll be joining Myke in London! This episode of Analog(ue) is...

The blueprint for AI in support didn’t exist. Until now.

Rolling out an AI Agent doesn’t just change how your team works – it changes who your team is. That’s something we learned firsthand. Before...