• 0 Posts
  • 8 Comments
Joined 1Y ago
cake
Cake day: Sep 27, 2023

help-circle
rss

Managers everywhere: “Okay team, recent research has shown that agile has serious flaws, so we’ll switch to Scrum.”


Yea, when it comes to type declarations it’s mostly about an added layer of safety especially when it comes to function layers and code contracts… these are useful things when you have a lot of cooks in the kitchen.


Why is it fashionable to hate curly braces - I think readability is much better served with explicit block closing tags…

And why do we hate type declarations? I don’t mind being able to omit type declarations, it’s handy for quick and dirty stuff - but strict type checking is a powerful tool… so much so that PHP has put a lot of effort into adding it after the fact.


A pure functional program can not have any I/O, but yes, they exist.

They’re generally considered pretty useless in terms of our modern view of what a computer should be (an interactive object) instead, purely functional languages are great for traditional computers (something used for computing i.e. math solutions).

Purely functional languages can do extremely complex things but, at the end of the day, you’re writing a program to solve a single starting state and that program will always resolve to the same output (and the occasional rabid functional purist will argue that a program “return” is itself a side effect).

I love functional-ish programming, where as much of the program as I can manage is side effect free and those aide effects are limited to the fringes of the program where it needs to interact with I/O (read/writing from a disk, database, cli, GUI, whatever) as that seems like the most powerful balance to me.

Oh, and lately, I’ve done a lot of my functional programming in PHP… most modern languages have a good support for functional programming in a limited context.


Building buildings is overrated, building good buildings is underrated.

As someone who has architected software to the point of becoming my company’s official architect simple design is usually the best design, but building software with no design or forethought just leads to spaghetti.

If you want to talk about the costs of having an FTE architect on your team I think there’s a lot of merit - but “architecting” is a hat somebody has to wear and if one of your senior devs spends 5% of their time wearing that hat it’s a good thing.

This article was written by a part time software architect who hates being called a software architect.


I’ve always been of the opinion that language choice is supremely unimportant - but in this case you’d probably want to check for good libraries that may be available (so probably python).

However, I’d also point you towards the creator code bullet since they’re always doing wacky AI shit and demonstrate the approachability of building such a system.


If a function is declared but not implemented it’ll usually cause a linking error… And sometimes (with older compilers) a runtime error.

The standard here is that the declaration (1) would be in a .h file that other .c files might reference while the implementation (2) would be in a .c so it is only built once into a .o file during compilation & linking.


Just my opinion here but using a signed JWT instead of a server local variable seems needlessly risky for communicating a price. Considering the potential liability to the company if your signing token is compromised I’d much rather send the prices to the user and keep a server local copy tied to the account/session/auth token. When the user tries to confirm the price we’d just pull the information from local storage.

In terms of your primary question though… I can see the UX advantage of honoring the expired token if prices were stable but I’d probably roll out an MVP without that feature fully developed but with some logging to flag how often it’d activate - throw the statistics at business people and let them ponder how often it’d activate.

That all said, this is an API not a GUI so I really don’t care as much about the UX since the consumer can just automate resubmitting for a new token - especially if we’re putting together an SDK or code samples for clients to run the requests and double especially if we’re controlling both ends with a distributed binary (but that doesn’t sound like the case here).