• (nodebb)

    Well, at least the inner variable declarations didn't use let ...

  • Sauron (unregistered)

    Hard-coding all of the needed data in the JS code? How nice!

    Sending an XMLHttpRequest to the back-end to get the data in JSON format was likely too much effort.

  • Brian (unregistered)

    Having worked for both the feds and government contractors, I can absolutely confirm that their code is just as bloated and inefficient as anything else they produce.

    My favorite story? I was working on a project in which they decided to take a novel approach and write in C instead of Ada. That's C, not C++, even though the nature of the project fit perfectly with a polymorphic design. Instead we had tons of duplicated code for each struct type, that differed from each other by only a handful of properties. On top of that, the project managers, in their infinite wisdom, knew that pointers were dangerous, so they decreed in the requirements that there shall be no pointers. Period. So you've got these large structs being passed by value into every method. And they wondered why they were having trouble meeting their performance targets...

    I finally convinced them that what they were really afraid of was dynamic memory allocation (they were all about being "deterministic"), and there are plenty of legitimate uses for pointers aside from that. Never did get them to see the light of OOP though.

  • I'm not a robot (unregistered) in reply to Sauron
    Sending an XMLHttpRequest to the back-end to get the data in JSON format was likely too much effort.
    s/effort/overengineering/

    Wait, this is government we're talking about... add an extra s/too much/not enough/ to that.

  • cschneid (unregistered)

    I do find it amusing that any government activity is met with cries of "privatize it all, fire all the bureaucrats" and any government privatization effort is met with cries of "outsourcing firms are all crooks" accompanied by stories of their incompetence, contract overruns, nepotism, etc.

    Look at government pay for these kind of jobs vs. what you make. Now take into account: you get what you pay for, paying more to get better developers means your taxes would go up, training people costs money too.

    Government tends to exhibit the worst traits of Deadline Driven Development, largely due to those deadlines being dictated by elected officials or political appointees who know nothing of the subject matter.

  • (nodebb)

    no government is more government than the US Federal government.

    I wouldn't bet on it... lots of competition out there! (the French government is a serious contender)

  • cellocgw (unregistered)

    Those of us who were in any business that contracted with the USGov't knew very well the cliche "close enough for government work."

  • submitter (unregistered)

    Actually it was nice that the configuration was delivered in the page rather than needing a further request. After some analysis the conclusion was that streamArch should be populated from the arch row of the configuration, so if we de-structure each row as stream_num, domain, stream_id, msl3 and get the filename and comm query parameters from the URL, there are 4 candidate stream URLs:

            hls_live = 'https://www-senate-gov-media-srs.akamaized.net/hls/live/{stream_id}/{comm}/{filename}/master.m3u8'
            msl3_arch = 'https://www-senate-gov-msl3archive.akamaized.net/{msl3}/{filename}_1/master.m3u8'
            hls_url = '{domain}/i/{filename}_1@{stream_num}/master.m3u8'
            hls_arch = '{stream_arch}/i/{video_id}.mp4/master.m3u8'
    

    Then try each of hls_live, msl3_arch, hls_url, hls_arch in order ... but so far only the first case has ever happened. There could be more legacy than you'd expect for code that can't be more than 250 years old.

  • submitter (unregistered)

    WTF? Email protection in a plaintext field?

    The corrupted text was _1 followed by the at sign.

    Also, loving the non-JS reCAPTCHA!

  • dereferenced null pointer (unregistered)

    I've seen the "for break;" pattern a few times, some people think its a neat trick to deal with something wich might be empty...

  • (nodebb)
    if (comm === false)
    

    The density of WTFery in that one line is a joy to behold.

  • Neveranull (unregistered)

    Our government contractor was finally able to switch from JOVIAL to C++ for the first time. The manager wrote his own list of coding standards, which consisted of decrees like You can’t use ++ , — , += operators. You must say i = i + 1; You can’t overload anything. You can’t inherit anything. Don’t even dare use the “P” word (Polymorphism).

    When he was done, their C++ code looked exactly like JOVIAL code.

  • (nodebb) in reply to Jeremy Pereira

    Why? Granted, I'd prefer a more traditional sentinel value like undefined or null, but in the end any sentinel value will do (note that (X==false) != (X===false) for some X, e.g. "").

    The #1 WTF is re-assigning only a part of the set of variables, which might cause a state that is a mixture of independent old and new data (but the missing context just might make it acceptable if every variable is in some sensibly way initialized beforehand).

    #2 is a dubious choice in client ~ server responsibilities.

    #3 is using a loop-construct that never loops. That's just loopy.

    #4 is using magic indices in preference of a data structure that is more mistake-proof.

    #5 is redeclaring variables.

    #6 is about variable names, #7 comments, #8 indentation (but all such aspects are relatively harmless).

    I left 2 spots , but I don't see how "if (comm === false)" can make it into the top 10.

  • nedalic142 (unregistered)
    Comment held for moderation.

Leave a comment on “Enterprise Streaming”

Log In or post as a guest

Replying to comment #:

« Return to Article