The Daily WTF
Juliano had this very non-WTF bit of PHP code: if (!$path) { //do stuff } else { //do other stuff } After another team member made a commit, however, the code turned into this: if (1 == 2) { //do stuff } else { //do other stuff } Now, generally, when I see 1 == 2 type expressions, I just assume that this is a templated, generated...
Gavin continues work on the old C++ app he inherited. Today we get a delightful smattering of bad choices. HRESULT CExAPI::GetPageCacheForFolder( IN CEntryID *p_cio_Folder, OUT CPageCache **pp_PC ) { CEntryID *p_cio_Local = new CEntryID( this, p_cio_Folder ); switch ( p_cio_Folder->m_uiType ) { case EID_TYPE_EMPTY: return S_OK;...
"The attached class connects to an Access database," writes Nicolai. That's always a good start for a WTF. Let's take a look. public class ResultLoader { private static Logger sysLog = Logger.getLogger(ResultLoader.class); private static String url = "somePath"; /** * get the ResultTable from the Access database * * @param tableName...
Tim Y. is on Fire with this burn. "Competing teams inside Google? Or just the AI recognizing marketing tactics?" Not to be outdone, the other big search conglomerate comes in for some anonymous criticism from a poster who says their name is "irrelevant". "I was suspecting for some time that bing is giving less and less reward points....
While Java didn't invent putting a toString method in the base class of every object, it certainly made it mainstream. The nice thing about the method is that it allows you to turn any object into a string, though it's up to the implementor to decide what a good string representation is. But what if you want to ensure that the object you're handed is...
Comments explain a lot about our code. And sometimes, the comments explain more than the code itself. Alastair found this lovely comment, which demonstrates an excellent, if confusing, understanding of a boolean "or": // Only add delivery option if it has no weight bands or at least one weight band. The developer has left the company, so no one...
خوراک خبری خود را بسازید
آیا آماده هستید تا آن را اجرا کنید؟
بدون نیاز به کارت اعتباری، یک دوره آزمایشی 14 روزه را شروع کنید.