• (nodebb)

    Sweet home Alabama.

  • Prime Mover (unregistered)

    I had to write an essay on South African anteaters when I was at school.

    I didn't bother -- I decided it was too much like aardvark.

  • D J Hemming (unregistered)

    AL is Annual Leave everywhere I've worked.

  • Industrial Automation Engineer (unregistered)

    Empoyee nr. 666 here Does this site now leak my confidential information?

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    I'm kind of worried why one has 32 entries in leavedays, and the other has 30.

  • my name is missing (unregistered)

    Annual leave makes more sense than my first guess, which was he went to Alabama.

  • Duston (unregistered)

    Or it could be the empty days are the day of leave they have accumulated, (i.e., how many days they can take) and as they take them, they get filled with ... well ... something. Or maybe they're used for formatting the page when the record is displayed. Who knows.

  • RetekBacsi (unregistered)

    AI'm not sure anything can explain having 32 values... Maybe a leap year, where August is the leap month?

  • Anon (unregistered) in reply to RetekBacsi

    Maybe they want the index of the value to match the day of the month, so the first value--at index 0--is an unused placeholder. For this, they need 32 values.

  • ooOOooGa (unregistered)

    Holy duplicate data Batman. What happens when 'employee' and 'drillkey.empcode.employeeid' don't match? How about 'comp' and 'drillkey.empcode.companyid'?

  • RussellWakely (google)

    Medium-sized insectivore with protruding nasal implement

  • (nodebb) in reply to D J Hemming

    AL is Annual Leave everywhere I've worked.

    I dunno, maybe in this case it means that on that day, the employee was in Alabama.

  • Jay (unregistered)

    A possible way is that we have several processes with slightly different interpretations. The spec probably allows an array of any size under it and the application used to generate the data enters empty strings for each month-day. Then they have something to enter the "leave" data in, however it does an insert instead of an update, but it does it at the specified array position.

    Finally, the reader doesn't care about the array size because it just looks at the array position of each data point that isn't empty.

    The first entry may have had a mistake made so they just changed the old value into an empty string before inserting the new value.

  • (nodebb) in reply to ooOOooGa

    This is probably generated by a REST API and is now how the data is stored in the database. It's common for REST APIs to denormalize some data for convenience.

    Addendum 2021-10-12 11:47: s/now/not/

  • Sole Purpose Of Visit (unregistered)

    Don't see any problem with this. (I assume it's JSON.)

    It's test data. If it's JSON, it can be used to populate your favorite ORM model. Presumably, the actual LOB system can handle that ORM model. ANd presumably it can handle the differently lengthed array, presumably by padding. I mean, this is test data. It's not humongously useful test data, because it only covers two cases. But I've seen worse, and you can always ask for more test data.

    Seriously. I'm working with "test data" that has things I'm expected to calculate with no documentation and not even a representative persisted model (which I asked for, two weeks ago).

    This trivial little blip would be heaven for me.

  • 32 is 30 (unregistered)

    I think what was me happening is some code talk. The empty string ends a set of information for a day. A non-empty string, e.g. "AL" (administrative leave / annual leave / allowed leave) apparently triggers some new substructure, which is closed by an empty string, and then the entire day is closed by another empty string. With enough data, you could suss out the pattern, but it would be worlds easier if you could get at what's the documentation or the code that's generating that coded array. I guess you could ask Mr. Goldfish, but good luck getting him to remember anything! Heyyoooo!

  • 32 is 30 (unregistered) in reply to 32 is 30

    That was apparently typed by different halves of my brain at different times.

  • Steve (unregistered) in reply to RetekBacsi

    Aaron must have sold one of his days to Alice...

  • Chris (unregistered)

    Given this is just some "test data", is it possible this is partially hand-crafted? E.g. they generated a couple of examples. Then because they wanted to show an example with someone with leave, so they inserted an "AL" in randomly for Alice. For Aaron, they originally overwrote one of the items with "AL", then deleted it because they realised they wanted that one to be an example of no leave being taken.

  • löchlein deluxe (unregistered)

    Nonono, AL is short for "Alice", it's the abbr that will be shown in the managers' month overview screen.

  • jo (unregistered)

    TRWTF is that Duncan took a guess and implemented something that may or may not be correct. And in a few years someone will post Duncan's code here :).

  • Duncan B (unregistered) in reply to jo
    Comment held for moderation.
  • Duncan B (unregistered) in reply to Chris

    Nope. The "test data" in question was a subset of an actual response (because of course this monstrosity didn't have a non-production sandbox). I anonymised it before submission ... and no, I never did manage to get an answer for why the number of strings didn't match the number of working days.

Leave a comment on “Like a Tree, and…”

Log In or post as a guest

Replying to comment #:

« Return to Article