1. 8

    Hey at least it’s C++ and not Electron.

    For my own workflow I’ve found the git command line to be fine for the basic operations. But sometimes resolving merge conflicts can be tricky and for that I use a cheesy little tool called tkdiff. The default color scheme is not too pretty, so I have these color customizations:

    ~/.tkdiffrc:

    define bytetag {-background blue -foreground black}
    define chgtag {-background LightSteelBlue -foreground black}
    define currtag {-background Khaki -foreground black}
    define deltag {-background Tomato -font {Monaco 16 bold}}
    define difftag {-background gray -foreground black}
    define inlinetag {-background DodgerBlue -foreground black -font {Monaco 16 bold}}
    define instag {-background PaleGreen -foreground black -font {Monaco 16 bold}}
    define overlaptag {-background yellow -foreground black}
    define textopt {-background black -foreground white -font {Monaco 16} -wrap none}
    

    It’s nice because the tool has just one function, and you can make it integrate with git by doing:

    ~/.gitconfig:

    [diff]
    	tool = tkdiff
    [merge]
    	tool = tkdiff
    

    Then when you have a merge conflict, run git mergetool.

    1. 5

      I use Meld which is nice, but I’m always on the lookout for something better.

      1. 2

        You’ve got Semantic Merge a plain text and semantic diff and merge tool with really good visual component. It supports C++.

        http://semanticmerge.com/

        1. 2

          Thanks, I’ll check it out.

    1. 2

      So they worked on the UI but kept the ultra-narrow columns? So weird. I can’t even read the text the column is so narrow.

      1. 3

        Try an alternate UI like pinafore, it has wider columns.

        1. 1

          Wow, pinafore is really nice. Will try it out for a couple of weeks.

          1. 1

            Thanks for this tip. Do I have to run my own instance to do that? Do I have to lobby my server admin to install extra themes? I’m just using mastodon.social so far.

          2. 2

            Yeah, that decision baffles me as well. Added some custom css to firefox to make columns wider.

            1. 1

              Different themes have different column width. Try the “Photon” theme, I find it much more usable.

              1. 1

                both the glitch-soc fork and the mastodon frontend for pleroma have growing columns… Why they don’t change it for mainline is a mystery.

              1. 2

                PHP has a decent package manager and a “default” package repository since cca 2013.

                1. 17

                  You’d save yourself a lot of trouble upfront not borrowing the filezilla name - it’s trademarked. Already there’s an argument for whether “-ng” postfix constitutes a new mark, why bother even having it. Just completely rename it

                  Hilariously their trademark policy seems to prohibit their use of their own name

                  1. 3

                    Oh, great point. We will need to think of a new name.

                    How about godzilla-ftp.

                    1. 14

                      How about filemander? It’s still in the same vein as “zilla,” but far more modest. The fact that you’re refusing cruft, provides a sense of modesty.

                      Also, “mander” and “minder” — minder maybe isn’t exactly right for an FTP client, but it’s not completely wrong…

                      1. 4

                        filemander

                        Great name! A quick ddg search does not show any existing projects using it.

                        1. 1

                          And it sounds a bit like “fire mander”, which ties in well with the mythological connections between salamanders and fire.

                          1. 1

                            Yeah, the intention was to have a cute salamander logo–way more modest a lizard than a “SOMETHINGzilla!”

                        2. 8
                          1. 5

                            Just remember to make sure it’s easy for random people to remember and spell. They’ll be Googling it at some point.

                        1. 1

                          I’m the author of the blog post and one of two authors of the guidelines. Any feedback is welcome.

                          1. 1

                            Thanks for posting this, it’s great to see how conferences do this (as a submitter, it seems so random).

                            I’m curious about your decision to not “blind” the submissions?

                            Some conferences ask for clips from previous talks (that may not be public) or a 2-3 minute video (for those who don’t have a clip), is that something you considered?

                            What shepherding/coaching did you provide (if any) for submissions?

                          1. 9

                            Here’s the RSS feed: https://us18.campaign-archive.com/feed?u=ab0f46cf302c0ed836e0bf0ad&id=56b5f64c5f

                            I still find this the best way for consuming periodical content. I can read it when I want, and not have it clutter my mailbox.

                            1. 1

                              While this will work, just keep in mind that there are plans for exclusive content that will not be available via RSS due to its limiting nature.

                              1. 2

                                Out of curiosity, what is more limiting about RSS than email? The only thing I’ve come up with so far is that I guess you could customize what is sent to each email address, but that doesn’t seem to apply to a newsletter anyway.

                                1. 1

                                  Customization is precisely my issue. The RSS feed will only render the issue as an anonymous reader, which removes any personalized messages I include as well as any exclusive content paying readers (will) have access to. Another issue on my end is that RSS subscriber numbers are not precise.

                                  To be clear though, I am in no way against RSS. In fact, the whole newsletter is based on my ability to read tons and tons of feeds. Just that Morning Cup of Coding is not (and will not be) designed for RSS, and thus I will not be actively promoting its use.

                                  1. 3

                                    You could require that RSS readers append a “token” to the URL; which would identify the reader and thus give them said personalized content.

                                    1. 2

                                      That could definitely work. Not sure how I can integrate that with MailChimp. I’ll give it a look this weekend. Thanks.

                                      1. 3

                                        You could always roll your own so you have more control:

                                        you’d still need something like SendGrid for delivery, but that’s not too hard either.

                                        1. 3

                                          Tbh, I don’t trust myself to build a software that sends emails to 3,5k readers :) But it’s definitely in the back of my mind because I still do a lot of things manually. I know about SendGrid and MailTrain, thanks for pointing out paperboy.

                            1. 2

                              I sincerely dislike them for completely shredding BC in version 4.

                              Now I need to find a week of time to figure it out and migrate a relatively large project I’m working on. In the meantime I cannot upgrade to the latest version of React since v3 does not support it.

                              1. 4

                                The PHP community has morphed “Avoid else” into “Never use else”. The idea was originally taken from Code calisthenics for Java, adapted for PHP and popularized by varios conference talks.

                                The benefits of early return are obvious, but to avoid using “else” altogether is just silly and can lead to some convoluted code.

                                1. 8

                                  Ruby community is also obsessed with enforcing small-scale coding rules (this is aspect I dislike most in ruby’s culture). For example, default settings of rubocop, the most popular ruby linter, forbids something like this:

                                  def check_thermal_safety
                                    if widgets_temperature > 100
                                      stop_warp_engine
                                    end
                                  end
                                  

                                  It forces user to invert logic like this:

                                  def check_thermal_safety
                                    return unless widgets_temperature > 100
                                    stop_warp_engine
                                  end
                                  

                                  I find this less readable, and moreover, it’s defined in style guide that almost became analogue of python’s pep-8 and it’s enforced by “canonical” ruby linter with default settings.

                                  However, avoiding long nesting, like in this article, is ok, I think.

                                  1. 3

                                    The thing I like, but many ignore, about PEP-8 is that it encourages breaking the rules when it makes sense to do so: A Foolish Consistency is the Hobgoblin of Little Minds.

                                    And Beyond PEP-8 is a good talk about how people tend to miss the point of style guides.

                                    1. 2

                                      Primary reason for applying guides without questioning might be that lots of projects run linters on CI. Your code will not pass if you don’t obey style guide.

                                      Disabling checks for blocks of code are not very convenient in most linters. For example rubocop allows to disable check before block and to enable after it. I’m not even sure if rubocop:enable all will not turn all checks after this block, even if only few checks are enabled in config. And nowadays any comments are red rag for code reviewers because “comments are code smell”.

                                    2. 2

                                      I’ve also seen this style, which in certain cases hides the conditional:

                                      def check_thermal_safety
                                        stop_warp_engine if widgets_temperature > 100
                                      end
                                      
                                      1. 2

                                        I think this style is acceptable for things like raise where it’s obvious at a glance that you would never do it unconditionally, but for anything more subtle it’s a readability disaster.

                                        1. 2

                                          This style is not that bad, but only if text editor is configured to show keywords such as if in color/font that stands out. It’s almost unreadable without syntax highlighting.

                                          Rubocop does not issue warning for this style. But this option of formating is available only if condition expression and body are small. This is the case when style guide requires you to rewrite code (negate logic, add return) if expression becomes larger (for example, if method is renamed).

                                          1. 1

                                            For what it’s worth, as a full-time ruby dev for 6 or 7 years now, this is my take on the “ruby idiomatic” way of writing this method.

                                      1. 2

                                        I tried VSCode for two weeks, then went back to Sublime. I found the code intel better on Code, but it just was not snappy on a medium sized python project. It was taking half a second to switch between two open files, and jump to symbol was nowhere as fast as sublime. Maybe it sounds like nitpicking but it was driving me insane. So Sublime it is for me. I’ll reevaluate Code periodically though, because it’s very promising.

                                        1. 2

                                          I love talks by Maciej Ceglowski, the guy behind Pinboard. If I were to single out a few:

                                          All talks have full transcripts if you’re not into video and video links are at the top if that’s your cup of tea.

                                          Here’s the full list: http://www.idlewords.com/talks/

                                          1. 2

                                            Red Mars, and it’s sequels Green Mars and Blue Mars. My dad read them last year, and gave them to me for Christmas. The wikipedia summary is accurate:

                                            The Mars trilogy is a series of award-winning science fiction novels by Kim Stanley Robinson that chronicles the settlement and terraforming of the planet Mars through the intensely personal and detailed viewpoints of a wide variety of characters spanning almost two centuries. Ultimately more utopian than dystopian, the story focuses on egalitarian, sociological, and scientific advances made on Mars, while Earth suffers from overpopulation and ecological disaster.

                                            The author also makes an effort to stick to hard science, and mostly gets it right. So far I like it a lot.

                                            1. 3

                                              I read the first two, and kinda lost interest on the third. But the science was spot on. Very interesting.

                                              1. 1

                                                I’ve read Aurora by Kim Stanley Robinson and quite enjoyed it. The Mars trilogy is on my wish list.

                                              1. 6

                                                Recently there’s been a lot of discussion of keyboard latency, as it is often much higher than reasonable. I’m interested in how much the self-built keyboard community is aware of the issue. Tristan Hume recently improved the latency of his keyboard from 30ms to 700µs.

                                                1. 2

                                                  The Planck that Dan and I tested had 40ms of latency - not sure how much that varies from unit to unit though.

                                                  1. 3

                                                    I would expect very little, using the QMK firmware with a custom keymap. There’s typically only a handful of C with a couple ifs, no loops.

                                                  2. 2

                                                    Why are those levels of latency problematic? I would think anything under 50ms feels pretty much instantaneous. Perhaps for people with very high typing speeds or gamers?

                                                    1. 1

                                                      The end-to-end latency on a modern machine is definitely noticeable (often in the 100s of ms). Many keyboards add ~50 ms alone, and shaving that off results in a much nicer UX. It is definitely noticeable comparing, say, an Apple 2e (~25ms end-to-end latency) to my machine (~170ms end-to-end latency, IIRC).

                                                    2. 1

                                                      I recall reading about that. I’ll see about getting some measurements made, and see what it’s like on my Planck.

                                                      I’m interested in how much the self-built keyboard community is aware of the issue

                                                      I haven’t really seen much about it :/ If we could find an easy way of measuring latency without needing the RGB LEDs and camera, that would be good.

                                                      1. 2

                                                        a simple trick - use a contact microphone (piezo), jack it into something like https://www.velleman.eu/products/view/?id=435532

                                                    1. 8

                                                      Ah it’s again time to be amused, impressed and be made to feel a bit stupid. I love the journal for that.

                                                      It is a valid PDF document and a ZIP file filled with fancy papers and source code. It is also a valid program for the Apollo Guidance Computer, which will run in the VirtualAGC emulator

                                                      <3

                                                      1. 2

                                                        Are there any decent alternatives?

                                                        1. 3

                                                          I just use Google (which has full integration with these sites), hotel tonight, or the hotel’s website/phone line (they’ll usually price match).

                                                          1. 1

                                                            These days going directly to the hotel’s site is usually the same price or cheaper, especially if you’re booking way in advance. I’ve just been through a big booking spree for my trip through South America and I was amazed - even non-chain boutique hotels are sometimes 30% under the price of the aggregators.

                                                            My usual process now is momondo -> google the hotel’s site.

                                                            1. 1

                                                              If you’re traveling to/within Asia, Agoda is the best option.

                                                              1. 1

                                                                hotels.com maybe, but I think they use similar techniques.

                                                                1. 1

                                                                  trivago seems ok?

                                                                  1. 5

                                                                    They are the same company, just different domains: http://www.expediainc.com/expedia-brands/

                                                                    1. 2

                                                                      Never knew that, very interesting.

                                                              1. 7

                                                                Great stuff, but I’m hoping for a blog post version soon. (Anyone else find Twitter threads annoying to read? Is this “old man shouts at cloud” territory?)

                                                                1. 5

                                                                  Already on his blog

                                                                  1. 2

                                                                    @Irene or @jcs could you update this submission to point at that blog entry instead please?

                                                                  2. 2

                                                                    What’s twitter?

                                                                    1. 1

                                                                      You’re right. Twitter is a horrible medium for blogging.

                                                                      1. 1

                                                                        https://xato.net/windows-spying-and-a-twitter-rant-19203babb2e7

                                                                        Maybe the story should point at that instead.

                                                                        1. 1

                                                                          I’ll join you np!

                                                                          *waves fist* Dag nabbit!!

                                                                        1. 3

                                                                          Where Erlang uses true as a catch-all, Clojure has the :else keyword. This makes it more readable.

                                                                          (cond
                                                                            (< n 0) "negative"
                                                                            (> n 0) "positive"
                                                                            :else "zero"))
                                                                          
                                                                          1. 16

                                                                            :else isn’t anything special in Clojure, it’s just truthy. The following is the same:

                                                                            (cond
                                                                              (< n 0) "negative"
                                                                              (> n 0) "positive"
                                                                              true "zero"))
                                                                            
                                                                            1. 5

                                                                              I regularly use :else as the catchall clause in Elixir (same rules as Erlang). Anything truthy will work.

                                                                            1. 1

                                                                              I like the idea of using a REST(ful?) API for reading data and a RPC API for changing data. I don’t usually work with plain CRUD apps, so having functions gives the API better semantics.

                                                                              1. 2

                                                                                I only knew to strafe along the wall to increase my speed, never imagined all this craziness.