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, embarrasing 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.

That is rather helpful; it explains that the DataManager is merely a wrapper round a connection, and that it probably should be deleted from the project and simply replaced by an IDbConnection and a factory

Working on Google sign in API for one of my project which need to load one j query file called

https://apis.google.com/js/client:plusone.js

i copy this link send it to my co-worker by Skype, he copied and apply that code. Boom, g-sign in button do not click. the same code working fine on the test project that we have created but not on our main project.

Reason,
Skype see "client:plusone.js" and convert :P to and when same code goes to vs it leaves a blank space and copied like "client lusone.js". after spending some half an hour we finally got a working example of Google sign in.

Just in case the message gets removed from reddit again, I've decided to copy the text verbatim...

Hi fellows, I'm stuck I need to extract data, the code was send to me from the statistics department of Mexico I need to extract information from a webpage, it says is API information. I tried to copy and paste the code on Dev- C++ 4.9.9.2 and click on run but it says file not compiled, after that I save the file and still is the same. The information is about energy consumption. THANKS! <DATASET_BIINEGI xmlns="http://schemas.datacontract.org/2004/07/BIINEGI.Model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Data> <GeneralNote/> <GeneralSource> Secretaría de Energía. Balance nacional de energía. </GeneralSource> <Serie> <Obs> <CurrentValue>9250.67</CurrentValue> <NotesPeriod i:nil="true"/> <SourcesPeriod i:nil="true"/> <TimePeriod>2010</TimePeriod> <ValueStatus/> </Obs> </Serie> </Data> <MetaData> <CreationDate>13/07/2015 10:23:56 a.m.</CreationDate> <Freq>Anual</Freq> <Indicator>13241</Indicator> <LastUpdate>2012/08/27</LastUpdate> <Name>Total</Name> <NoOfDecimals>3</NoOfDecimals> <Unit>Petajoules</Unit> <Region>Nacional</Region> </MetaData> </DATASET_BIINEGI>

I intentionally kept the delightful formatting of the original.

"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.