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?

5 comments

  1. zoroa
    Link
    Android UI Automation with ADB I use a Hacker News client called Glider on my phone. It's my favorite client, and seemingly one of few that lets you bookmark comments. But weirdly, despite letting...

    Android UI Automation with ADB

    I use a Hacker News client called Glider on my phone. It's my favorite client, and seemingly one of few that lets you bookmark comments. But weirdly, despite letting you export your bookmarks, there's no way to restore backups of your bookmarks.

    That hasn't been a problem before, since Android's "Use Your Old Phone to Setup Your New Phone" feature would carry the data over. But I couldn't use that approach the latest time I had to setup my phone anew. A feature request would've fallen on deaf ears, since Glider was abandoned shortly I started using it. And despite how simple I imagine the implementation would be, I had no interest in rebuilding the app.

    So I started doing it manually, and after only a couple minutes I was researching how to automate the manual tapping I was doing in the UI.

    Unsurprisingly, adb can do that. It just takes enabling Show Pointer Location in Developer Settings so you can see the coordinates of the UI you want to hit. Then you can use adb to programmatically send touch events.

    So after only an afternoon debugging a surprisingly long Python script, a detour into a hackernews api, and another detour in programmatically clearing my bookmarks from the app, I successfully automated restoring my bookmarks. A process that probably would've taken an hour max if I just did it myself :)


    This exercise had me go through those bookmarks for the first time in a long time, and I was surprised at all the interesting stuff I had saved. A lot of it would be useful to me right now, but I only happened to look because I was setting up a new phone. Maybe its time to start using an actual bookmarking system.

    3 votes
  2. Kremor
    Link
    I've been working on a productivity app where your progress is reflected in a 3D planet simulation. The more tasks you complete, the more things grow on the planet. And if you stop doing stuff,...

    I've been working on a productivity app where your progress is reflected in a 3D planet simulation. The more tasks you complete, the more things grow on the planet. And if you stop doing stuff, things slowly start to die.

    I've been working on the different features separately: tasks, events, notes, pomodoro, achievements. It's still far from finished, but it's starting to take shape, and soon it'll reach a point where the only thing missing will be some wiring between the different parts. At least for the first version.

    3 votes
  3. bugsmith
    Link
    Given the recent announcement of allowing Tildes to naturally sunset, I'm playing around with the idea of building something to fill the eventual void. I've been toying around with various...

    Given the recent announcement of allowing Tildes to naturally sunset, I'm playing around with the idea of building something to fill the eventual void. I've been toying around with various programming languages and frameworks.

    Initially I was convinced I wanted to use Go, as it's what we use at work, but honestly I don't think it's necessarily the best choice for something I'd ideally want other people to contribute to, or more importantly, something I want to be able to iterate on quickly to test things out and integrate feedback.

    I am leaning towards one of Python and Django or Elixir and Phoenix. The former felt like the obvious choice, but having played around with Phoenix for a couple of weeks, I'm am strongly leaning towards that.

    I'm not silly enough to overlook how stacked the odds are of me building something like this that would actually get used by a critical enough mass, so it's as much a project of learning and joy.

    Given I expect Tildes to still be around for quite a long time, it's not something I feel in a great rush to get out, so I'll likely build a bunch of PoCs and see what feels good.

    The much bigger challenge will be taking the best of Tildes and creating policies and tools that foster a similar quality of community - but that's certainly not something I intend to tackle alone.

    2 votes
  4. CrypticCuriosity629
    Link
    So I'm finally creating my dream ADHD task/scheduling/productivity app. I've had this idea for a very long time, and it's something I've done manually, and for me and my ADHD and my issues around...

    So I'm finally creating my dream ADHD task/scheduling/productivity app.

    I've had this idea for a very long time, and it's something I've done manually, and for me and my ADHD and my issues around executive function, task initiation, time blindness, etc, it's been VERY effective, however because I've had to manually set up the tasklist and schedule each time that's exactly what triggers my ADHD.

    Anyways, the concept is that it's like envelope budgeting but for tasklists and schedules. So kind of like how the concept of envelope budgeting says "Every dollar should have a job" and you assign your dollar to savings goals, this concept basically says "Every minute should have a job" and you assign your time throughout a day to tasks, and freetime.

    But the key to this is also balancing flexibility, So there's built in support for breaks, freetime, and "rewards". So it's not like you have to fill your day with constantly doing stuff, but it lets you plan for freetime as well.

    For example what works for me is to break my tasks up with short 30 minute gaming breaks where I'll play a few rounds of Deep Rock Galactic or something similar. And how I manage those breaks is that they're like rewards for finishing chores or whatnot.

    And to build in flexibility, those breaks are dynamic too. So lets say a break is scheduled for 30 minutes with a minimum of 15 minutes, however if I finish the previous tasks early the break time increases for more than 30 minutes, but if I take longer on tasks, the break time decreases to 15 minutes before the break gets pushed out. Alternatively people can instead have one big "Free evening" task at the end of the day that increases or decreases too.

    There's also the ability to be as granular or as broad as you want. So you can either have something like:

    • 7:00am-7:45am: Take shower and get ready for work

    or you can have

    • 7:00am-7:05am: Get clothes together.
    • 7:05am-7:20am: Take shower
    • 7:20am-7:25am: Brush teeth
    • 7:25am-7:30am: Shave
    • 7:30am-7:35am: Get dressed
    • 7:35am-7:45am: Style hair

    And you can end tasks early of course, and it expands the freetime blocks later.

    For me at least, it really helps when I've broken things down granularly like that. Having a timer per granular task helps me keep pace and not get distracted.

    And planning breaks and stuff feels nice because I don't feel guilty or like I'm in a rush or anxious about the break.

    The idea for this app is that it structures and automates this concept and gives it a UI. I'd been doing this manually and using LLMs to restructure the schedule, but it's too much work and triggers my adhd.

    Some features I'm planning:

    • Templates/Routines: Tasks or groups of tasks that can be dropped in a schedule
    • Live task interface: has a countdown to next task, an add-time button, or a finish early button, as well as a "stuck button"
    • Daily overview: Will ideally look like a full calendar.
    • Task Types:
      • Activity Task: Fixed duration. If you finish early, the next Block starts early and downstream Flex Blocks expand. If you run over, downstream Blocks shift forward and Flex Blocks compress.
      • Flex Task: A reward, break, or freetime Block that expands when you're ahead and shrinks (to a configurable minimum) when you're behind, then gets pushed if things go even further over.
      • Split Task: A Block with a beginning, an uninvolved middle, and an end, where you can do other things during the middle. For things like Laundry where you put the laundry in and can do other things while you wait.
      • Anchored Task: A block that has a rigid time that can not move. These are things like appointments, meetings, or anything on a rigid schedule.
    • Automatic Travel time/ready time blocks: If you have a doctor's appointment, you can put the address in and it will block off time telling you when you should leave. Ready time is configurable so it automatically gives you a small block to get ready before a following block. Can be applied to any task type.
    • Overflow: Can configure for delayed tasks that fall off the daily schedule to carry over into the next day or to go to a queue so you can reschedule.
    • LLM assisted scheduling: Uses an LLM to intelligently break down tasklists and create a daily schedule. Also can convert a vague task into granular pieces, or can help reorganize a day.
      • Panic/Stuck button: If having difficulty starting a task, or not sure where to start, you can hit this button and it'll use the LLM to walk you through completing the task. For me, this is things like "Clean the apartment" where it can be overwhelming. It'll break that into smaller steps like "Look around, first clean all the countertops," etc.

    Anyways, I've decided to go with Go and Typescript for this. My first iteration will be a self-hosted docker server that serves a PWA, but I'm planning on making standalone mobile apps that can either work on their own or sync to the server.

    I'm planning on allowing people to connect their own LLMs to it for the AI features, and potentially looking into offering a paid subscription for those who don't have access. First and foremost I want it to work for me lol.

    Since my main thing is design, I'm currently working on the design and branding of the app as well as the UI because I think that's important. I might update this post when I have something I'm comfortable showing, I've only got drawings right now.

    1 vote
  5. text_garden
    Link
    I started using a couple of OpenBSD security features in my Gopher server. The server is an application that serves a single request received on stdin, writing the response to stdout before...

    I started using a couple of OpenBSD security features in my Gopher server. The server is an application that serves a single request received on stdin, writing the response to stdout before exiting. The data being served lives in a single directory tree. In OpenBSD I manage this using inetd which can fire off commands upon socket connection, passing the socket I/O as standard I/O to the commands.

    In OpenBSD, processes can restrict themselves to subsets of the kernel API calling pledge. From the point of calling pledge, the restriction is enforced by the kernel; attempt to use a restricted syscall and your process will die. Access can only ever be narrowed, so a process can't unrestrict itself. I restrict my server process to using only standard I/O and filesystem access with pledge("stdio rpath") before I do anything else. Anything the attacker can achieve in userspace after the pledge call will be restricted to those APIs.

    The second feature is unveil, which can restrict a process to certain files or subdirectories. The first call will hide the entire filesystem from the process, except the given path (and anything within it, if it's a directory). Subsequent calls may add more paths. Calling unveil with NULL, NULL will prevent further unveiling of the filesystem (but so will pledging not to use it), so even if an attacker achieves rce in userspace they can't unveil more of the filesystem. I inserted a call to this before calling pledge, unveiling just the gopher root.

    I think these features are great examples of "worse is better". Something like SELinux is definitely the better approach in that it's more fine grained, provides more thorough protection and doesn't rely on the userspace playing along in the first place. pledge/unveil are more limited but mitigate ROP well enough for an operating system maintained the way OpenBSD is. I think this pays off in the worse-is-better sense because you can understand and apply pledge and unveil in less than 10 minutes.

    My setup still has some more glaring weaknesses. For one, there's no per-client rate limiting (inetd only supports global rate limiting per service) and there are no timeouts. I should be able to use timeout for timeouts and the kernel's packet filter to stop accepting connections from high request rate clients. I would like to avoid any such functionality in the server process to keep it simple.