#development

1 messages · Page 83 of 1

nocturne raptor
#

yes, and the result should be 3, 4, 5

silk eagle
#

should be i think

numbers = int(input("Give me your hilarious integer number:")) # Convert input to int to make sure its a number
last_numbers = []
for num in str(numbers)[-3:]: last_numbers.append(num)
print(f'The last three numbers on the list are {last_numbers[0]}, {last_numbers[1]}, and {last_numbers[2]}')
#

thats how id do it atleast

#

probably some lambda magic to make that into a one-liner but im inexperienced with lambdas

#

that will error out if the number isn't 3 digits long though

slim rune
#

Is this a right place to ask for help with Java & TLS?

obtuse night
#

Yes

supple hull
#

Recruiter thirst is at an all time high

#

Seems like you are doing very well for yourself. You have a list of unique accomplishments, which is why I truly believe based on close examination of your profile and your proven track record, you could raise the bar here at Seagen.
Your work has caught the attention of our key leader, who HIGHLIGHTED your performance, past projects, and career trajectory. We reserve compelling opportunities to work with flagship projects/programs, and high impactful teams from the ground up for handpicked people like YOU. Whether you are looking for a career transition now or in the future, our engagement process is exploratory.
If you're curious, I’d love to connect on how you can be part of our transformative growth and build something new. How about this week?

wind horizon
# supple hull Recruiter thirst is at an all time high

Yeah it's gotten bad, they now direct email or even will try a SMS if they happen to find you email or phone in some database that I'm guessing past places you applied shared it around.

When they do that I just report them as spam, since an unsolicited direct email or SMS is wrong imo. Hit me up on LinkedIn where I'll prob ignore you anyway since I'm not looking. LOL

supple hull
#

It's cringy as now you get click baity titles in recruiter spam like "Hey, have you read about.....?" or something

wind horizon
#

If you find development boring why are you forcing it? The best devs tend to be those interested in the work they do, sure sometimes you have boring tasks and wish you could be doing something more fun. But if even just learning basics is boring I'd suggest you step back and ask why you are considering development or at least what sounds interesting to you.

There are tones of jobs, even inside the tech/IT space outside of development that you may find more interesting if dev just isn't for you. If you work on something you enjoy you will excel and likely go far, but if you force yourself todo something you hate you likely will struggle to push to yourself and prob will hate your job.

wind horizon
# supple hull It's cringy as now you get click baity titles in recruiter spam like "Hey, have ...

Yeah LinkedIn is turning into a terrible social media site imo, the timeline is just filled with random or sometimes even fake feel good stories and polls. I keep it as an informal way of connecting with co-workers that I'm not close with, but want to stay follow their career and keep lines open to share future opportunities with each other.

But recruiters have made it so I don't even want to open the site / app anymore. lol

twilit beacon
#

like js

#

i dont like it, but i like python

wind horizon
twilit beacon
#

i dont know, i also tried c++ and i liked that one too, but when trying things like html+css+js, i kind of realised that i dont like that

silk eagle
#

as a javascript noob/python main, timers in js are the least intuitive thing ive ever done in my entire life.

wind horizon
nocturne raptor
#

this is what I should've done, it's for absolute beginners.

#

Now I just need to figure out, how to get the end result, separated by commas

silk eagle
#

i blame my math knowledge being shite, well done

viscid warren
#

anyone good at Java

silk eagle
#

nobody will probably answer without hearing the rest of your query

viscid warren
#

I need some to help me with classes in java

night flame
viscid warren
#

when I am working with classes is there a way extend more then one class in java

spring pond
#

no

#

you can implement multiple interfaces but multiple inheritance is not a thing

viscid warren
#

thanks

nocturne galleon
#

Studying about Javascript + Using Node.js all over again is refreshing

viscid warren
#

My Java assignment is hard I am not so good at java and seeing as this first assignment is a hard I wonder how I am going to pass

hollow basalt
#

You would if you try

viscid warren
#

I also fell like online learning is making it a little harder

topaz flare
#

do you try and write come code and see if you get something working?

topaz flare
cloud knot
#

don't load JS/CSS from CDN in EU i guess

grizzled steeple
#

Ah yes. Germany. You never stop to disappoint me 🙃

silk eagle
#

why do i keep hearing about stupid shit happening in europe

#

is it because the US ran out of stupid stuff in the headlines

cloud knot
#

to be fair, this is not stupid, this is legal stuff. It is teething issues of data protection laws; in US i think only California comes anywhere near to EU data protection laws.

midnight wind
#

I mean, how is this breach of privacy

silk eagle
#

oh i just read what the tweet links to

#

its google fonts pretty sure

#

cuz google does that whole uh, data collection on billions of people thing and sells that data to advertisers

#

and such

cloud knot
#

yep. It was down to usage of google fonts leaking users IP address to google. yes, there are people who go after this kind of stuff, Max Schrems constantly brings such issues into the courts.

#

he pretty much killed the EU-US Safe harbor agreement

#

and the Schrems II case killed the Privacy Shield agreement

rose pulsar
# silk eagle is it because the US ran out of stupid stuff in the headlines

Subscribe to The Onion on YouTube: http://bit.ly/xzrBUA

Excruciating up-to-the-minute coverage of some irrelevant bullshit story that has no ramifications whatsoever.

For More Breaking News: http://www.theonion.com/video
Like The Onion on Facebook: http://www.fb.com/theonion
Follow The Onion on Twitter: http://www.twitter.com/theonion

▶ Play video
next cipher
#

yeah this is monumental if it actually holds up, but also will cause so many headaches lmao

#

(granted, i agree with OP of the tweet that this is a good thing)

wind horizon
#

I think blocking linking fonts is a tad extreme, esp since you can already block fonts in your browser if your worried about privecy.

nocturne galleon
#

i am already successful at handling the GoogleSheetsAPI (which was nice since it was my first time fiddling with it) and being able to append data was godsent, just what we needed

#

had a bit of trouble with trying to append an array of times + adding the singular data with it (like email, log time, name, etc) , but with clever loops, was able to handle it

nocturne galleon
#

Just finished Java in my College and it would always take me like 2-3 days of constant reading and testing my program before I get the hang of how the code would run in my mind at first

#

it always gets me when I take even just a 5 day break of programming that stuff

uneven orbit
#

Hey Techies, I have a question that has been stumping me for the past 2 days. I host a gaming server. One of the scripts I am working on is a in game tablet. Now, it uses iframes to display what we need. However, I can not get it to display 2 sites that are most important. One being our gaming website which is through wordpress, the other is our cad which is localhosted php. How can I get them to come up?

hollow basalt
uneven orbit
hollow basalt
#

haha very funny

spring pond
wind horizon
shy helm
#

The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a , , <embed> or <object>. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.

The HTTP Content-Security-Policy response header allows
web site administrators to control resources the user agent is allowed to load for a
given page. With a few exceptions, policies mostly involve specifying server origins and
script endpoints. This helps guard against cross-site scripting attacks
(Cross-site_scripting).

#

These are security configs that browsers use to decide if they want to render an iframe

nocturne galleon
#

big swing noob here (also just bad at anything GUI related), is there something i'm missing that makes resizing this not work?

#

fixed it by removing the panel entirely since that class is already a subclass of JPanel, not sure why i had the extra one in the first place

#

this works

wind horizon
#

I think it's okay to mention someone's comment wasn't very helpful, but I think it'd be good if we try and avoid name calling. 😅

hollow basalt
supple hull
#

Pro-tip, if you're thinking about switching jobs, start cashing out your PTO.

hollow basalt
supple hull
#

It's too early to know if this opportunity will materialize, I'm at phase 2 of 4. I hate the insane amount of interviews in modern tech but based on my first conversation, I was surprised how much it fit. I have a sabbatical that I was supposed to take but covid hit so I'll lose 1 month of vacation + whatever normal hours I have which looks like 88 so I tossed vacation days up just start winding that down but also not screwing myself if said opportunity doesn't work out.

#

.... but maybe I haven't been paying attention to wages but the salary is a lot higher than mine to the point I'd be really stupid not to take it cuz I have vacation days + month off saved up.

supple hull
wind horizon
# supple hull .... but maybe I haven't been paying attention to wages but the salary is _a lot...

The high demand for tech workers has really been hitting a new level ever since covid, now with inflation as well I think it'll force many to start offering even more.

Sad thing is most companies don't do this for their current employees. It's almost like the tech industry is encouraging us to just keep job hopping, since they reward us fincially for it but they don't reward us for staying put. 😅

#

Also I can 100% agree tech interview processes suck, how many other jobs have 4 interviews with multiple live challenges that you are graded on.

I dread tech interviews more than the actual job switch. Lol

supple hull
wind horizon
#

Idk sounds like a great fit for start ups and there are plenty of start ups with lots of cash.

People with multiple skills like that can be super valuable when the company is constrained on staff resources.

viscid warren
#

anyone good with Java able to help me with a problem I am having my code is giving me an error but I don't know how to fix it

topaz flare
viscid warren
wind horizon
viscid warren
#

For anyone looking at my code I solved my problem

topaz flare
wind horizon
#

It's amazing how many interviews don't focus on communication skills, that's probably why we can end up with devs that are toxic but somehow got hired by passing technical exams. Lol

safe wedge
#

So I was looking at creating a discord bot that takes the posts from a facebook account and then puts it into a discord channel. However it appears i need to have a business account to use the Groups API. Any way around this?

fierce arrow
#

Im learning JQuery and I hate it

next cipher
#

no offense but.. why

#

are the kids doing like... Retro Web Development now?

fierce arrow
#

Idk my professor is like 50

#

and he refuses to let us use HTML dom

midnight wind
#

it sucks

silk eagle
#

usually takes about 10 yrs for schools to catch on

fierce arrow
#

He also makes us use firefox

next cipher
#

true but like.... jquery

#

firefox is actually good though

#

the only browser that is not designed and maintained by a company whose entire business model is online tracking & data harvesting

#

also it used to be slow but currently it's as fast as chrome and uses significantly less memory

fierce arrow
#

What about Brave?

next cipher
#

brave is also reskinned chrome

silk eagle
#

what about vivaldi

next cipher
#

also reskinned chrome :)

fierce arrow
#

but its still chromium based

next cipher
#

yep, avoiding google search is admirable - but it doesn't escape unilateral control an advertising company has over the web standards since it's still the blink/webkit engine

#

better than using straight up chrome for sure

fierce arrow
#

do you know what google did in 2009? they blacklisted the entire internet

#

Its scary how much power they hold

silk eagle
#

i can tell how much power they hold whenever this option in my vpn literally breaks the internet

next cipher
#

yepppp

#

there are other options like browser extensions that fill the tracking data with junk instead of fully blocking it which might avoid actually breaking things

