The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » code (RSS)
  • 500 KB saved is 500 KB earned

    Now that's not really a wtf. That's actually a pretty clever way of reducing memory allocation calls, which, for a game, is very useful. Now reviewing some code from the other team (which I thought we might reuse for our project) I bumped into this: It's a code for a class height_map that...
    Posted to Forum by wraith on 10-08-2008
  • [Help] How to wake up a bunch of dinosaurs ?

    Hello folks. First, let me introduce myself (quickly): I've been a developer for 5 years. I coded some winforms/webapps/console apps in VB6, then a lot web applications in Java and now I'm just using .NET (mostly C#). I'm NOT a "powercoder".I'm... let's say, probably slightly...
    Posted to Forum by Darth Developer on 07-03-2008
  • Re: Arrays in a C union and memory alignment.

    The compiler isn't likely to put any padding between the doubles, but I don't think there's something prohibiting it to do it. You can do the following, which is less risky, but potentially less efficient: #define FooArray(foo) { &(foo.x), &(foo.y), &(foo.z) } void IUseFoo(Foo...
    Posted to Forum by Spectre on 06-26-2008
  • Inform 7 WTF

    This is part of a translation of Dungeon (Zork) to Inform 7 from FORTRAN 77. FORTRAN code: C ENCRYP-- Encrypt password C C Declarations C SUBROUTINE ENCRYP(INW,OUTW) IMPLICIT INTEGER (A-Z) INCLUDE 'dparam.for' CHARACTER*8 INW,OUTW,KEYW INTEGER UINW(8),UKEYW(8) DATA KEYW/'ECOVXRMS'/ ICHARA...
    Posted to Forum by samanddeanus on 04-23-2008
  • useful?

    There is sooo much that I could post, but I don't want to flood this forum with it, so here's a random one: public class ArrayConverter { public BaseCourse[ convBaseCourse(Collection list) { BaseCourse[ basecourselist = null; int x = list.size(); basecourselist = new BaseCourse[x]; Iterator iter...
    Posted to Forum by nucleoid on 04-16-2008
  • Repeat1 (like, forever)

    Xilinx might have some of the most gifted silicon engineers out there, they sure know how to make excellent FPGAs. What they don't have a clue about is software. All Xilinx software that I have ever used has brought me to the brink of tears. It's not just that it doesn't work, its also exrutiating...
    Posted to Forum by pablot on 02-28-2008
  • Re: Why is Everybody so clueless on the importance of Desktop Search to the Masses?

    MasterPlanSoftware: El_Heffe: HAHAHA AWESOME! from what i've read so far, that is quite the accurate response. hell, even the code in my sig is better
    Posted to Forum by Steeldragon on 01-07-2008
  • You wanted WHAT PAGE???

    http://i40.photobucket.com/albums/e211/mewtwo064/whatpage.jpg First post :D sorry if it's been found before x3 wasnt sure if i wanted to go to page P, page 5, page o, page 8, page ( ;, or page it .............. o.O
    Posted to Forum by mewtwo064 on 12-03-2007
  • Re: #pragma warning disabling...

    bullestock: unsigned int NumProperties() const { return static_cast<unsigned int>(m_propList.size()); } There, fixed it for you. This answer surprises me. IMHO the correct solution is: size_t NumProperties() const { return m_propList.size(); } Which may of course trigger more 4267 at the function...
    Posted to Forum by snowman on 11-20-2007
  • Re: Representing a tree in a relational database (efficiently)

    Here is a trivial example of a tree structure in SQL2K5, and the code needed to traverse the tree (down): if object_id('tempdb..#tree') is not null drop table #tree create table #tree ( parent_id int null, id int not null, descr varchar(255) ) insert #tree ( parent_id, id, descr ) select null, 1, 'root...
    Posted to Forum by RaspenJho on 07-31-2007
Page 1 of 2 (20 items) 1 2 Next >
Powered by Community Server (Non-Commercial Edition), by Telligent Systems