thread_id
stringlengths 6
6
| question
stringlengths 1
16.3k
| comment
stringlengths 1
6.76k
| upvote_ratio
float64 30
396k
| sub
stringclasses 19
values |
---|---|---|---|---|
uos2rn | I come from Java, where a List<Cat> is a List<? extends Animal>.
I tried reading articles about c++ variance but I got nowhere.
If I have a function
void foo(std::vector<Animal>)
I can't pass a std::vector<Cat> ; I guess my designs are wrong from the start and I usually wriggle out of it but I'd like to know the 'right' way. I understand why it does not work.
So, how can I use foo with a vector<Cat> ? What should I do instead ?
struct Animal{
char* whatever;
};
struct Cat:public Animal{};
void foo(std::vector<Animal>){}
int main(int, char **)
{
std::vector<Cat> v;
foo(v); //<- Nope
} | The good news is that in C++ you avoid storing a Dolphin in an array of Cat, which is possible to attempt in Java (because both are arrays of Animal), I believe with an immediate exception as result.
That's also the bad news, that *a mutable array of `Derived*` is not safely a mutable array of `Base*`*, regardless of language. Because when `Derived` is `Cat` and `Base` is `Animal`, it's unsafe to let a function treat that `Cat` pointers array as an `Animal` pointers array, and store a pointer to `Dolphin` in it. If you could then the `Cat` pointer array owner would be in for a nasty surprise trying to move the dolphin out of the comfy chair.
So, you need to let the function deal with a `const` array-or-vector of `Animal*` (or smart pointer, or `std::reference_wrapper`, whatever). | 50 | cpp_questions |
uosc61 | Hi, I’m a 23f, and I’m really fascinated in the different teachings and values that different generations have and pass down, and which ones they learned from their ancestors that they’ve discarded. What are some life lessons, values, or habits that you believe would help the younger generations now? Even when taking in consideration their unique struggles? | For starters, treat each individual you may encounter in your life with human dignity.
American culture, in case you haven't noticed, is often individualistic. There's this sort of Rambo attitude that it's you against the World.
The reality is, the way things get done is by working together as a team. This is how we improve the quality of our lives. Cooperation requires compromise. | 30 | AskOldPeople |
uosc61 | Hi, I’m a 23f, and I’m really fascinated in the different teachings and values that different generations have and pass down, and which ones they learned from their ancestors that they’ve discarded. What are some life lessons, values, or habits that you believe would help the younger generations now? Even when taking in consideration their unique struggles? | Life lesson: Nothing you are experiencing now is uniquely bad. Some previous generations have had it a bit better. Some have had it much, much worse. The world didn’t end in either case.
Value: self-sufficiency. Ultimately, we are all responsible for our own well-being, and we all have an obligation (to the best of our abilities) not to become a burden on society or on our friends & families.
Habits: when in doubt, keep your mouth shut. There’s no need to say something about everything. | 30 | AskOldPeople |
uosc61 | Hi, I’m a 23f, and I’m really fascinated in the different teachings and values that different generations have and pass down, and which ones they learned from their ancestors that they’ve discarded. What are some life lessons, values, or habits that you believe would help the younger generations now? Even when taking in consideration their unique struggles? | Live within your means. Learn to cook from scratch. Look for free or low cost ways to have fun. Always pay off your credit card. Learn to be handy. Spend time with family and friends. Walk or bike whenever possible. Avoid get-rich-quick schemes. If it sounds too good to be true, it is. | 30 | AskOldPeople |
uoscs7 | Customer inputs their info into a web form and it comes to my email. Can I automate the info to go directly into our customer database?
It is not my program. I did not write any code. Think of me as say, a bank employee. I take the info from my email and input it into a database which my company pays a fee to use. We do not own the software for the database. | There is some code on your website that parses the form, and send it to your e-mail.
That same code can send the same information to the server that hosts your database, and write it there. | 170 | LearnProgramming |
uoscs7 | Customer inputs their info into a web form and it comes to my email. Can I automate the info to go directly into our customer database?
It is not my program. I did not write any code. Think of me as say, a bank employee. I take the info from my email and input it into a database which my company pays a fee to use. We do not own the software for the database. | I think this might be the kind of solution you're looking for: https://automatetheboringstuff.com/chapter18/ | 70 | LearnProgramming |
uoscs7 | Customer inputs their info into a web form and it comes to my email. Can I automate the info to go directly into our customer database?
It is not my program. I did not write any code. Think of me as say, a bank employee. I take the info from my email and input it into a database which my company pays a fee to use. We do not own the software for the database. | I would say. Have something to parse the email and get the informations required.
If the db has a public api, send a post request to the endpoint.
Else, if you have to use a GUI, I think python has pretty good libraries to automate user interactions. You could also look into js automation input library if the gui lives in a browser.
I think it all depends on the type of database you are using! | 30 | LearnProgramming |
uoshxo | Most recent : Amazon on site.
Oldest - fresh out of college for an entry SWE position. The coding exercise was to reverse a string. I knew how to do it, but my mind went blank and I struggled to put together a For loop in Java. I even googled it and looked at a for loop and I still couldn't put it together for 45 minutes! Yes, I made them watch me struggled for 45 minutes. | Reversing a string is easy, until you get an emoji with color modifier 😂 | 440 | CSCareerQuestions |
uoshxo | Most recent : Amazon on site.
Oldest - fresh out of college for an entry SWE position. The coding exercise was to reverse a string. I knew how to do it, but my mind went blank and I struggled to put together a For loop in Java. I even googled it and looked at a for loop and I still couldn't put it together for 45 minutes! Yes, I made them watch me struggled for 45 minutes. | Tanked most of my on-site, came back home and built a very complicated component. 😂. Circle of life for developers? | 240 | CSCareerQuestions |
uoshxo | Most recent : Amazon on site.
Oldest - fresh out of college for an entry SWE position. The coding exercise was to reverse a string. I knew how to do it, but my mind went blank and I struggled to put together a For loop in Java. I even googled it and looked at a for loop and I still couldn't put it together for 45 minutes! Yes, I made them watch me struggled for 45 minutes. | I've participated in technical interviews from the other side at a junior level (not the decision-maker), and I always tell candidates that they are free to use psuedocode or even just plain English like it was a recipe for brownies (the fun kind, of course).
I don't care how well someone can memorize the precise syntax of a given programming language; I just want them to be able to demonstrate the ability to programmatically break down a problem into discrete steps to accomplish their goal.
Technical programming tests that go beyond "can you code your way out of a wet paper sack?" are a waste of everyone's time. The position (any position) is very likely to never involve having to figure out how to implement some in-place sorting algorithm of a n-length array in Big O NlogN or better time or whatever other Leetcode challenge interviewers like to dig up. | 180 | CSCareerQuestions |
uosjpr | I'm leading a team that includes some extremely junior Python developers working in an OO style, myself being a long-time Python user but new to using Python in a team at a larger scale. (My background is mostly JVM languages.) My team has a pervasive issue of writing classes that present poorly designed interfaces to other code. You name the mistake, we've made it: overly specific methods, forcing the calling code to coordinate internal workflow, method and parameter names that reflects the internal implementation of a class rather than its purpose, etc.
Working with our developers, I have noticed that when they create or modify a class, they don't have a clear idea what the public interface for the class even is, so they aren't aware if they're creating a good interface or a bad one, or making it better or worse when they change it.
Are there techniques for structuring or formatting our code that can help foreground the public API of a class and make it more evident and more front-of-mind for junior developers? For example, is it a common practice in Python to tag "private" methods with a leading underscore? This is a habit I picked up a long time ago, but I can't tell how standard it is. Nobody does it at my company, and I've seen it in some open-source libraries but not all of them.
Also, are there documentation tools that help with this? I'm encouraging our developers to use our API docs generated with the pydoc tool, hoping that this makes them more conscious of understandability of the APIs they create, but I have not had much success getting them to even look. Maybe I'm crazy, but I feel like pydoc creates documentation in a style that caters to more experienced, confident, patient readers. My younger programmers look at it and are instantly intimidated and incapacitated. I know it's awful to say, but is there a way to create docs in a style that would feel more familiar and reassuring to them? I'd look for it myself, but I'm too old to even recognize it if I saw it. | > For example, is it a common practice in Python to tag "private" methods with a leading underscore? This is a habit I picked up a long time ago, but I can't tell how standard it is. Nobody does it at my company, and I've seen it in some open-source libraries but not all of them.
Yeah this is standard.
Another thing to do is to write your tests so that they only use the public interface of the classes. That way they'll break when someone inadvertently screws up the API. Try doing TDD: write the tests that use the public interface first, then write the code to make them pass. Refactor as needed. By thinking first from the perspective of the caller, they will have to consider what the public API should be before any code is written.
(You do have a test suite, right?)
You should flag this sort of thing up in code review. Juniors should not be able to directly commit code that breaks APIs, with nobody giving it a spot check.
Consider whether your juniors have impostor syndrome and are afraid of asking questions like this for fear of looking stupid. They might not even have a coherent idea of what an API _is_. You need to mentor them. Maybe try pair programming? Or give a lunchbreak seminar about how to design and maintain an API.
Also, do you even need to [write a class](https://www.youtube.com/watch?v=5ZKvwuZSiyc) in the first place? If you're coming from Java you may be overusing them. | 30 | LearnPython |
uosjpr | I'm leading a team that includes some extremely junior Python developers working in an OO style, myself being a long-time Python user but new to using Python in a team at a larger scale. (My background is mostly JVM languages.) My team has a pervasive issue of writing classes that present poorly designed interfaces to other code. You name the mistake, we've made it: overly specific methods, forcing the calling code to coordinate internal workflow, method and parameter names that reflects the internal implementation of a class rather than its purpose, etc.
Working with our developers, I have noticed that when they create or modify a class, they don't have a clear idea what the public interface for the class even is, so they aren't aware if they're creating a good interface or a bad one, or making it better or worse when they change it.
Are there techniques for structuring or formatting our code that can help foreground the public API of a class and make it more evident and more front-of-mind for junior developers? For example, is it a common practice in Python to tag "private" methods with a leading underscore? This is a habit I picked up a long time ago, but I can't tell how standard it is. Nobody does it at my company, and I've seen it in some open-source libraries but not all of them.
Also, are there documentation tools that help with this? I'm encouraging our developers to use our API docs generated with the pydoc tool, hoping that this makes them more conscious of understandability of the APIs they create, but I have not had much success getting them to even look. Maybe I'm crazy, but I feel like pydoc creates documentation in a style that caters to more experienced, confident, patient readers. My younger programmers look at it and are instantly intimidated and incapacitated. I know it's awful to say, but is there a way to create docs in a style that would feel more familiar and reassuring to them? I'd look for it myself, but I'm too old to even recognize it if I saw it. | It sounds like there may be some kind of organizational issue at play as well here. When the juniors are given tasks, do they have all the information they need? Or are they asked to design features and the requirements shift after the initial implementation? I’d suggest having them create design documents for the components they’re planning on creating prior to writing code. This may force them to consciously think about the end product before writing it. You could also have more in-depth code reviews. Some of the code reviews I’ve learned most from needed to be reworked several times.
For docs, setting up a documentation system is daunting. If there’s a system already in place but they are forgetting the step of documenting once their feature is done, then that should be caught in code review. It’s simple, code that doesn’t get reflected in the docs doesn’t get approved for merge. | 30 | LearnPython |
uosnni | I’ve recently become more interested in science fiction and this series seems as epic as Lord of the Rings. | Few weeks ago, actually. Never realized there were sequels. | 870 | AskAnAmerican |
uosnni | I’ve recently become more interested in science fiction and this series seems as epic as Lord of the Rings. | Yes I’ve read it. I don’t think it’s as good as *Lord or the Rings*: Herbert lacks Tolkien’s commitment to internal consistency. But it’s very good and comes closer to what Tolkien did than most authors do.
Both *Lord of the Rings* and *Dune* have a distinct atmospheric feeling. A place or a thing can remind me of either of those universes without being directly connected to anything from the books. Where Tolkien beats Herbert I think is that he maintains that atmosphere through everything in the Middle Earth setting, while the feel of the first *Dune* book is not really recaptured in the later Frank Herbert *Dune* novels (to say nothing of the Brian Herbert and Kevin J. Anderson sequels which I only started and then abandoned.) | 370 | AskAnAmerican |
uosnni | I’ve recently become more interested in science fiction and this series seems as epic as Lord of the Rings. | Yup! It's one of my favorites, and almost certainly the most influential series in Sci-fi. Not a much as LotR is to fantasy (arguably nothing is), but still a giant of the genre. | 360 | AskAnAmerican |
uosogj | Hello. I was wondering whether the line `e for e in range(1, n+1) if e % 3 == 0 or e % 5 == 0` can be referred to as a "generator comprehension", or would it be something else?
Furthermore, can the line `[first, last] = str_.split()` be referred to as an unpacking? (str_ is a two word string) | 1) Strictly speaking it's called a "generator expression" rather than "comprehension". Why, I don't know.
2) Yes that's unpacking. | 70 | LearnPython |
uospv7 | I remember browsing in 2020 and I had the time of my life. I trolled, I bonded with people and it was all good. Now, suddenly, everyone feels offended all the time and rarely feels the need to post anything in here anymore. So, what the hell happened? | This sub seems flooded with bored people, who have huge imaginations and very specific fetishes. | 100 | AMA |
uospv7 | I remember browsing in 2020 and I had the time of my life. I trolled, I bonded with people and it was all good. Now, suddenly, everyone feels offended all the time and rarely feels the need to post anything in here anymore. So, what the hell happened? | You said you trolled. That's the answer- the trolls are ruining the sub. | 40 | AMA |
uospv7 | I remember browsing in 2020 and I had the time of my life. I trolled, I bonded with people and it was all good. Now, suddenly, everyone feels offended all the time and rarely feels the need to post anything in here anymore. So, what the hell happened? | I breath air , AMA!
This sub has gone to shit...there's a few diamonds in the rough though like the PI's AMA and the guy that can taste music | 40 | AMA |
uosr8e | I have been arrested twice. Still kickin' | I’m Russian and just moved to America. I don’t support the war either | 60 | AMA |
uosr8e | I have been arrested twice. Still kickin' | I have read about hundreds of thousands of Russians using VPNs now. Do you think more Russians are getting western news? Or is that just western optimism?
Do you sense that opinion is shifting on the war? | 40 | AMA |
uosr8e | I have been arrested twice. Still kickin' | Not a question. Just support for you and all the brave people with you. | 30 | AMA |
uot1fy | Productivity seems to be the name of the game, for those that have experimented with their hours of sleep what did you find to be the most ideal?
Is staying up and studying but only sleeping 5 or 6 hours doing more harm than good?
Did you find that studying less but sleeping more boosted your overall information retention and productivity?
For those that have been in the industry for years and years how has your sleeping patterns changed throughout your career? | Cutting sleep to be more "productive" is a false economy, is the politest way I can find to put this. | 2,640 | CSCareerQuestions |
uot1fy | Productivity seems to be the name of the game, for those that have experimented with their hours of sleep what did you find to be the most ideal?
Is staying up and studying but only sleeping 5 or 6 hours doing more harm than good?
Did you find that studying less but sleeping more boosted your overall information retention and productivity?
For those that have been in the industry for years and years how has your sleeping patterns changed throughout your career? | I get way more sleep now that I'm working than I did when I was in school. | 2,290 | CSCareerQuestions |
uot1fy | Productivity seems to be the name of the game, for those that have experimented with their hours of sleep what did you find to be the most ideal?
Is staying up and studying but only sleeping 5 or 6 hours doing more harm than good?
Did you find that studying less but sleeping more boosted your overall information retention and productivity?
For those that have been in the industry for years and years how has your sleeping patterns changed throughout your career? | I find that I feel like a criminal every time I sleep less than 8 hours.
I only ever sleep late when I stubbornly want to stay up for fun.
I am really skeptical that sleeping less hours is a safe experiment. Do you want to guarantee meeting the same health performance as others, or are you willing to bet all your health on squeezing more hours being awake?
You also can't get much done when you are sleepy anyways.
I love sleeping. | 2,200 | CSCareerQuestions |
uot343 | I'm on version 11.6.10.433184565-release-arm64-v8a
Pixel 6 Pro | Still works for me, version 11.7.07.439544614-beta-arm64-v8a on Pixel 5a | 40 | AndroidQuestions |
uot40e | What is something bad you have done with no regrets? [Serious] | Worked as an orthopedic nurse for two years. The orthopedic director (Dr Assfuck) was not only a tyrant, but he also didn’t believe people had any pain after having a total knee replacement. I frequently got orders from him for Tylenol, when patients said they were in agony. I sat beside so many times holding the hands of innocent little old ladies we were in excruciating pain.
I spent so much of my shift calling Dr Assfuck and demanding pain medication for suffering people, only for him to order non narcotic pain relief (ice, walking, massage).
He finally blew a gasket one day, and codified all the things we had to try before contacting the physician for pain relief. The smug prick even codified it into policy.
One day, I arrive for work to find all my co-workers arguing about taking a patient. This wasn’t news, because we had any number of frequent flying Karen’s, who could make your shift awful.
The patient was Dr Assfuck, he had a total knee done. I had a smile as big as the Grinch on Christmas when I volunteered to take him.
On assessment, he rated his pain a 10 on a 0 to 10 scale. I told him his pain couldn’t be that bad, it’s just knee surgery. Didn’t you tell me it doesn’t hurt. Dr Assfuck demanded I get him some IV morphine ot dilaudid. No can do Doc. You’re not the physician on this case, and it’s policy that we try all these other things before I call.
I made him work through the whole list just like everyone else before. At the end of my shift he was crying so hard, he was blowing snot bubbles. I don’t feel bad at all.
After his stay, his orders changed to include pain medication. | 233,670 | AskReddit |
uot40e | What is something bad you have done with no regrets? [Serious] | A drunk driver hit my parked car, left a huge dent in the front driver’s side door, and then drove away. I happened to be looking out the window at the time and saw the whole thing, including his plate number. Cops got there not long after and took my statement. After a couple days and a couple phone calls, I found out nothing was going to come of it because he was the son of the sheriff the next county over.
Fast forward a couple months, I see his car parked behind a local bar within walking distance of my apartment. I got out my hunting knife and sliced all four of his tires, and made a couple trips around it destroying the paint job. Yellow Pontiac Sunfire, and I still remember the goddamn plate number even after almost 20 years. | 167,180 | AskReddit |
uot40e | What is something bad you have done with no regrets? [Serious] | I was a GM for a retailer that was going out of business. During the liquidation I let my employees that worked until the end store product they wanted to buy in a closet I claimed I didn't have a key to. Oh the final days I sold them all the items they requested for 95% off. 70" tvs, ipads, gaming laptops whatever they requested. | 126,640 | AskReddit |
uot680 | My uni organizes a mandatory hackaton (it's required to pass a course on Agile development) and I landed in a group where everyone is a fullstack webdev and I am a meager Android developer. The groups met up only a few days ago and that's when I found I don't fit in and I didn't have the time to prepare (I had a job interview, I think it went okayish but there were so many people applying it should have went great to have any hopes) and the hackaton starts tomorrow.
How can I help the rest of them with working on the app? The Project Owner and Scrum Master roles (it's uni organized so they want us to simulate some agile roles) are filled. I know a bit of Linux and might be able to help with hosting things on Docker containers but I think their IDEs are already capable of creating their own docker images for deployment.
Also, I know Kotlin and they want to use React. I know about Kotlin/JS but haven't used it, and also I have no idea about React. Just throwing it here in case someone has an idea if it's usable in any way.
###edit: on my way to the meeting
###edit2: I'm back
it's okay, I seem to be doing the CI/CD and also frontend webdev, and a guy has declared himself to support me if any need arises | You can write an entire program in psuedocode and then translate it to whatever language you want. Not sure why you think you have to know a specific language to design the software.
You are in a perfect position to do code reviews. If their code is not obvious to someone who is not familiar with the language then they need to name their variables/methods better. Forcing them to explain what their code does often reveals flaws. You will also learn a lot. Go find some code standard documents and share them with the team - enforce those in the reviews. Don't let people write garbage code.
You could extend that to some QA tasks. Write unit tests that break their code. Force them to handle common edge cases. Write some scripts that interact with whatever APIs are being used.
You could be devops - stand up a Jenkins server and have it auto-building commits. (This takes an hour if you know how to do it, maybe a day the first time you do it.) Create a strategy for using Git. Setup a local server or coordinate a github repo.
Do the marketing. Your team could have the best project ever made and get an F due to a shit presentation. Create some powerpoints and documentation for the project. Graphs that show how your project fixes or helps whatever you are solving. Use those to sell the project to your teacher or whoever is judging. I guarantee 95% of the teams will have some garbage demo when presenting. Be part of that 5% that has a plan, documentation, a working demo. Talk about how your project is better quality than the others due to code reviews and testing. Show off your test cases and code coverage. | 3,230 | LearnProgramming |
uot680 | My uni organizes a mandatory hackaton (it's required to pass a course on Agile development) and I landed in a group where everyone is a fullstack webdev and I am a meager Android developer. The groups met up only a few days ago and that's when I found I don't fit in and I didn't have the time to prepare (I had a job interview, I think it went okayish but there were so many people applying it should have went great to have any hopes) and the hackaton starts tomorrow.
How can I help the rest of them with working on the app? The Project Owner and Scrum Master roles (it's uni organized so they want us to simulate some agile roles) are filled. I know a bit of Linux and might be able to help with hosting things on Docker containers but I think their IDEs are already capable of creating their own docker images for deployment.
Also, I know Kotlin and they want to use React. I know about Kotlin/JS but haven't used it, and also I have no idea about React. Just throwing it here in case someone has an idea if it's usable in any way.
###edit: on my way to the meeting
###edit2: I'm back
it's okay, I seem to be doing the CI/CD and also frontend webdev, and a guy has declared himself to support me if any need arises | It's university - none of you are "fullstack webdevs" or "Android developers" or anything else, you're all students and you're all there to learn.
Talk to your group and see where it is you can be helpful, IMO this is a great opportunity to learn about something you don't have a ton of experience with. | 1,500 | LearnProgramming |
uot680 | My uni organizes a mandatory hackaton (it's required to pass a course on Agile development) and I landed in a group where everyone is a fullstack webdev and I am a meager Android developer. The groups met up only a few days ago and that's when I found I don't fit in and I didn't have the time to prepare (I had a job interview, I think it went okayish but there were so many people applying it should have went great to have any hopes) and the hackaton starts tomorrow.
How can I help the rest of them with working on the app? The Project Owner and Scrum Master roles (it's uni organized so they want us to simulate some agile roles) are filled. I know a bit of Linux and might be able to help with hosting things on Docker containers but I think their IDEs are already capable of creating their own docker images for deployment.
Also, I know Kotlin and they want to use React. I know about Kotlin/JS but haven't used it, and also I have no idea about React. Just throwing it here in case someone has an idea if it's usable in any way.
###edit: on my way to the meeting
###edit2: I'm back
it's okay, I seem to be doing the CI/CD and also frontend webdev, and a guy has declared himself to support me if any need arises | "Full stack web dev" is being fetishized here. Your mobile skills should be completely applicable to what they do. You'll be fine. | 550 | LearnProgramming |
uota0f | I was cheated on my by husband. AMA. | How did you find out? | 860 | AMA |
uota0f | I was cheated on my by husband. AMA. | What was his reaction when you confronted him? | 520 | AMA |
uota0f | I was cheated on my by husband. AMA. | Cheating is abusive. Not only emotionally because it holds you hostage in a relationship without the honesty of what the other person did bit also physically because it puts you at risk of STDs. | 510 | AMA |
uotaoz | I just heard an interview with the organisers of the Rugby World Cup 2031,scheduled for the USA... together with comments from the chairman of World Rugby.
They suggest 1 billion dollars revenue,3 million tickets sold all over the US, and sell out stadiums with crowds up to over 100,000 for the biggest matches.
What do you think? Is there this level of interest in the US? The US team is certainly not at a high level now, they may well not even qualify for the next World Cup.
Or will people go to watch anyway, even if the US is not a realistic contender?
Would you pay serious money to go and watch a rugby match? | I highly doubt a rugby match would sell out a football stadium in the US. | 360 | AskAnAmerican |
uotaoz | I just heard an interview with the organisers of the Rugby World Cup 2031,scheduled for the USA... together with comments from the chairman of World Rugby.
They suggest 1 billion dollars revenue,3 million tickets sold all over the US, and sell out stadiums with crowds up to over 100,000 for the biggest matches.
What do you think? Is there this level of interest in the US? The US team is certainly not at a high level now, they may well not even qualify for the next World Cup.
Or will people go to watch anyway, even if the US is not a realistic contender?
Would you pay serious money to go and watch a rugby match? | I would not go see a Rugby match.
I do believe a lot of people will travel from elsewhere to see it though, and with 330,000,000 people in the US finding a few million people who watch Rugby will not be difficult. | 210 | AskAnAmerican |
uotaoz | I just heard an interview with the organisers of the Rugby World Cup 2031,scheduled for the USA... together with comments from the chairman of World Rugby.
They suggest 1 billion dollars revenue,3 million tickets sold all over the US, and sell out stadiums with crowds up to over 100,000 for the biggest matches.
What do you think? Is there this level of interest in the US? The US team is certainly not at a high level now, they may well not even qualify for the next World Cup.
Or will people go to watch anyway, even if the US is not a realistic contender?
Would you pay serious money to go and watch a rugby match? | If they promote it well they might get people going out for the novelty. Especially so if it's done on a comparatively short timescale like the Olympics.
Or it could fail miserably. I don't really know. | 90 | AskAnAmerican |
uotlbw | I am a student who has spent a good amount of time in C#. I also have experience with JavaScript, HTML, MySql, and CSS. What would yall recommend as a another language that would be useful for me to know? | At this point, you would benefit more from working on a long-term project with a language you already know than learning a new language. Once you are familiar enough with a multi-paradigm language like C#, you are unlikely to encounter radically new concepts in other programming languages, so there's not much point in spending time learning syntax of language that won't teach you anything new. | 70 | AskProgramming |
uotovj | What charity can fuck right off and why? | Autism speaks. They treat people horribly, take most of the money to pay themselves, and have a history of advocating bad practices | 33,120 | AskReddit |
uotovj | What charity can fuck right off and why? | Susan G Komen is verifiable garbage | 24,250 | AskReddit |
uotovj | What charity can fuck right off and why? | The American Red Cross.
Let me tell you why. Most of the money you give them goes to exorbitant salaries for their higher ups, as well as other inflated overhead, and very little of it actually ends up doing good. Whenever there is any sort of disaster, they flood the media with appeals for money, but the money stays with them. They only use enough of it to do anything for anyone to keep up appearances. What is it like to deal with the Red Cross at a disaster site? Let me tell you of my experiences with them.
I was a volunteer during a flood, breaking our backs packing and placing sandbags in cold muddy water to divert as much as we could away from a town. The Red Cross showed up, and offered to *sell* us water and sandwiches at 3X the normal price. When the national Guard pulled up a water buffalo, (A drinkable water storage tank on a trailer for those who don't know) the Red Cross threw a fit, and demanded it be removed, it was cutting into their sales. They shouted obscenities at any of us who went to the water buffalo to get a drink, and ordered us to stay away from it, as if they were some sort of authority. They even attempted to threaten the NG commanding officer with criminal charges. (Made no sense to me either). The nonsense only stopped when the NG commander threatened to place them under arrest and physically remove them from the site. We applauded him.
Fast forward to hurricane Michael.
The Red Cross showed up and set up a couple of their mobile sandwich shops, at inflated prices, but this time, also demanded that they be given millions of dollars in relief funds, which had been earmarked for other programs for the victims. They also again tried to declare themselves the local authority, much to the surprise of local law enforcement, the county Emergency Management Office, and FEMA (don't even get me started on FEMA though). When there was some trouble with armed looters, they pulled out and restaged as far from the actual disaster site as they could get while still appearing to be on scene.
They went nowhere near the hardest hit area that actually needed help, there weren't enough news cameras rolling there. They did spend as much time as they could glad-handing politicians on camera, and filming people hunting through the debris for bodies, etc. implying that they were doing the work. They were not, those were local emergency management rescue teams and volunteers. They bypassed a lot of areas that needed help to get to where the cameras were, BTW, driving over 30 miles through the disaster zone to reach them.
They are all about the money, and don't give a damn about the people they are supposed to help. They are also the first to cut and run when there is any risk, or the money stops coming in. The whole thing is just a money making racket and PR front for the elites. | 18,150 | AskReddit |
uotqgq | Also is there a list of job openings for top companies? | Now.
If you are from the future and my comment is super old, the answer instead is: now. | 100 | CSCareerQuestions |
uotqgq | Also is there a list of job openings for top companies? | There isn't a list.
You are going to want to start in the fall.
Go to the pages where they have roles to apply for them as they appear.
Many firms do new college grad generic pool interviews and you become part of a cohort of people rather than having a team specific role along with title | 70 | CSCareerQuestions |
uotqgq | Also is there a list of job openings for top companies? | Fall if you plan on graduating in spring, around the time my school had it's career fair was when I applied and got my job. | 30 | CSCareerQuestions |
uotrgl | Like the idea that matter cannot be destroyed. Why is that considered so factual? As humans we do not know everything. | Theory and scientific theory is a bit different. In scientific theory things are tested, retested, tested by others, etc. If you don't trust it, test it your self. | 890 | ask |
uotrgl | Like the idea that matter cannot be destroyed. Why is that considered so factual? As humans we do not know everything. | Science is based on theories, and once these theories are proven through testing and observation, they are accepted as facts or even laws (e.g. laws of thermodynamics)
Whether or not you believe that aluminum is a solid at room temperature, most people accept this "theory" as fact when they board an airplane. While there may be some corner of a parallel universe where aluminum is like jello, it's not like that here. | 190 | ask |
uotrgl | Like the idea that matter cannot be destroyed. Why is that considered so factual? As humans we do not know everything. | Who else would the theory be from except a human? | 130 | ask |
uotvrd | Atheists, what do you believe in? [Serious] | I believe in a universe that doesn't care, and people that do. | 396,070 | AskReddit |
uotvrd | Atheists, what do you believe in? [Serious] | * There is no plan, no grand design. There is what happens and how we respond to it.
* Justice only exists to the extent we create it. We can't count on supernatural justice to balance the scales in the afterlife, so we need to do the best we can to make it work out in the here and now.
* My life and the life of every other human being is something that was extremely unlikely. That makes it rare, precious, and worth preserving.
* Nothing outside of us assigns meaning to our lives. We have to create meaning for our lives ourselves. | 362,710 | AskReddit |
uotvrd | Atheists, what do you believe in? [Serious] | Realistically, I think nothing happens. We literally experience nothing after death. Same thing that we experience before birth. We don't exist, so it's nothing. I think the tenant that we should follow while living is to try to be happy and healthy while minimizing the damage we do to each other.
What I would LIKE to happen after death is whatever you believe in, exists. I think Christians should get to go to heaven if they truly believe in it, Hindus and Buddhists get reincarnated, and everyone else also gets to experience what they believe they will experience. (I would still experience Nothing.) Maybe it's one of those things where at the moment of death their brain makes them experience what feels like an infinitely long moment in time where they experience their afterlife. I just think it would be neat for everybody. | 230,310 | AskReddit |
uotvsr | So I am making a Minecraft server, that i would control via Discord bot, but I have no idea how to run .jar file and get the output and give input.
I wonder, maybe there is a way to run virtual console in python program or something? I've got no idea. | 4 options:
1 You can spawn a JVM using subprocess.run()
2 You write your code in [Jython](https://www.jython.org/)
3 You ditch Python altogether and write the whole thing in a JVM-bound language. Which is really a generalisation of *2*
4 See if the Minecraft APIs have anything to offer
If you're hoping for ongoing IO from that jar, 1 is probably a non-starter. | 30 | AskProgramming |
uotw5u | This is exactly the kind of thing that reflects the insanity of some job posters:
[Entry Level](https://www.linkedin.com/jobs/view/3059168566) | Even if that were a senior posting, anything that lists that many essential functions is a giant red flag. | 3,230 | CSCareerQuestions |
uotw5u | This is exactly the kind of thing that reflects the insanity of some job posters:
[Entry Level](https://www.linkedin.com/jobs/view/3059168566) | >*Required Knowledge And Skills*
Basic principles of computer science, database technologies and information systems.
Advanced principles, best practices, methods, and techniques used in data engineering, business intelligence, data management, data warehousing concepts, data mapping, data modeling, reporting, analytics, and data science.
Relational database management systems, NoSQL databases and Big Data ecosystem
Data pipelines, stream processing, Supervisory Control And Data Acquisition (SCADA) and Internet of Things (IoT).
Enterprise data catalog, meta-data and master-data concepts and management.
Full-stack DevOps engineering with understanding of compute, network, storage with cost optimized implementations.
DevOps tools like ADO, Git, Jenkins, Dockers etc.
Enterprise application systems related to Finance, Human Resources, Asset Management, Transit Rider Technologies, and other subject areas as needed.
Evaluating business requirements and developing information technology solutions.
Operational characteristics of a variety of computer and network systems, applications, hardware, software, and peripheral equipment, including enterprise business systems.
Various methods of service delivery including agile and waterfall.
Software development life cycle, source code version control systems, release management, change management, and ITIL processes (Incident and Change Management).
Principles, practices, methods, and techniques used in the installation, troubleshooting, and maintenance of software systems and applications.
Quality Assurance techniques and automated testing practices.
Principles and practices of project management.
Pertinent federal, state, and local laws, codes, and regulations.
Designing and implementing Business Intelligence/Analytics platforms using Azure services such as Azure Synapse Analytics, Azure Data Factory, Azure Data Lake to improve and speed up delivery of data services.
Relational Database Management Systems (RDBMS), Microsoft SQL Server, SQL Server Integration Services (SSIS), SQL Server Analysis Services (SSAS), and other relevant technologies.
Message based integration using Kafka and/or Azure Event Hub
Logical and physical data modeling for both OLTP and OLAP.
Reporting technologies including but are not limited to Microsoft SQL Server Reporting Services (SSRS), Microsoft Report Builder, Power BI, Crystal Reports, Business Objects Enterprise, etc.
Working knowledge and advanced skills in Excel as a data source and reporting tool.
Big Data tools like Spark, MapReduce, Hive, Pig, Oozie, etc.
NoSQL solutions like HBase, MongoDB, Cassandra etc.
Programming using C#, Java, Scala, and Python; scripting using PowerShell.
Creating and consuming various data formats such as CSV, XML, JSON, etc. including using of APIs or web services for data acquisition.
Learning new applications, programming languages, development tools, and technologies quickly.
Establishing and maintaining effective working relationships with peers, other department staff, management, vendors, outside agencies, community groups, external business partners and the public.
Effective oral and written communication and the ability to convey technical details to non-technical stakeholders, senior leadership, and executives both in written and verbal form
Working effectively under pressure, meeting tight deadlines, and adjusting to changing priorities
LinkedIn really needs to fix their "experience level" tag. | 1,880 | CSCareerQuestions |
uotw5u | This is exactly the kind of thing that reflects the insanity of some job posters:
[Entry Level](https://www.linkedin.com/jobs/view/3059168566) | > Bachelor’s Degree in computer science, information technology, engineering, or closely related field and five years of experience in information technology in the areas of data engineering, business intelligence and analytics; OR an equivalent combination of education and experience.
CS degree + 5 YOE. Nobody with those qualifications for ANY field would be looking for entry-level positions. | 1,870 | CSCareerQuestions |
uotw8v | Update: Current solution I came up with for overall problem is all the way at the bottom. Original post:
Trying to make `std::pair<const K, V>` members swappable so my tree's `erase()` method can rebalance properly. this is my error:
error: use of deleted function ‘typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) [with _T1 = const int; _T2 = char; typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type = void]’
edit: adding this here below:
I do not know how to do a red black tree `erase()` without moving the node value to a leaf via swapping. The versions I happened to find all involved this technique. The issue is when I expose my `pair` via `iterator`'s `*` and `->` `operators` I need the `key` `const` but when swapping I need the `pair` swappable. So I have to figure out either how to only make it `const` when exposing it or having it `const` and only making it swappable when swapping it. And I have not been able to figure out how to only make it `const` when exposing it. When trying to specify my return values to `std::pair<const K&, V&>` from the `operators` I am unable to figure out how to set my `key` to `const` in the return without setting the `K` and `V` `parameters` in my `Node`'s `pair` to `references` (which crashes my code). Every casting attempt has failed using `static_cast` or `std::as_const` inside `std::make_pair` and I am unaware of any other techniques.
Current iterator operators:
template <typename K, typename V>
auto* RedBlackTree<K, V>::Iterator::operator->() {
return &(p->kvp);
}
template <typename K, typename V>
auto& RedBlackTree<K, V>::Iterator::operator*() {
return p->kvp;
}
Current swapping method:
template <typename K, typename V>
Node<K, V>* RedBlackTree<K, V>::moveToLeaf(Node<K, V>* toBeRemoved) {
Node<K, V>* current = toBeRemoved;
Node<K, V>* replacingWith = nullptr;
auto swapAndMove = [&]() {
std::swap(toBeRemoved->kvp, replacingWith->kvp);
toBeRemoved = moveToLeaf(replacingWith);
};
if (!current->right && !current->left) {
if (toBeRemoved->parent) {
if (toBeRemoved->branch == leftChild)
toBeRemoved->parent->left = nullptr;
else
toBeRemoved->parent->right = nullptr;
}
return toBeRemoved;
} else if (!current->right) {
replacingWith = current->left;
swapAndMove();
} else {
if (!current->right->left) {
replacingWith = current->right;
swapAndMove();
} else {
current = current->right;
while (current->left) current = current->left;
replacingWith = current;
swapAndMove();
}
}
return toBeRemoved;
}
Thanks
My best solution for the moment:
I left the `pair template parameters` as not `const` and swappable and am exposing them with the `key` as `const`. `The operator->` takes about 2 and a half times as long as it should as it allocates a `smart ptr` to make the `key` `const`. However the `operator*` is what is actually used by `<algorithm>` it seems and the `method` for that `operator` works just as fast as it would without manipulation:
template <typename K, typename V>
std::unique_ptr<std::pair<const K&, V&>>
RedBlackTree<K, V>::Iterator::operator->() {
auto constKeyPairPtr = [&](const K& key, V& value) {
return std::make_unique<std::pair<const K&, V&>>(key, value);
};
return constKeyPairPtr(p->kvp.first, p->kvp.second);
}
template <typename K, typename V>
std::pair<const K&, V&> RedBlackTree<K, V>::Iterator::operator*() {
auto constKeyPair = [&](const K& key, V& value) {
return std::pair<const K&, V&>(key, value);
};
return constKeyPair(p->kvp.first, p->kvp.second);
} | > so my tree's balance method can work
Rebalancing should change links, not data. | 110 | cpp_questions |
uotw8v | Update: Current solution I came up with for overall problem is all the way at the bottom. Original post:
Trying to make `std::pair<const K, V>` members swappable so my tree's `erase()` method can rebalance properly. this is my error:
error: use of deleted function ‘typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) [with _T1 = const int; _T2 = char; typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type = void]’
edit: adding this here below:
I do not know how to do a red black tree `erase()` without moving the node value to a leaf via swapping. The versions I happened to find all involved this technique. The issue is when I expose my `pair` via `iterator`'s `*` and `->` `operators` I need the `key` `const` but when swapping I need the `pair` swappable. So I have to figure out either how to only make it `const` when exposing it or having it `const` and only making it swappable when swapping it. And I have not been able to figure out how to only make it `const` when exposing it. When trying to specify my return values to `std::pair<const K&, V&>` from the `operators` I am unable to figure out how to set my `key` to `const` in the return without setting the `K` and `V` `parameters` in my `Node`'s `pair` to `references` (which crashes my code). Every casting attempt has failed using `static_cast` or `std::as_const` inside `std::make_pair` and I am unaware of any other techniques.
Current iterator operators:
template <typename K, typename V>
auto* RedBlackTree<K, V>::Iterator::operator->() {
return &(p->kvp);
}
template <typename K, typename V>
auto& RedBlackTree<K, V>::Iterator::operator*() {
return p->kvp;
}
Current swapping method:
template <typename K, typename V>
Node<K, V>* RedBlackTree<K, V>::moveToLeaf(Node<K, V>* toBeRemoved) {
Node<K, V>* current = toBeRemoved;
Node<K, V>* replacingWith = nullptr;
auto swapAndMove = [&]() {
std::swap(toBeRemoved->kvp, replacingWith->kvp);
toBeRemoved = moveToLeaf(replacingWith);
};
if (!current->right && !current->left) {
if (toBeRemoved->parent) {
if (toBeRemoved->branch == leftChild)
toBeRemoved->parent->left = nullptr;
else
toBeRemoved->parent->right = nullptr;
}
return toBeRemoved;
} else if (!current->right) {
replacingWith = current->left;
swapAndMove();
} else {
if (!current->right->left) {
replacingWith = current->right;
swapAndMove();
} else {
current = current->right;
while (current->left) current = current->left;
replacingWith = current;
swapAndMove();
}
}
return toBeRemoved;
}
Thanks
My best solution for the moment:
I left the `pair template parameters` as not `const` and swappable and am exposing them with the `key` as `const`. `The operator->` takes about 2 and a half times as long as it should as it allocates a `smart ptr` to make the `key` `const`. However the `operator*` is what is actually used by `<algorithm>` it seems and the `method` for that `operator` works just as fast as it would without manipulation:
template <typename K, typename V>
std::unique_ptr<std::pair<const K&, V&>>
RedBlackTree<K, V>::Iterator::operator->() {
auto constKeyPairPtr = [&](const K& key, V& value) {
return std::make_unique<std::pair<const K&, V&>>(key, value);
};
return constKeyPairPtr(p->kvp.first, p->kvp.second);
}
template <typename K, typename V>
std::pair<const K&, V&> RedBlackTree<K, V>::Iterator::operator*() {
auto constKeyPair = [&](const K& key, V& value) {
return std::pair<const K&, V&>(key, value);
};
return constKeyPair(p->kvp.first, p->kvp.second);
} | You fundamentally can't do that unfortunately... A structure that has constant data members won't work with most standard containers/methods... | 40 | cpp_questions |
uou278 | Newbie trying to learn Rust. I have a situation where I would like to pattern match and return a tuple of functions. Right now casting all functions with `as` keyword, but this is incredibly verbose. What is the canonical approach?
let (a, b) = match c {
c1 => (d1 as fn(f) -> g, e1 as fn(f) -> g),
c2 => (d2 as fn(f) -> g, e2 as fn(f) -> g),
...
}
Thanks! | a small improvement would be to annotate the variables/tuple that is being destructured to:
let (a, b): (fn(f) -> g, fn(f) -> g) = ...
([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fe393da0be09a9ad1153a88d45556a28))
but I'm not sure that's the best possible solution | 60 | LearnRust |
uou80g | There's older posts asking this question but I'm assuming a lot has changed in the minimum requirements in 2022.
All the network administrator positions near me have very different skill requirements. Same with the network engineer and networking positions in general. A lot of the positions vary from cyber security, VMware focused, server focused, 'have your own tools', or just vaguely 'be experienced in networking'. All with the same title or pay range.
I have the Comp3ia and CCNA but this probably isn't enough. It'll do me no good to guess what's important and buy random Udemy courses, get unnecessary certs, or build a homelab and do projects that turn out to be irrelevant to the job market. | > There's older posts asking this question but I'm assuming a lot has changed in the minimum requirements in 2022.
Not really.
> All the network administrator positions near me have very different skill requirements.
They probably also have different responsibilities & expectations too.
> I have the Comp3ia and CCNA but this probably isn't enough.
Do you actually understand how networks work?
Do you understand what client devices expect from the network?
-----
The primary expectation is a desire for you to have experience in managing critical systems.
Obviously, you need to understand how networks work. How in-depth that understanding needs to be depends on the role.
But I need to know that you've successfully moved beyond the "Let's try rebooting it..." phase of troubleshooting problems before I can let you login to routers. | 160 | ITCareerQuestions |
uou80g | There's older posts asking this question but I'm assuming a lot has changed in the minimum requirements in 2022.
All the network administrator positions near me have very different skill requirements. Same with the network engineer and networking positions in general. A lot of the positions vary from cyber security, VMware focused, server focused, 'have your own tools', or just vaguely 'be experienced in networking'. All with the same title or pay range.
I have the Comp3ia and CCNA but this probably isn't enough. It'll do me no good to guess what's important and buy random Udemy courses, get unnecessary certs, or build a homelab and do projects that turn out to be irrelevant to the job market. | Find all the networking jobs you can. The more the better.
Use a word cloud generator - [https://www.freewordcloudgenerator.com](https://www.freewordcloudgenerator.com)
Paste all the jobs into the cloud generator.
Generate a cloud. The bigger words are going to be the ones that are used the most in all the network engineer job ads. Learn those keywords and be on your merry way. | 140 | ITCareerQuestions |
uou80g | There's older posts asking this question but I'm assuming a lot has changed in the minimum requirements in 2022.
All the network administrator positions near me have very different skill requirements. Same with the network engineer and networking positions in general. A lot of the positions vary from cyber security, VMware focused, server focused, 'have your own tools', or just vaguely 'be experienced in networking'. All with the same title or pay range.
I have the Comp3ia and CCNA but this probably isn't enough. It'll do me no good to guess what's important and buy random Udemy courses, get unnecessary certs, or build a homelab and do projects that turn out to be irrelevant to the job market. | Cert wise, if you have a CCNA level of understanding you can probably hack it at an entry to mid level networking roles.
Just a matter of interviewing right and actually having the proper problem solving approach that employers are looking for. | 100 | ITCareerQuestions |
uou8ws | I am an entirely self taught developer with absolutely no professional experience or relevant qualifications. I've spent the last few months job searching and have eventually accepted a role at a startup with a salary of £45,000 ($55,000 approx) (fully remote, mid COL). All my offers have been in this range.
Every day though I see recruiters posting on LinkedIn saying they are looking for senior devs with salary between £40-50k. Who on earth are the people applying for these jobs, and why are they doing it?
This is a genuine question - I'm completely new to this industry and genuinely confused. | Usually either people are desperate or Thier in a lcol area with limited employers.
If I was out of work I would take whatever I can get. | 1,570 | CSCareerQuestions |
uou8ws | I am an entirely self taught developer with absolutely no professional experience or relevant qualifications. I've spent the last few months job searching and have eventually accepted a role at a startup with a salary of £45,000 ($55,000 approx) (fully remote, mid COL). All my offers have been in this range.
Every day though I see recruiters posting on LinkedIn saying they are looking for senior devs with salary between £40-50k. Who on earth are the people applying for these jobs, and why are they doing it?
This is a genuine question - I'm completely new to this industry and genuinely confused. | You’d be surprised that a lot of people are sometimes unaware of the big tech salaries.
I had a friend who is an amazing dev and super passionate about programming. When he told me his salary was $80k in California I told him he was underpaid. I showed him levels.fyi and he was shocked.
He’s since more than doubled his TC somewhere else. | 1,140 | CSCareerQuestions |
uou8ws | I am an entirely self taught developer with absolutely no professional experience or relevant qualifications. I've spent the last few months job searching and have eventually accepted a role at a startup with a salary of £45,000 ($55,000 approx) (fully remote, mid COL). All my offers have been in this range.
Every day though I see recruiters posting on LinkedIn saying they are looking for senior devs with salary between £40-50k. Who on earth are the people applying for these jobs, and why are they doing it?
This is a genuine question - I'm completely new to this industry and genuinely confused. | You being in the UK (or really anywhere that is not the US) means lower salaries. The US is the only country that pays crazy money for software engineers.
More detailed explanations in this post: https://www.reddit.com/r/cscareerquestions/comments/61uj1p/why_are_software_engineer_salaries_so_much_lower/ | 540 | CSCareerQuestions |
uouij5 | When did you realize today was Friday the 13? | Right now thanks | 17,820 | AskReddit |
uouij5 | When did you realize today was Friday the 13? | /r/IsTodayFridayThe13th | 3,110 | AskReddit |
uouij5 | When did you realize today was Friday the 13? | January 1st, I usually go through the calendars and note any significant days to keep a bit of a track on. | 2,250 | AskReddit |
uoukdy | I want to create websites for local businesses near me using just HTML and CSS. I’ve been teaching myself these a little over a month and I feel like I’m still only in the knowledge/comprehension level of learning according to Blooms Taxonomy. What are some ways to increase my ability? I want to be able to create sites from scratch asap
So far I’ve completed a lot of freecodecamp and done a couple yputube tutorials where I just follow along and type stuff exactly as they do.
Side question: I’m using notepad++ on windows as my editor, opening the doc with google chrome and just refreshing as it as I go to view the changes. Is this best practice or could I be doing this better?
Thanks, love this community! | >Is this best practice or could I be doing this better?
It's not necessarily bad practice, but it's also not necessarily the most efficient approach either. Personally, I'd use VS Code for the editor and an extension called Live Server to handle previewing (you don't have to refresh, it handles hot reloading for you).
>What are some ways to increase my ability?
Use what you learn. There aren't any real special tips or secret tricks to learn faster. You just have to practice what you learn, instead of just re-typing everything you see in a tutorial. Pause the video, experiment by changing things and see how that affects other things. Learn by doing. Build things that are similar to what the tutorials have you do, but with your own spin.
Programming and markup-language skills are honed by practice. | 140 | LearnProgramming |
uouo3x | Say someone wants to die let's call them Person A, Person A is extremely suicidal and wants to kill himself but he's a Christian and suicide can lead you directly to hell, so he hires one of his friends, let's call him Person B who is an atheist, Person A wants Person B to kill Person A but doesn't want Person B to go to jail, so he signs a contract saying he consents to being killed and even records a video of him saying it. Is it legal or is it illegal?
Edit: Just so we're clear I'm NOT suicidal, I just thought of this in the middle of showering | Consent is irrelevant to murder, and contracts that ask someone to do something illegal are void.
...So nope, you can't be legally killed by signing a contract saying you consent. | 35,010 | NoStupidQuestions |
uouo3x | Say someone wants to die let's call them Person A, Person A is extremely suicidal and wants to kill himself but he's a Christian and suicide can lead you directly to hell, so he hires one of his friends, let's call him Person B who is an atheist, Person A wants Person B to kill Person A but doesn't want Person B to go to jail, so he signs a contract saying he consents to being killed and even records a video of him saying it. Is it legal or is it illegal?
Edit: Just so we're clear I'm NOT suicidal, I just thought of this in the middle of showering | Contracts can't approve of anything that is illegal. Because murder breaks the law, any contract "allowing" murder would be deemed an illegal and unenforceable contract. | 7,110 | NoStupidQuestions |
uouo3x | Say someone wants to die let's call them Person A, Person A is extremely suicidal and wants to kill himself but he's a Christian and suicide can lead you directly to hell, so he hires one of his friends, let's call him Person B who is an atheist, Person A wants Person B to kill Person A but doesn't want Person B to go to jail, so he signs a contract saying he consents to being killed and even records a video of him saying it. Is it legal or is it illegal?
Edit: Just so we're clear I'm NOT suicidal, I just thought of this in the middle of showering | No. Otherwise euthanasia would be legal IN THE U.S.
Edit - to add US. | 2,880 | NoStupidQuestions |
uoustu | Hi all,
I am developing an alarm clock for disabled people using egui; I'm really impressed with the project. It's actually easy to make a web app. Later I'm going to port the gui to run on this native framebuffer, I imagine that won't be too hard.
But one thing I'm wondering is if there's a way to increase the frequency of the render.
Unless I actually click something or mouse my mouse over the area, it seems to call my update function about once per second. This is not frequent enough for me, because
a) there is enough variation that there might be 1.001 seconds between refreshes, which can cause my clock to skip for example from 12:34:55 to 12:34:57
b) we are planning flashing lights/vibration etc when the alarm goes off; I would like to flash the LED for around 300ms at a time.
c) we have a weird way of doing user input, not going to go through egui for this.
I could use a 50Hz refresh rate, or at least something higher than 1Hz. Even better would be if I could somehow decide myself when update() is called. Is this a configuration in egui that I've missed? | https://github.com/emilk/egui/issues/295
Has some workarounds for your problem | 30 | LearnRust |
uouu9v | Consider the following code:
#include <iostream>
#include <thread>
#include <atomic>
using aul = std::atomic_ullong;
aul cntr(0);
void foo(){
using namespace std::chrono_literals;
cntr++;
std::cout << "started thread number " << cntr << std::endl;
std::this_thread::sleep_for(1s);
std::cout << "ended thread number " << cntr << std::endl;
}
int main() {
for(int i=0; i < 3; i++){
std::thread t(foo);
t.join();
}
return 0;
}
The output is:
started thread number 1
ended thread number 1
started thread number 2
ended thread number 2
started thread number 3
ended thread number 3
Why am I not getting concurrency?
I want thread 2 start in the middle of thread 1 sleeping. | >for(int i=0; i < 3; i++){ std::thread t(foo); t.join(); }
The std::thread constructor starts the thread. t.join() waits for the thread to finish. Only after t.join() returns can the next iteration of the loop begin. This code is roughly equivalent to:
std::thread t0(foo);
t0.join();
std::thread t1(foo);
t1.join();
std::thread t2(foo);
t2.join(); | 60 | cpp_questions |
uouu9v | Consider the following code:
#include <iostream>
#include <thread>
#include <atomic>
using aul = std::atomic_ullong;
aul cntr(0);
void foo(){
using namespace std::chrono_literals;
cntr++;
std::cout << "started thread number " << cntr << std::endl;
std::this_thread::sleep_for(1s);
std::cout << "ended thread number " << cntr << std::endl;
}
int main() {
for(int i=0; i < 3; i++){
std::thread t(foo);
t.join();
}
return 0;
}
The output is:
started thread number 1
ended thread number 1
started thread number 2
ended thread number 2
started thread number 3
ended thread number 3
Why am I not getting concurrency?
I want thread 2 start in the middle of thread 1 sleeping. | join means "wait for thread to finish."
So in your loop, you make a thread, then you wait for it to finish, then go to the next iteration of the loop. | 40 | cpp_questions |
uouu9v | Consider the following code:
#include <iostream>
#include <thread>
#include <atomic>
using aul = std::atomic_ullong;
aul cntr(0);
void foo(){
using namespace std::chrono_literals;
cntr++;
std::cout << "started thread number " << cntr << std::endl;
std::this_thread::sleep_for(1s);
std::cout << "ended thread number " << cntr << std::endl;
}
int main() {
for(int i=0; i < 3; i++){
std::thread t(foo);
t.join();
}
return 0;
}
The output is:
started thread number 1
ended thread number 1
started thread number 2
ended thread number 2
started thread number 3
ended thread number 3
Why am I not getting concurrency?
I want thread 2 start in the middle of thread 1 sleeping. | for(int i=0; i < 3; i++){
std::thread t(foo);
t.join(); // <- put this outside
}
e.g.
std::vector<std::thread> thds{};
for(int i=0; i < 3; i++){
thds.emplace_back(std::thread(foo));
}
for(auto& t : thds) {
t.join();
} | 30 | cpp_questions |
uouwf7 | (Long) TLDNR at the bottom.
Background: I had been working a “temp to hire contract” for over 3 years and periodically asked my boss any chance of hiring me in, and he says if it were up to him he would but his boss’s boss won’t approve budget and keeps on saying “maybe in 6 months”. It is a great job but with no room for advancement I have been casually looking, even going to far as telling my contract company to look for other positions (which my current company manager had to sign a release for them to even do) and list a couple of my top companies and tell them to get me an interview if they see a position I fit there. I have had a few 1st interviews late last year though various companies but no second ones, and I had kind of lost motivation to apply and look. The end of last year and the beginning of this year I started getting a bunch cold e-mails and calls from various contract companies which I was in their system, but none from my current contract company.
The start of this year a contract company I worked with years ago sends me an e-mail in the morning on a position that looks great and I call back immediately and find it is with a top company I have wanted to work with and tell them to submit me for an interview. They send me an e-mail asking for me to reply with a “right to represent” (RTR) and I do, and they say I am their top candidate and they will let me know when they schedule an interview. A couple hours later I get an e-mail from my current contract company with the title “I got an interview request for you for…” and I notice the company, title, and job description match verbatim from the other contract company. I call them and tell them that another contract company told me about the same position and I gave them my RTR to submit, but she said she had submitted me early that morning (before I gave the other company the OK) so essentially they had sniped submitting me and if the other company submits me it will bounce back as they only take submittals for a person for a position from one contract company. They said that my earlier (6 months ago) verbal “get me an interview with that company” was my Right to Represent but admits she should have gotten a RTR in writing from me before she submitted and it was her fault that she put it off. She basically told me to call the other company back and cancel my request. I did not know what to do as legally the other company had my RTR, but I felt a kind of loyalty to my current company, plus it would be logistically easier to get the same paycheck, benefits, etc sticking with the same contract company.
So I call the other company back he says he submitted me already and it did bounce back and he had wondered why, then I fill them in on the situation. He is furious - not at me - but at the other company, and goes on a diatribe that what they did was not legal or ethical and that submitting without RTR has been rampant in IT contract space and it makes everyone involved look bad to the hiring company when two different companies submit you for the same position - both contract companies and myself look either unorganized or greedy. I agree with him but try to defend my current company in that I had verbally told them before to get an interview with that company and we debate whether that is really a “R2R” or not. I am truly between a rock and a hard place as I actually agree with his position, and for a minute debate whether to go with him, but somehow made up my mind to stick with my current contract company, not only because it is just easier but now also because they had set up my interview and not sure how cancelling and trying to get this other company to set up interview would look to employer, if I could even get the interview. He begrudgingly agrees to my decision and he is a little peeved at me that he 1/2 convinced me but I still don’t want to go with him - obviously he will loose commission but I honestly believe it is also the principle of it he does not like.
I call the current contract company back and say that I talked to the other company to tell them to cancel my submittal and told them that other rep was understandably upset that that rep did not contact me to get my written RTR for that specific position before submitting me. She apologizes again and says it was not the way she was supposed to do and says it will not happened again; oh and BTW can you sent me a written RTR for the position they already submitted me for. So I send, I do the interview and ace it, and get an offer, and now I got a new position at more than a 33% boost in salary. I still feel bad that I did kind of screw the other company - he did email me a week after I accepted the offer later to see how the interview went but he did also send me another job offer at the same time, showing I had not (yet) burned my bridge with him. I called him to let him know I was offered and accepted the job and he did congratulate me but also he was a little upset, and again I do believe it was a combination of lost commission and the fact that my company did not follow legal/ethical practices of RTR and not only got away with it but profited from it (as his expense). I do forgive my current contract representative but loose trust in her a bit.
**Do you think a verbal agreement counts as a RTR? Would you have went with the same or other company in the same situation? Do you think if I did switch I would have gotten an interview though them?**
TLDNR; I give the OK for one company to submit me for an interview when unbeknownst to either of us my current contractor had already submitted me and got me an interview and snipes them out of commission. Leaves me in a tough spot that I am not sure I made the best decision and loose trust in current contract rep, but at least I got the job. | Honestly you are lucky they still did the interview. A lot of times if two companies submit the same person the company will just throw out the applicant so they don't get in a legal biind over who should get the commission.
Your first company IMO was in the wrong for submitting you without speciifcly being told to. | 30 | ITCareerQuestions |
uouxtc | I've known more about the US since I was 7, when my 2nd oldest friend moved to my country of Australia from Hawaii, and my Year 3 teacher, from Canada, taught us a fair bit of US/Canadian history.
Over the years, I've made online friends from Texas, California, Washington state, Florida, Georgia, Virginia, Oklahoma, Minnesota, New Jersey, Michigan, and North Carolina to name others, but I've still never seen any of the US in person.
So, give me the full rundown! | Indiana
Good: Being a major shipping means I always get packages on time if not early
Bad: Gary Indiana
Ugly: Also Gary Indiana | 1,650 | AskAnAmerican |
uouxtc | I've known more about the US since I was 7, when my 2nd oldest friend moved to my country of Australia from Hawaii, and my Year 3 teacher, from Canada, taught us a fair bit of US/Canadian history.
Over the years, I've made online friends from Texas, California, Washington state, Florida, Georgia, Virginia, Oklahoma, Minnesota, New Jersey, Michigan, and North Carolina to name others, but I've still never seen any of the US in person.
So, give me the full rundown! | Pennsylvania -
Good: Lots of interesting historical sites, large areas of protected forests/natural areas
Bad: High gasoline taxes, lots of rundown cities and towns due to loss of industry
Ugly: Turnpike tolls and awful road/bridge maintenance | 1,250 | AskAnAmerican |
uouxtc | I've known more about the US since I was 7, when my 2nd oldest friend moved to my country of Australia from Hawaii, and my Year 3 teacher, from Canada, taught us a fair bit of US/Canadian history.
Over the years, I've made online friends from Texas, California, Washington state, Florida, Georgia, Virginia, Oklahoma, Minnesota, New Jersey, Michigan, and North Carolina to name others, but I've still never seen any of the US in person.
So, give me the full rundown! | Minnesota
Good - great standard of living, good health care, lake/cabin life
Bad - high taxes
Ugly - the cold weather will actively try to kill you for 5-6 months a year | 1,070 | AskAnAmerican |
uouy4e | I'm currently working a job that I don't like very much so id jump on any decent SWE opportunity. I have a technical interview with a company next week which I believe should be the last one and I have another technical interview with another company in a few weeks.
I already told this first company that I've been interviewing other companies so I'm worried that if they make me an offer, they'll ask me about my other interviews. I don't want to tell them that I have another interview lined up because I'm worried they're gonna think that I'll take this first offer then leave if I get the other job (which I probably would).
What have other folks done in similar situations to this? Just accept the offer, say you don't have anything else lined up, and then shamelessly quit in a few weeks if other companies give you offers? | It’s extremely common to have multiple interviews and multiple offers. The best thing for you to do is be completely forthcoming about it and your current status with every prospective employer, as it just makes things more competitive and beneficial for you.
Imagine a few scenarios:
“Hey Company B, company A just sent me a formal offer, but I’d like to take every option into account before making a decision. Is there any chance we can accelerate your process and get me to the next step sooner?”
“Sure! Normally we do a call with HR first, but let’s just skip that and get you on with the hiring manager tomorrow.”
“Hey Company A, I’m glad to hear you want to extend an offer. Full disclosure, I am interviewing with Company B and/or expecting an offer from them as well, so I will need some time to weigh my options.”
“What if we made our offer more competitive and gave you an extra 9999999 millionty dollars. Would you sign right now?”
Worst case in each of these scenarios is that a company who wasn’t interested just says “no” quicker and it drives you to your end game faster. | 280 | CSCareerQuestions |
uouy4e | I'm currently working a job that I don't like very much so id jump on any decent SWE opportunity. I have a technical interview with a company next week which I believe should be the last one and I have another technical interview with another company in a few weeks.
I already told this first company that I've been interviewing other companies so I'm worried that if they make me an offer, they'll ask me about my other interviews. I don't want to tell them that I have another interview lined up because I'm worried they're gonna think that I'll take this first offer then leave if I get the other job (which I probably would).
What have other folks done in similar situations to this? Just accept the offer, say you don't have anything else lined up, and then shamelessly quit in a few weeks if other companies give you offers? | You determine whether you want that job or not, if you do, great. If you don't, then you'll move on.
> they'll ask me about my other interviews
They will most likely give you a deadline to provide an answer rather than asking.
> Just accept the offer, say you don't have anything else lined up, and then shamelessly quit in a few weeks if other companies give you offers?
Nope. I give a heads up to companies I'm currently pretty far in the process with (once I have a concrete offer that I'm interested in). If they counter I get choices, if they don't that's cool as well. | 160 | CSCareerQuestions |
uouy4e | I'm currently working a job that I don't like very much so id jump on any decent SWE opportunity. I have a technical interview with a company next week which I believe should be the last one and I have another technical interview with another company in a few weeks.
I already told this first company that I've been interviewing other companies so I'm worried that if they make me an offer, they'll ask me about my other interviews. I don't want to tell them that I have another interview lined up because I'm worried they're gonna think that I'll take this first offer then leave if I get the other job (which I probably would).
What have other folks done in similar situations to this? Just accept the offer, say you don't have anything else lined up, and then shamelessly quit in a few weeks if other companies give you offers? | Hey! Great question. It’s important to NOT just take jobs and quit a few weeks later for other offers. You can get away with it a couple of times in your career, but as big as tech is, it can still be small enough to run into the same folks sometimes.
The way to handle this is like others have said. You get an offer from company A, email company B and say something like:
Hey I’ve received an offer from a company I’ve been speaking with. I have to say that I’m incredibly excited about the opportunity at [company B].
I know there’s a process to go through, but if there’s any way we could speed up that process so I can give company A an answer, I’d really appreciate it.
Most of the time, they’ll try and speed up the offer. With company A, you get the offer and tell them you’ll need a few days to consider it. Then negotiate a little to get some more time and when they give you your “final offer” you can pull the whole, can I have a couple of days to think again.
If you’re at the VERY beginning stages of company B, this won’t work, so you may have to just do the job hop if you’re super stoked about B but desperate for A. And that’s okay! Just try not to do it too frequently! | 50 | CSCareerQuestions |
uov41w | Other than butter, what do you put on your popcorn? | Old bay seasoning. Will change your life. | 540 | AskAnAmerican |
uov41w | Other than butter, what do you put on your popcorn? | Salt and parmesan cheese. | 450 | AskAnAmerican |
uov41w | Other than butter, what do you put on your popcorn? | I like adding white cheddar cheese (powder?) from the shakers, both at home and at the movies. | 330 | AskAnAmerican |
uov59f | I have germaphobia AMA | Why do you hate German people so much ? Let them drink their beer for gad sake | 40 | AMA |
uov6zc | In your experience, what city/town had the friendliest people? | Can't speak for anywhere except the US, but I have lived in most parts except the most northern.
I'd say Texas, by far. Friendly, but not nosy.
Most of the south as well, except Florida.
New Jersey is the worst. I call it the armpit of America. | 120 | AskOldPeople |
uov6zc | In your experience, what city/town had the friendliest people? | New Yorkers are kind, not friendly. Californians are friendly, not kind. | 120 | AskOldPeople |
uov6zc | In your experience, what city/town had the friendliest people? | Adare Ireland. Met some of the nicest most welcoming people. Willing to chat, curious, just fantastic all around. | 70 | AskOldPeople |
uovbji | I have joined a startup and they want me to tell them what machine I want to use for coding on. I have only worked for large companies where the PC you use is the one you get and that is the end of it.
I am not an expert in Linux although I can use it, I have not really ever used a Mac. Our product is a SASS system which uses mainly C++ but we are converting bits to Python and other more modern languages.
Is there a standard PC setup I should ask for?
A lot of people seem to use Macs but are they actually better or are they just well marketed?
Is there a business style Linux distribution which people use that does not require advanced knowledge of the command line? | Well...what platforms are they building on? Which of those will you be required to work on? What are other members of the team using? The answer to those three would influence my decision of what would be the lowest-friction choice.
> Is there a standard PC setup I should ask for?
Some Lenovo or Dell workstation, or a Macbook Pro, I suppose. There's no single standard, but a lot of developers end up developers have a strong personal preference for brand and/or OS.
> A lot of people seem to use Macs but are they actually better or are they just well marketed?
They're nice hardware and a solid OS.
> Is there a business style Linux distribution which people use that does not require advanced knowledge of the command line?
If others on the team are using Linux, I'd focus on what they're using. Otherwise: I like Fedora. Ubuntu and its derivatives are still common. | 40 | AskProgramming |
uovim0 | At where I am at the store I shop, it’s $3.58 for a dozen of store brand and before Easter it was $2.5 or $2.8 I forgot. I heard there’s massive kill of chickens due to Birdflu. | Pre-Biden: Mike Pence laid eggs on my doorstep for free
Post-Biden: one egg is 18 MILLION DOLLARS | 220 | AskAnAmerican |
uovim0 | At where I am at the store I shop, it’s $3.58 for a dozen of store brand and before Easter it was $2.5 or $2.8 I forgot. I heard there’s massive kill of chickens due to Birdflu. | $2.99
Before the avian flu outbreak this week they were $2.19-ish. | 90 | AskAnAmerican |
uovim0 | At where I am at the store I shop, it’s $3.58 for a dozen of store brand and before Easter it was $2.5 or $2.8 I forgot. I heard there’s massive kill of chickens due to Birdflu. | Before store brand eggs were 1.78 at Walmart
Now their store brand is 2.77
Eggland’s Best is 2.66
I’m sure they will be raising the prices of EB as soon as I’ve gotten used to buying them | 60 | AskAnAmerican |
uovpb0 | How central was Homeric literature to Classical Greek life? Was the reverence for Homeric poems comparable or wholly different to that of Abrahamic books and religions? | Besides of course Homer's references that can be found in later works and commentaries, there's one interesting Solon's law, possibly of early 6th c. BCE, but survived by Diogenis Laertius \[1.57\].
According to it, the reciter of Homer's epic poems, who was substituting the previous one, should continue the recitation from the point where the last one stopped. Probably to avoid repetitions, as the poems were long, while the law was setting \[or considering as precondition\] the substitution of the reciters, that would keep the quality of the recitations high \[\*there's some debate on the translation of a term\]. But I think that it's also indicating that Homer's epics had a central part in Athens's entertainment and they should be considered frequent, as a law was needed to regulate these.
There's also, on the opposite aspect, a story told by Herodotus \[5.67\], where Cleisthenes the tyrant of Sicyon of the early 6th c. BCE forbade the recitation contests of the Homer's epics, cause they were praising the city of Argos, against which Cleisthenes was fighting at the time. Again I think that it's signifying some importance, mentioning also the contests; for the age of Herodotus, too, as the story was reproduced then.
Of course both incidents took place before the classical era, but Solon's laws and the contests, I think, survived for some time. | 30 | AskHistorians |
uovq85 | What is song what feels most you? | Musik | 120 | AskAnAmerican |
uovq85 | What is song what feels most you? | My shits fucked up | 90 | AskAnAmerican |
uovq85 | What is song what feels most you? | [This one](https://youtu.be/gy5-EQ7Ae_0)
The soft, breezy vibe, punctuated by the most *perfect* guitar solo ever laid down. I wish my whole aura to be like this song. | 50 | AskAnAmerican |
uovs3i | Religious people, how do you view atheism/atheists? [Serious] | Like normal people | 11,930 | AskReddit |
uovs3i | Religious people, how do you view atheism/atheists? [Serious] | One of my good friends is an atheist, and he's a stand up guy. We talk about religion from time to time, and it never gets heated or insulting. He is interested in learning from my perspective, even if he doesn't believe the same things. I've met several people like this, and I hope it's the norm for atheists.
I've also met several religious people who act like anything but. They are narcisistic, racist, ignorant, and hateful.
It saddens me to see a atheists on reddit who loudly proclaim that religion is a cancer on the world and that anybody who follows one is an idiot. To me, these atheists are acting exactly like the religious people they claim to hate: narcissistic, ignorant, and hateful.
Religion, or lack of, is what you choose to clothe yourself in. If you're a bad person, it doesn't matter how you're dressed, you're still going to be a jerk. | 10,750 | AskReddit |
uovs3i | Religious people, how do you view atheism/atheists? [Serious] | The same as everyone else, just regular people. They have their beliefs and I have mine, doesn’t mean we can’t happily coexist or that one opinion is more valid than the other. | 2,380 | AskReddit |
Subsets and Splits