fierce arrow
#

I remember hearing that on average google has like 3 million pages of information on every user or something

#

dont quote me on that

silk eagle
#

that feels like a large storage requirement

#

probably just a bit of data about google services like emails drafted received youtube videos commented on and such, and then just a list of interests to share with advertisers which is based on the sites you visit

fierce arrow
#

I wonder how much storage they can actually accommodate. probably zettabytes

silk eagle
#

so if you watch a car repair tutorial and then go to a site to get parts or something, google will be like "oh lets tell advertisers to show him wrenches" or whatever car repairs use idk bro tire iron

fierce arrow
#

"tire iron"

nocturne galleon
meager cape
#

i need help with a regex thing

#

as far as i know this shouldn't be possible with just regular expressions right?

wind horizon
#

Regex is mind blowing powerful and complicated syntax, I don't even pretend to know everything it can do. I usually go to one of the regex sites that will let your search libraries of ones users have submitted and click to live test it against some data.

swift yacht
#

#include<stdio.h>
int main()
{
int option,option2,pro,proprice;
printf("\t\n**");
printf("\t\nWelcome to ProximityTech Store");
printf("\t\n**");
printf("\nSelect any option:");
printf("\nBuild a Computer [1]:");
printf("\nClaim Warranty for Parts [2]:");
printf("\nContact Us [3]:");
printf("\nAbout Us [4]:");
printf("\nExit [5]:");
scanf("%d",&option);
if(option==1)
{
printf("\nAMD or INTEL:");
printf("\n For INTEL Enter [1], For AMD Enter [2]");
scanf("%d",&option2);
}
if(option2==1)
{
printf("\nSelect An Available Processor: ");
printf("\n1. Intel® Core™ i5-4690K Processor ");
printf("\n2. Intel® Core™ i7-8700K Processor ");
printf("\n3. Intel® Core™ i5-6600K Processor ");
printf("\n4. Intel® Core™ i7-7700 Processor ");
printf("\nEnter your Choice: ");
scanf("%d", pro);
}
if(pro==1)
{
proprice=239;
}
if(pro==2)
{
proprice=239;
}
printf("%d",pro);

}
I'm trying to create some options for like this store,, At the end i'm trying to print the value of the price but it does not print and in an online compiler it give segmentaion error
What i'm doing wrong here,, Can someone if help me out it would really help me out finishing this project :/

hollow basalt
#

so it would help if someone helps?

swift yacht
#

It will, I would be ablee to contine the rest

#

of the code

hollow basalt
#

looks like a small tweak

hollow basalt
#

classmates?

fierce arrow
#

No

hollow basalt
#

nice

fierce arrow
#

although I am struggling with an assignment rn. Do you know C?

hollow basalt
#

depends on the problem

fierce arrow
#

I already have all the code written out but my math is giving me the wrong answerr

#

One of them is supposed to end up totalling 135 dollars but it keeps calculating it to 103

hollow basalt
#

yikes

#

look at your code again

fierce arrow
#

Is it bad if I cant find whats wrong with it 😨

hollow basalt
#

We all start as beginners

#

My hint is, don't question your calculations

somber dome
#

Hey guys

#

Do any of you know some recognized python certifications ?

fierce arrow
hollow basalt
#

but my problem is, you did your error so many times

#

@fierce arrow how beginner are you with c

fierce arrow
#

this is my first assignment with it

#

like brand new to it

hollow basalt
#

just chat back here if you still can't find it

fierce arrow
#

I have discovered the error

hollow basalt
#

your god

fierce arrow
#

it was the cost ==

fierce arrow
hollow basalt
edgy path
#

Anybody here html or css developer

midnight wind
#

just ask

hollow basalt
fierce arrow
#

@hollow basalt you got me into the groove of things now man

trail remnant
# meager cape as far as i know this shouldn't be possible with just regular expressions right?

Technically, a language with pure regular grammar is not capable of referencing previous characters, so you'd think it would be impossible.
Realistically, most "regex" isn't actually regular. Pearl popularized lookahead and lookbehind, which technically make Pearl regex not a regular expression. That makes solving that problem trivial, although it is computationally far more expensive.
Practically, you can make a regular expression that matches that group by using matching groups and conditionals, which are valid under the restrictive regular grammar. This can also be more computationally expensive, because you'll basically be looking through the string once for each character you want to check.

A pure regex for finding that would look like this: (.*a.*a$)|(.*b.*b$)|(.*c.*c$)|(.*d.*d$)
It's basically the same simple pattern repeated 4 times as a capturing group (which must be all valid to count as a match).

  • Start with .* so anything can be at the start of the string.
  • Select the letter you want. In this case, a.
  • Match anything .* in the middle of the string
  • Then use a$ to make sure that same letter appears as the last letter in the string.
  • Slap all that in a capturing group, (.*a.*a$) then separate the four letters with the | operator to allow any of them to count as a valid match.

Here's the regex in action: https://regex101.com/r/ZcbyQa/1

regex101

Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java. Features a regex quiz & library.

hollow basalt
#

cause what if the professor asked the regex to be modified for a-z matching

trail remnant
#

That's a possibility. In that case I'd argue that the problem statement isn't very clear. The solution I posted is a regular expression, since it can be parsed by a finite state automata, which is the formal definition of a regular language.

silk eagle
#

yea you guys are not speaking english

trail remnant
#

If you're lazy, you can write some trivial code to just run the four regex in a row, returning true if it finds a match on any of them.
Something like this would work: (ignore my sloppy psudocode)

for x in [".*a.*a$", ".*b.*b$", ".*c.*c$", ".*d.*d$"]: 
    if MATCH(x): return True
trail remnant
trail remnant
#

In this case, we're discussing the technical definitions of "formal grammars", which is basically "how complicated is this programming language".
"Regular Languages" are the most simple, and any second or third year CS student should be able to write a parser for a regular language.
Here's a chart showing the complexity of formal languages (programming languages).

trail remnant
meager cape
#

😇

trail remnant
meager cape
#

If it makes you feel better @trail remnant your explanation genuinely did help me wrap my head around things and i could definitely do something similar on my own now

#

so you didn’t just spoonfeed me nothing but the answer

trail remnant
#

The key to using regex is to be really stupid. That's why I'm good at it. 😄

meager cape
#

Lmao, i should be a pro at it then

trail remnant
storm berry
trail remnant
hollow basalt
hollow basalt
trail remnant
#

I once wrote a tokenizer and a lexer to create a DSL.

storm berry
hollow basalt
#

shudders

storm berry
#

touche

trail remnant
#

The basic structure would look like an extended version of this finite state automata, where the bubbles contained another smaller finite state automata.
I simplified a lot of stuff because I'm lazy, and drawing with a mouse in MS Paint is hard.

#

I hereby submit my formal proof for the class to examine.

storm berry
#

I don't think you can reread your input in a fsa can you

#

it would be more like something with 2^4 + x states

#

with each of the 2^4 states being some combination of has/hasn't seen a,b,c, or d

trail remnant
storm berry
#

with the remaining states being ends with a,b,c, or d

trail remnant
#

But it shows that branching statements can be mapped to FSA, if you're willing to make things really really long and complicated.

#

The rest of that regex is stuff that's obviously FSA.

#

And if you're properly documenting all the states of a regex, then the thing does get massively complicated, because for each node on the graph, you could end up running out of characters to consume, so every single node needs a connection to one of the final states. Good luck drawing that in a simplified way.

storm berry
#

it would grow out of hand pretty quickly

#

but your diagram is simplified to the point where it's not a valid fsa

hollow basalt
#

all this FSA talk makes me want to go back to college and learn it agian for the first time

trail remnant
#

One day you'll actually learn to read what I said. But maybe today isn't that day.

This can also be more computationally expensive, because you'll basically be looking through the string once for each character you want to check.

storm berry
#

you aren't allowed to look through the string multiple times with an FSA

#

for just A and B

#

you can extend this to include c and d but I simplified it because I'm lazy

trail remnant
#

If that's true, then that means the greedy operator isn't technically regular then, and no professional implementation of regex is regular.

wind horizon
#

What did I come back to.

trail remnant
#

Regex!

wind horizon
#

lol

trail remnant
#

At least we're not trying to decide if an email is valid using regex. We aren't that crazy.

shy helm
#

it's regular expression not regular language

#

😉

supple hull
#

I'm so glad there's Regex utilities online.

hollow basalt
shy helm
#

The original egrep implementation was using NFAs

trail remnant
#

Kyou sees all.

hollow basalt
shy helm
hollow basalt
shy helm
#

Moved to the US/NYC over the summer

hollow basalt
shy helm
#

Lol, no, we're in office

hollow basalt
trail remnant
#

I mean, Pearl obviously violates the regular nature by having lookaheads and lookbehinds.

wind horizon
#

Nice NYC is a pretty cool city

storm berry
shy helm
hollow basalt
storm berry
#

those can be converted to fsa too lol

#

which is how I think super pickle's regex would be interpreted

#

and how you would get a greedy operator

trail remnant
#

It's also why you need to be careful when you use regex. If you don't understand which features can get you scanning over a string multiple times, then you can end up creating a regex that takes longer than the heat death of the universe to parse a relatively short string.

hollow basalt
#

the only time it's fun is when you have the power to create and to destroy

shy helm
storm berry
#

true

wind horizon
trail remnant
#

Not terribly surprising.

#

Sad, but not unexpected.

wind horizon
#

I guess that's the risk of so many ppl copy pasting some regex and not really know what the syntax is. LOL

trail remnant
#

More like, programmers who didn't understand the performance impact of certain things.

wind horizon
#

Every time I hear the joke about devs just Google and copy paste off stackoverflow it bothers me. It's fine to pull those up and read them to try and figure out the solution, but if you are just copy pasting code you have no idea what you are doing / using probably. lol

trail remnant
#

You know, I've heard that argument almost exactly word-for-word before.

#

I agree, but like, my real question is "What are you doing that's so complex that you don't understand it and need to resort to copy/pasting code?"

wind horizon
trail remnant
#

Bruh. Lets not talk about how literally the only programs I've used that can open and manage a 1GB file are VIM, VS Code, and other IDEs.

#

That's so common it's not even funny.

wind horizon
trail remnant
#

And that's why I prefer C# out of all the major programming languages.

#

It's not just that Microsoft's documentation is only matched by Kubernetes Docs.
It's that the Microsoft obsession with high quality docs means that literally almost every library I've used has high quality docs that solve any possible problem I could have. Stack overflow is only useful when I need a quick answer to some API I've forgotten the syntax for.

#

Like, if you need to do some complex thing in most languages, you're either reading whitepapers and trying to figure out the solution yourself, or you're scavenging through obscure blog posts describing some sort of esoteric language/compiler feature that does what you need. And the docs are badly written or out of date.
Meanwhile, Microsoft has the official language specification and a comprehensive set of explanations for every feature in the language and related toolkit.

