5 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

17 comments

  1. crdpa
    Link
    This is my first fully working software. I'm learning programming so it probably has a lot of problems, but here it goes: https://github.com/crdpa/gore It is a bulk renamer written in Go. Just run...

    This is my first fully working software. I'm learning programming so it probably has a lot of problems, but here it goes:

    https://github.com/crdpa/gore

    It is a bulk renamer written in Go. Just run it in the directory you are in and rename the files in your $EDITOR.

    I already use the built-in bulk renamer in nnn, but i did this as a learning experience and it is working. Just be careful because i barely know what i'm doing.

    Tips and contributions are welcome.

    Next step is learning how to package a binary and publish on github.

    5 votes
  2. [6]
    archevel
    Link
    I've been working a bit on a Öppna Skolplatformen to enable it for parents with kids in my municipality. Unfortunately I've run up against a bit of a roadblock. All communication with the server...

    I've been working a bit on a Öppna Skolplatformen to enable it for parents with kids in my municipality. Unfortunately I've run up against a bit of a roadblock. All communication with the server works when I drive the calls via node. However, when I shift over to use react-native to do the fetching the login breaks down. I think I've tracked down the issue to react-native's fetch call not handling multiple Set-Cookie headers correctly (in the case of Android). Just for debugging purposes (and also for a bit of fun and learning) I implemented my own fetch function in android and exposed it as a native module. It now manages to get past one part of the login, but there is some additional issue that prevents the whole login flow to complete. This hack isn't the way to solve the issue (I have a hunch I can inject a custom cookie manager into the existing fetch function in a cleaner way), but I haven't worked much with react-native so figured it'd be good way to learn some details.

    4 votes
    1. skybrian
      Link Parent
      If you don't mind being sidetracked, this might be an opportunity to contribute a bugfix to react-native? Is it following the protocol?

      If you don't mind being sidetracked, this might be an opportunity to contribute a bugfix to react-native? Is it following the protocol?

      3 votes
    2. [4]
      cfabbro
      Link Parent
      Is that the same Öppna Skolplatformen that WIRED wrote about a few weeks ago? These Parents Built a School App. Then the City Called the Cops

      Is that the same Öppna Skolplatformen that WIRED wrote about a few weeks ago?

      These Parents Built a School App. Then the City Called the Cops

      1 vote
      1. [3]
        archevel
        Link Parent
        Yeah, that's the one. We're building it for Gothenburg now and so far they've been much more supportive of our efforts.

        Yeah, that's the one. We're building it for Gothenburg now and so far they've been much more supportive of our efforts.

        2 votes
        1. [2]
          cfabbro
          (edited )
          Link Parent
          Neat. If you don't mine my asking: How long have you been working on it? Were you or anyone you know amongst the people targeted by the legal bullshit that the city of Stockholm tried to stir up?

          Neat. If you don't mine my asking: How long have you been working on it? Were you or anyone you know amongst the people targeted by the legal bullshit that the city of Stockholm tried to stir up?

          1 vote
          1. archevel
            Link Parent
            I started a few months back when one of the people in the project reached out since they needed Devs with kids in Gothenburg. I wasn't part of the Stockholm city stuff as that was mainly before I...

            I started a few months back when one of the people in the project reached out since they needed Devs with kids in Gothenburg. I wasn't part of the Stockholm city stuff as that was mainly before I started.

            2 votes
  3. [8]
    lonk
    Link
    I'm facing one of the two most difficult problems in programming: naming things[1]. In my personal project LinkLonk, when you upvote stuff you put it into a "collection", but I'm now thinking that...

    I'm facing one of the two most difficult problems in programming: naming things[1].

    In my personal project LinkLonk, when you upvote stuff you put it into a "collection", but I'm now thinking that calling them "channels" would be better.

    Here is what I posted on this topic in https://linklonk.com/item/7735497677823082496:

    I posted an explanation of how collections work on LinkLonk: https://linklonk.com/item/2369676162410512384

    But is collection the right name for it? I came across the word channel and it sounds more fitting.

    Some reasons:

    • Collection is passive, while channel is more active. You don't collect links on LinkLonk for the sake of collecting (though you could do that). But the main goal is to discover more useful information and to help others do the same.
    • Signal-to-noise is a core idea of the LinkLonk's algorithm and it is more related to channels than to collections.
    • When you upvote an item you could say you are "tuning into" the other people's channels that transmitted that item. Or you amplify the volume of channels that resonated with you.
    • A channel has a concept of order, which fits how LinkLonk works - you connect to channels based on what they "transmitted" in the past to get what they will transmit in the future. A collection does not necessarily have an order. For example, in programming language Java, a collection can be ordered (a list) or unordered (a set): "A collection represents a group of objects, known as its elements. Some collections allow duplicate elements and others do not. Some are ordered and others unordered." (source)
    • On LinkLonk you can connect to RSS feeds and to other users' collections. Both are treated in exactly the same way by the algorithm - a sequence of items. Channel is a name that could be applied to both RSS feeds and user collections. But I wouldn't call an RSS feed a "collection". It's a good sign that "channel" covers both sources of information.
    • A collection may give an impression that you can rearrange items (like bookmarks in a folder), while a channel implies ordering by time => less likely to create unmet expectations.
    • Each user starts with one collection that is called default - I don't like this name, but I can't think of anything better. If we use channels then I think the default channel could be called main. I don't know why, but I think main works for channels but not collections.

    I think it is very important to get the names of the main concepts right because better names help users create more accurate models of how the system works.

    What do you think?

    [1] - The other problem is cache invalidation - I solve it by running the server as a single Go binary, so it is easy to keep track of cached state since all changes to the database are done through this binary.

    3 votes
    1. [5]
      skybrian
      Link Parent
      I've been thinking that I actually would like a place to collect links for the sake of collecting, with conversation being secondary. (Key to that would be avoiding the feeling that you're...

      I've been thinking that I actually would like a place to collect links for the sake of collecting, with conversation being secondary. (Key to that would be avoiding the feeling that you're spamming people if you post a dozen links at once on a specialized topic.) But it's up to you where you want to go with that. If "channel" fits your vision better, it seems fine.

      Bug report: When I go there, I see a message that I'm not logged in. When I hit the login button, a little blank square appears. Maybe that's supposed to be a dialog?

      I'm using Chrome on my phone, so maybe the layout doesn't work for this screen?

      1 vote
      1. [4]
        lonk
        Link Parent
        You should feel free to use LinkLonk to collect links just for yourself. The idea of LinkLonk is that the user has control who they want to get recommendations from. If they are not connected to...

        You should feel free to use LinkLonk to collect links just for yourself. The idea of LinkLonk is that the user has control who they want to get recommendations from. If they are not connected to your channel, then the links you add to that channel won’t rank high on their For you page. It’s only the brand new users that are not yet connected to anything will be most affected. In that case the recommendations they see are ordered basically by popularity.

        I remember you posted about this concern of spamming people on Tildes. I think it was in the context of whether too many music links were posted. That should not be a concern on LinkLonk.

        Maybe LinkLonk should have an option to exclude your channel from showing up in popular - so the items from this channel would only be shown to users that happen to also upvote what you put in your channel?

        Thanks for the bug report! When you press Sign in at the top of the page, you should see a dialog, but the fact that it is empty for you means that something is broken. I tested logging out and back in in Chrome on my phone and my laptop and, unfortunately, I couldn’t reproduce the issue - the dialog worked. If you could send me any details - please PM me. Too bad the issue is on the phone - there are no Developer Tools that could be easily checked for errors in the console or in the network requests.

        1 vote
        1. [3]
          Bwerf
          Link Parent
          The login popup shows up correctly for me on chrome/android, firefox/linux and chromium/linux. Running no ad/popup or other blockers on the phone.

          The login popup shows up correctly for me on chrome/android, firefox/linux and chromium/linux. Running no ad/popup or other blockers on the phone.

          1 vote
          1. [2]
            lonk
            Link Parent
            Thanks for testing! skybrian@ helped me find the issue over PM. The login dialog was broken only when you tried to open it on the item details page. The details page has a comment form which...

            Thanks for testing!

            skybrian@ helped me find the issue over PM. The login dialog was broken only when you tried to open it on the item details page. The details page has a comment form which fetches the name of the user from the server. But it didn't work in the case when the user was not signed in. This caused the whole page misbehave and the login dialog was affected. I fixed the handling of this case.

            The bug was on the server side handling the /user/profile request when the user was not signed in. There was a pointer variable "currentUser" that I did not initialize when the user was not signed in (since there is no user), but /user/profile tried to access currentUser.name, which caused a panic (a Go analogue for a NullPointerException). To fix it I initialized currentUser with a stub user with an empty name. Result: /user/profile simply returns a user with an empty name, instead of returning an internal error (code 500).

            1 vote
            1. Bwerf
              Link Parent
              Great, glad that you were able to fix it =D

              Great, glad that you were able to fix it =D

              1 vote
    2. [2]
      space_cowboy
      Link Parent
      Looks like solid reasoning to me. I have been enjoying linklonk, but there isn't much there yet it seems.

      Looks like solid reasoning to me. I have been enjoying linklonk, but there isn't much there yet it seems.

      1. lonk
        Link Parent
        We don’t have many active users, so the popular page has little content indeed. But you should be getting content from RSS feeds that posted content that you liked before. Are you not getting...

        We don’t have many active users, so the popular page has little content indeed. But you should be getting content from RSS feeds that posted content that you liked before. Are you not getting enough from RSS feeds? If so, maybe you have not yet connected to enough feeds? Please try upvoting a few links or, better yet, submitting links you found elsewhere to https://linklonk.com/submit. That will let the system know which RSS feeds to bring you content from.

        1 vote
  4. jzimbel
    Link
    In my weird version of procrastination from Thanksgiving prep, I made this. My own take on the classic 10PRINT program. It’s not really useful, but it sure is mesmerizing to look at!

    In my weird version of procrastination from Thanksgiving prep, I made this. My own take on the classic 10PRINT program. It’s not really useful, but it sure is mesmerizing to look at!

    2 votes
  5. Bwerf
    Link
    What about the off-by-one errors?

    What about the off-by-one errors?