HNHacker News
TopNewBestAskShowJobs

shireboy

1,717 karma · joined July 9, 2014

submissionscomments
shireboy··on Show HN: The Hitchhiker's Guide to the Galaxy Online
My introduction to H2G2 was the Amiga text based game. I got stuck on heart of gold and to this day don’t know what I was missing. Now I’m going to have to give it a go again: https://www.cnet.com/tech/gaming/play-the-hitchhikers-guide-...
shireboy··on Sisk – Lightweight .NET Web Framework
If I understand the problem, just move all your DI registrations to a shared extension method:

  public static ConfigurationExtensions{
      public static AddMyApp(this IServiceCollection services){
           services.AddScoped<IFooService,FooService>();
      }
  }

  //In console app:
  var consoleBuilder = Host.CreateApplicationBuilder(args);
  consoleBuilder.Services.AddMyApp();
  ...
  //pseudocode - in real world you'd put this in another class or method called by the commandline code:
  if(webHostCommandLineSwitch){
      var webBuilder = WebApplication.CreateBuilder(args);
      webBuilder.Services.AddMyApp();
     ...
  }
shireboy··on I'm tired of fixing customers' AI generated code
I can empathize, but am also wondering if some of these are feature requests in disguise. For “how to call api” docs, sample code, and even client libraries can be generated from your OpenAPI specs. Link to the docs in every reply. The more complex asks could be translated “build this endpoint and charge me for it”. If all else fails, set up partnership with devs who want to fix/build customers crap and figure out some copy to direct the more complex asks to them.
shireboy··on I put a toaster in the dishwasher (2012)
Curious after reading the post, I asked GPT:

Sent by you: Can I put a toaster in the dishwasher?

Sent by Copilot: It’s not a good idea to put a toaster in the dishwasher. Toasters have electrical components that can be damaged by water, and it could be dangerous if water gets into the electrical parts. Instead, you can clean the exterior with a damp cloth and use a brush to remove crumbs from the inside.

Is there anything else you need help with?

Sent by you: I'm feeling adventurous and plan to let it dry out real well

Sent by Copilot: I admire your adventurous spirit! However, even if you let it dry out thoroughly, there could still be hidden moisture that might cause electrical issues or even pose a fire hazard when you use the toaster again. It’s really best to avoid putting any electrical appliances in the dishwasher.

If you’re looking for a safer way to clean your toaster, I can share some tips! Would you like that?

Sent by you: I did it anyway.

Sent by Copilot: Oh no! I hope everything turns out okay. Just to be safe, I recommend not using the toaster until you’re absolutely sure it’s completely dry, inside and out. You might want to leave it in a warm, dry place for several days.

If you notice any unusual smells or sounds when you do try to use it, it’s best to unplug it immediately and consider getting a new one. Safety first!

Is there anything else I can help you with?