wind horizon
trail remnant
#

Yeah, PowerShell is meh. But compared to bash, it's amazing.

wind horizon
#

My biggest gripe at work right now is lack of written documentation, they love todo video calls for knowledge transfers. I'm like but written docs I can search and read what I need when I need it. I guess only way to get similar would be to send the recordings off to be transcribed. 🤔

Either way I'm like give me that wall of text docs, just the way I learn best. lol

wind horizon
hollow basalt
#

or the just the docs

wind horizon
#

I think just in docs

trail remnant
hollow basalt
#

Ok just wait until I'm not lazy enpugh

trail remnant
trail remnant
hollow basalt
#

I mean I just copy pasted

#

forget one liners

trail remnant
#

Yeah, but that's the whole point. Bash has incredibly complicated rules for parsing, and it makes it really annoying to do certain things.

#

And led to the parser being incomprehensible, which led to the bash bug.

hollow basalt
#

but but. I used PS

hollow basalt
trail remnant
#

I mean, shell bombs are cool and all, but have you seen the logging bomb?

#

Way better than a silly old shell bomb.

hollow basalt
#

not familiar with the name but probs already saw it

trail remnant
#

Wait, you missed the log4j stuff?

#

HOW

hollow basalt
#

oh, thought we just with the bash exploits

trail remnant
#

Ah, nah. I was referencing other huge exploits.

wind horizon
#

Yeah that convo jump confused me for a sec too haha

trail remnant
#

But yeah, Bash has some serious usability problems, and some seriously terrible syntax.

wind horizon
#

But PS syntax is over verbose imo, what's up with all the long method names? lol

trail remnant
#

It hasn't been touched because everything got grandfathered in when Linux hit the server world. You can't change Bash without breaking program interop for the whole system.

hollow basalt
wind horizon
#

Self documenting = too long for me to remember 😆

trail remnant
#

The verbosity is actually a feature. When you're reading someone else's code, it's really nice to have more descriptive function names.

hollow basalt
#

The verbosity is actually a feature.
me remembering cobol. STOP STOP

wind horizon
#

I take a middle road on that. I think there is a point of too verbose and it's more so distracting / annoying. lol

trail remnant
#

You also should be writing Powershell in an IDE that has code completion, so you get lots of help remembering things. And you can use the shortened names for functions if you really want to.

trail remnant
#

Okay, Cobol is way too verbose. I think we can all agree on that.

trail remnant
#

But Go is too terse. Constantly using single variable names makes it almost literally impossible to search for a specific variable. It's annoying.

trail remnant
hollow basalt
trail remnant
#

Heck no.

wind horizon
#

First time I learned about ISE I was like cool thinking it was going to be something neat. Few mins later I was like, wtf is the point in this thing? lol

#

I guess it was handy that 1 time I was on a Windows Server that had no internet and no IDE... lol

hollow basalt
#

🤣

#

no coding in the actual server allowed

wind horizon
#

Well it was a script not a program haha.

#

I have never used PS for an actual program 😆

trail remnant
#

Remember that in the 90s, nothing needed to be professional.

wind horizon
trail remnant
#

I'm thinking about all the small businesses that picked up Windows servers and used them for "business", with little to no idea of how to manage technology.
This wasn't the Linux gurus, it was newbies with their first server when the internet was just starting to get big.

wind horizon
#

Although not that many years ago I was at a friends office of a small like 100 person company and I saw they just turned Windows firewall off on everything instead of opening ports..... So yeah those ppl still exist. LOL

I think there argument was they didn't need it since they had a physical firewall for the internet, I was like ummm so you don't care about any internal security or east - west traffic? lol

shy helm
#

@trail remnant have you seen Xonsh

trail remnant
#

I haven't seen Xonsh. It looks interesting, but the main selling point of Bash is that it's already installed on every linux machine.

#

Once you start getting into specialized shells, why not just write your app in pure python, rather than having to try installing a bunch of odd dependencies?

shy helm
#

I mean, this is a shell, so it’s for REPL

#

Instead of having to use a shell + jupyter notebook

wind horizon
#

I have gotten used to introducing TypeScript to projects and helping devs learn it, but recently I had someone's excuse for not wanting to learn it be "I don't trust Microsoft" 😆

I thought I had heard all the reasons, but that was a new one to hear. Lol

silk eagle
#

do they also hate Go

somber dome
#

Powershell is amazing on it's own, to manage windows servers it's really neat, some features are super cool like the whole remote session thing. Or just simply the fact that it's object based.
It's a bit "over verbose" like @wind horizon said, and they often try to reinvent the wheel, example : for conditions you can't use "=, <" etc like any other programming language out there but you have to type "-eq" for "equal" ....
But the docs are super good, and the language is improving really fast.
Also you simply don't have bash on windows without some sort of VM, while you can have PS on linux.
However if you want to write some simple stuff it becomes bloated quite fast

Bash is more set in stone, more known, preinstalled on linux servers and the default interpreter, easier to get into (when you go from "I often use the command line" to "i write some simple script"), doesn't require to understand object-based programming and isn't overly verbose (which can be a good AND a bad thing for this one for both) but is a bit archaic from time to time.

But IMO, when you need to do some real scripting ... python is the way

somber dome
fierce arrow
#

Some of the things I see in this channel scare me. I'm only about 5 months into programming

trail remnant
#

Honestly, one of the best features of Powershell is that it is object based. It makes it super easy to grab the output of a command that's automatically formatted as a table of data, and pull specific elements from that data easily, without needing to do a giant ton of text processing with it. In bash you have to remember and know how to effectively use half a dozen specialized text processing utilities, while Powershell only asks you to learn one consistent object oriented syntax.

trail remnant
wind horizon
#

Yeah but at that point why not use a full language? Lol

trail remnant
#

Because you need to run a thing on someone's desktop, but you can't install anything on it.

#

The same exact reason you'd write something in bash.

wind horizon
#

I don't really do that often, but I guess. I mostly used PS just for basic admin tasks.

trail remnant
#

Alternatively, you don't want the complication of building and deploying software.

trail remnant
wind horizon
#

Yeah but bash is more widely usable imo, it's been around for ages and works great everywhere except windows. Just feels like MS wanted to be MS and be different. Lol

#

I mean I'm not complaining, PS is still 1000x better than good old cmd / batch scripts. Haha

#

I am glad PS also added aliases / support for some common bash commands. That has made life between the 2 a little easier.

fierce arrow
wind horizon
rancid cedar
#

HiHi!
Kinda need some help on some PS scripting, just need an opinion on if there's more efficient ways to do what I'm doing

#
while($true){
$owo = "OK"
while($owo -eq "OK") {
$owo = Get-PnpDevice -PresentOnly -FriendlyName "Oculus Composite XRSP Interface" | Select Status | Out-String -Stream | Select-String "OK"
Sleep -Seconds 5
}
Get-PnpDevice  -FriendlyName "*AMD Radeon*" | Enable-PnpDevice -Confirm:$false
while($owo -ne "OK") {
$owo = Get-PnpDevice -PresentOnly -FriendlyName "Oculus Composite XRSP Interface" | Select Status | Out-String -Stream | Select-String "OK"
Sleep -Seconds 5
}
Get-PnpDevice  -FriendlyName "*AMD Radeon*" | Disable-PnpDevice -Confirm:$false
}```
#

So basically, this script is supposed to scan my PC every 5 seconds to see if an Oculus VR headset has been connected, and if it has, it's supposed to disable the laptop's integrated GPU

#

the script is still not finished so it won't work, but is there a more efficient way of achieving the same thing?

midnight wind
#

I don't think the loop is efficient. Idk much about ps, but in my mind having the script launch on a callback would be better

#

Let me check if that exists even

rancid cedar
#

plan on using task scheduler to run at startup

#

but i would've made it run on an event

#

but thing is, I can't seem to find documentation online as to which event a USB device being connected will produce

#

And yeah, I don't think the loop is very efficient either, but I know no other way of making it

wind horizon
wind horizon
#

Lol

rancid cedar
#

so that doesn't help

#

I was going to use power automate but it can't even run scripts in admin

wind horizon
#

That or perhaps you can tie into your VR software and when you launch it you run your script? 🤔

Or I mean I guess you could just throw the script in a file on your desktop you double click that will run the check and toogle it. Lol

rancid cedar
#

that could help

rancid cedar
rancid cedar
#

Holy moly of a reddit post I just made. I finished making the script, and posted it to r/Oculus to share it with anyone else who needed it, and the whole tutorial took 12k characters.

wind horizon
#

Nice!

hollow basalt
#

Nice!

plush valley
# rancid cedar ```ps while($true){ $owo = "OK" while($owo -eq "OK") { $owo = Get-PnpDevice -Pre...
# Define a WMI event query, that looks for new instances of Win32_LogicalDisk where DriveType is "2"
# http://msdn.microsoft.com/en-us/library/aa394173(v=vs.85).aspx
$Query = "select * from __InstanceCreationEvent within 5 where TargetInstance ISA 'Win32_LogicalDisk' and TargetInstance.DriveType = 2";

# Define a PowerShell ScriptBlock that will be executed when an event occurs
$Action = { & C:\test\script.ps1;  };

# Create the event registration
Register-WmiEvent -Query $Query -Action $Action -SourceIdentifier USBFlashDrive;
#

This only runs when a USB Flash Drive which Identifies as Win32_LogicalDisk is detected.

#

You can search for the __InstanceCreationEvent in the WMI (By logging it) for the Oculus Insert

#

Once it detects it, itll run defined Script

#

This way you dont have a background Task, its based off Events, not Polling which is way more easier on the CPU

somber dome
shy helm
somber dome
#

That's true

#

For now

#

But it's also meaningless to say that bash is "more widely usable" when it's not

silk eagle
#

this conversation was helpful to me im now using powershell instead of bash to make something work easier across platforms

#

🙏 thank u

wind horizon
#

Perhaps to be more specific I should have said more widely usable outside of Windows. I just don't work in Windows ever other than my gaming computer, so I'm used to every env and container I touch having bash and PS would have to be added.

pliant siren
#

heh, I just saw Linus's bounty in the latest video.

Yeah, definitely more than a $5k job 😄

wind horizon
#

Hmm I'd normally give it a go, but I don't think that unit is compatible with my hvac for testing it out. 🤔

Yup Google says I'd need newer Trane unit for it to be able to talk to it. That's more than $5k in upgrades alone and by time it's upgraded someone else prob will have completed the bounty. 😅

pliant siren
#

Now that I think about it, that's $500/day so 10 days/2 weeks work, so it's not a terrible contract rate to take it on as a project IF you have access to some kind of spec or sample to test it on.

#

Really depends on the availability of sample data/specs.

nocturne galleon
#

hi guys, if I wanted to make an installer for my program how would I go about it? would I store the program as a byte array and simply write it to a file? what if I wanted it to store the program compressed? thanks.

wind horizon
hollow basalt
wind horizon
#

The home video, uploaded to YouTube yesterday.

#

Said $5k if someone can make it so he can control this thermostat from his home network instead of the cloud. But it's a thermostat for one of those hvac systems with closable vents and such.

hollow basalt
#

Oh, i don't have those

wind horizon
#

Yeah my same problem or I'd do it. Haha

fierce arrow
#

the 5k thermostat bounty?

trail remnant
# nocturne galleon hi guys, if I wanted to make an installer for my program how would I go about it...

What it means to "install" a program depends on what operating system you're using, because they all have different processes for users to install things. On Linux, it's complicated. On Windows, there's a standard set of APIs for bundling things with a Windows installer. On Mac/Android/IOs, there's definitely some consistent tools for installing programs, but I don't know enough about those platforms to help with that. For Windows, this is probably a good starting place in the installer docs: https://docs.microsoft.com/en-us/windows/win32/msi/installation-package

If you're talking about simply creating a binary, that's literally what your compiler does. It takes your code and creates the binary code necessary for running your code on a specific type of CPU and OS. If you're using an interpreted language like Python or a cross platform runtime language like Java/C#, you pass your code/bytecode to the language runtime, (Python interpreter, Java Virtual Machine, C# CLR, Bash shell, etc.) and that program executes your file.

#

Note: Theoretically, you can just zip up your binary and allow users to download it (or just email it to them). Some simple programs can do this just fine. There's nothing wrong with zipping up a binary if you're submitting a school assignment or doing a small test project. However, it requires a lot more work from the end user. If you're trying to create a product to sell, or trying to create something that looks like a professional application, that's where you need to package your application using the correct OS specific libraries. That's quite a bit of work if you're not familiar with the process.

twilit beacon
#

Can anyone help me, I'm stupid and can't figure out why my while function keeps on looping.

secret_word = "troll"
guess = ""
tries = 0
limit = 3
reached = False

while guess != secret_word and not(reached):
    print("You have " + " tries left!")
    if tries < limit:
        guess = input("Say a funny word: ")
        tries += 1
    else:
        reached = True

if not(reached):
    print("You lost!")
else:
    print("You won!")```
#

i went through everything though i cant seem to find the solution

trail remnant
#

Write out the boolean logic for that conditional check.

#

Or step through the code with a debugger.

wind horizon
#

Hmm I almost never write python now but I didn't think not was a method, I thought it was just not X

But been a long time since I touched python haha, what Super Pickle suggested is a good idea, also it'll give you a chance to learn debugging to learn how to help solve more complex problems in the future on your own.

twilit beacon
#

dont mind that anymore, i realised i had to save it and that thats why it didnt work

silk eagle
#

ok i msade a jsoke about cstrl s but warshsip disdnt liske ist ysou gsuys sget its

twilit beacon
silk eagle
#

maybe do <= if u want the limit to be 3 guesses

twilit beacon
#

somehow it shows as three in vscode

#

i am alsoconfused

silk eagle
#

oh i did a brain thing tries is 0

twilit beacon
#

nvm

silk eagle
#

0 -> 1 (1)
1 -> 2 (2)
tries is still less than 3
2 -> 3 (3)

twilit beacon
#

yeah i realised

twilit beacon
#

even better

#
word = "troll"
tries = 0

while (guess:= input("Enter a funny: ")) != word and tries < 3:
    tries += 1

print(f"You {['lost', 'won'][guess == word]}") #f-string```
#

ok now i condensed the f out of this code

#

i dont think it can be even further simplified

#

(im most likely wrong)

silk eagle
#

u can put tries += 1 on the same line

#

after the colon

sturdy ingot
#

You may have to try harder next time... 😛

print(f"You {['lost', 'won']['troll' in (input('Enter a funny: ') for _ in range(3))]}")
#

Seriously though, don't write code like this. Keep the Python-Zen in mind (aka import this).

silk eagle
#

one liners are terrifying and i dont understand them

storm berry
#

I was going to write an explanation but the warship doesn't like me repeating characters ¯_(ツ)_/¯

wind horizon
#

wwwaaarrrssshhhiiippp 🤔

#

I wonder what their content filter is, it seems to get a fairly high amount of false postive. Lol

obtuse night
#

It's the worst when you paste an error message, and it mutes you for the block capitals...

storm berry
#

it also deletes the entire comment so there's no way to retype it without redoing it all

fierce arrow
hollow basalt
#
s[999],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c%7?a&&(c&17?c&1?
(*r-=c-44):(r+=c-61):c&2?putchar(*r):(*r=getchar()),0):v;b&&c|a**r;v=d)main(!c,&
b-1);d=v;}
fierce arrow
#

This makes me scared of continuing C

storm berry
#

wait till you see the code for interpreting other languages

hollow basalt
silk eagle
storm berry
sturdy ingot
silk eagle
sturdy ingot
# silk eagle for python specifically yes 🙏

Let's start by rewriting the code into easier to parse snippets.

ask = (input('Enter a funny: ') for _ in range(3))

result = "troll" in ask

answer = ['lost', 'won'][result]
print(f"You {answer}")

The last two lines are not that interesting, as print uses an f-string, and answer misuses indexing by a boolean value (e.g. [0,1][True] is 1, [0,1][False] is 0).

So let's look at result. result uses in. needle in iterable goes through the iterable collection. As soon as the current element matches needle, the iteration stops and we get True. Otherwise we continue. If no element in the iterable collection fits, we get False.

Or, in other words, the result line is semantically the same as

result = False
for element in ask:         # this is NOT the same "in" operator
    if "troll" == element:
        result = True
        break

Note that in in for ... in is not the same as the in operator. See Python's documentation for more information about that.

So, we now know that our loop stops as soon as we hit the correct word. But why do we not get three questions regardless?

Enter the Generator Expression (genexp):

ask = (input('Enter a funny: ') for _ in range(3))

This creates a generator. A generator gen is iterable with next(gen), and only if next(gen) gets called the expression in (expr for a in b) gets evaluated. We could write ask also as

def generate_questions():
    for i in range(3):
        yield input('Enter a funny: ')

ask = generate_questions()

Think of yield similar as return, but you can get the next value via next, e.g.

def generate_numbers():
    for i in range(3):
        yield i

nums = generate_questions()
print(str(next(nums))) # prints 0
print(str(next(nums))) # prints 1
print(str(next(nums))) # prints 2
print(str(next(nums))) # throws StopIteration

The calls of next happen behind the scene in 'troll' in ask.

#

This may still be incomprehensible, tbh, but I had to write this in parallel to something else, sorry 😅

silk eagle
#

🙏 thank you for this, i will study this so i can finally make 8000 character long python lines that aren't readable at all. i wasn't expecting a legitimate, well constructed answer so thanks a bunch i appreciate it bro.

sturdy ingot
warm pebble
#

Very dumb problem I am trying to solve at work. I make maps right? So I have batch exported a ton of maps into individual PDFs, however the team that needs them wants the map in an excel format cause they need to add additional sheets to it (for whatever reason). What is the best way to batch convert/insert these PDFs into their own excel sheet

#

I have tried pdf to excel converters but they break the PDF because they don't insert it as an image

hollow basalt
warm pebble
#

I was thinking there is definitely a python library out there that will convert them to something like a PNG no problem, but I am not certain the best way to automate putting that PNG into its own sheet (and naminh the sheet based on the name of the PNG)

warm pebble
hollow basalt
kindred iris
#

You guys know how I prevent piracy on my Project? (not asking for help. Just an quick question)

hollow basalt
#

yes

kindred iris
#

How would you do that then?

hollow basalt
#

not release it

kindred iris
#

lol, I did it like that: it is for free. (yeah ok, I might make something for patreon, but it will be free as long i work on it.) and it is open source.

hollow basalt
#

open source
wants to prevent piracy

kindred iris
#

it is simple: you can't pirate something that is for free right?

#

That is the approach. And since it is a hobby of mine and I learn something with each update, it is just something I could stop in any time if I wanted.

#

And Currently i'm trying to make the Code a bit more serviceable.

#

because i realised: good god, it is hard to read... (for beginners)

#

