New around here? Register your SA Forums Account here!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
gonadic io
Feb 16, 2011

>>=

Skyl3lazer posted:

Is this some serverless specific thing? This seems like an awful rule for most coding scenarios.

A serverless deployed function which is called via rest (which I'm talking about here) is very different from like a method in the code.

It would be loving absurd to have this rule within a single codebase

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

prisoner of waffles posted:

So serverless really seems like a cloud cost model leading to a different programming model, which makes sense and is kinda neat.

not something to get excited about unless you really care about the cost of a cloud deployment

Yes, but the main draw (for me) is that you don't janitor the server(s) it's running on or really care about them

FlapYoJacks
Feb 12, 2009

by vyelkin

Progressive JPEG posted:

brb figuring out how to do numerical formatting using streams

NOT

If you can't figure out how to do a basic simple thing like numerical formatting in streams, you should not be a programmer. :stare:

Xarn
Jun 26, 2015

CRIP EATIN BREAD posted:

its useful when you have something that will get called very infrequently, or is some sort of special endpoint that you dont want integrated into your applications.

especially if it just does stuff like call AWS API endpoints

yup.

At Job-2 we had 2 Lambdas that were run on a cron with long-rear end timer (one was ran hourly, the other once a day), whose job it was to run some queries against other AWS services and then optionally do some short-lived stuff. It was very needs suiting for that.

We also had a crazy overengineered data pipelines on Lambda + S3 + SQS (I think?) so that the pipelines could in theory scale almost indefinitely. Last I heard, it never needed to serve more than 5 requests per second :shrug:

Bloody
Mar 3, 2013

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

crazypenguin
Mar 9, 2005
nothing witty here, move along

CRIP EATIN BREAD posted:

especially if it just does stuff like call AWS API endpoints

yep. what made serverless finally click for me was when someone called them cloud bash scripts.

it's just the glue you need sometimes to make pre-existing services work together

it's not really for actually building applications

raminasi
Jan 25, 2005

a last drink with no ice

Bloody posted:

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

yeah its trivial to just run them on a timed schedule

gonadic io
Feb 16, 2011

>>=

ratbert90 posted:

If you can't figure out how to do a basic simple thing like numerical formatting in streams, you should not be a programmer. :stare:

1) Don't do this. Just because somebody has never seen before some code you've done lots of (and so find easy) there's no need to be so condescending about it. This thread is a safe space.
2) nobody should be a programmer lol

3) yeah it is pretty straitforward you can basically copy/paste from the docs

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
clearly you just do sout << "foo" << printf("%f", float) << "whatever" << endl;

Xarn
Jun 26, 2015

Bloody posted:

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

For AWS Lambda it is super simple. When you set up a Lambda, you have to provide something called trigger -> when it should be launched, and what kind of data message should be passed to it when it starts (e.g. you can have a Lambda that runs when someone uploads a new file to an S3 bucket to a specific path).

One of the possible triggers you can have is just scheduled notification.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
There's something I've run into a few times in slightly different forms, and I'm wondering if there's a name for it or common pattern for handing it.

basically, there's some data at rest. A serving job loads some of that data and validates it in order to handle a request. Separately, there is code that loads all of the data and validates some of the same invariants. Conceptually it seems like a really good idea for the code that validates stuff to be completely shared. In practice, I have never seen it works out that way.

Often, the serving job possesses additional context or privileges necessary for certain checks.

Or perhaps the validation job is able to perform more checks because it operates on all the data rather than a subset.

Or maybe in one context the data is in text form and you want line numbers + human actionable messages for every single issue, but in the other context the data is in a serialized binary format and you only want to know good/bad and fail quickly.

So have y'all run into stuff like this? What kind of things do you consider when working on this problem?

Shaggar
Apr 26, 2006

gonadic io posted:

Yes, but the main draw (for me) is that you don't janitor the server(s) it's running on or really care about them

you can do that with normal application deployment on azure paas or to a lesser extent aws ebs

FlapYoJacks
Feb 12, 2009

by vyelkin

gonadic io posted:

1) Don't do this. Just because somebody has never seen before some code you've done lots of (and so find easy) there's no need to be so condescending about it. This thread is a safe space.
2) nobody should be a programmer lol

3) yeah it is pretty straitforward you can basically copy/paste from the docs

Hey, normally I wouldn't be a jerk, but he was a jerk first! :saddowns:

Shaggar
Apr 26, 2006

Bloody posted:

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

yea azure functions has multiple trigger types one of which is a scheduling.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
Hell yes, the ETL contractor that shot down every attempt of mine to teach him git just blew away 2-3 weeks of his own work.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

ThePeavstenator posted:

Hell yes, the ETL contractor that shot down every attempt of mine to teach him git just blew away 2-3 weeks of his own work.

Was he using SCM at all?

Shaggar
Apr 26, 2006

ThePeavstenator posted:

Hell yes, the ETL contractor that shot down every attempt of mine to teach him git just blew away 2-3 weeks of his own work.

oh so he was using git.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
oh poo poo you got shaggar'd

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Finster Dexter posted:

Was he using SCM at all?

