Click here to Skip to main content
16,021,211 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: WTF-8 Pin
PIEBALDconsult19-Jun-24 3:12
mvePIEBALDconsult19-Jun-24 3:12 
General.NET Core & (auto)binding: Is it a bug? Pin
raddevus16-Jun-24 5:15
mvaraddevus16-Jun-24 5:15 
GeneralRe: .NET Core & (auto)binding: Is it a bug? Pin
0x01AA16-Jun-24 5:58
mve0x01AA16-Jun-24 5:58 
GeneralRe: .NET Core & (auto)binding: Is it a bug? Pin
raddevus16-Jun-24 6:52
mvaraddevus16-Jun-24 6:52 
GeneralRe: .NET Core & (auto)binding: Is it a bug? Pin
Richard Deeming16-Jun-24 21:52
mveRichard Deeming16-Jun-24 21:52 
GeneralRe: .NET Core & (auto)binding: Is it a bug? Pin
raddevus17-Jun-24 2:10
mvaraddevus17-Jun-24 2:10 
GeneralRe: .NET Core & (auto)binding: Is it a bug? Pin
jochance18-Jun-24 3:05
jochance18-Jun-24 3:05 
GeneralUntested Backups with IonicZip Pin
kmoorevs2-Jun-24 5:30
kmoorevs2-Jun-24 5:30 
Over a decade ago, I wrote a SQL Server backup/rotation manager. Backups are zipped and password protected using IonicZip, then copied to a local repository on another disk, and optionally pushed out to an FTP resource. This is handy for when I find myself working on the laptop away from the home/office. This system has been used on multiple servers without issues.

A couple of weeks ago, I started using it on a newish Azure VM for one of our latest projects to manage 2 customer databases. It appeared to be working fine...backups/zips/copies all getting created with no errors...or so I thought. Yesterday, I was away from the office and decided to grab the previous day's backups and restore them on my laptop. Using 7-zip, the zips extracted, but with a CRC error detected. Confused | :confused: Of course, the backups were useless. Native windows zip refused to extract anything, failing with a generic error message. 'unrecognized error'. WTF | :WTF: Every backup from that system was corrupted! OMG | :OMG:

Backups from the other 2 systems are/were fine...one of the other systems is also an Azure VM with practically identical setups and has been working fine for years. Confused | :confused:

I'll skip the troubleshooting details and get to the fix. IonicZip has a property that I had never heard of before, and which until now had not been important: ParallelDeflateThreshold which needed to be set to -1. Doing so fixed the problem. If I understand correctly, IonicZip has a known problem with files that compress to < 4MB. In my case, mine were slightly over 2MB compressed. All of my other backups are much larger which is perhaps the reason why I've never seen this problem before.

At any rate, I wanted to post this here in case someone else here is using this component and not aware of this issue. The bottom line is, test your backups! Laugh | :laugh: Have a great weekend! Smile | :)
"Go forth into the source" - Neal Morse
"Hope is contagious"

GeneralRe: Untested Backups with IonicZip Pin
MarkTJohnson4-Jun-24 5:19
professionalMarkTJohnson4-Jun-24 5:19 
GeneralRe: Untested Backups with IonicZip Pin
kmoorevs4-Jun-24 6:49
kmoorevs4-Jun-24 6:49 
GeneralLooking at the very topmost line ... Pin
trønderen1-Jun-24 11:21
trønderen1-Jun-24 11:21 
GeneralRe: Looking at the very topmost line ... Pin
Greg Utas1-Jun-24 16:42
professionalGreg Utas1-Jun-24 16:42 
GeneralRe: Looking at the very topmost line ... Pin
Daniel Pfeffer1-Jun-24 19:57
professionalDaniel Pfeffer1-Jun-24 19:57 
GeneralRe: Looking at the very topmost line ... Pin
TNCaver4-Jun-24 5:58
TNCaver4-Jun-24 5:58 
GeneralRe: Looking at the very topmost line ... Pin
trønderen4-Jun-24 14:37
trønderen4-Jun-24 14:37 
GeneralRe: Looking at the very topmost line ... Pin
Daniel Pfeffer4-Jun-24 20:19
professionalDaniel Pfeffer4-Jun-24 20:19 
GeneralRe: Looking at the very topmost line ... Pin
trønderen5-Jun-24 3:21
trønderen5-Jun-24 3:21 
GeneralRe: Looking at the very topmost line ... Pin
Daniel Pfeffer5-Jun-24 8:29
professionalDaniel Pfeffer5-Jun-24 8:29 
GeneralRe: Looking at the very topmost line ... Pin
jochance6-Jun-24 6:31
jochance6-Jun-24 6:31 
GeneralRe: Looking at the very topmost line ... Pin
Richard Andrew x6416-Jun-24 8:12
professionalRichard Andrew x6416-Jun-24 8:12 
GeneralBlessed endian mismatches collide with progress Pin
honey the codewitch1-Jun-24 7:30
mvahoney the codewitch1-Jun-24 7:30 
GeneralRe: Blessed endian mismatches collide with progress Pin
Ron Anders1-Jun-24 8:26
Ron Anders1-Jun-24 8:26 
JokeRe: Blessed endian mismatches collide with progress Pin
PIEBALDconsult1-Jun-24 9:22
mvePIEBALDconsult1-Jun-24 9:22 
GeneralRe: Blessed endian mismatches collide with progress Pin
trønderen1-Jun-24 11:13
trønderen1-Jun-24 11:13 
GeneralRe: Blessed endian mismatches collide with progress Pin
honey the codewitch1-Jun-24 11:33
mvahoney the codewitch1-Jun-24 11:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.