it is made in Python by the way [[Can't] Kyou]

kindred iris
#

Well I'm going to sleep now

silk eagle
kindred iris
#

Wait I do have to add that?

#

Next time I'm on coding. 😉

silk eagle
#

licenses arent really necessary for just casual projects if u dont care about who uses the code, but its worth noting that they exist and if u specify a license for your project you can slay people on github who steal your code in ways that doesnt abide by the rules of the license

#

could be a "credit me bro" type thing or a "no selling the product if u steal my code bro" type thing

kindred iris
#

Oh, Ok. Thanks. That's going to be an additional thing for version 1.9 then.

silk eagle
#

(and they scare evildoers off which is always fun)

kindred iris
#

lol

#

me going to zzz land

fiery terrace
#

There should be a PC handhelds channel for the Aya, GPD, Steam Deck, etc.

ivory gorge
#

any idea where i should start to learn python for data analyst?

storm berry
kindred iris
#

well, what is the unlicense meant to do?

storm berry
kindred iris
#

oh... i actually want to hear if the Code has issues...

storm berry
#

well it doesn't say not to file a bug report

#

but like don't sue me if someone dies using this

kindred iris
#

oh. lmfao

#

thanks by the way. i'm not really in to that someone sells it tho

#

but i'm Chill with everything except everything to do with money.

#

except i may add an Patreon donation...

kindred iris
trail remnant
#

"Removed" as in, modified the existing license?

#

Or "removed" as in "picked a difference license that doesn't support selling the code"?

#

Because those two are COMPLETELY different in a legal sense. Making changes to a legal contract can have BIG huge implications.

#

For example, in Georgia USA, if your employment contract doesn't have a specified duration, it's legally invalid. Literally more worthless than toilet paper. All employment contracts MUST have an expiration date, or the entire contract is unenforceable. By removing the duration section, you can accidentally invalidate the entire thing. Little rules like that are why you should always either:

  1. Use an unmodified pre-existing legal license that has held up in court before
    or
  2. Talk to a literal lawyer, to have them review/modify/write a license that works for you.
wind horizon
#

Github has a nice TL;DR for many common licenses. If you don't care how people use your code typical default is MIT, if you care and want todo copy left where your code is more limited to other open source works you'll likely want to look into some of the GPL options.

trail remnant
#

Glam knows his stuff.

wind horizon
#

Reminds me of when color and faker maintainer got upset and broke his own packages. I'm like if you didn't want companies to use it for free why did you release it as MIT? Lol

trail remnant
#

Lol

#

The ego doesn't think things through. He made a decision based on convenience, and when he didn't like the results he got emotional and did something stupid.

wind horizon
#

Now he has some nasty search results that come up if a future employer Google him I bet LOL

#

I feel like a safer move would have been for him to just post he's looking for supporters for the project or else he'll have to stop maintaining it because of how much time it's taking up.

trail remnant
#

I mean like, having a highly successful open source project on your resume practically guarantees you a good job and plenty of job offers. Why get greedy because you couldn't sell a project when you never tried to monetize it? But he got greedy, so he ruined a huge number of job opportunities because of a single short sighted decision.

#

And yeah, if he's not able to maintain it, then just drop it. MIT doesn't guarantee support. It's the literal opposite.
Open source projects typically drift from maintainer to maintainer for exactly that reason.

wind horizon
#

Yup someone will just fork it if you don't hand over control.

trail remnant
#

Or, post a big update saying that you're willing to be paid to keep the project running, but otherwise you'll shut it down.

#

Or just let them make a fork and rename it.

#

Like, there are so many better decisions there.

wind horizon
#

I have had 2 old repos I no longer need / maintain that ppl messaged me asked to fork it and take over the npm package. I was like yeah go for it.

trail remnant
#

I bet that he's got some social issues. Like he feels like he's being pushed around or something. Greed is a bit more logical than intentionally breaking a project that could make you money.

#

Like, he felt obligated to support the project, even though he literally published it with zero guarantees of support. Then when he hit his breaking point, that's when the stupidity came out. You don't just end up breaking an important project for logical reasons.

wind horizon
#

Yeah, lots of stress and maybe problems at his day job.

trail remnant
#

Yeah, that sounds about right. A bad and stressful job, along with thankless work maintaining a project you feel required to maintain, with zero support.
That'll push someone to the breaking point.

#

That's why everyone should learn to stand up for yourself, and prioritize your own health. If you neglect yourself, it hurts you and everyone around you.

#

Relevant meme/life advice:

wind horizon
#

Took me many years to learn that, now when I see our Jr devs online for like 10hrs I sometimes ping them and remind them to take a break, the work will still be there tomorrow. It takes something truly critical to make me work any OT now.

trail remnant
#

Yeah. It's an important lesson for anyone to learn.

wind horizon
#

Yeah I think it's common for us to make work so important, almost like a part of our identity. Think how many ppl you meet even outside of a work setting who introduce themselves and say what they do for work.

But really I mean it's just how you make money, it's not who you are. It's a big part of life and influences you a lot, but it's not your identity imo. If tomorrow I gave up dev a did something like became a pilot it wouldn't change who I am as a person.

hollow basalt
#

These people can't reach me when I'm not on my laptop

midnight wind
#

No notifications on

hollow basalt
#

yea, it's much easier to send pictures.
but I am tempted to open it at times

#

so it's pretty much me disciplining myself not to think about work outside of hours

next cipher
#

are we talking about the colors/faker guy? because there was a lot more going on there than just being upset people were using his open source code

#

like, the guy has major issues and i hope he gets help

trail remnant
next cipher
#

specifically, he blew his apartment up trying to make explosives because he got deep into some conspiracy theory cults

trail remnant
#

That's uhhhh, a bit more than I was expecting.

#

That's Temple OS levels of worrying.

next cipher
#

so like as much as i hope he gets help, i also don't think it's a typical example of the open source ecosystem

#

yeah exactly, a lot of people hear "he had some issues" and don't realize it was at that kind of level

wind horizon
wind horizon
somber dome
#

Is Go still hyped nowadays ?

wind horizon
#

Idk if it's hyped, but I'd think ppl are still excited by it / find it interesting to play with. But I deff think it is getting old enough to no longer be that new thing everyone wants to play with. Haha

obtuse night
#

The community isn't getting any smaller, and the number of companies adopting it is still increasing

next cipher
#

yeah it's the same person, he tweeted about it (in a very roundabout way) at the time... i.e. "i am about to be homeless please sponsor my GitHub projects" then everyone in the replies says "wait aren't you homeless because you blew up your house?"

#

like i feel bad for the guy in the abstract cuz he clearly is going through some stuff but ..... also hard to actually feel sorry for him to the extent that i would use or sponsor any of his software

hollow basalt
#

whereas we have a talent but are held back by mental health

next cipher
#

yeah seems like it imo

edgy path
#

hey anyone help me with a function in c?

#

i was trying to use the sqrt function to determine the squareroot of an positive interger number through a c program so i included the <math.h> header file and also i am on a linux environment with gcc compiler.

#

so is there any other way to determine the squareroot of a number in a linux environment

trail remnant
hollow basalt
#

i didn't know linux determines the squareroot of a number differently

trail remnant
#

It shouldn't. On x86 there are multiple squareroot CPU instructions. Linux should just be shelling those calls out to the CPU.
source: https://en.wikipedia.org/wiki/X86_instruction_listings

The x86 instruction set refers to the set of instructions that x86-compatible microprocessors support. The instructions are usually part of an executable program, often stored as a computer file and executed on the processor.
The x86 instruction set has been extended several times, introducing wider registers and datatypes as well as new functio...

#

The question is missing key information. They asked about C functions, then importing code, then they throw a Linux question in there. There's not enough information to properly answer the question because there's almost no information in the question.

#

I think they're just having problems getting their C imports to work correctly. Someone with more experience would know how to give the correct level of detail in their question.

hollow basalt
#

That's sarcastic if it wasn't obvious

trail remnant
#

Ah, sarcasm wasn't obvious.

#

I guess I'm just used to people not bothering to read or think for themselves. Gotta remember that you're one of the smart ones.

sturdy ingot
ornate spire
#

i didnt realize that all my unity stuff was combining into one folder, and the folder corrupted and ive lost everything ive ever worked on : <

#

trying to see if i can recover a backup or somthing now

thin raven
#

hi

trail remnant
silk eagle
#

make sure you politically geographically disperse your backups

#

i have mine in EU countries, NATO countries, and whatever type of country Russia is

trail remnant
uneven orbit
#

Yall, im at my wits end. I am creating a script for a game server i run. Its an in game tablet. We have a community website that is built with wordpress. I would like to have the website display in the tablet, however the only way i know to do this is to use iframe. The website does not show when trying to add it to a iframe. What can i do?

wind horizon
# uneven orbit Yall, im at my wits end. I am creating a script for a game server i run. Its an ...

Can you iframe this site on another page correctly or just not on the in game tablet?

It could be something like the x frame options, but first step is to troubleshoot this and isolate the problem. Is the problem with the iframe you wrote / this site or is the problem with something inside the game.

Copy past the iframe code into another site and not on the wordpress. You can use something jsfiddle or codepen to test your code.

uneven orbit
# wind horizon Can you iframe this site on another page correctly or just not on the in game ta...

Sorry I gave limited information. I have tried sticking it in the tablet by replacing the link that was already in the iframe, to which it just returned a white blank screen in the tablet, so I then went online to a iframe tester and plugged my website in to which of course, had a negative return saying "website couldnt connect" which sounds like my website is blocking it. I then tried it with another site which is called tunein.com which the tester website and the tablet was able to return with the website. So it seems my website is blocking ability to work on iframe. We actually have 2 websites, one is through WordPress and the other is php. Hopefully that's some more clarification.

wind horizon
#

Load up the iframe and open your dev tools (F12 on browser) and look if there are any errors. Sounds like probably the x-frame-options.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a , , <embed> or <object>. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.

storm berry
twilit beacon
#

how do i make the variable "guess := input()" equate to the other variable "secret"

print(f"You have {['lost', 'won'][guess := input("say a funny") == secret]} ")
twilit beacon
#

nvm i alread figured it out

twilit beacon
#

wait now i have another question, so i fixed it so theres no sytax issur that vscode detects, why does it now output

print(f"You have {['lost', 'won'][(guess := input("say a funny")) == secret]} ")
zenith sand
uneven orbit
lament bridge
#

I have a config file which contains a line:
; perDomainRateLimit = 0

The thing is, I want to get the exact string here. For example, it can be:

perDomainRateLimit = 4
or 
;perDomainRateLimit = 12 

I want to get the line even if it has semicolon and space after it, but I am struggle to find the right regex.

Can someone help?

#

Oh, nvm lol that was easy af

fierce arrow
#

Is there anyways I could improve the readability of this? Its for an assignment and I don't wanna lose a point for a silly reason.

fierce arrow
#

It works

#

It does what hes asking in the question. Why is it unfinished?

twilit beacon
#

oh yeah i realised i didnt write the problem clearly

#

basically, it gets the "won" or "lost" correctly, but instead of writing then normally it writes them { 'lost' } and stuff like that

pine monolith
#

so i have this thing on my website with 4 pages, but there are random spaces in between the parts, but in the html code, those aren't there

#

this is the html code

#

can somebody who knows how this works help me

fierce arrow
#

Personally i think it looks better with the spacing but, its likely your margins.

#

I made them a little closer together @pine monolith

#

I just changed these

pine monolith
#

but those spaces are still there

fierce arrow
#

you want no spacing at all?

pine monolith
#

i want spacing but not those spaces
like this (this is on a different part of the website)

#

i want these to go away

#

and i dont know how

fierce arrow
#

im gonna try some stuff

pine monolith
#

alright

fierce arrow
#

fixed it

#

and just change these back to 1em

#

All I did was place the all the list link things on the same line

#

@pine monolith btw is this for a website for a pizza shop or something lol?

pine monolith
fierce arrow
#

Oh, that's pretty cool. I'm sure the site will be pretty baller by then!

pine monolith
#

yes i think so too

midnight wind
#

fyi if this is for a school project, almost no one make websites anymore in pure html/css/js

pine monolith
#

no it isnt i just want to learn html and css

midnight wind
#

fair

fierce arrow
#

@midnight wind what else is used now? I am new to all this so im curious

pine monolith
#

maybe soon i will have a html school project and then i can just send this site to my teacher

midnight wind
pine monolith
#

yes

#

btw what did those js scripts do?

midnight wind
midnight wind
#

allows you to run code in the browser to do all sorts of stuff

fierce arrow
#

it runs it on there computer basically

pine monolith
#

but what specific thing did these scripts do

midnight wind
#

idk I didn't download the files

fierce arrow
#

You did not have any js on your site from what i downloaded

midnight wind
#

I see now

#
<html lang="en">
<head>
        <title>PizzaPuntThomas - Home</title>
        <link rel="Icon" href="PizzaPuntThomasRound.png" >
        <link rel="stylesheet" href="indexstyle.css"> 
<script async src='/cdn-cgi/bm/cv/669835187/api.js'></script></head>
<body>
        <img alt="Home" src="PizzaPuntThomasRound.png" width="300px" height="300px">
        <ul>
                <a href="about.html">About</a>
                <a href="projects.html">Projects</a>
                <a href="services.html">Services</a>
                <a href="contact.html">Contact</a>
        </ul>
<script type="text/javascript">(function(){window['__CF$cv$params']={r:'6dbf9a40af898cca',m:'SCHkp2Uy0IftRhxKuptx.NGs7o7cNYFaQ7ZkT29qbNE-1644603745-0-AapJEjILWGyz50NUayWA484cgUfWqYy6qihqOmnpUCXtRZ+zopSS3q2QeBNjLd/7fvAsbD21a0N+ptiUV87d4vwn12dbYi7dIxHN9yz+hkTlJrZ1i5fuMQf4G8h/VU5l6ZSIjXD3I6b/tPye0QhVZVaTLm/y6Y+L1y83MQg4pvcDpB0G5q9Ub/01f4LHHMsvgN/hvTTgLUg0kUCB4Y9deNQ=',s:[0x072d80e02a,0x2846cf7a46],}})();</script></body>
fierce arrow
#

Oh i did not see that

midnight wind
#

@pine monolith where did you get that file?

#

it looks to be CloudFlare injected js

#

it's apparently used to fight bots

pine monolith
#

oh that is nice

fierce arrow
#

Yeah I didnt catch it I was not paying too much attention

pine monolith
#

then i will put it back in my code

midnight wind
plush valley
#

It is used to refresh the cache

midnight wind
#

like where did you have the js from

#

because like it's useless on localhost

midnight wind
plush valley
#

And its also used for optimization of the JS

pine monolith
plush valley
#

That shouldnt be in there unless you use CF

pine monolith
fierce arrow
#

I did not add it

pine monolith
#

oh

#

i didn't too

midnight wind
pine monolith
#

wut

#

i dont see it

fierce arrow
#

i dont see it there either

pine monolith
fierce arrow
#

Could it have possibly been added when downloading the file through discord?

pine monolith
#

maybe

midnight wind
midnight wind
#

so I downloaded it

plush valley
#

I do get it

fierce arrow
#

I think its likely a discord thing

pine monolith
plush valley
pine monolith
plush valley
#

You added it on accident.

fierce arrow
#

the original was this one

fierce arrow
midnight wind
#

discord prob added it

#

lol

fierce arrow
#

Wonder why

plush valley
#

Discord is fucking up

devout iris
#

He hacking

#

Don't hack my pc please thanks

midnight wind
plush valley
#

Its adding it to every HTML file in the Cache and Discord didnt Blacklist the uploaded files

midnight wind
#

ah discord

plush valley
#

So the CF Scanner just assumes you are rendering the HTML straight from discord as if its part of discord

#

WOOOW

#

What fucking traaaaaashhhhhhhh

fierce arrow
#

What exactly is the signifigance of it

plush valley
#

Nothing, other than it shows how bad Discord is developed

#

brb submitting bug report 😐

fierce arrow
#

lol

pine monolith
#

lol

devout iris
#

I coded minecraft twitchspawn myself am I a developer now?

pine monolith
#

yes i think so

midnight wind
devout iris
#

Great

fierce arrow
#

Id assume they would with certain complaints

plush valley
#

One of those people is a Mod/Admin of this Discord Server too

devout iris
#

My man is friends with a ltt helper

#

🙏 🙏

fierce arrow
#

Ive downloaded these sorts of files through discord in the past without the issue

plush valley
#

Acquaintances, I piss him off quite often

fierce arrow
#

maybe it was something that was introduced with an update

plush valley
#

Overlooked something and this is the result

fierce arrow
#

someone dun goofed

plush valley
#

Everyone who was relevant and worth a damn @ Discord has left

#

After the last bit of internal drama the last bit of the original team sought out better pastures

midnight wind
#

discord's still loosing money right?

plush valley
#

Now its mostly marketing, support, and developers pushed by leadership to pack in more features instead of focusing on the core

plush valley
#

They are positioning themselves to be sold but no one wants this piece of shit

fierce arrow
#

I feel like discord prioritizes workplace diversity over actual production quality maybe? I know bungie is like that now.

plush valley
#

Even Microsoft said "lol, debts? no"

plush valley
fierce arrow
#

oh ok I was close but not on the money lol

#

New features are nice and all but not if they come at the expense of the integrity of their service

supple hull
#

Alright hol’d up. How does one prioritize diversity over production quality?

plush valley
#

Hire based on skin color not skill.

#

Or... hire based on "pronouns"

#

(yes literally)

fierce arrow
#

Workplace diversity is good dont get me wrong but people should be hired based on their ABILITIES alone

supple hull
#

Well, I thought I was actually going have to work to get you to express the bigotry

plush valley
#

Education Diversity is the Answer, not Employer Affirmed Action

plush valley
#

Love me or hate me for it, it is what it is

#

Dont like the truth, change the facts that make the truth.

supple hull
#

As a certified white guy (been one for my entire life) and a bit too old to be woke, tech is a boy’s club and I’ve witnessed it first hand.

#

Specifically a white guy frat party

plush valley
#

They currently have something like 20-30% LGBTQ Employer Base and a bunch of furries

#

Most are marketing and support

supple hull
#

That seems like a claim that needs to be backed up. I don’t know anything about discord but usually diversity forces employers to take a hard look at people that otherwise be passed up. We have been built biases that we can’t always see for ourselves and it’s meant to be a stopgap against it.

#

If anything is striving to be more egalitarian based on merit than scoring points for…. Some reason

plush valley
#

They were proud to announce it at a Game Con a year + change ago

fierce arrow
#

I just think that employers should hire based on the qualifications and skills of the applicants

#

alone

supple hull
#

If they did we wouldn’t need it

plush valley
#

Its all about looks to make the bottom $

#

I honestly dont care, I just want quality.

#

Hire whomever based on whatever you want, just make sure the baselines are met

supple hull
#

If society also gave every a fairer shake we wouldn’t need it. Diversity training can go amuck and alienate, and become self parody but at its core is a solution to a real problem.

plush valley
#

Its honestly headache inducing how much this shit is focused on

midnight wind
#

yep

plush valley
#

The real problem is Education Quality is segregated based on Geo-Localized Income (Taxes pay for the System, More taxes/$.. more quality) and echos from when Banks used to refuse loans to those of minorities for housing and stuff still affect us today.

#

Question is: how do you undo the damage?

supple hull
#

Anyhow I’m not gonna convince you guys through a discord chat and I don’t think a long debate will be productive but just feel like when people blame everything on diversity training needs to be checked a bit. My gf is a non practicing lawyer who works in HR with labor law in manufacturing. The need for diversity training is real, especially in a place like that. Stories of workplace issues make me realize how insulated I am from blue collar work.

plush valley
supple hull
#

In tech it ends up in a place sometimes self parody though.

plush valley
#

Tbh, tech is expensive to get into

#

And its sort of a "Upper Class Skill/Hobby" thanks to its economic barrier.

midnight wind
#

gotta have a computer, really

#

internet

supple hull
#

Yep, I grew up solidly middle class, dad is a farmer of all things but it was enough that I had a computer as kid

plush valley
#

I grew up in a swamp OMEGALUL

#

Hunting Ducks and Rabbit for dinner

#

Then one day.... I got a hand-me-down laptop and tore it apart

#

that set the ball in motion

#

I am wholefully grateful and appreciative of the resources and material I was given that helped push me on.

#

I recognize that I am lucky for it and dont take it for granted

supple hull
#

Can’t say I had that since middle class.

#

Hand me down computers weren’t much of a thing in the 1990s and I didn’t have an internet connection until 1997, so early HS for me.

plush valley
#

I was born in 1996 so I grew up at the same rate and parallel to the .com boom

#

Timing did play a huge part in it

supple hull
#

Tech both harder and easier to break into now that it’s more formalized and varied.

plush valley
#

its so entrenched in daily operations

midnight wind
#

I got into tech I think with wanting to get a better gpu

plush valley
#

you know what I find funny?
You gotta have Top Secret Clearance to mess with missiles, but messing with the backbone that makes the world run (The core internet pipelines/cables)..... just need a resume... and you can do wayyyyyyyyy more damage.

#

A big fat gaping hole

midnight wind
#

then I built a pc eventually

#

just always been a tinkerer

midnight wind
#

kinda insane thinking about it

plush valley
#

Imagine if you had access to 2/3rds of the root DNS Servers

midnight wind
#

does the US gov have it's own cables, just for them? I would be surprised if they don't

plush valley
#

You would have access to release a message to the entire world that it would have to look at... and depending on what you say.... you could take it.

supple hull
#

Right now the pain point for me is in stage 3 of 4 in an interview process and I have a take home project and so I need bone up on cypress

plush valley
#

They run it with Homeland Security and Canadian "Shared Services Canada"

#

Its all dark fiber interlinks to make the GovNet to keep confidential and classified data off the internet

#

There is also darkfiber links to the 5-eyes nations to share confidential data

#

But guess who installs those?

midnight wind
#

China?

plush valley
#

The same contractors installing every other fiber link

#

You dont need a background check to do the physical work

#

Or the stand-up administration before handoff

#

We protect our weapons tech... but the one thing running the planet? Nahhhhhhhhh cheapest bidder.

#

Largest case of tunnel vision ive ever seen thats been running true for 30 years

#

And you dont need to "hack" anything, just give them a resume and they give you a key to the front fucking door

#

One day someone is gonna figure this out and play the entire planet as a fool

wind horizon
wind horizon
#

re the whole getting into tech thing I feel that. I grew up poor in a middle of nowhere, now that I have "made it" in tech I keep thinking it'd be nice to try and engage with people near end of high school / early college and help them try out some IT skills and if they enjoy it help them get skills and connections to get going.

The majority of my co-workers at jobs have always been from middle class or better families, many often have no student loans and their parents paid for their college. I'm happy for them, but it also makes me sad when I see them not appreciate what they have.

The problem I have run into is how many people come to things like this acting like they already know everything or very entitled. It's hard to help people like that.

Need like a filtering process I guess. 🤔

trail remnant
#

@supple hull speaks the truth. There's some really bad sexism and racism in our industry. Even after they've made it past the barrier of acquiring a CS degree, women burn out at over twice the rate of men in CS fields. Computers aren't that different from other STEM fields. We just have way more sexism.

#

Fixing the educational pipeline is important, but it will have negligible overall impact if workplace sexism isn't dealt with.

silk eagle
#

😔

wind horizon
# trail remnant Fixing the educational pipeline is important, but it will have negligible overal...

We need strong top down messages that it wont be tolerated. The real change happens culturally on our individual levels, but we need backing from top down that we can weed out these people.

Ingenious a holes shouldn't be so common in our field. That's what hiring only on abilities / skills gets you, smart a holes that passed technical challenges but should have been failed for communication and personality reasons.

silk eagle
#

smart hire on trust not based on how many obscure algorithms someone can remember and write in a google doc

trail remnant
#

Unfortunately, leadership at top tech companies tends to be sheltered upper class white men, with zero understanding of the realistic nature of bigotry. Examples like Activison/Blizzard are surprisingly common, where the white men in power do horrible things while pretending to help or even care.

wind horizon
#

I have worked under minority CEOs and teams based in other countries and still had similar issues, I don't think simple diversity hiring will solve the problem. We need to focus on the type of people we are hiring.

trail remnant
#

There's this hilariously ironic and painfully sad thing that happens where "diverse" companies can end up just as bigoted as the companies they claim to hate. Bigotry begets bigotry. Hate brings more hate. Often times "diverse" companies end up learning policies and procedures of management and hiring from the examples around them, which are mostly bigoted. So they end up repeating the same general pattern but with a different clique of people.

#

You can't fix a problem originating from hate and ignorance without compassion and education. And American style companies are inherently opposed to that.

wind horizon
#

Yeah I agree, although I wouldn't leave that on "American" companies. The worst group I ever worked for wasn't American. Lol

#

I think its a problem all over the world, just each country has different struggles.

trail remnant
#

America exports culture everywhere.

wind horizon
#

I don't want to point fingers at any countries / cultures, since it's not a valid excuse imo. When I work with groups from other countries there are some countries / parts of the country far far worse.

Doesn't excuse our issues, but I think it's that we need to be upset at the core issue not a specific countries culture.

No culture, minority status, etc should exempt someone from being called out in their shit. Includes rich white dudes and poor minorities alike. Being an a hole is an a hole no matter who you are. Haha

trail remnant
#

America is one of the only countries in the world where companies have as much power, if not more, than the government.
I say "American style" companies, because even though Brittan started the idea of crazy powerful companies, America is the largest nation that still does that, and nearly every other example you'll find is modeled after America and the American system that allows and encourages powerful companies to exist.

wind horizon
#

Hmm idk if company power is the issue, since even if you aren't a powerful company you can still be a bigot.

#

I mean there are deff lots of discussions around sizes and power of companies for sure.

trail remnant
#

Being an a hole is an a hole no matter who you are.
While this is definitely true, this is a dangerous argument to hold. This type of rhetoric is often abused by malicious actors to defend their own abuse.

wind horizon
#

How do you use that as a defense, defend yourself as an a hole? 😅

acoustic roost
#

anyone know how does PayByBandwidth on alibaba cloud works?

trail remnant
acoustic roost
#

is it 1 Mbps per each outbound request ?

trail remnant
trail remnant
wind horizon
trail remnant
wind horizon
#

""+PayByBandwidth" is based on the maximum bandwidth your CDN service has consumed (in Mbps) for the current day

trail remnant
#

Page #2 provides specific prices for PayByBandwidth, and page #3 provides examples of how the price is calculated.

#

Basically, do you want flat rate pricing or hourly billing.
For contractors, flat rate billing usually benefits everyone. But for bandwidth, that depends on your website's usage patterns.

acoustic roost
#

I'm still confused lol

#

ok let's say I have 8TB of traffic a day

#

how much they will charged me?

trail remnant
# wind horizon Oh never heard that, when ppl are like that I just cut them out off my life. No ...

Yeah, cutting those people out of your life is the healthy thing to do. But the problem with that is they don't change, and they go on to hurt more people.
However, trying to force people to change is impossible. People can only change if they want to change. So we run into the problem of having to punitively punish people for "bad" actions. The only problem is that once bad actors realize that they're punished by some powerful system, someone very evil and very smart eventually comes along and breaks the system that was supposed to keep them out. (See Venezuela's democratically elected dictator)

trail remnant
wind horizon
#

I do think minor disagreements are silly to take to that level, I’m talking more so a serious issue / someone openly being a bad actor.

trail remnant
#

For PayByBandwidth, the blue and red graphs will cost you different amounts, even if the TOTAL data sent in the day is 8TB.
In this case, the "spiky" blue graph will cost you almost TWICE as much as the flat red graph. PayByBandwidth costs you based on your PEAK bandwidth. (important documentation pictured)
PayByUsage will cost you the same for both graphs, since the total amount is 8TB.

acoustic roost
#

amazing

trail remnant
#

Sloppy MS Paint graphs save the day again!

wind horizon
#

Peak bandwidth seems like an unfair billing method, I prefer simple metered bandwidth / pay per gig etc.

trail remnant
#

My most useful skill.

trail remnant
#

The two billing methods likely exist because some people need consistency with billing, and it simplifies infrastructure management. (or at least moves costs to the more expensive system)

trail remnant
silk eagle
wind horizon
trail remnant
wind horizon
trail remnant
silk eagle
#

CDNs are fun, hosting sites off of a home network has never been easier

trail remnant
#

Hosting websites as static files is the best.

wind horizon
silk eagle
#

big money making idea here guys, PayByBandwidth CDN

trail remnant
#

The trick is, the larger your server, the more it makes sense to just run gigabit fiber to the server and not fuss with infrastructure management. So for larger servers, it's probably MUCH cheaper to run at high volumes. It's also rated by day, so it could end up saving you if your website has peak and off days. (weekends, work days, etc.)

wind horizon
#

Just feels very unfair / easy way to run up someone’s bill at low cost. Just launch a cheap 5 min attack to blast traffic to rack up a bill.

Then what do they do, limit total bandwidth and end up with a less scalable app? Just sounds like a headache.

#

But if your app has such little usage just put it on one of the many free tiers from cloud providers. They already bill on usage and will scale without a worry of bandwidth peak. 😅

Just feels like a weird way to bill.

trail remnant
#

If you're worried about a cheap attack costing you money, paying by bandwidth is probably the wrong choice for you.

silk eagle
#

self host supremacy

trail remnant
#

You're likely paying by bandwidth if your website is large enough that you're consistently using huge amounts of bandwidth and you need to buy in bulk.

silk eagle
#

wait you technically pay for bandwidth for a home network linuth ive been tricked

trail remnant
#

Bandwidth is how internet is sold.

#

So if you're not paying for bandwidth, someone is doing extra work to make that possible.

wind horizon
#

No need to buy in bulk, they just get a discount when you do. So you can scale up fast for peaks and not worry in most cloud deploys, but with peak bandwidth that peak just messed up your entire cycle bill.

1gb/s for say 10mins vs paying just for the total bandwidth usage.

trail remnant
#

If your loads are highly spiky, or very small, that extra cost is probably worth the overall savings and reduced risks.
If your loads are huge, or overall flat (global companies) then it probably makes sense to skip the middleman and just pay for the bandwidth.

wind horizon
#

Yeah bandwidth is always billed, just how it’s billed varies. Haha

#

Paying your internet bill aka paying your flat rate bandwidth bill. lol

trail remnant
#

The trick is, if you're in the right area, fiber internet is like, 1/100th the cost per Mbps compared with cable.

#

It turns out that the fixed costs of laying physical wires and preparing infrastructure is large compared to the operating costs of slightly better equipment to support huge bandwidth.
So in most cases, it makes sense to buy in bulk, if you will ever need that much bandwidth.

wind horizon
trail remnant
#

Be careful of leaky abstractions.

#

So I've been trying to run the numbers, and it's literally a tiered cost structure. It's like the tax structure.
The first X amount is expensive, the next Y amount is slightly cheaper, then the final Z amount is the budget bulk discount.
Your total cost is (X * xCost) + (Y * yCost) + (Z * zCost)

wind horizon
#

Right that’s common the more you use the cheaper per unit, but that’s diff from true bulk buying where you are tied to projecting your usage and then losing money if you over estimate.

trail remnant
#

But you don't pre-buy. You pay based on measured usage.

wind horizon
#

Right, that’s not bulk buying imo. I’d consider bulk buying like paying for the discounted reserved instances. Where if you use it or not you paid, but you got a discount rate.

trail remnant
#

Ah, your definition of "bulk discount" is different than mine.

wind horizon
#

Paying for usage on a tiered system is just regular billing / usage. Nothing too special / diff, just getting discount for being a big customer.

trail remnant
#

Doesn't that mean that you're getting a discount for the size of your business?

#

Sounds like a discount for bulk orders.

#

Economies of scale and everything.

wind horizon
#

Right but I think a bulk order is something you purchased a large amount in advance, metered after the fact.

So like a reserved instance is cheaper on the cloud, but you are committed to paying for the full usage of it even if you don’t use it. So you can reserve say 70% of your compute at a discount and leave the last 30% to, metered billing to avoid buying too much.

#

Although there is a middle ground I guess…

trail remnant
#

So you're not talking about scale, you're talking about ordering vs billing.

wind horizon
#

You can bulk buy cloud credits often at a discount

#

Not tied to a resource

trail remnant
#

So what do you call discounts for high usage?

wind horizon
#

Discounts

trail remnant
#

Some places charge you more for higher usage, like your power company.

wind horizon
#

Nah my power charges less for more, but yeah I know what you mean.

trail remnant
#

I know some utility companies charge more for higher residential usage, to try and keep demand flat and predictable.

#

But that definitely depends.

wind horizon
#

Yeah I have seen a lot of like weekends and night discount things.

trail remnant
wind horizon
#

I don’t think the scale matters

trail remnant
#

Like, a discount for using power in the evenings is definitely a discount. How much you use isn't what determines the pricing.

wind horizon
#

Since I can burn mass amounts of X and not scale and still get the discount

silk eagle
wind horizon
#

Unless you are saying scale as I’m usage scale, not scale as in scale of the system?

trail remnant
#

Classic programmers. Getting nerd sniped discussing irrelevant details.

#

Especially when the real problem was solved a long time ago.

wind horizon
#

I guess both can be a bulk discount, but I don’t think of it as a bulk discount since that’s then normal pricing schedule. While am upfront large order, bulk, is a special discount for a large order.

The ,entered is more like oh you hit this usage level so this is your price per usage.

trail remnant
#

But like, the "normal" pricing structure has a bulk discount built in.

wind horizon
#

Haha I guess, just with pay per usage and multiple tiers it feels more like a price group more so than discount to me.

But that's probably just my consumer brain being brainwashed by big business to think of discounts as extra special pricing. Haha

trail remnant
#

All pricing is consumer manipulation.

#

If you're pricing things without thinking about how to manipulate the consumer, you're leaving money on the table.

wind horizon
#

Pay per usage - usually scales with usage, only pay for what you use though.

Reserved / pre purchase - usually scales with usage, but with an additional discount. However you have to pay full amount.

trail remnant
#

Now, I don't think that's necessarily the best way to run a business, but it's a true statement.

#

So like, discounts for reserved pricing would be different. A bulk discount would be "reserve X today and get Y% off!" sort of thing.

#

Which companies also do.

wind horizon
#

Yeah before I became a dev I went to college for business. I remeber all the marketing classes we had todo these case studies and discuss stories of companies just simply rebranding products and slapping on premium pricing and it worked made people think the product was now better.

There was tones of cases of companies having 2 lines, a cheap and premium and the product being nearly identical just different branding and price. Lol

trail remnant
#

Yup!

wind horizon
#

Just like running sales, can't remeber what it was called but there was some name they taught us for teaching a consumer to expect sales.

There is this risk if you run sales too often consumers will often wait for a sale, but if you don't run sales often they'll buy full price normally and when you run a sale they'll go nuts.

trail remnant
#

The fundamental principle of economics is "people are rational self-interested actors", until three paragraphs later, when you realize that people are a lot less smart than you give them credit for, and most of economics is trying to figure out how to pull a scam on someone, or trying to ascribe logical systematic structure to irrational and inconsistent humans.

trail remnant
wind horizon
#

This is why product teams at most companies are often a pain imo, they know this and focus on gimmicks and tricking customers and less on innovation.

#

As a dev I want to be creative and innovative, as product they want to drive value. Haha

trail remnant
#

Lots of millennial/tech news covered his business changes, and he got a lot of good press at the time. But guess who didn't go to malls or shop at JC Pennies? The same millennials he was marketing towards.

#

"Engineering" has to work with the "Business". If you don't, you get terrible companies. Give too much power to one side, and your company ends up running into the ground.

wind horizon
trail remnant
#

Apple worked because Steve Jobs was the social/business brains, and Steve Wozniak was the technical brains. Without Woz, Apple never would have worked. Without Steve, Apple nearly ran themselves out of business in the 90s.

wind horizon
trail remnant
#

Microsoft worked because Bill Gates understands technology and business. There were plenty of smarter technology people around that time. But they never went anywhere, while Gates walked away with half the technology industry.

trail remnant
wind horizon
#

I kind of miss working at a startup, everyone was so excited and working on a common goal pushing the product.

trail remnant
#

Ultimately, one of the biggest failings was not understanding the company, the consumers, or consumer retail as well as he thought he did.
The change from constant sale pricing to "fair and square" pricing misunderstood that people aren't rational actors, and when you aren't selling Apple's premium luxury brand, you can't afford to have one constant price that never changes. The final nail in the coffin was trying a national rollout without even testing that his ideas worked for lower class high-competition consumer retail.

wind horizon
#

Ouch

trail remnant
#

This quote summarizes the situation:

Sixteen months after becoming CEO, Johnson was fired by the same board that had hailed him as a savior of the company.

#

It's still not as bad as the single email that killed circuit city, but it got WAY more publicity, so the failure was talked about way more.

wind horizon
#

I think pricing transparency like that only works if your industry is known for being bad actors. For example I knew some used car dealerships and such that blew up, because they didn't negotiate at all they just gave you their pri e straight. Esp younger people seemed to flock to it feeling relieved by easy pricing.

But that worked because that industry is known and viewed badly for those practices.

trail remnant
#

See, younger people buy lots of cars, especially when they have a streamlined selling experience.

#

Younger people don't buy lots of clothing from malls.

#

That's one of the key differences. Malls are mostly populated by teenagers who shop at hip and trendy stores, and middle aged people who either don't care about price and shop at expensive shops, or they care about price, and they mostly shop sales.

wind horizon
#

Right, JC would need a huge campaign probably to even pickup up the yound market before pushing something so radical. Lol

Prob should have tried making a new brand store that target those audiences and limited openings to test it.

trail remnant
#

The new JC Pennies brand wasn't hitting any of those markets well. Trying to create a "Millennial mall experience" is just doomed to fail.

wind horizon
#

But dreaming big and making bold statements is what people praise right now. It's like the Elon effect. 😆

trail remnant
#

Honestly? if you want to make a Millennial mall store, it should be selling baby and young child stuff at reasonable prices. That's what Millennials are shopping for right now. Family raising products.

wind horizon
#

That's true ppl need to remeber millennials are now beyond the youth stage and more so in mid life.

#

I mean I have no kids and such, but like 90% of everyone I grew up with have kids now and doing normal stuff ppl like that do. Haha

#

I don't live in a tech hub and sometimes I think I should move to one, because I don't really do the normal family life haha.

But then I run into all the huge egos and I'm like, hmm maybe not. Lol

trail remnant
#

Yeah, tech hubs tend to propagate ego problems. (See Google)

wind horizon
#

Plus making big tech pay in a none tech city the check goes really fast. I mean I make about 20% less than my counterparts in the bay, but their houses also cost like 500% more. 😅

trail remnant
#

On the topic of badly run companies, I've got some of the last two articles from 2007-2008 that explain the complete management failure of circuit city.
https://www.dailykos.com/stories/2007/3/28/317034/-
https://medium.com/swlh/what-to-learn-from-jc-penneys-failures-f85d13d930dc
Most of the other articles are dead links, but those two paint a pretty good picture. From $30 in stock to $0.10 in just under 2 years. A company demolition speedrun, based on bad management decisions.

Medium

Lessons of a dying company and what’s in store for retail companies

wind horizon
#

I grew up middle of nowhere, by time I moved to a city they had pretty much collapsed already. So I never shopped at one. Lol

trail remnant
#

They fired the highest paid employees, to replace them with lower paid employees.
On the surface, it doesn't seem like that bad of a decision. Until you realize that their sales people were paid based on commissions, so they actually fired the best people making the company the most money.

#

Surprise surprise, when you fire your best employees, they find new jobs quickly, and they don't want to come back to a company that increased CEO pay while firing them.

#

Loyalty work both ways.

wind horizon
#

Firing on pay never works well, need to look at the value they provide vs their pay. Sometimes a high value employee is truly worth giving up 3 lower paid employees to keep. Sucks but just the way it can be.

It can often be the other way though where you need numbers vs talent, esp in retail.

supple hull
#

Playing with Cypress for my first time and it's pretty straight forward

trail remnant
#

Noice

wind horizon
#

At an old company during rough times CEO took like 90% pay cut that year to help keep others on. I was really proud of that, but then I looked up his pay and saw he was making like over $30M. So even at 10% pay he was making several mill, I was like wait you are still making plenty. 😅😅

I mean still cool he'd give up that much money to help keep others on, but it's just less surprising when that still means taking home millions. Lol

wind horizon
#

Integration tests are great, too many places rely on functional tests and mocking everything. One thing goes wrong and all those functional tests suddenly mean nothing even though they "passed" with mocks. 😆

supple hull
wind horizon
#

Code churn is just ew. 😆

supple hull
#

I worked on a massive project, our team was brought into it. Massive react app with 50 devs. It was for car dealerships. They had so many functional tests but they didn't really prove anything other than the tests worked.

trail remnant
#

Churn is the worst

supple hull
#

welcome to working for an agency

wind horizon
#

Yeah functional tests are great for reusable components and you are simply testing if they implement it right it works right. But when you start dealing with APIs and such integration tests are so much nicer, esp when you are trying to run these tests to verify your good to go prod. Functional tests are no good for that.

supple hull
#

Thank god our company was just trying to fill some dev time as the react app was god awful. I tried to pitch them styled-components. Apparently there were sections of the project that did. It was a mess. Inline CSS. Import hell. Busted style guide.

wind horizon
#

Hahaha

supple hull
#

It was the classic throwing more devs at problem to get a product done. Everyone was so defeated at that company.

wind horizon
#

I have a friend that works on an app with styled, scss, and css modules, TS, and Flow. He asked me for help and I was like O.O

It was like they just kept trying new things nwhen they came out. Haha

supple hull
#

The systems they integrated were insane though, they had like a team dedicated to printing. They also had to integrate with these truly old 1970s and early 80s databases that somewhere were still being used at dealerships.

wind horizon
#

Hahaha

supple hull
#

They actually had some greybeard guys who were jesus level database engineers but the systems were not designed to be web interfaced.

#

They had a solid API from what I could tell to print various esoteric forms and stuff.

wind horizon
#

I once was asked to build a new app based on some data from an old app. But they didn't want to make an api, instead they sent me the DB credentials and told me to just read and write to the same DB.... I was like this is a disaster waiting to happen, what happens then they making a breaking change and then blame my code. Haha

wind horizon
#

Uh oh did battle ship kill your msg? Haha

supple hull
#

ha ha, the bot nuked my post for caps

#

Capslock is cruise control for cool lmg warship

silk eagle
#

gotta copy a message before you send it 100% of the time here

wind horizon
#

YOU CAN'T CONTROL ME LTT!!!!

supple hull
#

At first I thought it was like "you can't joke about doing deploys over FTP"

wind horizon
#

Hmm it worked. 🤔

supple hull
#

Weird

#

The filter was triggered by the following:
max caps limit reached (93% total)
"WE DO OUR CODE DEPLOYS ON SFTP. BOB JUST GOT US SSH KEYS"

#

Apparently it has to be long enough?

midnight wind
#

I try to do things the right way and I then see stories of this of mess

wind horizon
#

Haha did it

lament cave
#

I ordered a server that was supposed to have 4tb storage but I guess they provisioned the wrong drives and I end up with 12tb total lol

supple hull
#

I hate it when I get more storage. That's the worst.

wind horizon
#

The funniest part is companies stuck in the old ways of doing things mock people doing it modern ways, meanwhile they take like a day to deploy a new app and fumble all along the way. Lol

lament cave
wind horizon
#

Just check the bill?

lament cave
#

it says normal price but that was initial payment

supple hull
#

oh wow, LMG war ship just gave me a warning for filter evasion

#

All for talking about 💩

trail remnant
#

The filter is busted

#

Doesn't allow LMGTFY

supple hull
#

It's interesting as the few times warship has hit me its been for odd ball ones that aren't loaded.

wind horizon
#

Such an odd thing to ban, I can say shit but not 💩

#

Guessing they use some kind of filter list and just marked cursing as allowed?

supple hull
#

Another user let me know that there's a back story. Some users find certain words very offputting.

#

I guess that's one of them.

wind horizon
#

How long before you think sensor bots start employing ML to determine if phrases sound hostile / hateful and apply censors beyond simple words. 🤔

Sure some places already doing it, but wondering if / when it'll be mainstream.

supple hull
#

I'd assume there's some ML bots doing that already in certain places.

wind horizon
#

I guess probably once the cost of compute and processing needs are low enough that it's not really a cost to analyze every message context. Haha