When he started here the first thing he worked on was an older VS solution that we have in a git repo. He then made new projects in this solution for everything he did because he didn't know how to create a new repo for a new solution (we use VSTS so this is easy as hell from Visual Studio even if you don't know git). He'd periodically (like once every week or so :stare:) ask me to help him get his stuff "checked in" and every time I'd have to remind him that committing doesn't also push to remote. I'd also try to use this as an opportunity to teach him stuff about git but once he got his stuff committed, he brushed it off as a thing he'd worry about later.

I made a change to the original code that belongs in this repo. He tried to merge my changes locally but instead of committing, or stashing, or branching, he did a reset. Since he has like 10 other unrelated projects in this repo with uncommitted changes, he lost all of it.

Progressive JPEG
Feb 19, 2003

ratbert90 posted:

Hey, normally I wouldn't be a jerk, but he was a jerk first! :saddowns:

plz don't gender my posting

Shaggar
Apr 26, 2006

ThePeavstenator posted:

When he started here the first thing he worked on was an older VS solution that we have in a git repo. He then made new projects in this solution for everything he did because he didn't know how to create a new repo for a new solution (we use VSTS so this is easy as hell from Visual Studio even if you don't know git). He'd periodically (like once every week or so :stare:) ask me to help him get his stuff "checked in" and every time I'd have to remind him that committing doesn't also push to remote. I'd also try to use this as an opportunity to teach him stuff about git but once he got his stuff committed, he brushed it off as a thing he'd worry about later.

I made a change to the original code that belongs in this repo. He tried to merge my changes locally but instead of committing, or stashing, or branching, he did a reset. Since he has like 10 other unrelated projects in this repo with uncommitted changes, he lost all of it.

git is trash.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Shaggar posted:

git is trash.

Yeah this sounds like a problem with git and not that the guy was keeping multiple projects in one repo and almost never committing.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
even our technical writer has git figured out and she has only started using it like a month ago.

that ETL contractor should be put up against the wall.

AggressivelyStupid
Jan 9, 2012

ThePeavstenator posted:

When he started here the first thing he worked on was an older VS solution that we have in a git repo. He then made new projects in this solution for everything he did because he didn't know how to create a new repo for a new solution (we use VSTS so this is easy as hell from Visual Studio even if you don't know git). He'd periodically (like once every week or so :stare:) ask me to help him get his stuff "checked in" and every time I'd have to remind him that committing doesn't also push to remote. I'd also try to use this as an opportunity to teach him stuff about git but once he got his stuff committed, he brushed it off as a thing he'd worry about later.

I made a change to the original code that belongs in this repo. He tried to merge my changes locally but instead of committing, or stashing, or branching, he did a reset. Since he has like 10 other unrelated projects in this repo with uncommitted changes, he lost all of it.

perfect in every way

Shaggar
Apr 26, 2006
its a problem with git in that it has a bunch of bad terminology around what it does which makes it hard to learn and also encourages the use of local, distributed repos which is a terrible idea.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
yeah git is so hard to use it hasn't gotten any traction in the industry, or in private projects

Shaggar
Apr 26, 2006
yeah in that way git is just like javascript

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
and windows

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
git is very simple and obviously superior provided your brain has not been broken by something worse

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
svn's branching model works akin to copying backups to the compaq under the intern's desk

gonadic io
Feb 16, 2011

>>=

AggressivelyStupid posted:

perfect in every way

User/post combo

Shaggar
Apr 26, 2006
gits branching model is using the interns computer to store the backups

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme
back when i was janitoring servers and workstations my manager liked to use mercurial for version control, i remember it being less lovely than svn and more intuitive than git. I havent looked at it in years, is it bad or good?

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
its good but it's been blown away in market share by git cuz it's not really better, except for the ui, which is only marginally better

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Shaggar posted:

gits branching model is using the interns computer to store the backups

The problem you're describing with git is "the computer doesn't force people at gunpoint to properly push their changes" which isn't a problem that has anything to do with git.

Shaggar
Apr 26, 2006
git has specific workflows that encourage you to commit locally before you commit remotely. not only is there no reason to do this but it makes easy for new users to confuse fake (local) commits with real (remote) commits.

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
I love the YOSPOS trinity

the sh*gg*r, the f*shm*ch, and the holy st*m**

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
git: ensuring your work is stored somewhere other than your machine takes at least one extra step compared to most old-rear end vcses

contractor who lost all his poo poo didn't listen to someone trying to ensure that his work would be retained (and person trying to help took "no" for an answer, allowing the work to be lost)

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

prisoner of waffles posted:

git: ensuring your work is stored somewhere other than your machine takes at least one extra step compared to most old-rear end vcses

contractor who lost all his poo poo didn't listen to someone trying to ensure that his work would be retained (and person trying to help took "no" for an answer, allowing the work to be lost)

I had an intern this summer, the contractor's work involves interfacing with the software my team writes, and he reports to a different manager at the same level as mine. I had a person that I was actually being paid to mentor and me offering help was a courtesy in the first place.

ThePeavstenator fucked around with this message at 19:00 on Sep 4, 2018

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

prisoner of waffles posted:

I love the YOSPOS trinity

the sh*gg*r, the f*shm*ch, and the holy st*m**

how tiny bug child has fallen

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply