1. 3

    The author claims they’re a programmer, but they still clicked 338 checkboxes manually? Sounds fishy :)

    Here’s what I’ve done on Tumblr, which also has something similar.

    for (var x of jQuery("input[checked]")) {jQuery(x).removeAttr("checked");}

    1. 11

      The author is a programmer, a software architect, an hacker, and a curious person in general.

      I can conceive several ways to fool your smart jquery script. If you cannot think of them yourself, you shouldn’t code in Javascript, actually.

      But also I’m a UI and UX designer, at work.

      I was surprised to see a nice UI with such a stupid mistake.

      I hoped the developer on the other end was cool enough to surprise me.

      After the first ten clicks I realized she was not that smart.

      I hit F12. But then I thought “my users cannot hit F12: lets walk their path and see how I feel”.

      I’m not stupid. I simply care.

      1. 2

        I can conceive several ways to fool your smart jquery script. If you cannot think of them yourself, you shouldn’t code in Javascript, actually.

        • I don’t think he was claiming his solution was a fit for all
        • So by your logic only people who know DOM JS should code in JS? ;)

        I know this was a reply to a slightly provocative comment in defense of the author, but this in particular seems a little silly

        1. 5

          I’m the author. And actually I’m sorry for the tone of the reply: I’m tired, and I didn’t intended the @janiczek’s post as a joke for me, but as an attempt to justify InfoWorld by calling me fishy.

          I’m fishy, definitely! :-)

          But I also care about users. And I’m an European fish…

          So by your logic only people who know DOM JS should code in JS? ;)

          Nobody should code in JS. Really. Nobody should.

          But yes, if you don’t know how DOM JS has been interpreted in the last 10 years, I think you shouldn’t code in JavaScript professionally. You might think I’m exaggerating to get a point, but trust me: everything is still there, under the hood. Ready to break.

          1. 2

            Thanks for the kind reply. I wasn’t trying to provoke myself, just point out something that seemed a bit off :) Professionally? Perhaps your right in a perfect world, but the fact remains there will always be code monkeys that build or maintain simple systems for a customer base that can’t pay for a seasoned developer. Regardless, I agree with the pain point of your article :)

            1. 3

              Mm, I kind of feel like as a profession we should try to have more respect for our own work. Software can cause significant harm, and we’ve all just collectively agreed that it’s okay to prop up companies that want to build broken things and not properly maintain them. Maybe companies that aren’t willing to spend the money to build safe software shouldn’t have the privilege of getting engineers to work for them.

              I know that’s a tangent and not really what you were trying to address.

              1. 3

                I completely agree with your first statement, having respect for your own work is a great virtue.

                The devil is in the details in regards to companies/individuals who provide shoddy services. Outside passionate and informed social circles, it’s customers vote with their pockets (counting data as a form of currency here), whether that be for trading for convenience or just a result of plain ignorance.

                Unfortunately there aren’t any easy remedies to this problem. Shoddy companies/individuals will find ways to work their way around regulations, and customers will quite happily dig themselves into holes in pursuit of the cheapest or quickest solution. That doesn’t mean you don’t try, in fact I personally think one of the best tactics we can use for problems such as these, is informing the general public of the consequences (though that’s another problem in itself).

                1.  

                  Yes, I agree with all of that, and thank you for it.

                2. 2

                  Maybe companies that aren’t willing to spend the money to build safe software shouldn’t have the privilege of getting engineers to work for them.

                  I see your point, but to me it’s like saying that companies that aren’t willing to spend the money to write proper English shouldn’t have the privilege of getting writers to work for them.

                  They can learn how to write by themselves.

                  I prefer a different approach: turn all people into hackers.

                  1.  

                    Yeah, I see that point also. But, I mean, writers have historically been more willing to stand up to exploitative labor practices than hackers have… I think there’s a balance to be found, and getting to the right balance requires rethinking some things.

                    1.  

                      We are just like scribes from Ancient Egypt.

                      Despite the groupthink, we are still at a very early stage of information technology.

                      Just like being a scribe back then, being hackers today does not mean understanding the power and responsiblity we have. But it’s just a matter of time.

                      We will forge the future.

              2. 1

                I’m sorry if my post came as provocative! (Maybe my definition of “fishy” – as English is not my native language – is slightly off compared to your definition)

                Yeah, “I know I could do X instead of clicking, but common user can’t, so let’s walk in their shoes” is a fair motivation. Maybe I just expected the thought to be expressed in the post, given you’ve expressed you’re a programmer. But maybe that’s a silly expectation ¯_(ツ)_/¯ Thanks for the clarifications in the comments here.

        1. 8

          One of my favourite things about openbsd is the controlled deprecation and removal of accumulated junk each release.

          1. 2

            That’s what I like about Elm language - removing syntax, simplifying concepts, … Refreshing approach to development of anything :)

          1. 3

            Great to see other languages steal from Erlang as well :D

            Here’s my library doing this in Elm: https://github.com/Janiczek/elm-architecture-test/blob/master/README.md

            And here is a talk on the topic from the Elm Europe conference: https://youtube.com/watch?v=baRcusTHc8E

            1. 6

              My favorite approach to this problem is in TLA+, and it always finds the solution.

              1. 4

                And here’s the Alloy way of doing it!

                1. 2

                  Both of these are awesome! :) Thanks for the links!

              1. 12

                Any interest in a crustacean private leaderboard?

                1. 9

                  I guess competition is healthy, but I have an additional suggestion: crustacean private help board: I don’t know how we’d do it, one big “ask” story/thread would be difficult, we could set up a github project for it and have questions as “issues” perhaps? We could have a wiki on it too.

                  EDIT:

                  Also, the idea of a lobste.rs joint github additionally appeals to me because I know we all dabble in various esoteric languages and we could have a “rosetta code” type of project where we solve the problems in different languages, and it would be fun to compare these solutions across languages.

                  EDIT:

                  https://github.com/a-red-christmas

                  In case anyone thinks its a good idea … please join up

                  1. 4

                    Sounds like fun to me, I’m azdle on github too if you’re adding people.

                    I agree with @gerikson about not having a daily thread and I think one monster thread would quickly get unwieldy. I created a #lobsters-advent on freenode that we can for discussion.

                    1. 3

                      The AoC subreddit is a good place to look for help and tips.

                      I don’t like the idea of “polluting” Lobsters with a daily question thread.

                      I love the idea of a shared code repo.

                      1. 3

                        Please add gustafe on Github!

                        1. 3

                          yumaikas on github. I’d love to join.

                          1. 3

                            Count me in. trevmex on GitHub.

                            1. 2

                              The github web interface doesn’t seem to have a ‘request to join’ button. I think you have to add people manually.

                              1. 4

                                JKowalsky on Github as well, I’d love to join as well!

                                1. 4

                                  tftio

                                  1. 3

                                    daveloyall

                                    1. 3

                                      NattyNarwhal, not sure if I’ll do it, but I’d definitely consider it.

                                    2. 2

                                      Would you mind adding bpollack?

                                      1. 2

                                        Cool. I’ll add my Haskell solutions :)

                                        1. 1

                                          (Or at least I will if you add PhilArmstrong to the project :) )

                                        2. 1

                                          I’d love to join! My username is Vaelatern.

                                          1. 1

                                            I’ve invited you!

                                            1. 1

                                              And I’ve contributed my clojure solutions!

                                        3. 2

                                          I’d be up for it!

                                          1. 1

                                            Post your ‘join code’?

                                            1. 1

                                              Will do asap!

                                          1. 2

                                            This is one of those cases where “clever” is used as a synonym for “obfuscated.” Or am I missing something RE: modern js best practices, as hinted by the line “…we strive here to avoid creating new functions”?

                                            1. 1

                                              Relevant (for Elm instead of JS, but the point stands): http://martin.janiczek.cz/clanek/being-clever-antipattern-in-elm/