As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

[Programming] Reinventing equality, one language at a time

194959698100

Posts

  • SpawnbrokerSpawnbroker Registered User regular
    What I don't understand is the young javascript developers who glom onto the new hotness because "it's new, therefore better".

    I tried to join a project a few months ago that had one of these developers as their lead from the start. I wanted to learn React better. Their website looked nice, but I couldn't figure out exactly what was going on because all of the HTML was obfuscated under React gibberish.

    So I submitted a pull request with a sample refactor of the React code to make the HTML readable in F12 dev tools and got kicked off the project :rotate:

    Steam: Spawnbroker
  • thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    What I don't understand is the young javascript developers who glom onto the new hotness because "it's new, therefore better".

    I tried to join a project a few months ago that had one of these developers as their lead from the start. I wanted to learn React better. Their website looked nice, but I couldn't figure out exactly what was going on because all of the HTML was obfuscated under React gibberish.

    So I submitted a pull request with a sample refactor of the React code to make the HTML readable in F12 dev tools and got kicked off the project :rotate:

    It's not just young developers. This is the big problem with every B-List developer and below. The whole "I understand it, thus it is perfect" attitude is really bad, and they wonder why they cannot move onto new projects within the company (and ultimately quit). Well, duh, the code isn't readable, it's not properly commented (don't make a comment "// updating variable"; instead for difficult to understand code the why should be in the code), and the debug flow is flawed. Which makes the original developer the only one viable to maintain the project.

    It sounds like your modification was at least trying to help with the debug flow for new developers, and they didn't like that. If I was the manager of that team, I'd dig into what's going on ASAP, give the lead a chance to correct the obvious maintainability gaps, and re-engage with you and others like you to develop a backlog of items that need to be addressed. If the lead and others on the team decide to quit, the manager and company are going to be spending a lot of extra time and extra money in the maintenance phase.

  • urahonkyurahonky Registered User regular
    Yeah that's not really unique to Javascript. Hop on Stack Overflow and peruse some of the questions/answers for various programming languages.

  • LD50LD50 Registered User regular
    urahonky wrote: »
    Yeah that's not really unique to Javascript. Hop on Stack Overflow and peruse some of the questions/answers for various programming languages.

    Lies. Befunge is perfect and unequaled on any metric.

  • tyrannustyrannus i am not fat Registered User regular
    doing some socket programming in C for an assignment. look at C's version of polymorphism!
    // get sockaddr, IPv4 or IPv6:
    void *get_in_addr(struct sockaddr *sa)
    {
        if (sa->sa_family == AF_INET) {
            return &(((struct sockaddr_in*)sa)->sin_addr);
        }
    
        return &(((struct sockaddr_in6*)sa)->sin6_addr);
    }
    
    // inside of main
      inet_ntop(p->ai_family, get_in_addr((struct sockaddr *)p->ai_addr),
                s, sizeof s);
        printf("client: connecting to %s\n", s);
    

  • ASimPersonASimPerson Cold... and hard.Registered User regular
    I maintain I still miss writing C full-time.

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    bowen wrote: »
    Integrating with all those old techs is basically like summoning Cthulhu

    As Google Inbox gets shut down I started thinking about what it would take to write my own mail client.

    Then I looked into IMAP.... Holy shit. I see why email has been so stagnant.

    Oh boy. IMAP. The folder seperator is not defined by the RFC.

    Nor is there a way to discover what the folder seperator is.

    Insert appropriate emoticon here.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • bowenbowen How you doin'? Registered User regular
    I'm pretty sure postfix can dump to a database. You could literally just write any email client you wanted at that point. You only need IMAP support if you want to use shit like thunderbird.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • templewulftemplewulf The Team Chump USARegistered User regular
    Speaking of hating JavaScript (un)justly, this really tickled my fancy: https://dev.to/winduptoy/a-javascript-free-frontend-2d3e

    I don't agree that abusing the label tag is "plain and simple", but I love the principle and would like to see it formalized in a more intuitive way.

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited March 2019
    templewulf wrote: »
    Speaking of hating JavaScript (un)justly, this really tickled my fancy: https://dev.to/winduptoy/a-javascript-free-frontend-2d3e
    I was expecting wasm-fu, but what I got was css and html tag tricks.

    I'll accept it.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • DehumanizedDehumanized Registered User regular
    edited March 2019
    https://github.com/kjk/blog

    this person didn't write much javascript either for their website :so_raven:

    Dehumanized on
  • templewulftemplewulf The Team Chump USARegistered User regular
    templewulf wrote: »
    Speaking of hating JavaScript (un)justly, this really tickled my fancy: https://dev.to/winduptoy/a-javascript-free-frontend-2d3e
    I was expecting wasm-fu, but what I got was css and html tag tricks.

    I'll accept it.

    Yeah, some of it comes off as kind of cheeky, but I could really get into this as an idiom.

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited March 2019
    I feel like dynamic web pages are like nuclear reactors. They are highly effective, but the working bits need to be properly isolated and contained or you are going to have a bad time.

    The way some are written is more like the original reactors that were just a big pile of plutonium surrounded by cinderblocks. Everything is exposed but still basically magic, and if you even look at it you will get cancer.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • LD50LD50 Registered User regular
    Do you ever miss the days when a fancy web page was just a big image cut into hyperlinked slices?

  • EchoEcho ski-bap ba-dapModerator mod
    LD50 wrote: »
    Do you ever miss the days when a fancy web page was just a big image cut into hyperlinked slices?

    Ah yes, the halcyon days when you could also get paid $Texas for this arcane knowledge.

  • zeenyzeeny Registered User regular
    #getoffmylawn programming thread.

    I respect that!

  • DehumanizedDehumanized Registered User regular
    edited March 2019
    LD50 wrote: »
    Do you ever miss the days when a fancy web page was just a big image cut into hyperlinked slices?

    even https://spacejam.com has succumbed to the awful "we use cookies" pop-in :(

    Dehumanized on
  • DisruptedCapitalistDisruptedCapitalist I swear! Registered User regular
    templewulf wrote: »
    Speaking of hating JavaScript (un)justly, this really tickled my fancy: https://dev.to/winduptoy/a-javascript-free-frontend-2d3e
    I was expecting wasm-fu, but what I got was css and html tag tricks.

    I'll accept it.

    I also like how noScript shows that slimvoice.co only has one Javascript file loading. Nothing more annoying than finding dozens of js files from dozens of different cloud sites and I can't even tell which one is the correct CDN and which one is just loading crap.

    "Simple, real stupidity beats artificial intelligence every time." -Mustrum Ridcully in Terry Pratchett's Hogfather p. 142 (HarperPrism 1996)
  • LD50LD50 Registered User regular
    It's pretty nice. I feel like it's the direction the web should have gone, but HTML/CSS didn't keep up fast enough (or CSS browser support really).

  • templewulftemplewulf The Team Chump USARegistered User regular
    LD50 wrote: »
    It's pretty nice. I feel like it's the direction the web should have gone, but HTML/CSS didn't keep up fast enough (or CSS browser support really).

    Yeah, I remember someone making this point back in 2007!

    I guess I hadn't realized CSS support had advanced to the point that you could make it work now. I'm so accustomed to JavaScript that I didn't even conceive of an alternative being viable!

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ran across this today, it's a good example as to why you always sanitize external inputs
    https://www.youtube.com/watch?v=2GtbY1XWGlQ

  • LD50LD50 Registered User regular
    templewulf wrote: »
    LD50 wrote: »
    It's pretty nice. I feel like it's the direction the web should have gone, but HTML/CSS didn't keep up fast enough (or CSS browser support really).

    Yeah, I remember someone making this point back in 2007!

    I guess I hadn't realized CSS support had advanced to the point that you could make it work now. I'm so accustomed to JavaScript that I didn't even conceive of an alternative being viable!

    A lot of it could work back in 2007, but IE didn't support things like positioning elements with CSS so it was pointless.

  • UselesswarriorUselesswarrior Registered User regular
    edited March 2019
    RE: Email, there was a pretty good thread on HackerNews (that I now wished I bookmarked) with a Mozilla dev who had worked on both Firefox and Thunderbird who was asked what was the more difficult project, email client or web browser and he responded that an email client was more work. That kind of put me off the idea of writing one. Fastmail is trying to get JMAP to an open standard, which sounds like it would reduce the complexity some.

    RE: Javascript, Javascript is an ugly language that has ugly choices that are largely obscured at this point by syntax suger that makes it look like most Java inspired languages. The ecosystem is pretty productive, but that productive can come with the cost of library dev ADD and a community that is probably too cool with breaking changes.

    As a language aside, protyped-based languages are pretty interesting, Javascript is an immensely successful language that now hides it's protype roots behind more traditional OO syntax sugar, Lua on the other hand is less successful, but feels a lot more consistent and intentionally designed.

    Uselesswarrior on
    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
  • UselesswarriorUselesswarrior Registered User regular
    edited March 2019
    Echo wrote: »
    As Google Inbox gets shut down

    Great, now I'll get mad about that all over again.

    It's seriously so much better than the Gmail interface.

    Dude I know. I am doing some traveling for work and my Gmail looks like someone vomited text everywhere due to all the travel itineraries I have. Inbox, on the other hand, is bundling all those Itineraries together into two separate bundles, one for the each leg of my trip. It also parses out my hotel information, flight numbers and times into a handy card at the top of those bundles.

    It's like fucking magic, and Google is throwing this away.

    EDIT: Oh also Inbox has a feature that recognizes the dates in the email and offers to snooze the email to either that day, or in the case of flights, the day before. Gmail has a dumb snooze interface that has a pretty poorly designed date picker.

    Google open sourced Wave when they killed it, I really really wish they were doing that with Inbox.

    Uselesswarrior on
    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
  • EchoEcho ski-bap ba-dapModerator mod
    Dude I know. I am doing some traveling for work and my Gmail looks like someone vomited text everywhere due to all the travel itineraries I have. Inbox, on the other hand, is bundling all those Itineraries together into two separate bundles, one for the each leg of my trip. It also parses out my hotel information, flight numbers and times into a handy card at the top of those bundles.

    It's like fucking magic, and Google is throwing this away.

    I like the preview on Amazon orders, that also updates to say that it's been shipped when you get that followup email. So much good stuff in the UX.

  • zerzhulzerzhul Registered User, Moderator mod
    I am using Inbox until the moment it is shut down. No amount of "please swap to gmail now" reminders are going to sway me.

  • PeewiPeewi Registered User regular
    Apparently on Android there's internal and external storage, meaning storage only available to your app and storage available to the whole system. Then you try to google something related to it and it is clearly awful naming because everyone already already uses the terms internal and external storage to refer to whether it is physically built into the device.

    Also, I googled how to grey out a button in my app and the Stack Overflow answers I found talked about editing some file to add another button state or setting Alpha to 50% and Clickable to false. It wasn't until days later that I randomly discovered that buttons have an Enabled property that does exactly what I would expect and wanted.

  • DisruptedCapitalistDisruptedCapitalist I swear! Registered User regular
    Ugh. Speaking of unnecessary javascript, I saw Firefox was recommending a story about Samuel L. Jackson on Esquire.com so I clicked the link.

    This is what the article is supposed to look like:
    j6dixf6t4qyl.png

    This is what it looks like with all the JS blocked:
    ho6ulxd5e7am.png
    and...
    ap7gakk96shv.png
    and...
    v11rpj3ixsv2.png
    and...
    43je4psbzx5k.png
    and...
    3hld5jy4qd5t.png

    and here are all the sites that are loading crap onto the webpage according to noScript:
    d36addelbaj6.png

    Now I haven't even loaded all of them, but the sites style already seems to be set (I also checked in Edge just to see it with all the ads loaded, it looks exactly the same.) Yet looking through the noScript list I see a bunch of sites labeled "CDN" even though whatever content they're delivering it's not even being used on the fricken website! I mean, I even see it loading "cdnjquery.com" which is not even jQuery's official CDN!! (and appears to be an empty website hosted by GoDaddy). In fact almost all of these seem to be separately loaded by some JS from ensighten.com.

    I mean, I get that most people should be using javascript and so it should look correct to most people, but I can't imagine that this is readable for accessibility browser (I don't see any skip links to get to the content). Plus if there is any problem with a users internet connection (switching networks, spotty wifi, whatever) it'll bring the page to a crashing halt. Plus the fricken design is so simple you could easily do everything they did with some very simple CSS (not even the magic that Matt Reyer did above.)

    I mean, I guess that's ensighten's business model, convince your client to load up a ton of javascript so that way it looks like you're actually doing work, and ignore that certain people can't even load the page.

    "Simple, real stupidity beats artificial intelligence every time." -Mustrum Ridcully in Terry Pratchett's Hogfather p. 142 (HarperPrism 1996)
  • Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    edited March 2019
    What I don't understand is the young javascript developers who glom onto the new hotness because "it's new, therefore better".

    I tried to join a project a few months ago that had one of these developers as their lead from the start. I wanted to learn React better. Their website looked nice, but I couldn't figure out exactly what was going on because all of the HTML was obfuscated under React gibberish.

    So I submitted a pull request with a sample refactor of the React code to make the HTML readable in F12 dev tools and got kicked off the project :rotate:

    It's not just young developers. This is the big problem with every B-List developer and below. The whole "I understand it, thus it is perfect" attitude is really bad, and they wonder why they cannot move onto new projects within the company (and ultimately quit). Well, duh, the code isn't readable, it's not properly commented (don't make a comment "// updating variable"; instead for difficult to understand code the why should be in the code), and the debug flow is flawed. Which makes the original developer the only one viable to maintain the project.

    It sounds like your modification was at least trying to help with the debug flow for new developers, and they didn't like that. If I was the manager of that team, I'd dig into what's going on ASAP, give the lead a chance to correct the obvious maintainability gaps, and re-engage with you and others like you to develop a backlog of items that need to be addressed. If the lead and others on the team decide to quit, the manager and company are going to be spending a lot of extra time and extra money in the maintenance phase.

    OMG yes. I've run into this so many times it's not funny. I'm not a huge fan of React, simply because my brain was not designed for JSX. I get that it clicks for a lot of people, but I find it cumbersome and in my opinion it adds a lot of extra work. Javascript as a whole needs to either be replaced or significantly revamped. It has a lot of nice things going for it, but also a lot of things that suck. Typescript is a nice step, so I'm holding out hope that it will catch on more and continue to improve things.

    EDIT: I worked on a project late last year where the client actually told me to remove my comments, because "good code should be self-documenting." I countered that good code can only explain what was done, not why it was done (I see we are on the same page in that regard). In the end, they didn't care and I had to pull them. They also didn't like that I used the word `container` in my css class names, for reasons unknown. So I had to change several dozen of them.

    Ear3nd1l on
  • DisruptedCapitalistDisruptedCapitalist I swear! Registered User regular
    heh. So what did you rename the container tags to?

    "Simple, real stupidity beats artificial intelligence every time." -Mustrum Ridcully in Terry Pratchett's Hogfather p. 142 (HarperPrism 1996)
  • Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    edited March 2019
    heh. So what did you rename the container tags to?

    I wanted to change it to `bucket` because I'm a jerk, but they made me use `items` instead. So instead of having a class called `menu-container`, I had to use `menu__menu-items`. Because that's better.... :?

    And then each item in the "container" was called `menu__menu-items__menu-item`. At one point I ended up with a class name that was 42 characters long.

    Ear3nd1l on
  • EchoEcho ski-bap ba-dapModerator mod
    edited March 2019
    Peewi wrote: »
    Apparently on Android there's internal and external storage, meaning storage only available to your app and storage available to the whole system. Then you try to google something related to it and it is clearly awful naming because everyone already already uses the terms internal and external storage to refer to whether it is physically built into the device.

    Also, I googled how to grey out a button in my app and the Stack Overflow answers I found talked about editing some file to add another button state or setting Alpha to 50% and Clickable to false. It wasn't until days later that I randomly discovered that buttons have an Enabled property that does exactly what I would expect and wanted.

    SO is full of actively harmful crap.

    Echo on
  • LD50LD50 Registered User regular
    Echo wrote: »
    Peewi wrote: »
    Apparently on Android there's internal and external storage, meaning storage only available to your app and storage available to the whole system. Then you try to google something related to it and it is clearly awful naming because everyone already already uses the terms internal and external storage to refer to whether it is physically built into the device.

    Also, I googled how to grey out a button in my app and the Stack Overflow answers I found talked about editing some file to add another button state or setting Alpha to 50% and Clickable to false. It wasn't until days later that I randomly discovered that buttons have an Enabled property that does exactly what I would expect and wanted.

    SO is full of actively harmful crap.


    And then they complain that everyone in IT suggests that everyone uses adblockers everywhere all the time regardless of the site.

  • templewulftemplewulf The Team Chump USARegistered User regular
    LD50 wrote: »
    Echo wrote: »
    Peewi wrote: »
    Apparently on Android there's internal and external storage, meaning storage only available to your app and storage available to the whole system. Then you try to google something related to it and it is clearly awful naming because everyone already already uses the terms internal and external storage to refer to whether it is physically built into the device.

    Also, I googled how to grey out a button in my app and the Stack Overflow answers I found talked about editing some file to add another button state or setting Alpha to 50% and Clickable to false. It wasn't until days later that I randomly discovered that buttons have an Enabled property that does exactly what I would expect and wanted.

    SO is full of actively harmful crap.


    And then they complain that everyone in IT suggests that everyone uses adblockers everywhere all the time regardless of the site.

    That's part of what intrigues me about the slimvoice approach.

    It's weird to me how much of layout is reliant on scripting when we have things like LESS and Sass already, and making a site that just works without scripting sounds like a best practice to invest in.

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • AngelHedgieAngelHedgie Registered User regular
    So, in interesting political/programming news, it has come out that Beto O'Rourke was a member of the Cult of the Dead Cow,under the name "Psychedelic Warlord".

    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
  • EchoEcho ski-bap ba-dapModerator mod
    After all this Arduino meddling I've done recently I have come to the conclusion that electronics are 75% boolean logic and 25% magic.

  • urahonkyurahonky Registered User regular
    Now I haven't even loaded all of them, but the sites style already seems to be set (I also checked in Edge just to see it with all the ads loaded, it looks exactly the same.) Yet looking through the noScript list I see a bunch of sites labeled "CDN" even though whatever content they're delivering it's not even being used on the fricken website! I mean, I even see it loading "cdnjquery.com" which is not even jQuery's official CDN!! (and appears to be an empty website hosted by GoDaddy). In fact almost all of these seem to be separately loaded by some JS from ensighten.com.

    I mean, I get that most people should be using javascript and so it should look correct to most people, but I can't imagine that this is readable for accessibility browser (I don't see any skip links to get to the content). Plus if there is any problem with a users internet connection (switching networks, spotty wifi, whatever) it'll bring the page to a crashing halt. Plus the fricken design is so simple you could easily do everything they did with some very simple CSS (not even the magic that Matt Reyer did above.)

    I mean, I guess that's ensighten's business model, convince your client to load up a ton of javascript so that way it looks like you're actually doing work, and ignore that certain people can't even load the page.

    Yeah I'm not even sure how you can use noScript anymore. I tried using it once upon a time but felt like I was spending more time fidgeting with it than I was actually browsing.

  • CampyCampy Registered User regular
    urahonky wrote: »
    Now I haven't even loaded all of them, but the sites style already seems to be set (I also checked in Edge just to see it with all the ads loaded, it looks exactly the same.) Yet looking through the noScript list I see a bunch of sites labeled "CDN" even though whatever content they're delivering it's not even being used on the fricken website! I mean, I even see it loading "cdnjquery.com" which is not even jQuery's official CDN!! (and appears to be an empty website hosted by GoDaddy). In fact almost all of these seem to be separately loaded by some JS from ensighten.com.

    I mean, I get that most people should be using javascript and so it should look correct to most people, but I can't imagine that this is readable for accessibility browser (I don't see any skip links to get to the content). Plus if there is any problem with a users internet connection (switching networks, spotty wifi, whatever) it'll bring the page to a crashing halt. Plus the fricken design is so simple you could easily do everything they did with some very simple CSS (not even the magic that Matt Reyer did above.)

    I mean, I guess that's ensighten's business model, convince your client to load up a ton of javascript so that way it looks like you're actually doing work, and ignore that certain people can't even load the page.

    Yeah I'm not even sure how you can use noScript anymore. I tried using it once upon a time but felt like I was spending more time fidgeting with it than I was actually browsing.

    I think with some sites you just have to accept that it's simply not feesable. Netflix and its ever changing litany of stream URLs was the breaking point for me.

  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Echo wrote: »
    After all this Arduino meddling I've done recently I have come to the conclusion that electronics are 75% boolean logic and 25% magic.

    You've discovered the secret of transistors.

  • evilbobevilbob RADELAIDERegistered User regular
    well yeah the magic smoke is what carries charge in the electronics. that's why they stop working when the magic smoke escapes.

    l5sruu1fyatf.jpg

This discussion has been closed.