The Official Status Thread



  • @magus said in The Official Status Thread:

    Sad, somehow:

    I don't know how I feel about HTML image tags, but I've said for decades that code editors should be more like word processors (including the ability to embed images/diagrams) and less like plain text.

    We don't have to work like it's still 1985. We just do because this industry is full of morons.



  • @blakeyrat I was more referring to the name of the package; really, the example they show is a good use of it.



  • Status: Got bored. Saw the Q# development tools extension available for VS.

    Implemented the example they showed, and it does indeed work.

    namespace Quantum.Bell
    {
        open Microsoft.Quantum.Primitive;
    
        operation Set (desired: Result, q1: Qubit) : ()
        {
            body
            {
                let current = M(q1);
                if (desired != current)
                {
                    X(q1);
                }
            }
        }
    
        operation BellTest (count : Int, initial: Result) : (Int,Int,Int)
        {
            body
            {
                mutable numOnes = 0;
                mutable agree = 0;
                using (qubits = Qubit[2]) // Allocate quantum bits
                {
                    for (test in 1..count)
                    {
                        Set (initial, qubits[0]);
                        Set (Zero, qubits[1]);
    
                        H(qubits[0]); // Quantum up the bits to superposition mode
                        CNOT(qubits[0],qubits[1]); // Entangle the qubits
                        let res = M (qubits[0]);
    
                        // Check if the entangled qubits are, indeed, the same.
                        if (M (qubits[1]) == res)
                        {
                            set agree = agree + 1;
                        }
    
                        // Count the number of ones we saw:
                        if (res == One)
                        {
                            set numOnes = numOnes + 1;
                        }
                    }
                    Set(Zero, qubits[0]);
                    Set(Zero, qubits[1]);
                }
                // Return number of times we saw a |0> and number of times we saw a |1>
                // and the number of times the second qubit matched the first
                return (count-numOnes, numOnes, agree);
            }
        }
    }
    

    Now I have no idea what I'd do with my newly gained knowledge. So I'll post it here, with the rest of the irrelevance.



  • @blakeyrat What I really want is a mini sketchpad so I can draw and embed quick diagrams.

    With SVG it could be entirely client-side.



  • Status: uh oh.

    0_1513798020350_c53cffcf-375f-4bba-b7d7-608e0b15fef2-image.png


  • Discourse touched me in a no-no place

    @anotherusername said in The Official Status Thread:

    uh oh

    The double Uh Oh! would be if IE started working again…



  • Status: I was annoyed looking at this one code file. I turned on StyleCop.Analyzers for that project, and then fixed things based on the rules I agreed with. Many of those around where spaces and newlines go.

    I subtracted over 400 lines, which feels like progress. 3.2% progress, in fact!


  • Discourse touched me in a no-no place

    Status: I'm now on holiday until in the new year. 😀 :smiling_face_with_open_mouth_smiling_eyes: 😄 🥂 🎅 🍖 🍷 🥃 🍺 ☕ 🛌


  • Notification Spam Recipient

    Status:

    0_1513805131983_a59910f7-f351-42b7-9fe3-6c5a85f8bfaf-image.png

    Note to self: Don't lean on keyboard.


  • Considered Harmful

    Status:
    https://i.imgur.com/XLgYBWU.jpg

    That is a significantly large blue jay. The tree shook when it landed.



  • @anonymous234 The editor in VS is entirely WPF, which has a <Path> tag which can contain SVG, so it isn't as if such an extension would be terribly difficult.



  • @magus I moved some verbatim strings to embedded text files! I've removed more than a thousand lines today!


  • 🚽 Regular

    Status: Got home from work at 8pm as I was supervising some upgrades. Before I could start cooking I get a call from my brother that his car has broken down in a city an hour away. It sounds like something I can fix and I have a brand-new part in the garage because I'm weirdalways prepared.

    Load up tools and drive to him, fit the new part which is extremely annoying on his car due to ridiculous air intake and the rain. It fixes the problem.

    Its now half eleven and I can finally have supper and a couple of fingers of whiskey.



  • Status: Kept trying to figure out what to use Q# for. Everyone always says things like, "You can crack RSA in 10 seconds with real hardware!!!" or "Hey, we can simulate physics now!". Great, thanks, but what's some actual thing I can do with my basic, bad understanding of how to write code with this stuff?

    But now I'm watching a video, which won't help, but is at least cool:
    https://www.youtube.com/watch?v=2mIk3wBJDgE


  • 🚽 Regular

    @magus said in The Official Status Thread:

    Status: Kept trying to figure out what to use Q# for. Everyone always says things like, "You can crack RSA in 10 seconds with real hardware!!!" or "Hey, we can simulate physics now!". Great, thanks, but what's some actual thing I can do with my basic, bad understanding of how to write code with this stuff?

    But now I'm watching a video, which won't help, but is at least cool:

    I love Feynman, frightening intellect but he could explain things to (relative) lay-people in a useful and practical way. A very rare skill.

    Edit: What disappointed me in University was talking with people in other fields/disciplines and having them say 'I can't explain it to you, you need 4 years of x to get the grounding to understand it'. That's always a cop out.



  • Status: just found out that wife "probably" threw away the perfectly good Bluetooth dongle, because the Bluetooth mouse stopped working.

    The whole reason I got Bluetooth instead of a generic wireless mouse was because it works for more than just the damn mouse, dammit! And it didn't even go with her laptop originally, it went with my work laptop... I just don't use it with my work laptop, because I have my own USB optical mouse that I prefer to use instead.

    Also my personal laptop is fucked and I don't want to mess with it so I've been using the work laptop instead. Spank spank, naughty programmer and all that. But the Bluetooth headphones I have don't work with it without Bluetooth, so I'd have liked to get the dongle back. 😠



  • @cursorkeys said in The Official Status Thread:

    @magus said in The Official Status Thread:

    Status: Kept trying to figure out what to use Q# for. Everyone always says things like, "You can crack RSA in 10 seconds with real hardware!!!" or "Hey, we can simulate physics now!". Great, thanks, but what's some actual thing I can do with my basic, bad understanding of how to write code with this stuff?

    But now I'm watching a video, which won't help, but is at least cool:

    I love Feynman, frightening intellect but he could explain things to (relative) lay-people in a useful and practical way. A very rare skill.

    Edit: What disappointed me in University was talking with people in other fields/disciplines and having them say 'I can't explain it to you, you need 4 years of x to get the grounding to understand it'. That's always a cop out.

    Not always. Feynman did a good job of presenting the surface and making it sound reasonable, but you'd be unable to go apply that information to a real situation (or even a practice problem). I face this every day. Students say "I understand it when you're doing it, but then can't do it myself." That's because all the fine-sounding explanations do is give you a surface gloss. Actual understanding comes through practice, and that practice isn't possible without the pre-requisites. Unless you understand the nature of path integrals, Feynman diagrams are pretty pictures.

    And, as they say

    A little learning is a dangerous thing;
    drink deep, or taste not the Pierian spring:
    there shallow draughts intoxicate the brain,
    and drinking largely sobers us again.

    Often thinking you understand things (but not going further) is worse than knowing you don't understand it. Just think of all those users who are "sure they can fix it" and end up breaking things worse and worse (and are unable to understand why it keeps happening).


  • Notification Spam Recipient

    @tsaukpaetra said in The Official Status Thread:

    Tomorrow we shall stress it!

    Works fine, until the cases in which it's supposed to be protecting against actually get hit.

    So, had to code around that. Looks a smidge safer now.

    Now I can launch 30 servers (each wanting 5 threads/ODBC connections each) simultaneously and (for the most part) everything seems to work fine!


  • Considered Harmful

    Status: Box cat.
    0_1513829380802_20171220_194509.jpg


  • Notification Spam Recipient

    Status: FFS....

    0_1513832099996_cc589e79-97ad-4040-8249-80469790da0e-image.png

    This site is bad and it should feel bad...



  • @tsaukpaetra said in The Official Status Thread:

    Status: FFS....

    0_1513832099996_cc589e79-97ad-4040-8249-80469790da0e-image.png

    This site is bad and it should feel bad...

    FIFTEEN CHARACTERS?

    Ok, let's try

    RytlockBrahamRoxCanachTaimiKasmeerMarjoryPhluntArkkDessaCaitheEllenEvonFarenPalawa

    Does that fit?


  • Notification Spam Recipient

    @ben_lubar said in The Official Status Thread:

    Does that fit?

    Not if I type it.

    0_1513838329387_f2f9833a-cab4-4658-9ed2-a60e23724578-image.png

    But if the system starts it out that way, yes.


  • 🚽 Regular

    Status: CF card on one of our production machines failed. The machine software runs on Japanese DOS 6.1

    I've just finished trying to restore backups. Turns out 90% of the floppy drives in the company are defective. And Windows 10 can't properly read/write to FAT16. I tried to delete a file and it claimed it was deleting 3.2GB from a 64MB card...then the card was unreadable :/

    Thank god for Google live translate, it did a pretty good job on the Japanese DOS Setup text.


  • Java Dev

    @cursorkeys said in The Official Status Thread:

    And Windows 10 can't properly read/write to FAT16.

    Aren't floppies in FAT12?


  • 🚽 Regular

    @pleegwat said in The Official Status Thread:

    @cursorkeys said in The Official Status Thread:

    And Windows 10 can't properly read/write to FAT16.

    Aren't floppies in FAT12?

    I'm not sure, it seemed to handle those OK when I found a working drive. The CF cards are definitely in FAT16


  • :belt_onion:

    That's twice now this squirrel motherfucker has been waiting for me as I leave for work so he can run across the road right in front of my car and then freeze.

    Presence of enemy agent indicates compromise of OPSEC. Departure times and travel routes must be varied to regain strategic advantage.


  • Java Dev

    @cursorkeys said in The Official Status Thread:

    I'm not sure, it seemed to handle those OK when I found a working drive. The CF cards are definitely in FAT16

    Ah, the CF cards. I must've misread your post.


  • I survived the hour long Uno hand

    @heterodox
    Myself, I would be inclined to find a more permanent solution to the problem of that squirrel 🤷♂


  • BINNED

    @izzion
    Have it tend the rabbits?


  • I survived the hour long Uno hand

    @luhmann
    I'm not saying to kill it, I'm just saying that if your car runs over it, all of its forgotten nuts that sprout into trees should be counted as carbon offsets for your emissions 😇


  • BINNED

    @izzion
    If you run it through a wood chipper you could use it as fertilizer for those nuts ... Think Green!



  • Status: Spent 30 minutes debugging a set of scripts (PHP and js). Let's play "spot the errors!" (there's one in each snippet).

    ...
    a.uuid AS assignment_id
    COALESCE(c.complete,100.0) AS percent_completed
    ...
    

    in an sql query

    and

    ...<li><progress max='100' value="${this.complete$}"></progress></li>...
    

    in a DOM manipulation script.


  • Java Dev

    @benjamin-hall A missing comma and an extra dollar sign?



  • @pleegwat said in The Official Status Thread:

    @benjamin-hall A missing comma and an extra dollar sign?

    Exactly. And with poor debugging tools (can't set breakpoints on the PHP that's running that query because I can't figure out how to actually attach a debugger to my XAMPP stack), it took me forever to find those two errors. And one was blocking the other. Even though there was a query error, the stupid thing was returning 200 OK...


  • Discourse touched me in a no-no place

    @benjamin-hall said in The Official Status Thread:

    200 OK

    Knew a webapp that liked to do that for all pages. Get anything wrong? It'd just send you the content of the front page with an iframe injected into it that contained a human-readable version of the error (usually about as helpful as “something went wrong and we're very sorry about that”). Creating a sane wrapper client library around that was an exercise in frustration and HTML scraping.



  • @dkf said in The Official Status Thread:

    @benjamin-hall said in The Official Status Thread:

    200 OK

    Knew a webapp that liked to do that for all pages. Get anything wrong? It'd just send you the content of the front page with an iframe injected into it that contained a human-readable version of the error (usually about as helpful as “something went wrong and we're very sorry about that”). Creating a sane wrapper client library around that was an exercise in frustration and HTML scraping.

    I'm almost certain that this is my fault (somewhere)--it's a home-built PHP API and I'm probably not checking sql errors right (using PDO), but it'd be nice if it actually did that for me...maybe I ask too much.



  • @pleegwat said in The Official Status Thread:

    @cursorkeys said in The Official Status Thread:

    And Windows 10 can't properly read/write to FAT16.

    Aren't floppies in FAT12?

    I've never seen a 64MB floppy.



  • @izzion said in The Official Status Thread:

    @heterodox
    Myself, I would be inclined to find a more permanent solution to the problem of that squirrel 🤷♂

    More of a... "final" solution. 🤔


  • Discourse touched me in a no-no place

    @benjamin-hall said in The Official Status Thread:

    I'm almost certain that this is my fault (somewhere)--it's a home-built PHP API and I'm probably not checking sql errors right (using PDO), but it'd be nice if it actually did that for me...maybe I ask too much.

    If you want to do it right, you split your webapp into an internal API that sits in front of the business logic code (which in turn uses whatever databases and services and whatever you need), and a bunch of front end renderings that allow that API to be invoked by means of HTML forms, REST calls, SOAP calls (if you really want), etc. The idea is that whatever way the user chooses to invoke the actions of the app, you get sane and consistent behaviour; you should be able to chop and change between the front end API styles and not see essential service objects appearing and disappearing (except in response to requests to make and delete them, of course, assuming you support those operations). It also gives you considerable freedom to implement the front-end; if it makes sense to deliver a SPA and have that talk JSON over REST to your webapp, you can do that just fine and you shouldn't have to rewrite your back-end to do so.

    The reality is sometimes a lot more awkward than the theory. ;) But aiming for it really does minimise the amount of work over the slightly longer term because it limits the amount of horrible bodges you need.



  • @dkf said in The Official Status Thread:

    @benjamin-hall said in The Official Status Thread:

    I'm almost certain that this is my fault (somewhere)--it's a home-built PHP API and I'm probably not checking sql errors right (using PDO), but it'd be nice if it actually did that for me...maybe I ask too much.

    If you want to do it right, you split your webapp into an internal API that sits in front of the business logic code (which in turn uses whatever databases and services and whatever you need), and a bunch of front end renderings that allow that API to be invoked by means of HTML forms, REST calls, SOAP calls (if you really want), etc. The idea is that whatever way the user chooses to invoke the actions of the app, you get sane and consistent behaviour; you should be able to chop and change between the front end API styles and not see essential service objects appearing and disappearing (except in response to requests to make and delete them, of course, assuming you support those operations). It also gives you considerable freedom to implement the front-end; if it makes sense to deliver a SPA and have that talk JSON over REST to your webapp, you can do that just fine and you shouldn't have to rewrite your back-end to do so.

    The reality is sometimes a lot more awkward than the theory. ;) But aiming for it really does minimise the amount of work over the slightly longer term because it limits the amount of horrible bodges you need.

    That's what I've done. Mostly. Kinda. In a flawed sort of way.

    This API takes REST calls and JSON objects and deals with the database, returning JSON back to the consumer. That's because the main consumer (for the particular part of the API in question) is a stand-alone web page that can't have any back-end on that server (due to hosting limitations).

    Even my "admin" pages (checking what the students have submitted) is an HTML/JS page that calls this API through REST calls. I was adding a particular feature (partial completions) and so had to modify the database and API to handle that.


  • :belt_onion:

    Status: Trying to figure out how the fuck to verify a certain value is being displayed in a read-only text box on the UI with Selenium... given that both Internet Explorer and Firefox do not show that that input element has a value. Even though I SEE IT on the UI. Their developer tools don't show that value anywhere in the DOM (except in JavaScript). No matter what the JavaScript is doing, it eventually has to put that value somewhere in the DOM for it to be displayed... doesn't it?!

    I don't... what? What are we doing with HTML and JS? What is ANYONE doing with HTML and JS these days? Starting to feel like everything I know is outdated.

    Edit: Huh, never mind. Did a document.getElementById("<ID>").value in the Console and it shows the proper value. It just doesn't show it in the inspector anywhere on either browser. Maybe it's the difference between setting a value of the element in JavaScript and setting the value of the value attribute, and the former is invisible. Weird.



  • @heterodox AFAIK the only time the value="whatever" attribute comes into play is to pre-populate the input. The current value, whether it comes from user input, javascript or the value attribute, is accessible through the .value property.


  • :belt_onion:

    @hungrier said in The Official Status Thread:

    @heterodox AFAIK the only time the value="whatever" attribute comes into play is to pre-populate the input. The current value, whether it comes from user input, javascript or the value attribute, is accessible through the .value property.

    Which is confusing because in Selenium you use GetAttribute("value") and it returns it correctly for me when it's not an attribute, it's a property. But I guess I appreciate it trying to make things easy for me.



  • Status: I've finished my formatting fixes in the tests we're inheriting. I don't know if anyone will be okay with a pull request with it, but it's a whole lot cleaner.

    Now if only I could figure out where our app's entry point is...


  • FoxDev

    Status:

    0_1513879970678_f81d77c5-99e7-45ea-8d1f-7c5dc0d4e6f3-image.png

    0_1513880630785_9ad59338-c0fe-4385-9d6c-dec9b176c871-image.png

    ooooooh. dis gonna be fuuuuuuun.


  • I survived the hour long Uno hand

    @accalia
    So you're converting all those bonus points from long business trips into a better home computer? 🍹


  • FoxDev

    @izzion said in The Official Status Thread:

    @accalia
    So you're converting all those bonus points from long business trips into a better home computer? 🍹

    nah. finally got the budget approved for a new work PC



  • @accalia You need $4.3k for a new work machine?


  • FoxDev

    @jazzyjosh said in The Official Status Thread:

    @accalia You need $4.3k for a new work machine?

    i need 10k for 6.

    because i'm not an asshole



  • 12 items seemed to be a reasonable number of parts + accessories for a machine. The quantity of 6 SSDs was tiny in comparison to the other text.

    Also for some reason didn't notice newegg.


Log in to reply