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?
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.
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.If you don't mind being sidetracked, this might be an opportunity to contribute a bugfix to react-native? Is it following the protocol?
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
Yeah, that's the one. We're building it for Gothenburg now and so far they've been much more supportive of our efforts.
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?
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.
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:
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.
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?
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.
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.
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).
Great, glad that you were able to fix it =D
Looks like solid reasoning to me. I have been enjoying linklonk, but there isn't much there yet it seems.
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.
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!
What about the off-by-one errors?