• What are you working on? December 2011 Edition
    3,353 replies, posted
  • Avatar of Tezzanator92
  • Psuedo-Crapcode [code]return (bool)math.clamp((int)correct, 0, 1);[/code] I had to sell my soul to write that code. :v: (I would never do this, just to clarify)
  • Avatar of Robber
  • [QUOTE=danharibo;33841864]I knew someone who kept writing: [code] if( a == true ) { b = true; } else if( a == false ) { b = false; }[/code][/QUOTE] One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.
  • Avatar of Ortzinator
  • [QUOTE=sambooo;33841844][code] if (correct) { return true; } else { return false; }[/code] [code]return correct;[/code] :v: ?[/QUOTE] I can sympathize. For a while I had to force myself to not write code like that.
  • Avatar of reevezy67
  • Checking out angelscript so I can mess around and make an amnesia custom story, looks very easy it's based on C/C++.
  • Avatar of Robber
  • [QUOTE=Robber;33842006]One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.[/QUOTE] Holy shit I found the actual code in the revision history: [cpp] public float getPendlerpauschale(float km, boolean large) { if large=true { if(km<20) return 28; if(km<40 ) return 113; if(km<60) return 196; else return 281; } if large=small { if(km<40) return 52; if(km<60) return 103; else return 154; }[/cpp] It's a bit different than I what I remembered but just as horrible! And I'm pretty sure he never even tried to compile that... thing.
  • Avatar of ZenX2
  • Dear lord. [editline]22nd December 2011[/editline] My Day: Make some exciting progress on a feature that is potentially extremely useful, and yet barely understand this despite writing it Determine that this progress is actually very useful Run into problem after problem when attempting to use the new feature as intended, wasting hours firing away at it, wearing it down piece by meaningless piece Then, some time in the future... Do something and the feature suddenly works. Hark, and hear the angels singing! All is now clear. Begin work on next feature. Repeat.
  • Avatar of garry
  • Fixed OGG codec.. you need to mark the last frame as the last frame. If this don't loop now then I don't know what its problem is. [vid]http://puu.sh/bfLT[/vid] [editline]22nd December 2011[/editline] Blargh guess I don't know what its problem is.
  • Avatar of Hruhf
  • [QUOTE=Robber;33842006]One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.[/QUOTE] Ashamed to say it took me a while.
  • Avatar of voodooattack
  • [QUOTE=Naarkie;33833030]Do you mean you want to display the captcha image in console? I could make it work with Windows Forms, so it displays a basic form with a picturebox. Thanks once more for le patch. If you want, I can add you as a contributor to the project. Gonna make the thread tomorrow morning, too tired right now. EDIT: [csharp] case "count": if (this.Count != null) this.Count(this, new EventArgs()); //I'm a cheapskate, ev[1] holds user count though. [/csharp] The "user count" is actually a number randomly generated with each user connection. #themoreyouknow[/QUOTE] No problem, and.. not sure about contributor status, I have commitment issues. :v: [QUOTE=Naarkie;33841765]Added a nice captcha window. It should work, but I'm not sure, because Omegle refuses to send me a captcha request. It's way too trusting. [URL="http://code.google.com/p/dot-omegle/downloads/detail?name=CleverOmegle-v1%2C0%2C5.zip"]CleverBot v1.0.5 get[/URL][/QUOTE] I just saw that you added the form, not sure if that'll work, but I'll test it out. From what I remember, displaying a winform from a console application will freeze because of the lack of a message pump (you'd need a separate thread to run it). I think a modal form would work though. I'll get it to show me a captcha and try it out.
  • Avatar of danharibo
  • Have you considered putting the Chatlog inside a winform? then you could just display the captcha no worries.
  • Avatar of garry
  • Made a little coding blog: [url]http://garry.tv/post/14613360572/coding-evolution[/url]
  • Avatar of voodooattack
  • Actually, that would be the right way to approach the whole thing, I'm going the quick route though. I think showing a modal form that has a text field for input would be easiest. [editline]22nd December 2011[/editline] Garry, I'd pay to change your title to something manageable.
  • Avatar of garry
  • What are you talking about then? Who would you pay to change it?
  • Avatar of Robber
  • [QUOTE=garry;33843147]What are you talking about then? Who would you pay to change it?[/QUOTE] It's a rhetorical "I'd pay" meaning if there wasn't an option to pay for it he would pay if there was an option to pay. :v: Maybe we should split the cost of changing his title? I'd contribute 3$!
  • [QUOTE=Robber;33843203]It's a rhetorical "I'd pay" meaning if there wasn't an option to pay for it he would pay if there was an option to pay. :v: Maybe we should split the cost of changing his title? I'd contribute 3$![/QUOTE] Change it to something like "Massive Twat".
  • Avatar of GameDev
  • [QUOTE=Maurice;33840907]Made object size not matter with portals! That's been bugging me for months (really). [img]http://i.imgur.com/8LNgk.png[/img] Feels good to finally get it done. I'm invincible![/QUOTE] Oh christ, I love you for fixing that [sub][sub]But let's be honest, I've always loved you.[/sub][/sub]
  • Avatar of Sc00by22
  • [QUOTE=sambooo;33841844][code] if (correct) { return true; } else { return false; }[/code] [code]return correct;[/code] :v: ?[/QUOTE] It's been a while since I've done any programming but I admit that was silly of me. :suicide: [QUOTE=DevBug;33841876]I'm more worried about the unsanatized input.[/QUOTE] I did that a few minutes after I posted.
  • [QUOTE=LuaStoned;33841097]Now it's time to use TortoiseHG! :v: In other notes, I cloned the Facepunch Lua API over to Mercurial. It's on [url=https://bitbucket.org/luastoned/facepunch-lua-api]BitBucket[/url][/QUOTE] I have the best co-developers ever^
  • Avatar of Murkat
  • [QUOTE=ZenX2;33842326]Dear lord. [editline]22nd December 2011[/editline] My Day: Make some exciting progress on a feature that is potentially extremely useful, and yet barely understand this despite writing it Determine that this progress is actually very useful Run into problem after problem when attempting to use the new feature as intended, wasting hours firing away at it, wearing it down piece by meaningless piece Then, some time in the future... Do something and the feature suddenly works. Hark, and hear the angels singing! All is now clear. Begin work on next feature. Repeat.[/QUOTE] That happened to me a few days ago when I was messing about in Construct, except it took 2 days to figure out rather than 2 hours.
  • [QUOTE=garry;33843066]Made a little coding blog: [url]http://garry.tv/post/14613360572/coding-evolution[/url][/QUOTE] The fact that I stayed focused on reading your article and not the color of your blog's background really confused me by the time I figured out it was changing colors.
  • Avatar of Wingar
  • [QUOTE=garry;33843111]Go for it [url]http://www.facepunch.com/store/[/url][/QUOTE] Goddammit. The part on Source Control. Source Control has been something that has been completely pissing me off lately, not because I can't use it or it doesn't work for me. Because of a friend I am working with on some project absolutely hates it, he continually wants to move to FTP and it always saying FTP does what Source control does but is't as volatile. The other day he re-arranged all the shit on my SVN, in a way that removed all way of reverting back WHILE leaving all the hard drive space taken up by the delta's. Worst part is he will not read up on it, Refuses to, avoid it whenever brought up. I tried to get him to get the "Version Control by Example" book (Brilliant book, I love Version Control because of it) but he said his family would freak the fuck out if a random book appeared in his name, so I found him an online version and PDF version. Still won't read it.
  • Avatar of BlkDucky
  • [QUOTE=wingless;33844714]Goddammit. The part on Source Control. Source Control has been something that has been completely pissing me off lately, not because I can't use it or it doesn't work for me. Because of a friend I am working with on some project absolutely hates it, he continually wants to move to FTP and it always saying FTP does what Source control does but is't as volatile. The other day he re-arranged all the shit on my SVN, in a way that removed all way of reverting back WHILE leaving all the hard drive space taken up by the delta's. Worst part is he will not read up on it, Refuses to, avoid it whenever brought up. I tried to get him to get the "Version Control by Example" book (Brilliant book, I love Version Control because of it) but[B] he said his family would freak the fuck out if a random book appeared in his name,[/B] so I found him an online version and PDF version. Still won't read it.[/QUOTE] what Edit: I can't make sense of this at all. :v:
  • Avatar of Robber
  • [QUOTE=wingless;33844714]Goddammit. The part on Source Control. Source Control has been something that has been completely pissing me off lately, not because I can't use it or it doesn't work for me. Because of a friend I am working with on some project absolutely hates it, he continually wants to move to FTP and it always saying FTP does what Source control does but is't as volatile. The other day he re-arranged all the shit on my SVN, in a way that removed all way of reverting back WHILE leaving all the hard drive space taken up by the delta's. Worst part is he will not read up on it, Refuses to, avoid it whenever brought up. I tried to get him to get the "Version Control by Example" book (Brilliant book, I love Version Control because of it) but he said his family would freak the fuck out if a random book appeared in his name, so I found him an online version and PDF version. Still won't read it.[/QUOTE] He sounds like a typical character from [url=thedailywtf.com]TDWTF[/url]. Why are you working with him? At least take away his SVN administration privileges.
  • Avatar of Wingar
  • [QUOTE=BlkDucky;33844738]what Edit: I can't make sense of this at all. :v:[/QUOTE] He has a family of technophobes. To put it simply, they think since his address is now on the internet people will start to come and rob the place and rape people. Technophobia to the max. It's pretty bad. [editline]23rd December 2011[/editline] [QUOTE=Robber;33844805]He sounds like a typical character from [url=thedailywtf.com]TDWTF[/url]. Why are you working with him? At least take away his SVN administration privileges.[/QUOTE] Good idea.
  • Avatar of reevezy67
  • Is he a child or does he not have the balls to explain to them that this book will not end up with rape?
  • Avatar of Wingar
  • [QUOTE=reevezy67;33844919]Is he a child or does he not have the balls to explain to them that this book will not end up with rape?[/QUOTE] Yeah, he's a minor.
  • Avatar of reevezy67
  • My parents were the same but I didn't give a shit, I can understand though. I figured it would take me a good day or so to learn how to script for an amnesia mod but god damn this shit's easy.