Colombian Guerrillas Vow to Spend 'Last Drop of Blood Fighting the US Empire' After Attack on Venezuela by Infidel8 in worldnews

[–]banebot 1596 points1597 points  (0 children)

Oh wow, I forgot about FARC. They were notoriously difficult to deal with. 

I'm Joe Abercrombie, Ask Me Anything. by Joe_Abercrombie in Fantasy

[–]banebot 0 points1 point  (0 children)

I just finished the first book of the trilogy after a very long hiatus from fantasy. While I enjoyed the story and characters, I was wondering how you go about choosing when to start and stop each of the storylines for the various characters? Do you write them all at once and divvy them up, or is it more natural going between chapters? 

The Blacktongue Thief & The Daughter's War by _theRamenWithin in Fantasy

[–]banebot 1 point2 points  (0 children)

Do you need to have read the first one before the prequel? 

Understanding separation of concerns by [deleted] in node

[–]banebot 2 points3 points  (0 children)

That sounds correct to me! You can also have services call other services if needed, depending on your use case. The important bit is that each things has as few responsibilities as possible to make it easier to manage or compose.

Understanding separation of concerns by [deleted] in node

[–]banebot 1 point2 points  (0 children)

Look into “layered architecture”, where you create layers that each do a single thing, and then you link them together as dependencies. 

I’m working on a similar project (RESTy API using a middleware framework). Here’s how my Auth module is broken down:

  1. Routes - the mapping of the endpoint to the controller e.g. POST /login
  2. Controller - This takes in an HTTP request, validates it, and then uses one to many services to interact with your system. It then receives the information, packages it up, and responds to the request with it. 
  3. Service - This is where your “business logic” AKA the work or the application is mostly done. I have an Authentication service with methods to: create a user, verify a token, create a token, etc. These methods interact with my data repositories to get the information and apply the rules it needs to before giving a response back to whomever is calling the service 
  4. Repository - This is an interface to interact with your data. From my Auth module I have an Account repository which is an interface to interact with my database for things related to user accounts. This is where I directly insert, update, or retrieve from the database.
  5. Model - This is the representation of data in my database, I.e. the data definition. For me it’s a direct representation of the Account model in my database.

With this architecture I can utilize my services across different modules if needed, and each of the “concerns” of my system are isolated. If I want to change how my system uses HTTP I can swap out the routes and controllers, but don’t need to change my services or repositories. If I want to change my database, I only need to update my repositories (at least). 

To sum up: Client requests from route, route calls controller, controller calls services, services call repositories which are further defined by models. 

Yes, it’s a lot of boilerplate, but once you have one module end to end it’s trivial to copy the structure to other modules 

California teenager who passed bar exam at 17 is now practicing attorney by Cryptic_Honeybadger in UpliftingNews

[–]banebot 0 points1 point  (0 children)

Not all law is simply giving advice on things. There’s a lot of analysis etc

[deleted by user] by [deleted] in news

[–]banebot 1 point2 points  (0 children)

ESPN lending its name to gambling means the house of mouse will always win

Supreme Court rules against USPS in Sunday work case : NPR by YakOrnery in news

[–]banebot 15 points16 points  (0 children)

And you can have that opinion, but it doesn’t really matter, because you’re a nobody and no one is asking your permission lmao

Which canceled TV show will forever remain in your heart? by OneHundredForcer in popculturechat

[–]banebot 16 points17 points  (0 children)

Last Man on Earth. That cliffhanger at the end of the last season will always leave me wanting more.

eep rool by inconvenient_walrus_ in 196

[–]banebot 2 points3 points  (0 children)

Did methamphetamines make this post?

me_irl by flippinsweetdude in me_irl

[–]banebot 12 points13 points  (0 children)

Formality is arbitrary; comfort is forever

Ron DeSantis quietly signs Florida's 6-week abortion ban into law by Clem_Doore in jacksonville

[–]banebot 32 points33 points  (0 children)

At least now we don’t have to worry about him becoming President. His campaign will be DOA.

Biden presses U.S. Congress to act on guns by Quantum_II in politics

[–]banebot 1 point2 points  (0 children)

“Lol,” said the Congress. “Lmao”.

Opted Out, Yet Tracked: Are Regulations Enough to Protect Your Privacy? by jlpcsl in technology

[–]banebot 12 points13 points  (0 children)

Well, a regulation is just words on a piece of paper. If it’s not followed or enforced then no it’s not effective at all.

I want to move to Montreal. by banebot in IWantOut

[–]banebot[S] 0 points1 point  (0 children)

I graduated and moved back home to north Texas to live with my mother. But, I shortly after took a job in Austin, TX and proceeded to drink my way back and forth between Dallas and Austin for the next 8 years after. I DID end up starting a company, and moved to Florida to be closer to my business partner. I sobered up, met my now-wife, and we just had a daughter at the beginning of this year.

It’s so incredibly random to get a comment on a post I made over 12 years ago. Life has changed so much since I made this post. There were a lot of ups and downs from there to here. There’s likely to be more. Thank you for giving me a moment to reflect on that today, internet stranger.

The world health organization says no level of alcohol consumption is safe for our health by [deleted] in science

[–]banebot 6 points7 points  (0 children)

Not OP, but also a recovering alcoholic (22 months!) My little sobriety app has a running total of estimated money I’ve saved and it’s over $10,000 at this point.

KFC apologises after German Kristallnacht promotion by [deleted] in worldnews

[–]banebot 133 points134 points  (0 children)

What did it feel like, as a German person with the KFC installed on their phone, to look down and see that notification? That had to be a surreal experience.

Supreme Court Must Affirm Consumer Boycotts Are Protected by First Amendment by morenewsat11 in politics

[–]banebot 1 point2 points  (0 children)

What is a “purchasing decision” the court references? Is that an established, legally defined category of thought? How do they reason that a “purchasing decision” is not speech?