• aalien (unregistered)

    Hey, this is just like one these crossword type of puzzles that are quite popular at least in Finland: krypto. They have numbers assigned for each letter, with usually just one picture as a hint to get you started, and you have to deduce the number-letter mapping by filling in the crosswords. Except that this WTF would be like a hardcore version, where the mapping would change depending on the position in the puzzle.

  • JC (unregistered)

    I once interviewed a guy who proudly described he designed a framework like this one. The phrase that that stayed with me from that interview is: "Programmers these days don't know how to program without variable names".

    It was an ORM-like monstrosity with a single DAO, called TableBean, with fields like i1...i22 for ints, s1..s22 for strings, d1...d22 for dates and so on. A JSP would handle the rendering and there would be a single table for the system. Everything stored on that huge table.

    He didn't pass the interview. Last I checked his Linked In he was doing consulting.

  • bvs23bkv33 (unregistered)

    completely normal phenomenon

  • (nodebb)

    Back in prehistoric times I worked on the RCA batch Fortran compiler written in assembly language. Statement labels for each pass were assigned lexigraphically from a dictionary e.g. aardvark, aardwolf. The run time was for one type of i/o such as single buffered magnetic tape. To do say double buffered the program would modify branch condition tests so the code would traverse a different path. You had to run an execution trace since the code was constantly modifying itself.

    To save memory you would see code such as IC *+743 (Insert character). This was used to get a blank. It was addressing a location containing a MVI (Move immediate) instruction whose opcode is the value for a ASCII blank. This made for awful bugs when a line of code was added .

    Amazingly it worked most of the time.

  • 23YearsAsATraineeProgrammer (unregistered)

    The legacy accounting/ERP software system I worked on when I started out as a developer was written for a compiler that could only handle a 32k source code file. That 32k was pre-parse, so comments were included in the size limit.

    Thus, when an individual module hit that 32k limit, variables started getting shortened - but only after removing explanations of how or why anything worked. Code comments were considered overhead.

    Now we minify js and css code, or anything similar, and call it progress - but that's mainly because we keep a copy of the full code so that we never have to figure out just why i4 = j2 + k3, or indeed what any of those variables might once have been.

    Still, it makes me wince when I see people with modern IDEs and compilers using this sort of variable naming scheme.

  • DCL (unregistered)

    Been there, seen that in a distant past. The same variable used to hold totally unrelated items at different times/places in the program. Opcodes used as single character literals in moves. Self modifying code. Fun times.

  • Rudolf Polzer (google)

    I do that all the time! Except that I call the variables rax, rbx, rcx, rdx, rdi, rsi, rbp, r8, r9, r10, r11, r12, r13, r14, r15.

  • Solomon Ucko (google)

    Funnily enough, in Python (and probably most other dynamic languages), globals are actually much slower than locals: not only are there typically more of them, but locals can (usually? unless you use things like eval?) use tuples instead of dicts, for much faster lookups.

  • George (unregistered)

    It's just your I23rd nervous breakdown...

  • Raj (unregistered) in reply to DCL

    I've seen even worse: database columns being reused for different purposes over time, without the older data being wiped.

    For instance, the "customer id" column in the account table initially contained customer id, but for a while in 2011 it contained CSV data because the product suddenly started supporting multiple customers per account, then in 2014 there was no longer a difference between a customer and an account in the system but someone needed a place to store invoice number so they used the customer id column. Etc. Therefore queries must have very specific time windows.

    This is a side effect of some mainframe databases being absurdly unpleasant to deal with and nobody having time to export terabytes of data with a brittle structure. Still quite depressing.

  • Worf (unregistered) in reply to Solomon Ucko

    That makes a lot of sense. When you reference a variable, the compiler needs to check scope first, so it checks the locals table for local variables with that name. If it's not found locally, then it needs to check the global table for globals of the same name. Unless python is one of the few that disallow scoping to separate names (i.e., you can have a local variable with the same name as a global - which one is used depends on the variable's scope), it will have to be the way.

    And when I say search the local table, it's checking all local variables in scope - a block of code can have several local variable scopes depending on where the block is.

  • Naomi (unregistered) in reply to Worf

    Even better! I don't know if any particular implementation of Python does this, but you could easily represent locals with an array:

    def stupid_example(a):
        b = random.randint(413, 612)
        c = math.hypot(a, b)
        print(c)
    

    Just by reading that function, you know a, b, and c are locals, so you just make an array of three variables, and name resolution for those three is just an array lookup. :)

  • isthisunique (unregistered)

    I'd stop calling those variables and start calling them registers.

  • Marnee (unregistered)

    Some people should not be developers. And yet some managers are thinking it would be a good idea to make just any ol' person a developer: QEs, BAs, etc., without any real-life experience in best development practices and the like that come with years in the profession. (It's fine to move them to a developer role, but should treat it as a profession and thus they should be mentored, assigned work just like any intern, and closely monitored.)

Leave a comment on “Best of 2019: Temporal Obfuscation”

Log In or post as a guest

Replying to comment #:

« Return to Article