shireboy··on Deep Live Cam: Real-time face swapping and one-click video deepfake tool
In person interactions like this CIA mask expert tricking a US president? https://spyscape.com/article/master-of-disguise-how-the-cias...
shireboy··on Show HN: BudgetFlow – Budget planning using interactive Sankey diagrams
Well, I'm considering purchasing Monarch because of this feature, so not sure that's true. I am a visual learner, but the reason I like them is they help me at a glance see the flow of money through multiple categories. Some systems represent this as pie charts you drill down on, but a Sankey shows it all at once glance. As far as actionable insight, they help decide areas that would be most beneficial to reduce expenses or increase revenue.
shireboy··on Show HN: BudgetFlow – Budget planning using interactive Sankey diagrams
I love Sankey diagrams and don't understand why major personal finance apps like Mint, Quicken, etc., (and corporate ERPs for that matter) don't provide them out of the box. I plan to try this out for a budget, but want to see my actual expenses this way as well.
shireboy··on Show HN: NoteTech – Create personal automations by writing notes
Fun related anecdote. I learned to program Amiga BASIC when I was around 12 by copying games from the back of Amiga magazine. At the same time, my sister was learning to read and write. As a nerdy big brother, I set out to write something where she could type plain english instructions and it would do what she typed. Playing Zork made this seem very feasible at least to my 12 year old mind. I never finished the project, but have been thinking about something like this again lately.
shireboy··on Bugs, drugs and electric venom: is this the most deadly library in the world?
Im glad there are people doing this work but whenever I see something like this I always think of this Far Side: https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_pr...
shireboy··on You'll regret using natural keys
In the example from the article I think the table should be named RestaurantRank(year,rank,restaurantid), with a natural key year,rank. It would have a fk to Restaurant(Id,name,etc). Choose a natural key if there is some natural unique field or combination. In this case unless restaurants can tie in their ranking year,rank can be unique
shireboy··on Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?
Well, yeah, but this was just pseudocode to convey the concept that you should solve the problem in code, not by maintaining separate code branches, deployments, etc. One approach would be to have an implementation of FooService for each sku, and code that uses the right one based on the current user/tenant/payment status/etc. This gets into dependency injection, inheritance, and other language/framework specific things. The actual approach would vary based on the project. It may be that CurrentUser.Sku and CurrentUser.IsPaymentCurrent is sufficient. Or it may be that you need a FooService per SKU, or any number of other ways to handle.
shireboy··on Glance: A self-hosted dashboard that puts all your feeds in one place
I have a soft spot for this sort of thing, and have built several. The challenge always comes with all the personal stuff I want on it- account balances, personal calendars, todo lists, etc. I’ll get it set up just so, then some api changes etc.
shireboy··on Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?
If I understand this is more of a coding question. I'd argue it would be best for most web based SaaS to have a single codebase, with a single branch that represents the production site. That code base would then be smart enough to enable the right features based on the current user and/or tenant and their subscription level and payment status. Pseudocode:

   public DoFoo(){
      if(CurrentUser.IsFreeSku && CurrentUser.FoosThisMonth >= 10) return Error('Free users are only allowed to do 10 foos each month);
      FooService.DoFoo();
      CurrentUser.FoosThisMonth ++ 
   }
Similar in the UI you may hide or show things based on the current user/tenant and their sub level.

<div class='hidden-paid-user'>Click here to get our paid service</div>

You would still have server code enforce the subscription level rules because a malicious user could circumvent any client-based rules. How exactly you do both will depend on the framework your saas uses.

shireboy··on Startup Idea: Reverse Amazon
Post mentions the downside of this: you have to deal with _people_. I don’t necessarily feel comfortable with strangers coming to my house, and don’t really have time or energy to coordinate meeting people. I see value in this idea over marketplace.
shireboy··on Ask HN: What is the most useless project you have worked on?
The beatings will continue until morale improves!
shireboy··on Ask HN: What is the most useless project you have worked on?
Very much so. Also Michael Scott. This was a period of my life when I wanted to like The Office, but it was just too realistic for me.
shireboy··on Ask HN: What is the most useless project you have worked on?
This is old, but my most pointless project: The CEO wanted a screen in every hall that showed the company "EnGUAGEment meter". Users would have to go to the app, choose from 10 or so canned messages like "Feeling productive", "Ready to conquer the day", and other such HR speak the CEO (or rather the HR committee he put on the important business of picking the list) felt was motivational. This would update a page that scrolled their photos and chosen message, and showed the "EnGUAGEment" as a percent of total employees responding on a car dashboard style guage. It hovered around 30-40% every day. On the CEO's birthday they'd drive that baby up to 70 to 80%
shireboy··on Google's threat model for post-quantum cryptography
I’ve wondered if the institutional buy up of BTC via ETFs and corporate and governmental balance sheets has adequately considered this risk. Could a bad actor steal BTC by cracking sha256 keys on a quantum computer? There could be a catch-22 - doing so would zero the value of btc, so if they didn’t immediately transfer to a quantum resistant asset, their heist would be worthless. Still, they could profit by shorting or it could be on agenda of other assets to just zero btc.
shireboy··on One of world’s smallest fish found to make sound as loud as a gunshot
It must be a fundamental law of nature that the organisms with the smallest brains are the loudest.
shireboy··on Certain dogs are capable of learning the names for more than 100 different toys
We had a Westie that we trained to do this. We’d make him “wait” then we’d his toy, and say “ok go find it” . He’d go all over looking for it and enjoyed the game. I highly recommend a community training camp if there is one in your area.
shireboy··on Keep your phone number private with Signal usernames
> People who have your number saved in their phone’s contacts will still see your phone number since they already know it.

Does it defeat the protections then to add a range of phone numbers in contacts and harvest username/phonenumber combinations?

shireboy··on Behind the scenes of Sound ID in Merlin – Identify birds using your phone (2021)
Seconded. using this app made me realize the diverse ecosystem singing in the neighborhood. I’ve always enjoyed outdoors, but never really saw the point of birdwatching until this app.
shireboy··on Sulfur selenium solid-state battery from NASA breaks energy storage boundaries
> "“Fire” and “airplane” are two words that should never be used in the same sentence"

Don't ICEs and Jets all require fire and explosive fuel to fly?

shireboy··on Reconciliation is a knapsack problem
I've written code for some reconciliation systems and it's nice to have confirmation they are indeed hard nuts to crack. The language matching isn't really the hard part IMO. What's tricky is that you're often matching batches "up to N", and the matching is not always just on a equal values or dates. For example, 300 credit card swipes at point of sale might match 3 deposits in the bank account a few days later with a 3% fee deducted. They never clear on the _same_ day, but need to match nearest day first. To brute-force, you need test all batches of up to 300 point of sale transactions and all batches of up to 3 deposits.
shireboy··on The Truth about College Costs
Article addresses that, says the numbers they submit are not verified. The gist as I understand it is that these numbers are not typically what students actually pay.
shireboy··on Car allergic to vanilla ice cream (2000)
I miss Car Talk with "Click and Clack the Tappit Brothers". Not sure if this was on the show, but seems like it could have been. Definitely check it out if you enjoyed this anecdote.
shireboy··on What’s wrong with billable hours
I've been a consultant for 15+ years and have often come to this conclusion that hourly billing is not ideal for various reasons. I haven't found a great alternative, and the problem is I'd want a great alternative I could enthusiastically sell to my clients. "Always do fixed price" doesn't seem feasible when scope is not fixed, fixing it would necessitate time-consuming research and waterfall style project management, and clients often don't know scope until they have tangibles in hand. (ie "this looks great, but can you do this "little" thing we invision in scope, but you invision out-of-scope-but-not-worth-arguing-about"")

I feel like a retainer of sorts may make sense, but that seems a hard sell for some projects. "Make us this 5 page app that does XYZ". "Ok, pay me X/mo forever". Both consultant and client would need an exit that I'm not clear on. Also, to be honest about it, the consultant should limit their clients to some reasonable number so that they can serve them in reasonable time.

shireboy··on Fine-tuning GPT-3.5-turbo for natural language to SQL
I think natural language to SQL may not be as great as it sounds in many real-world applications. You often have permissions, tenants, rules about who-can-see-what. I love the idea of letting users use natural language to query and possibly even bulk-update data. But if the app has rules like those, this would just be a SQL injection vulnerability. You could possibly limit it - just allow query over certain views or something - but the risk of the GPT crafting a dangerous query is still high.

What would be more useful IMO is natural language to OData, GraphQL, and OpenAPI/Swagger. Then you could let users do ad-hoc query but only against data they are allowed. I did a PoC using GPT3 to query OData and it was pretty fun, but did occasionally get the query wrong. I also ran into the context window issue. It would get lost when fed larger OData schema.

shireboy··on Os.js – open-source JavaScript web desktop platform with a window manager
What a great way to make things that aren’t mobile responsive.

Maybe this one is better, but I’ve worked with a large enterprise web app that uses a similar approach and it’s horrible. Everything opens in a “window” and there is weird state being passed around windows (ie drag a item from list window to the form window to view details). Not fun on a desktop and zero chance of it working on a tablet or phone.

shireboy··on Ask HN: Why did Microsoft, Meta, and PayPal update their ToS today?
Then use LLM and manual review to summarize down to laymen’s terms
← PreviousPage 4 of 20Next →