|
Biowarfare posted:Not really bad code per se, but who the gently caress indents like this???? That is really strange...generally I would do it like this, as I imagine most would: code:
|
# ¿ Jul 21, 2013 05:41 |
|
|
# ¿ May 10, 2024 00:54 |
|
Dicky B posted:I know it's pointless and annoying to maintain for anybody who doesn't have some kind of editor plugin How?
|
# ¿ Jul 21, 2013 16:52 |
|
geonetix posted:Just ran into something that's always pretty sad (it's coldfusion, but the comments make it worse): x++; //increment the x variable
|
# ¿ Jul 25, 2013 02:11 |
|
QuarkJets posted:What kind of poo poo class requires physical printouts of code for homework submission? Classes in the early 90s, perhaps My intro to OOP class was like this. I had to print out 30+ pages of code for each assignment. Prof's reasoning? "So the TA can make comments in the margins" ... Right. That happened maybe five times total outside of them writing my grade on the paper, which was useless because our grades were online anyways. Why couldn't the TA just add comments to our code with a text editor and return it to us that way? Or give us a document back telling us which lines the mistakes were on? But no, we had to waste our loving money printing out code and not using the online submission system that every other loving course used. This is the same prof who would dock marks on exams in second and third year courses for missing semicolons and handwritten code not being perfectly indented in the tiny space given to us on the exam sheet.
|
# ¿ Jul 26, 2013 04:44 |
|
Found this in some code the other day and while it isn't the worst thing in the world, it annoyed me because there's no reason to do it and it sort of kills readability.code:
Sacrificing readability to reduce 4 lines of code is dumb.
|
# ¿ Aug 15, 2013 02:38 |
|
Crosscontaminant posted:True. I assume it is on the basis of self. Sorry, forgot to mention it's Objective-C.
|
# ¿ Aug 15, 2013 15:39 |
|
substitute posted:
I call it the crocodile clause.
|
# ¿ Aug 21, 2013 03:34 |
|
This is the kind of poo poo you come across frequently in the hobbyist (Arduino) community. Everything is an unreadable unmaintainable poorly formatted loving mess.code:
|
# ¿ Sep 2, 2013 17:43 |
|
EntranceJew posted:Looks like someone was brought up on assembly. Even in assembly I don't often see large chunks of code with ; and no actual comment after it though.
|
# ¿ Sep 2, 2013 17:52 |
|
pokeyman posted:I'm not defending this particular style, but it looks like the empty comments signify the code described by the nonempty comment at the top. Like #region in C#. Yeah, that's definitely the reason. Could have gone about it a bit better though.
|
# ¿ Sep 3, 2013 03:34 |
|
I'm working on a mobile app right now. Our engineers have been working with the client and a few of their engineers for the past year or so on this product. We were trying to figure out why scrolling performance on a particularly complicated part of the app had suddenly gone from "pretty good to very good" on most devices to "complete poo poo and dropping assloads of frames even on the most powerful phones" It turns out our client's developer committed some fixes to a custom text label we had implemented as part of a feature he had implemented. The basic functionality of this custom label is to include clickable links within the text. When the label is configured, some code gets run that detects whether or not a link exists in the plain text, and, if so, magics it into a clickable link that will push to another part of the app or a web view if necessary. It's a fairly expensive operation, and the cost can add up quickly when scrolling fast. So clearly it should be called as little as possible - ie, only when the text changes. Client dev decided to override almost every label method to call super, then call the code that checks for links. This included setting the font, changing the text colour, changing the background colour, adding an attribute to the text (which actually resulted in it being called twice). So, when the view was configured with new text, the minimum of the following was happening: set text set text background colour set text font set text font colour On top of running the same expensive operation four times in a row for no loving reason, each time it was run it was creating a new instance of the object that we use to check if the links exist rather than just creating it once and keeping it around for the lifetime of the label. This happened for each instance of this label. Of which there were many being recycled and re-configured as the view scrolled. We ripped out all of his lovely overridden methods and stopped recreating the same object over and over and magically the code is 700 billion times faster and nothing broke because changing the font doesn't change the goddamn text so why the gently caress would I need to check for links embedded in the text unless changing the text itself!?!?as;lkgdfhasdjlg Ugh.
|
# ¿ Mar 25, 2015 04:03 |
|
Haha, that would be nice. We're too far in to re-factor that much (they're still too busy shoving features down our throats for us to do any maintenance) and they wouldn't let us do it anyways because reasons. Scrolling is pretty close to where I would reasonably expect it to be while doing all UI on main, so I'm not too upset now that this particular fuckup is fixed.
|
# ¿ Mar 25, 2015 04:15 |
|
My friend sent me this today:code:
|
# ¿ Mar 28, 2015 02:16 |
|
EpicCodeMonkey posted:>$5000/seat compiler These are a thing?
|
# ¿ Mar 29, 2015 02:17 |
|
shodanjr_gr posted:Is the horror the break; statement instead of "return" or "return rc"? Is it the spelling mistake in the trace statement? Is it me? http://code.metager.de/source/xref/QubesOS/qubes-r2/vmm-xen-windows-pvdrivers/xenpci/gntmem_device_interface.c#733 ?
|
# ¿ Apr 14, 2015 02:24 |
|
NihilCredo posted:So, I gather that the perfect version of this code should have no mutation, a single return statement, and two braces for every if block. i hate you
|
# ¿ Oct 11, 2015 03:53 |
|
Ika posted:While tracking down the source of a newly introduced error I found this beauty This reminds me... I hate it when people type stupid idiot poo poo like "lst" instead of just spelling the mother loving word properly. JUST TYPE THE FULL WORD. USING VOWELS WILL NOT CAUSE YOUR COMPILER TO EMIT DEMONS. THE loving IDE WILL AUTOCOMPLETE IT FOR YOU FROM THAT POINT ON. YOU'RE NOT SAVING ANY TIME YOU STUPID rear end in a top hat I had an intern once that called a bunch of UIButtons in an iOS project btn1, btn2, btn3, etc and I wanted to stab him in the face.
|
# ¿ Feb 24, 2016 05:26 |
|
Suspicious Dish posted:half rant / half question: does anybody hate the "programmers are introverted, we must be alone, in our own offices, to prevent ~*~ breaking the flow ~*~" meme thing I did pair programming full time for over two years. It's really good for what you describe. There are some downsides of course, but I found it significantly helped productivity.
|
# ¿ Feb 24, 2016 06:34 |
|
Hollow Talk posted:
use better variable names
|
# ¿ Feb 24, 2016 23:34 |
|
FamDav posted:Can this be the new thread title. Please yes. That is terrifying.
|
# ¿ Apr 10, 2016 01:56 |
|
Absurd Alhazred posted:This is a horror I made myself. See if you can spot the error: you put a space before your square bracket you loving monster
|
# ¿ Apr 28, 2016 21:23 |
|
more falafel please posted:Lol, blueprint doesn't compile to native, it compiles to UnrealScript bytecode. UnrealScript was the scripting language they used through UE3, and it's not even close to native. Blueprint is useful for simple stuff (designers rigging up level triggers, etc) but in a full production game you don't want any tight loops in Blueprint, because it's very slow. the nativization docs say it can be compiled into native c++. is that not actually true, or are you speaking specifically about the default setting? https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/TechnicalGuide/NativizingBlueprints/
|
# ¿ Jun 25, 2022 01:11 |
|
returning dates in both incorrect unix timestamps and that dumbass start and end format instead of a single proper iso8601 string for the start and end (or proper unix timestamps...just anything but the current two wrong formats) is the real horror here
dc3k fucked around with this message at 07:20 on Aug 15, 2023 |
# ¿ Aug 15, 2023 07:18 |
|
Falcon2001 posted:The sheer virtriol in this thread is absolutely hilarious / baffling / horrifying to me. it's par for the course when dealing with gamers, tbh. minor inconveniences to the typical reddit/r/gaming (or whatever subreddit is the main one) users become life altering disasters that require constant commenting and complaining. most gaming subs are generally unusable due to the constant whining every time a patch/update comes out
|
# ¿ Sep 26, 2023 01:32 |
|
|
# ¿ May 10, 2024 00:54 |
|
everything in linux is a file everything in javascript is a god drat nightmare
|
# ¿ Apr 4, 2024 02:32 |