site banner

Small-Scale Question Sunday for March 31, 2024

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

I live in an apartment building that offers free visitor parking with online registration. The web form asks a lot, between the info of visitor and the resident to every detail of the car. It's not unreasonable, but it's time consuming, and there isn't a way to easily re-register a car that's previously been registered.

How feasible is it to create a local app on my Android phone that automates all this?

I did some light coding years back so am not completely code illiterate, but expect will have to heavily rely on GPT 4 / Claude 3 and general smarts to make this work. I feel like the personal breakeven for me is making this work in 8 hours or less. To be honest, I doubt this app will save me more than 4 hours over the lifetime of my staying in this apartment, though the personal satisfaction of beating an inefficient system is worth like 4 hours.

It seems to me like the basic components are:

  • Install Android IDE
  • Tailor an HTTP request to the web form: replicate form submissions, which is pretty basic--visit the URL, enter the static building passcode, choose permit type from a dropdown, then enter text fields, then click submit
  • Create a Google spreadsheet with all the requisite info of my guests and their vehicles to serve as the database. Seems easier to just make the file visible to all with the URL, though I understand it'd be more secure to invest in figuring out their API with OAuth etc.
  • Create a simple app GUI to tap on a name to auto submit the HTTP request to the webpage
  • Create error handling to confirm form returns success

There are probably a dozen QOL features that I could add, like displaying the registration date and time, add/edit guest info directly in app, offline support etc. But I'm just interested in the simple basics right now.

What do you think about this approach? It feels like this is a bigger project than 8 hours (for me). Are there places to cut corners so I can more readily rely on GPT4 to do the heavy lifting?

Separately, I'm curious how long end-to-end you think an actually competent developer might need to create something basic like this. Because if it's like 2 hours with the aid of GPT4, I might try to see if I can pay a friend to do this for me...

(I should write the full story about this)

I once had a similar situation, except all of the info had to be filled out by hand on paper for every iteration of the same visitor parking.

At the time, I was dating a stripper (decisions were made!). She would roll over to my place after work, so 3 am on Thurs, Fri, and/or Saturday. Having to pretty much fill out an insurance survey every damn time got old for her.

Her solution was to flirt hard with the front desk guy, who proceeded to cut her visitor parking passes without so much as her first name filled out on the sheet.

The flirting involved what one could call a "free show" in the package room of that particular apartment building.

Everybody got choices, that's what I'm trying to say.

Seems like dark pattern to not allow at least photocopies of the paper form.

The other solution is probably to tip the guy with some singles.

Change apartments.

Android app? Almost certainly a bad idea, unless you already have experience in building android apps and getting them onto your phone. Just figuring out how to build a "hello world" level app and get it onto your phone could easily take 8 hours by itself, much less setting up even a fairly basic UI that's functional. Using GSheets as a data store sounds like a bad idea too, way too much work to interface with. What I'd do is, in this order, following the steps until you think it's good enough or get tired of it or whatever:

  1. Open up dev tools network tab the next time you use the form. Note down everything about the request to actually reserve a spot and what it returns on success and failure.
  2. Put together a CLI script on your developer machine to make those requests. Iterate on that until you are able to successfully reserve a spot without using the website directly. Doesn't matter what language, Python is fine, just make direct HTTP requests, you almost certainly don't need full browser emulation.
  3. Hard-code in the info for your regular visitors, implement a decent CLI interface to make reservations for any of them. This is probably good enough for most people.
  4. Turn that script into a basic web server, running locally on the developer machine. A few simple HTML pages to interface with it you can use on the browser on your developer machine.
  5. If you still really want to use it on mobile, rework the CSS etc until those pages look good on a mobile browser
  6. You could leave it running on your developer machine or some other machine in your local network and access it from your mobile any time you're on your home WiFi. Or you could deploy it to a proper web server somewhere, probably for free, maybe using Google Cloud Run or something like that, to be able to use it on your mobile from anywhere. It'll be on a weirdo URL nobody can guess, so you can probably get away with no authorization. And the visitors are still hard-coded, so you'd need a redeploy to add or remove anyone, but that shouldn't be hard enough to be annoying.
  7. If you're still feeling ambitious, add a proper DB on the server to store visitor info, and web interfaces for managing them. Probably ought to do authorization too at this stage.
  8. For even more ambition, set it up so other residents can register themselves on your system, enter their own visitor lists, and reserve spots too. Then advertise it to other people in your building, or even people in other buildings that use the same system.

Thanks for the walkthrough! Think you're absolutely right in avoiding an entirely new platform (i.e. phone). Think I'll aim for step 3 on your list. Then maybe before the EOY GPT 4.5's user agent will be able to assist with the rest (like on mobile).

Check out Selenium, maybe just use python/selenium for the form automation and run it from your computer. You could have a table of your guest personas and just read that into the script. I've never done web dev stuff but I'd think finagling the script into an API that you could call to from some simple web gui would be doable on a cheap VPS.

Good call. I did code a little scraper in Selenium a long time ago.

It'd probably be easier to make the automation with a chrome extension that automatically fills out the fields when you navigate to the webpage. Creating an android app interface feels like a lot of work, especially for a beginner, when you're the only one using the app. The only reason I'd see to use the app is if you often want to do the parking requests while you don't have access to your laptop. And even then, I'm pretty sure it's possible and not too much more difficult to do browser extensions for a phone browser.